Commit 2e727587 authored by Muhammadali's avatar Muhammadali

update-

parent a61ab349
{
"name": "boxdialer",
"version": "3.1.6",
"version": "3.1.7",
"description": "",
"main": "src/boxDialer.js",
"scripts": {
......
......@@ -562,38 +562,68 @@ export class BoxDialer {
});
}
holdButtonClick() {
console.log(
`this_callEvetsBoxDialer_callHold: `,
this.callEvetsBoxDialer.callHold,
);
// 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,
};
}
// console.log(
// `this_callEvetsBoxDialer_callHold: `,
// this.callEvetsBoxDialer.callHold,
// );
// // 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;
this.onSipStateChange.setCallEvents(this.callEvetsBoxDialer);
// this.oSipSessionCall.bHeld = this.callHold;
// this.onSipStateChange.setCallEvents(this.callEvetsBoxDialer);
this.callBxMethods({
bxMethodName: 'CallCardSetHold',
bxFuncParams: { held: this.oSipSessionCall.bHeld },
// bxFuncParams: { held: false },
callback: (e) => {
console.log(e, `CallCardSetUiState method done ${e}`);
},
});
// this.callBxMethods({
// 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({
bxMethodName: 'CallCardSetUiState',
bxFuncParams: { muted: false },
callback: (e) => {
console.log(e, `CallCardSetUiState method done ${e}`);
},
});
}
}
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