Commit dfe5a541 authored by Muhammadali's avatar Muhammadali

update-

parent eae50bcc
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "4.6.1", "version": "4.6.2",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
......
...@@ -342,8 +342,16 @@ export class BoxDialer { ...@@ -342,8 +342,16 @@ export class BoxDialer {
uri: `sip:${number}@${wsurl}`, uri: `sip:${number}@${wsurl}`,
password: secret, password: secret,
stun_server: 'stun:stun.l.google.com:19302', stun_server: 'stun:stun.l.google.com:19302',
register_expires: 60,
}); });
window.localStorage.setItem(
BX.bitrix_sessid() + '_mycall',
this.ua.configuration.instance_id,
);
window.localStorage.setItem(
'mycall',
this.ua.configuration.instance_id,
);
this.ua.on('connected', (e) => { this.ua.on('connected', (e) => {
console.log( console.log(
'%c sip_register [connected]: ', '%c sip_register [connected]: ',
......
...@@ -64,7 +64,15 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => { ...@@ -64,7 +64,15 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
setInnerCallerModal, setInnerCallerModal,
'innerCallerModal', 'innerCallerModal',
); );
boxDialer.sipRegister(wsphonedata);
if (
window.localStorage.getItem(BX.bitrix_sessid() + '_mycall') &&
window.localStorage.getItem('mycall')
) {
console.log('UA is running!');
} else {
boxDialer.sipRegister(wsphonedata);
}
} }
}, []); }, []);
...@@ -133,7 +141,7 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => { ...@@ -133,7 +141,7 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
return ( return (
<> <>
{selectWidjetType(wsphonedata.variant)} {selectWidjetType(wsphonedata.variant)}
<ModalPhoneNumpad <ModalPhoneNumpad
modalState={modalState} modalState={modalState}
phoneModal={phoneModal} phoneModal={phoneModal}
......
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