Commit 2e727587 authored by Muhammadali's avatar Muhammadali

update-

parent a61ab349
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "3.1.6", "version": "3.1.7",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
......
...@@ -562,38 +562,68 @@ export class BoxDialer { ...@@ -562,38 +562,68 @@ export class BoxDialer {
}); });
} }
holdButtonClick() { holdButtonClick() {
console.log( // console.log(
`this_callEvetsBoxDialer_callHold: `, // `this_callEvetsBoxDialer_callHold: `,
this.callEvetsBoxDialer.callHold, // this.callEvetsBoxDialer.callHold,
); // );
// BX24.placement.call('CallCardSetHold', { held: true }, () => { // // BX24.placement.call('CallCardSetHold', { held: true }, () => {
// }); // // });
if (this.callEvetsBoxDialer.callHold) { // if (this.callEvetsBoxDialer.callHold) {
this.oSipSessionCall.resume(); // this.oSipSessionCall.resume();
this.callEvetsBoxDialer = { // this.callEvetsBoxDialer = {
...this.callEvetsBoxDialer, // ...this.callEvetsBoxDialer,
callHold: false, // callHold: false,
}; // };
} else { // } else {
this.oSipSessionCall.hold(); // this.oSipSessionCall.hold();
this.callEvetsBoxDialer = { // this.callEvetsBoxDialer = {
...this.callEvetsBoxDialer, // ...this.callEvetsBoxDialer,
callHold: true, // callHold: true,
}; // };
} // }
this.oSipSessionCall.bHeld = this.callHold; // this.oSipSessionCall.bHeld = this.callHold;
this.onSipStateChange.setCallEvents(this.callEvetsBoxDialer); // this.onSipStateChange.setCallEvents(this.callEvetsBoxDialer);
this.callBxMethods({ // this.callBxMethods({
bxMethodName: 'CallCardSetHold', // bxMethodName: 'CallCardSetHold',
bxFuncParams: { held: this.oSipSessionCall.bHeld }, // bxFuncParams: { held: this.oSipSessionCall.bHeld },
// bxFuncParams: { held: false }, // // bxFuncParams: { held: false },
callback: (e) => { // callback: (e) => {
console.log(e, `CallCardSetUiState method done ${e}`); // console.log(e, `CallCardSetUiState method done ${e}`);
}, // },
}); // });
if (this.oSipSessionCall && this.oSipSessionCall.bHeld === false) {
this.oSipSessionCall.hold({
events_listener: {
events: '*',
listener: (event) => this.onSessionEvent({ type: 'hold', event }),
},
});
this.callBxMethods({
bxMethodName: 'CallCardSetUiState',
bxFuncParams: { muted: true },
callback: (e) => {
console.log(e, `CallCardSetUiState method done ${e}`);
},
});
} else if (this.oSipSessionCall && this.oSipSessionCall.bHeld === true) {
this.oSipSessionCall.resume({
events_listener: {
events: '*',
listener: (event) => this.onSessionEvent({ type: 'resume', event }),
},
});
this.callBxMethods({
bxMethodName: 'CallCardSetUiState',
bxFuncParams: { muted: false },
callback: (e) => {
console.log(e, `CallCardSetUiState method done ${e}`);
},
});
}
} }
closeButtonClick() { closeButtonClick() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment