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,39 +562,69 @@ export class BoxDialer { ...@@ -562,39 +562,69 @@ 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) {
// this.oSipSessionCall.resume();
// this.callEvetsBoxDialer = {
// ...this.callEvetsBoxDialer,
// callHold: false,
// };
// } else {
// this.oSipSessionCall.hold();
// this.callEvetsBoxDialer = {
// ...this.callEvetsBoxDialer,
// callHold: true,
// };
// }
// }); // this.oSipSessionCall.bHeld = this.callHold;
if (this.callEvetsBoxDialer.callHold) { // this.onSipStateChange.setCallEvents(this.callEvetsBoxDialer);
this.oSipSessionCall.resume();
this.callEvetsBoxDialer = {
...this.callEvetsBoxDialer,
callHold: false,
};
} else {
this.oSipSessionCall.hold();
this.callEvetsBoxDialer = {
...this.callEvetsBoxDialer,
callHold: true,
};
}
this.oSipSessionCall.bHeld = this.callHold; // this.callBxMethods({
this.onSipStateChange.setCallEvents(this.callEvetsBoxDialer); // bxMethodName: 'CallCardSetHold',
// bxFuncParams: { held: this.oSipSessionCall.bHeld },
// // bxFuncParams: { held: false },
// callback: (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({ this.callBxMethods({
bxMethodName: 'CallCardSetHold', bxMethodName: 'CallCardSetUiState',
bxFuncParams: { held: this.oSipSessionCall.bHeld }, bxFuncParams: { muted: false },
// bxFuncParams: { held: false },
callback: (e) => { callback: (e) => {
console.log(e, `CallCardSetUiState method done ${e}`); console.log(e, `CallCardSetUiState method done ${e}`);
}, },
}); });
} }
}
closeButtonClick() { closeButtonClick() {
console.log('closeButtonClick'); console.log('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