Commit 63f2675b authored by Muhammadali's avatar Muhammadali

update-

parent bcafa22e
{
"name": "boxdialer",
"version": "3.3.4",
"version": "3.3.7",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "boxdialer",
"version": "3.3.4",
"version": "3.3.7",
"license": "ISC",
"dependencies": {
"@emotion/react": "^11.11.1",
......@@ -17,7 +17,6 @@
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.5",
"date-fns": "^2.30.0",
"ecmascript-webrtc-sipml": "git+https://git.4u.uz/kulya/ecmascript-webrtc-sipml.git",
"i": "^0.3.7",
"jssip": "^3.10.0",
"npm": "^10.1.0",
......@@ -4016,11 +4015,6 @@
"tslib": "^2.0.3"
}
},
"node_modules/ecmascript-webrtc-sipml": {
"version": "1.0.13",
"resolved": "git+https://git.4u.uz/kulya/ecmascript-webrtc-sipml.git#73f2d59232c3a817d63f00aab65b042bc05baea2",
"license": "ISC"
},
"node_modules/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
......
{
"name": "boxdialer",
"version": "3.3.7",
"version": "3.3.8",
"description": "",
"main": "src/boxDialer.js",
"scripts": {
......@@ -20,7 +20,6 @@
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.5",
"date-fns": "^2.30.0",
"ecmascript-webrtc-sipml": "git+https://git.4u.uz/kulya/ecmascript-webrtc-sipml.git",
"i": "^0.3.7",
"jssip": "^3.10.0",
"npm": "^10.1.0",
......
/** @format */
// import SIPml from 'ecmascript-webrtc-sipml';
import { toast } from 'react-hot-toast';
import outcomingringTone from '../sounds/ringtone.wav';
import waitRingTone from '../sounds/ringbacktone.wav';
......@@ -107,6 +106,7 @@ export class BoxDialer {
},
confirmed: (e) => {
this.setGuiPhoneState({
stateCode: 'connected',
funcName: 'modalState',
funcParam: {
bool: true,
......@@ -114,16 +114,6 @@ export class BoxDialer {
callFromName: 'Test',
},
});
// ===============
// this.setGuiPhoneState({
// funcName: 'modalState',
// funcParam: {
// bool: true,
// callType: 'answered',
// callAnswerType: 'oncoming',
// },
// });
},
};
}
......@@ -146,12 +136,7 @@ export class BoxDialer {
body: 'Answer Call',
icon: tugpng,
});
// navigate to the https://www.javascripttutorial.net/ on click
greeting.addEventListener('click', cbk);
// greeting.addEventListener('click', function(){
// window.open('https://www.javascripttutorial.net/web-apis/javascript-notification/');
// });
}
onSoundType({ type, bool }) {
......@@ -259,6 +244,7 @@ export class BoxDialer {
console.log('--=== newRTCSession', this.callSession);
this.setGuiPhoneState({
funcName: 'modalState',
stateCode: 'incoming',
funcParam: {
bool: true,
callType: 'connected',
......@@ -279,8 +265,6 @@ export class BoxDialer {
// incoming call here
this.callSession.on('accepted', () => {
// the call has answered
console.log('incoming accepted');
this.onSoundType({ type: 'ring', bool: false });
this.setGuiPhoneState({
funcName: 'modalState',
......@@ -324,14 +308,6 @@ export class BoxDialer {
},
});
});
// this.callSession.on('addstream', (e) => {
// // set remote audio stream (to listen to remote audio)
// // remoteAudio is <audio> element on page
// console.log('incoming addstream');
// this.remoteAudio.src = window.URL.createObjectURL(e.stream);
// this.remoteAudio.play();
// });
this.callSession.on('peerconnection', (e) => {
console.log('peerconnection: ', e);
});
......@@ -401,12 +377,6 @@ export class BoxDialer {
console.log('peerconnection: setremotedescriptionfailed: ', e);
},
);
// Answer call
// session.answer(callOptions);
// Reject call (or hang up it)
// session.terminate();
}
});
......@@ -420,7 +390,33 @@ export class BoxDialer {
getBxUiState(sipState) {
console.log('this_callDirection: ', this.callDirection);
let arcodes = {
// let arcodes = {
// incoming: 1,
// transferIncoming: 2,
// outgoing: 3,
// connectingIncoming: 4,
// connectingOutgoing: 5,
// connected: 6,
// transferring: 7,
// transferFailed: 8,
// transferConnected: 9,
// idle: 10,
// error: 11,
// moneyError: 12,
// sipPhoneError: 13,
// redial: 14,
// externalCard: 15,
// };
if (sipState && !!sipState.length) sipState = this.sipState;
let uiStates = {
// stack_i_new_call: this.callDirection === 'in' ? '' : '3',
// call_connected: '6',
// call_m_stream_audio_remote_added: '6',
// call_i_ao_request: 'connectingOutgoing',
// stack_m_permission_accepted: this.callDirection === 'in' ? '1 ' : '5',
// stack_m_permission_accepted: '1'
// call_i_ao_request: this.callDirection === 'in' ? '1 ' : '5',
incoming: 1,
transferIncoming: 2,
outgoing: 3,
......@@ -437,16 +433,6 @@ export class BoxDialer {
redial: 14,
externalCard: 15,
};
if (sipState && !!sipState.length) sipState = this.sipState;
let uiStates = {
stack_i_new_call: this.callDirection === 'in' ? '' : '3',
call_connected: '6',
call_m_stream_audio_remote_added: '6',
// call_i_ao_request: 'connectingOutgoing',
stack_m_permission_accepted: this.callDirection === 'in' ? '1 ' : '5',
// call_i_ao_request: this.callDirection === 'in' ? '1 ' : '5',
};
return sipState && uiStates[sipState] ? uiStates[sipState] : '';
}
......@@ -476,9 +462,8 @@ export class BoxDialer {
window?.alovoicePhone?.close();
}
}
setGuiPhoneState({ stateCode, funcName, funcParam }) {
// { stateCode, funcName, funcParam }
console.log('setGuiPhoneState: ');
if (window?.alovoice_wsphone && !!stateCode?.length) {
this.callBxMethods({
bxMethodName: 'CallCardSetUiState',
......
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