Commit dfe5a541 authored by Muhammadali's avatar Muhammadali

update-

parent eae50bcc
{
"name": "boxdialer",
"version": "4.6.1",
"version": "4.6.2",
"description": "",
"main": "src/boxDialer.js",
"scripts": {
......
......@@ -342,8 +342,16 @@ export class BoxDialer {
uri: `sip:${number}@${wsurl}`,
password: secret,
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) => {
console.log(
'%c sip_register [connected]: ',
......
......@@ -64,8 +64,16 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
setInnerCallerModal,
'innerCallerModal',
);
if (
window.localStorage.getItem(BX.bitrix_sessid() + '_mycall') &&
window.localStorage.getItem('mycall')
) {
console.log('UA is running!');
} else {
boxDialer.sipRegister(wsphonedata);
}
}
}, []);
const hangupButton = () => {
......
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