Commit 1a6852de authored by Muhammadali's avatar Muhammadali

update verison: 0.7.9

parent 8d1b245d
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "0.7.8", "version": "0.7.9",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
......
...@@ -146,7 +146,7 @@ const WidjetButton = ({ data, onSetDnd, position }) => { ...@@ -146,7 +146,7 @@ const WidjetButton = ({ data, onSetDnd, position }) => {
}, [handleKeyUp]); }, [handleKeyUp]);
const hangupButton = () => { const hangupButton = () => {
boxDialer.stopCall(); boxDialer.hangupButtonClick();
}; };
const callButton = () => { const callButton = () => {
......
...@@ -440,28 +440,9 @@ export class BoxDialer { ...@@ -440,28 +440,9 @@ export class BoxDialer {
}); });
} }
} }
stopCall() {
console.log('stopCall');
this.onSoundType({ type: 'ring', bool: false });
this.onSipStateChange.modalState({
bool: false,
callType: 'answered',
callAnswerType: 'oncoming',
callFromName: null,
});
if (this.oSipSessionCall) {
this.oSipSessionCall.hangup({
events_listener: {
events: '*',
listener: (event) => this.onSessionEvent({ type: 'hangup', event }),
},
});
}
}
skipButtonClick() { skipButtonClick() {
this.onSoundType({ type: 'ring', bool: false }); this.onSoundType({ type: 'ring', bool: false });
this.stopCall(); this.hangupButtonClick();
} }
answerButtonClick() { answerButtonClick() {
...@@ -531,11 +512,25 @@ export class BoxDialer { ...@@ -531,11 +512,25 @@ export class BoxDialer {
closeButtonClick() { closeButtonClick() {
console.log('closeButtonClick'); console.log('closeButtonClick');
this.stopCall(); this.hangupButtonClick();
} }
hangupButtonClick() { hangupButtonClick() {
this.stopCall();
console.log('hangupButtonClick'); console.log('hangupButtonClick');
this.onSoundType({ type: 'ring', bool: false });
this.onSipStateChange.modalState({
bool: false,
callType: 'answered',
callAnswerType: 'oncoming',
callFromName: null,
});
if (this.oSipSessionCall) {
this.oSipSessionCall.hangup({
events_listener: {
events: '*',
listener: (event) => this.onSessionEvent({ type: 'hangup', event }),
},
});
}
} }
transferButtonClick(number) { transferButtonClick(number) {
......
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