@telegenta/webclient 2.0.10 → 2.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/babel.config.js +0 -0
- package/browser/telegenta.min.js +1 -1
- package/demos/add_phone_number.html +0 -0
- package/demos/calldata_available.html +0 -0
- package/demos/embedded_config.html +94 -94
- package/demos/event_client.html +225 -225
- package/demos/phone_client.html +557 -557
- package/demos/styles.css +0 -0
- package/demos/telegenta.min.js +1 -0
- package/docs/EventClient.html +1 -1
- package/docs/Phone.html +1 -1
- package/docs/Session.html +1 -1
- package/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Bold-webfont.svg +0 -0
- package/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-BoldItalic-webfont.svg +0 -0
- package/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Italic-webfont.svg +0 -0
- package/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Light-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Light-webfont.svg +0 -0
- package/docs/fonts/OpenSans-Light-webfont.woff +0 -0
- package/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-LightItalic-webfont.svg +0 -0
- package/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Regular-webfont.svg +0 -0
- package/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/docs/global.html +1 -1
- package/docs/index.html +1 -1
- package/docs/scripts/linenumber.js +0 -0
- package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
- package/docs/scripts/prettify/lang-css.js +0 -0
- package/docs/scripts/prettify/prettify.js +0 -0
- package/docs/styles/jsdoc-default.css +0 -0
- package/docs/styles/prettify-jsdoc.css +0 -0
- package/docs/styles/prettify-tomorrow.css +0 -0
- package/embedded_client/embedded_phone.js +0 -0
- package/embedded_client/index.html +0 -0
- package/embedded_client/server.php +0 -0
- package/embedded_client/styles.css +0 -0
- package/embedded_client/tiny_rest_client.php +0 -0
- package/embedded_client/webphone_sprites.png +0 -0
- package/es5/event-client.js +175 -219
- package/es5/index.js +0 -0
- package/es5/phone-client.js +771 -1173
- package/package.json +1 -1
- package/src/event-client.js +1 -1
- package/src/index.js +0 -0
- package/src/phone-client.js +1 -1
- package/webpack.config.js +0 -0
package/es5/phone-client.js
CHANGED
|
@@ -17,27 +17,36 @@ var _camelcaseKeys = _interopRequireDefault(require("camelcase-keys"));
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const a0_0x35184d = a0_0x2d29;
|
|
21
21
|
|
|
22
|
-
(function (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
(function (_0x1a3c78, _0x1542f9) {
|
|
23
|
+
const _0x2ebe6c = a0_0x2d29,
|
|
24
|
+
_0x53f287 = _0x1a3c78();
|
|
25
|
+
|
|
26
|
+
while (!![]) {
|
|
27
|
+
try {
|
|
28
|
+
const _0xfed1c5 = -parseInt(_0x2ebe6c(0x206)) / 0x1 + -parseInt(_0x2ebe6c(0xf5)) / 0x2 + -parseInt(_0x2ebe6c(0x182)) / 0x3 + parseInt(_0x2ebe6c(0x1f3)) / 0x4 + -parseInt(_0x2ebe6c(0x23c)) / 0x5 + -parseInt(_0x2ebe6c(0x1a6)) / 0x6 * (-parseInt(_0x2ebe6c(0x269)) / 0x7) + parseInt(_0x2ebe6c(0xdf)) / 0x8 * (parseInt(_0x2ebe6c(0xe2)) / 0x9);
|
|
29
|
+
|
|
30
|
+
if (_0xfed1c5 === _0x1542f9) break;else _0x53f287['push'](_0x53f287['shift']());
|
|
31
|
+
} catch (_0x566ab1) {
|
|
32
|
+
_0x53f287['push'](_0x53f287['shift']());
|
|
26
33
|
}
|
|
27
|
-
}
|
|
34
|
+
}
|
|
35
|
+
})(a0_0x29ff, 0x44d7e);
|
|
28
36
|
|
|
29
|
-
|
|
30
|
-
|
|
37
|
+
function a0_0x2d29(_0x3cab44, _0x4a422b) {
|
|
38
|
+
const _0x29ff42 = a0_0x29ff();
|
|
31
39
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
};
|
|
40
|
+
return a0_0x2d29 = function a0_0x2d29(_0x2d29a8, _0x31a60e) {
|
|
41
|
+
_0x2d29a8 = _0x2d29a8 - 0xc4;
|
|
42
|
+
let _0x1624f7 = _0x29ff42[_0x2d29a8];
|
|
43
|
+
return _0x1624f7;
|
|
44
|
+
}, a0_0x2d29(_0x3cab44, _0x4a422b);
|
|
45
|
+
}
|
|
37
46
|
|
|
38
47
|
const options = {
|
|
39
|
-
'wssServer':
|
|
40
|
-
'eventServer':
|
|
48
|
+
'wssServer': a0_0x35184d(0x272),
|
|
49
|
+
'eventServer': a0_0x35184d(0x11b),
|
|
41
50
|
'provisionToken': null,
|
|
42
51
|
'authorizationUsername': null,
|
|
43
52
|
'password': null,
|
|
@@ -54,8 +63,8 @@ const options = {
|
|
|
54
63
|
'autoRemoveSessionTime': 0xbb8,
|
|
55
64
|
'playRingOnIncoming': !![],
|
|
56
65
|
'playCallInitializedTone': ![]
|
|
57
|
-
}
|
|
58
|
-
|
|
66
|
+
},
|
|
67
|
+
DTMF_FREQUENCY_TABLE = {
|
|
59
68
|
'1': [0x4b9, 0x2b9],
|
|
60
69
|
'2': [0x538, 0x2b9],
|
|
61
70
|
'3': [0x5c5, 0x2b9],
|
|
@@ -72,20 +81,20 @@ const DTMF_FREQUENCY_TABLE = {
|
|
|
72
81
|
'0': [0x538, 0x3ad],
|
|
73
82
|
'#': [0x5c5, 0x3ad],
|
|
74
83
|
'd': [0x661, 0x3ad]
|
|
75
|
-
}
|
|
76
|
-
|
|
84
|
+
},
|
|
85
|
+
ST_TEMP_UNAVAIL = [{
|
|
77
86
|
'd': 0xfa,
|
|
78
87
|
'f1': 0x1a9,
|
|
79
88
|
'f2': 0x0,
|
|
80
89
|
'g': 0xfa
|
|
81
|
-
}]
|
|
82
|
-
|
|
90
|
+
}],
|
|
91
|
+
ST_BUSY = [{
|
|
83
92
|
'd': 0x1f4,
|
|
84
93
|
'f1': 0x1a9,
|
|
85
94
|
'f2': 0x0,
|
|
86
95
|
'g': 0x1f4
|
|
87
|
-
}]
|
|
88
|
-
|
|
96
|
+
}],
|
|
97
|
+
ST_INVALID_NUMBER = [{
|
|
89
98
|
'd': 0x14d,
|
|
90
99
|
'f1': 0x3b6,
|
|
91
100
|
'f2': 0x0,
|
|
@@ -100,8 +109,8 @@ const ST_INVALID_NUMBER = [{
|
|
|
100
109
|
'f1': 0x708,
|
|
101
110
|
'f2': 0x0,
|
|
102
111
|
'g': 0x3e8
|
|
103
|
-
}]
|
|
104
|
-
|
|
112
|
+
}],
|
|
113
|
+
ST_CALLINIT = [{
|
|
105
114
|
'd': 0xc8,
|
|
106
115
|
'f1': 0x1f4,
|
|
107
116
|
'f2': 0x0,
|
|
@@ -111,14 +120,14 @@ const ST_CALLINIT = [{
|
|
|
111
120
|
'f1': 0x2bc,
|
|
112
121
|
'f2': 0x0,
|
|
113
122
|
'g': 0x1388
|
|
114
|
-
}]
|
|
115
|
-
|
|
123
|
+
}],
|
|
124
|
+
ST_RINGBACK = [{
|
|
116
125
|
'd': 0x3e8,
|
|
117
126
|
'f1': 0x1a9,
|
|
118
127
|
'f2': 0x0,
|
|
119
128
|
'g': 0xfa0
|
|
120
|
-
}]
|
|
121
|
-
|
|
129
|
+
}],
|
|
130
|
+
ST_INCOMING = [{
|
|
122
131
|
'd': 0x96,
|
|
123
132
|
'f1': 0x190,
|
|
124
133
|
'f2': 0x0,
|
|
@@ -150,279 +159,205 @@ const ST_INCOMING = [{
|
|
|
150
159
|
'g': 0xbb8
|
|
151
160
|
}];
|
|
152
161
|
|
|
162
|
+
function a0_0x29ff() {
|
|
163
|
+
const _0x1775a6 = ['X-Record:\x20', 'activeDuration', 'Session\x20state:\x20', 'Exception\x20in\x20call\x20quality\x20report\x20update\x20event:\x20', 'Subscribe\x20failed:\x20', 'requestFailed', 'isOnHold', 'length', '_sessionCounter', 'jitter', 'Call\x20is\x20not\x20correct\x20type\x20(listen)', 'getStats', 'value', '450824ffeZKc', 'X-MS', 'Audio\x20API\x20not\x20supported\x20by\x20this\x20browser', 'remoteAudioElement', 'ontrack', 'stream', 'cause', 'Error\x20starting\x20call:', 'replace', 'incomingCall', 'connected', 'inboundJitter', 'Error', 'stopTone', '_webRTCSession', 'muted', '_toneAudioElement', '_fireWhisperModeChangeEvent', 'newInfo', '\x20on\x20media\x20switch\x20', 'Call\x20is\x20being\x20prerecorded', '\x20for\x20', 'NORMAL', 'INVALID_NUMBER', 'requestSucceeded', 'now', 'Exception\x20in\x20callEnded\x20event:\x20', 'Hanging\x20up\x20call\x20with\x20disposition\x20', 'wssServer', '_toneTimer', 'explicitShortCallerId', 'Starting\x20phone', 'extraHeaders', 'toString', 'inboundPacketsLost', 'Call\x20direction\x20is\x20INBOUND', 'mute', 'We\x20now\x20have\x20', 'options', 'effectiveLatency', 'outbound-rtp', 'response', '_callEndTime', 'muteMic', 'ICE\x20Timeout\x20(', 'Playing\x20repeated\x20tone,\x20pos\x20=\x20', '_answerCallTimer', 'answer', 'authorizationUsername', 'answerCallTimeout', 'UNKNOWN', 'reason_phrase', 'X-RMS:\x20', 'Other\x20sessions\x20exist\x20but\x20media\x20switch\x20address\x20is\x20invalid', '1786330oxpWBa', '_fireHoldStateEvent', 'Subscription\x20successful\x20ID\x20=\x20', '_toneStreamNode', 'succeeded', 'BARRED', 'OUTBOUND', 'isMuted', 'DISCONNECTED', 'Not\x20Found', '\x20days', 'error', 'Setting\x20answer\x20call\x20timeout\x20to:\x20', 'sessionStateChange', 'message', 'hasMediaPermissionError', 'sessions', 'Exception\x20in\x20recordingStateChange\x20event:\x20', '_fireMuteStateEvent', 'dtmf', 'warning', 'CONNECTING', 'createMediaStreamDestination', 'from', 'recordings', '_fireCallEndedEvent', 'update', 'session', 'info', 'keys', 'No\x20active\x20session,\x20ignoring\x20answer\x20call\x20timeout', 'toggleHold', 'Request\x20stop\x20recording', '_manualDisposition', 'autoRemoveSessionTime', 'browserSupported', 'NO_ANSWER', 'display_name', 'No\x20call\x20recording\x20started\x20yet', 'once', 'sendDTMF', 'UNREGISTERED', 'InvalidParameter', '_currentReport', 'Exception\x20in\x20hold\x20state\x20change\x20event:\x20', '687813QgNwDG', 'createUUID', 'substr', 'prepareMedia', 'outgoing', 'Unable\x20to\x20connect\x20phone\x20websocket:\x20', 'unmuteMic', 'WebSocketInterface', 'playback', 'wss://api.telegenta.com/sip/', '_connection', 'call', 'rFactor', 'register', 'log', 'remote', 'Bad', 'accepted', 'Mute\x20mic\x20while\x20sending\x20DTMF', 'answerDurationStr', 'Hanging\x20up\x20call', 'ON_HOLD', '_startRTCPStatsUpdateTimer', 'Exception\x20in\x20sessionCreated\x20event:\x20', 'createGain', 'Transfer\x20completed\x20successfully', 'debug', 'Rejecting\x20call', '_originName', 'start', 'destinationNumber', 'Missing\x20call\x20token', '_repeatToneActive', 'createOscillator', '_callFinished', 'state', 'Exception\x20in\x20whisper\x20mode\x20change\x20event:\x20', '_oscillator1', 'disconnected', 'Hold\x20call', 'autoBusyIncoming', 'X-RMS:\x20sip:', '7042632aiJmIA', 'remote-inbound-rtp', 'Start\x20media\x20output\x20(track):', '9SdzhHl', 'terminate', 'Repeating\x20tone\x20sequence\x20started', '_endRepeatTone', 'playSignalTones', 'call_command', 'roundTripTime', 'Rejected', 'outboundPacketLossPct', 'srcObject', '_iceCandidateTimer', 'ruri', 'outboundBytesSent', '_callBeginTime', 'packetsReceived', '_sessionTerminated', 'ready', 'getHeader', 'MediaNotPrepared', '536998hPsqqu', 'unmute', 'activeDurationStr', 'REGISTRATION_FAILED', 'srflx', 'bind', '_answerCallTimeout', 'X-P-UUID', 'push', '_checkForConnectingCalls', 'createElement', 'outboundPacketsSent', '_request', 'callDataInfo', 'ACTIVE', 'ended', '__containerId', 'Unable\x20to\x20disconnect\x20event\x20client', 'Exception\x20in\x20connectionStateChange\x20event:\x20', 'uuid', 'split', 'unregistered', '_initWebRTCSession', 'hasOwnProperty', 'Exception\x20in\x20incomingCall\x20event:\x20', 'PROGRESS', '_calcReportMetrics', 'inbound-rtp', 'PLAYBACK', '_mediaSwitch', 'INFO', 'Connection\x20state:\x20', 'Got\x20ICE\x20candidate:\x20', '_durationUpdTimerObj', '_isRecording', 'Record:\x20off', 'reinvite', 'setWhisperMode', 'wss://api.telegenta.com/es/', 'Setting\x20destination\x20number\x20to:\x20', 'WebRTCSession\x20object:', 'user', 'Missing\x20username', '_recordingError', 'Received\x20remote\x20call\x20data\x20info', 'bytesSent', 'bytesReceived', 'Accepting\x20ICE\x20candidate:\x20', 'sessionRemoved', 'direction', 'event_server', 'Fair', '_activeSessions', '_checkMediaPermission', '_isOnHold', 'sip:', 'answerDuration', 'iceGatherTimeout', '_callAnswerTime', 'qualityString', 'Phone\x20is\x20not\x20started', 'parse', 'local', '_originatingNumber', 'Event\x20service\x20not\x20enabled', '_repeatToneSequence', 'toISOString', 'subscribe', 'Exception\x20in\x20sessionRemoved\x20event:\x20', 'listen', 'Poor', '_sessionState', 'relatedAddress', 'Created\x20new\x20outbound\x20session\x20to:\x20', '\x20sessions:', '_fireIncomingCallEvent', 'Holding\x20all\x20active\x20sessions', 'toneVolume', 'mos', '\x20because\x20there\x20is\x20already\x20active\x20calls', 'candidate', '_oscillator2', '\x20ms)\x20reached', '_initToneGenerator', 'Unable\x20to\x20make\x20new\x20calls\x20while\x20others\x20are\x20connecting', '_callUUID', 'password', 'NotReady', 'Requesting\x20call\x20grouping\x20on\x20media\x20switch\x20', 'registered', 'Exception\x20in\x20sessionStateChange\x20event:', 'inboundBytesReceived', 'CONNECTED', 'request', 'status_code', '_options', 'Recording\x20stopped\x20failed:\x20', 'connectionStateChange', '_startRepeatTone', 'playTone', '_repeatToneSequencePos', '\x20=>\x20', 'values', 'getUserMedia', 'sessionCreated', '_UA', '_mediaPermission', 'stopRecording', 'failed', 'X-P-UUID:\x20', 'transfer', 'wss_token', 'Media\x20switch\x20handling\x20call:\x20', 'LOGLVL', 'stun:stun.l.google.com:19302', 'Successfully\x20started\x20phone', 'UnableToConnect', 'Good', 'createDurationString', 'startRecording', 'NotAllowed', '_toneGainProcessor', 'Unavailable', 'disable', '_phone', 'Record\x20parameter\x20must\x20be\x20a\x20number', 'newRTCSession', 'mediaSwitchURI', 'holdAllCalls', 'Transferring\x20', '_fireRecordingStateEvent', 'Transfer\x20failed:\x20', 'level', 'autoplay', '@telegenta.com', 'LogHandler', 'Using\x20provisioning\x20token\x20authorization', '_addSession', 'assign', 'packetsSent', 'application/info', '847404PyNCDH', 'TERMINATED', '_fireCallDataInfoEvent', 'unhold', 'Session\x20reinvite', 'reject', 'inboundPacketLossPct', '_removeSession', 'Session\x20update', 'Phone\x20already\x20started,\x20stopping\x20first', 'TEMP_UNAVAIL', '_eventClient', 'calldata_available', '_connectionState', 'Session\x20', 'wss_server', 'INCOMING', 'incoming', 'InvalidOptions', 'X-Max-cost:\x20', 'newInboundSession', 'Exception\x20in\x20call\x20duration\x20update\x20event:\x20', 'Getusermedia\x20failed', 'newOutboundSession', 'outboundPacketsLost', 'Rejected\x20call', 'Phone\x20client\x20successfully\x20stopped', 'Mic\x20already\x20muted,\x20just\x20sending\x20DTMF', 'inboundPacketsReceived', 'FAILED', 'X-DID-NAME', 'useCallDataInfoEvent', 'maximumCallCost', '_rtcpStatsTimer', 'duration', 'then', '24jmuncy', '\x20/\x20', 'wss_password', 'callEnded', 'Canceled', 'getusermediafailed', 'connectEventService', 'getSessionByUUID', 'removeAllListeners', 'emit', 'icecandidate', '_whisperMode', 'fireEvent', 'Using\x20manual\x20specified\x20credentials', 'record', 'Request\x20start\x20recording', 'Invalid\x20DTMF\x20code', 'Repeating\x20tone\x20stopped', 'frequency', '_setConnectionState', 'callToken', 'stop', '_setAnswerCallTimeout', 'X-Call-token:\x20', '_localNumberName', 'Sending\x20DTMF:\x20', 'whisperModeChange', 'outboundJitter', 'recordingStateChange', 'callQualityReportUpdate', 'Busy', '\x20ms', '_destinationNumber', 'hold', '_isStarted', 'callDurationUpdate', 'browserIsChrome', 'connection', '_handleRemoteAudio', 'localNumberName', '_doRepeatTone', 'muteStateChange', 'INBOUND', 'disconnect', '\x20seconds', '_callDisposition', '_startDurationUpdateTimer', 'LISTEN', 'Connected\x20to\x20event\x20server', 'AUDIO', 'getOtherSessions', 'Unknown\x20call\x20direction:\x20', 'hangup', 'New\x20RTCSession', 'gain', '_isMuted', 'Recording\x20enabled\x20and\x20kept\x20for\x20', 'JsSIP:*', 'originator', '_setSessionState', 'explicitCallerId', 'isRecording', 'packetsLost', 'sendInfo', 'mediaDevices', 'X-Meta-Info:\x20', '_mediaPermissionError', 'Transfer\x20rejected:\x20', 'provisionToken', 'connect', '_isListenCall', 'Mute\x20microphone', 'Event\x20callback\x20failed:\x20', 'Calling\x20number:\x20', 'CALLING', 'Requesting\x20specific\x20media\x20switch\x20', 'Unable\x20to\x20connect\x20to\x20event\x20server:\x20', '1470696hdTPTM', 'Unmute\x20microphone', 'Answer\x20call\x20timeout\x20after\x20', 'Exception\x20in\x20mute\x20state\x20change\x20event:\x20', '_remoteAudioElement', 'streams'];
|
|
164
|
+
|
|
165
|
+
a0_0x29ff = function a0_0x29ff() {
|
|
166
|
+
return _0x1775a6;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
return a0_0x29ff();
|
|
170
|
+
}
|
|
171
|
+
|
|
153
172
|
class Phone extends _events.default {
|
|
154
173
|
constructor() {
|
|
155
|
-
let
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
this[
|
|
159
|
-
this[_0x1c61('0x3')] = null;
|
|
160
|
-
this['_connectionState'] = null;
|
|
161
|
-
this['_isStarted'] = ![];
|
|
162
|
-
this[_0x1c61('0x4')] = null;
|
|
163
|
-
this[_0x1c61('0x5')] = null;
|
|
164
|
-
this[_0x1c61('0x6')] = 0x0;
|
|
165
|
-
this['_activeSessions'] = {};
|
|
166
|
-
this[_0x1c61('0x7')] = document[_0x1c61('0x8')](_0x1c61('0x9'));
|
|
167
|
-
this['_remoteAudioElement']['autoplay'] = !![];
|
|
168
|
-
this[_0x1c61('0xa')] = document[_0x1c61('0x8')](_0x1c61('0x9'));
|
|
169
|
-
this[_0x1c61('0xa')][_0x1c61('0xb')] = !![];
|
|
170
|
-
this[_0x1c61('0xc')] = null;
|
|
171
|
-
this['_repeatToneActive'] = ![];
|
|
172
|
-
this[_0x1c61('0xd')] = [];
|
|
173
|
-
this[_0x1c61('0xe')] = 0x0;
|
|
174
|
-
this[_0x1c61('0xf')] = null;
|
|
175
|
-
this[_0x1c61('0x10')] = null;
|
|
176
|
-
this[_0x1c61('0x11')] = null;
|
|
177
|
-
this[_0x1c61('0x12')] = logger ? logger : new _common.Logger[_0x1c61('0x13')](_common.Logger[_0x1c61('0x14')][_0x1c61('0x15')]);
|
|
178
|
-
|
|
179
|
-
if (this[_0x1c61('0x12')][_0x1c61('0x16')] === _common.Logger[_0x1c61('0x14')][_0x1c61('0x17')]) {
|
|
180
|
-
_jssip.default[_0x1c61('0x18')][_0x1c61('0x19')](_0x1c61('0x1a'));
|
|
181
|
-
} else {
|
|
182
|
-
_jssip.default[_0x1c61('0x18')][_0x1c61('0x19')]('JsSIP:*');
|
|
183
|
-
}
|
|
174
|
+
let _0xb08040 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
175
|
+
|
|
176
|
+
const _0x3cbff1 = a0_0x35184d;
|
|
177
|
+
super(), this[_0x3cbff1(0x15f)] = ![], this[_0x3cbff1(0x1e8)] = ![], this[_0x3cbff1(0x15e)] = null, this[_0x3cbff1(0x18f)] = null, this[_0x3cbff1(0x1c8)] = ![], this['_eventClient'] = null, this[_0x3cbff1(0x154)] = null, this[_0x3cbff1(0x201)] = 0x0, this[_0x3cbff1(0x129)] = {}, this['_remoteAudioElement'] = document['createElement'](_0x3cbff1(0x1d7)), this[_0x3cbff1(0x1f7)][_0x3cbff1(0x17a)] = !![], this[_0x3cbff1(0x216)] = document[_0x3cbff1(0xff)]('AUDIO'), this[_0x3cbff1(0x216)]['autoplay'] = !![], this[_0x3cbff1(0x223)] = null, this['_repeatToneActive'] = ![], this[_0x3cbff1(0x136)] = [], this[_0x3cbff1(0x159)] = 0x0, this[_0x3cbff1(0x16e)] = null, this[_0x3cbff1(0xda)] = null, this[_0x3cbff1(0x146)] = null, this[_0x3cbff1(0x277)] = _0xb08040 ? _0xb08040 : new _common.Logger[_0x3cbff1(0x17c)](_common.Logger[_0x3cbff1(0x166)][_0x3cbff1(0x113)]), this[_0x3cbff1(0x277)][_0x3cbff1(0x179)] === _common.Logger[_0x3cbff1(0x166)]['DEBUG'] ? _jssip.default['debug'][_0x3cbff1(0x170)](_0x3cbff1(0x1df)) : _jssip.default[_0x3cbff1(0xcf)][_0x3cbff1(0x170)](_0x3cbff1(0x1df));
|
|
184
178
|
}
|
|
185
179
|
|
|
186
|
-
[
|
|
187
|
-
|
|
180
|
+
[a0_0x35184d(0x26c)]() {
|
|
181
|
+
const _0x38669a = a0_0x35184d;
|
|
182
|
+
|
|
183
|
+
this[_0x38669a(0x277)]['info']('Get\x20media\x20permission');
|
|
188
184
|
|
|
189
|
-
const
|
|
190
|
-
|
|
185
|
+
const _0x47ad25 = this,
|
|
186
|
+
_0x4bad14 = {
|
|
191
187
|
'audio': !![],
|
|
192
188
|
'video': ![]
|
|
193
189
|
};
|
|
194
|
-
return new Promise(function (resolve, reject) {
|
|
195
|
-
navigator[_0x1c61('0x1e')][_0x1c61('0x1f')](constraints)[_0x1c61('0x20')](() => {
|
|
196
|
-
self['_mediaPermission'] = !![];
|
|
197
|
-
self[_0x1c61('0x2')] = ![];
|
|
198
|
-
|
|
199
|
-
self[_0x1c61('0x12')][_0x1c61('0x1c')](_0x1c61('0x21'));
|
|
200
|
-
|
|
201
|
-
resolve();
|
|
202
|
-
}, err => {
|
|
203
|
-
self[_0x1c61('0x1')] = ![];
|
|
204
|
-
self[_0x1c61('0x2')] = !![];
|
|
205
190
|
|
|
206
|
-
|
|
191
|
+
return new Promise(function (_0x444a23, _0x113cb4) {
|
|
192
|
+
const _0x5113c5 = _0x38669a;
|
|
207
193
|
|
|
208
|
-
|
|
194
|
+
navigator[_0x5113c5(0x1e6)][_0x5113c5(0x15c)](_0x4bad14)[_0x5113c5(0x1a5)](() => {
|
|
195
|
+
const _0x21627b = _0x5113c5;
|
|
196
|
+
_0x47ad25[_0x21627b(0x15f)] = !![], _0x47ad25[_0x21627b(0x1e8)] = ![], _0x47ad25[_0x21627b(0x277)][_0x21627b(0x258)]('Media\x20permission\x20granted'), _0x444a23();
|
|
197
|
+
}, _0x1dca8f => {
|
|
198
|
+
const _0x465e28 = _0x5113c5;
|
|
199
|
+
_0x47ad25['_mediaPermission'] = ![], _0x47ad25[_0x465e28(0x1e8)] = !![], _0x47ad25['log']['error']('Denied\x20media\x20permission:\x20' + _0x1dca8f), _0x113cb4(_0x1dca8f);
|
|
209
200
|
});
|
|
210
201
|
});
|
|
211
202
|
}
|
|
212
203
|
|
|
213
|
-
[
|
|
214
|
-
|
|
204
|
+
[a0_0x35184d(0xd2)](_0x2c9d9e) {
|
|
205
|
+
const _0x3e19bf = a0_0x35184d;
|
|
215
206
|
|
|
216
|
-
|
|
217
|
-
this[_0x1c61('0x12')][_0x1c61('0x24')](_0x1c61('0x25'));
|
|
207
|
+
this[_0x3e19bf(0x12a)]();
|
|
218
208
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
this['_options'] = Object[_0x1c61('0x27')](options, phoneOptions);
|
|
223
|
-
|
|
224
|
-
this[_0x1c61('0x28')]();
|
|
209
|
+
this['_isStarted'] && (this[_0x3e19bf(0x277)][_0x3e19bf(0x250)](_0x3e19bf(0x18b)), this['stop']());
|
|
210
|
+
this['_options'] = Object['assign'](options, _0x2c9d9e), this['_initToneGenerator']();
|
|
225
211
|
|
|
226
|
-
if (this[
|
|
227
|
-
let
|
|
212
|
+
if (this[_0x3e19bf(0x154)][_0x3e19bf(0x1ea)]) {
|
|
213
|
+
let _0x424c81 = null;
|
|
228
214
|
|
|
229
215
|
try {
|
|
230
|
-
|
|
231
|
-
} catch (
|
|
232
|
-
throw new _common.Exceptions[
|
|
216
|
+
_0x424c81 = JSON[_0x3e19bf(0x132)](atob(this[_0x3e19bf(0x154)][_0x3e19bf(0x1ea)]));
|
|
217
|
+
} catch (_0x103359) {
|
|
218
|
+
throw new _common.Exceptions[_0x3e19bf(0x194)](_0x3e19bf(0x1ea), 'Invalid\x20token');
|
|
233
219
|
}
|
|
234
220
|
|
|
235
|
-
this[
|
|
236
|
-
|
|
237
|
-
this['_options']['wssServer'] = pt['wss_server'];
|
|
238
|
-
this[_0x1c61('0x5')][_0x1c61('0x2d')] = pt[_0x1c61('0x2e')];
|
|
239
|
-
this[_0x1c61('0x5')][_0x1c61('0x2f')] = pt[_0x1c61('0x30')];
|
|
240
|
-
this['_options'][_0x1c61('0x31')] = pt[_0x1c61('0x32')];
|
|
241
|
-
this[_0x1c61('0x5')][_0x1c61('0x33')] = pt[_0x1c61('0x34')];
|
|
221
|
+
this[_0x3e19bf(0x277)][_0x3e19bf(0x258)](_0x3e19bf(0x17d)), this[_0x3e19bf(0x154)][_0x3e19bf(0x222)] = _0x424c81[_0x3e19bf(0x191)], this[_0x3e19bf(0x154)]['eventServer'] = _0x424c81[_0x3e19bf(0x127)], this[_0x3e19bf(0x154)][_0x3e19bf(0x236)] = _0x424c81['wss_username'], this[_0x3e19bf(0x154)][_0x3e19bf(0x14b)] = _0x424c81[_0x3e19bf(0x1a8)], this[_0x3e19bf(0x154)]['callToken'] = _0x424c81[_0x3e19bf(0x164)];
|
|
242
222
|
} else {
|
|
243
|
-
this[
|
|
244
|
-
|
|
245
|
-
if (!this['_options'][_0x1c61('0x2f')]) {
|
|
246
|
-
throw new _common.Exceptions['InvalidOptions'](_0x1c61('0x2f'), _0x1c61('0x36'));
|
|
247
|
-
}
|
|
223
|
+
this['log'][_0x3e19bf(0x258)](_0x3e19bf(0x1b3));
|
|
248
224
|
|
|
249
|
-
if (!this[
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
if (!this[_0x1c61('0x5')][_0x1c61('0x33')]) {
|
|
254
|
-
throw new _common.Exceptions[_0x1c61('0x2a')](_0x1c61('0x33'), _0x1c61('0x38'));
|
|
255
|
-
}
|
|
225
|
+
if (!this[_0x3e19bf(0x154)][_0x3e19bf(0x236)]) throw new _common.Exceptions[_0x3e19bf(0x194)](_0x3e19bf(0x236), _0x3e19bf(0x11f));
|
|
226
|
+
if (!this[_0x3e19bf(0x154)][_0x3e19bf(0x14b)]) throw new _common.Exceptions[_0x3e19bf(0x194)]('password', 'Missing\x20password');
|
|
227
|
+
if (!this['_options'][_0x3e19bf(0x1ba)]) throw new _common.Exceptions[_0x3e19bf(0x194)]('callToken', _0x3e19bf(0xd4));
|
|
256
228
|
}
|
|
257
229
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
this[_0x1c61('0x5')]['connectEventService'] = !![];
|
|
262
|
-
}
|
|
230
|
+
this[_0x3e19bf(0x154)]['useCallDataInfoEvent'] && !this[_0x3e19bf(0x154)]['connectEventService'] && (this[_0x3e19bf(0x277)][_0x3e19bf(0x258)]('Enabled\x20event\x20service\x20because\x20\x27useCallDataInfoEvent\x27\x20is\x20enabled'), this[_0x3e19bf(0x154)]['connectEventService'] = !![]);
|
|
231
|
+
this[_0x3e19bf(0x154)][_0x3e19bf(0x1ac)] && (this[_0x3e19bf(0x18d)] = new _eventClient.EventClient(this[_0x3e19bf(0x277)]), this[_0x3e19bf(0x18d)][_0x3e19bf(0x1eb)](this[_0x3e19bf(0x154)]['eventServer'])['then'](() => {
|
|
232
|
+
const _0x47dad1 = _0x3e19bf;
|
|
263
233
|
|
|
264
|
-
|
|
265
|
-
this['_eventClient'] = new _eventClient.EventClient(this[_0x1c61('0x12')]);
|
|
234
|
+
this['log'][_0x47dad1(0x258)](_0x47dad1(0x1d6));
|
|
266
235
|
|
|
267
|
-
|
|
268
|
-
|
|
236
|
+
if (this[_0x47dad1(0x154)][_0x47dad1(0x1a1)]) {
|
|
237
|
+
let _0x2ecd0c = {
|
|
238
|
+
'event_name': _0x47dad1(0x18e),
|
|
239
|
+
'call_token': this[_0x47dad1(0x154)][_0x47dad1(0x1ba)]
|
|
240
|
+
};
|
|
269
241
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
'event_name': 'calldata_available',
|
|
273
|
-
'call_token': this['_options'][_0x1c61('0x33')]
|
|
274
|
-
};
|
|
242
|
+
this[_0x47dad1(0x18d)][_0x47dad1(0x138)](_0x2ecd0c, _0x314bc4 => {
|
|
243
|
+
const _0x16d66a = _0x47dad1;
|
|
275
244
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
245
|
+
try {
|
|
246
|
+
this['log']['debug'](_0x16d66a(0x121)), this[_0x16d66a(0x277)][_0x16d66a(0xcf)](_0x314bc4), this['_fireCallDataInfoEvent'](_0x314bc4);
|
|
247
|
+
} catch (_0x5d3bda) {
|
|
248
|
+
this[_0x16d66a(0x277)]['error'](_0x16d66a(0x1ee) + _0x5d3bda);
|
|
249
|
+
}
|
|
250
|
+
})[_0x47dad1(0x1a5)](_0x58f97d => {
|
|
251
|
+
const _0x2295a7 = _0x47dad1;
|
|
279
252
|
|
|
280
|
-
|
|
253
|
+
this['log'][_0x2295a7(0x258)](_0x2295a7(0x23e) + _0x58f97d);
|
|
254
|
+
}, _0x14ce53 => {
|
|
255
|
+
const _0x4f46ae = _0x47dad1;
|
|
281
256
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
this[_0x1c61('0x12')]['info'](_0x1c61('0x41') + subscriptionId);
|
|
288
|
-
}, reason => {
|
|
289
|
-
this[_0x1c61('0x12')][_0x1c61('0x22')]('Subscribe\x20failed:\x20' + reason);
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
}, reason => {
|
|
293
|
-
this[_0x1c61('0x12')][_0x1c61('0x22')](_0x1c61('0x42') + reason);
|
|
294
|
-
});
|
|
295
|
-
}
|
|
257
|
+
this[_0x4f46ae(0x277)][_0x4f46ae(0x247)](_0x4f46ae(0x1fd) + _0x14ce53);
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}, _0x278fa6 => {
|
|
261
|
+
const _0x4db0c2 = _0x3e19bf;
|
|
296
262
|
|
|
297
|
-
|
|
263
|
+
this[_0x4db0c2(0x277)][_0x4db0c2(0x247)](_0x4db0c2(0x1f2) + _0x278fa6);
|
|
264
|
+
}));
|
|
265
|
+
let _0x504113 = null;
|
|
298
266
|
|
|
299
267
|
try {
|
|
300
|
-
|
|
301
|
-
} catch (
|
|
302
|
-
throw new _common.Exceptions[
|
|
268
|
+
_0x504113 = new _jssip.default[_0x3e19bf(0x270)](this[_0x3e19bf(0x154)]['wssServer']);
|
|
269
|
+
} catch (_0x55dea5) {
|
|
270
|
+
throw new _common.Exceptions[_0x3e19bf(0x169)](_0x3e19bf(0x26e) + _0x55dea5);
|
|
303
271
|
}
|
|
304
272
|
|
|
305
|
-
this[
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
'
|
|
311
|
-
'
|
|
312
|
-
'password': this[_0x1c61('0x5')][_0x1c61('0x31')],
|
|
313
|
-
'register': this[_0x1c61('0x5')][_0x1c61('0x47')],
|
|
314
|
-
'display_name': this[_0x1c61('0x5')][_0x1c61('0x2f')],
|
|
315
|
-
'uri': this['_options'][_0x1c61('0x2f')] + '@telegenta.com',
|
|
273
|
+
this[_0x3e19bf(0x277)][_0x3e19bf(0x258)](_0x3e19bf(0x225)), this[_0x3e19bf(0x277)][_0x3e19bf(0xcf)](this[_0x3e19bf(0x154)]), this['_UA'] = new _jssip.default['UA']({
|
|
274
|
+
'sockets': [_0x504113],
|
|
275
|
+
'authorization_user': this['_options'][_0x3e19bf(0x236)],
|
|
276
|
+
'password': this['_options'][_0x3e19bf(0x14b)],
|
|
277
|
+
'register': this[_0x3e19bf(0x154)][_0x3e19bf(0x276)],
|
|
278
|
+
'display_name': this[_0x3e19bf(0x154)][_0x3e19bf(0x236)],
|
|
279
|
+
'uri': this[_0x3e19bf(0x154)][_0x3e19bf(0x236)] + _0x3e19bf(0x17b),
|
|
316
280
|
'session_timers': ![]
|
|
317
281
|
});
|
|
318
|
-
const self = this;
|
|
319
282
|
|
|
320
|
-
|
|
321
|
-
self['log'][_0x1c61('0x18')](_0x1c61('0x49'));
|
|
283
|
+
const _0x48b7b2 = this;
|
|
322
284
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
session['newInboundSession'](data);
|
|
285
|
+
this[_0x3e19bf(0x15e)]['on'](_0x3e19bf(0x173), function (_0x42f2f5) {
|
|
286
|
+
const _0x404c8b = _0x3e19bf;
|
|
326
287
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
288
|
+
_0x48b7b2[_0x404c8b(0x277)]['debug'](_0x404c8b(0x1db));
|
|
289
|
+
|
|
290
|
+
if (_0x42f2f5[_0x404c8b(0x1e0)] === _0x404c8b(0xc4)) {
|
|
291
|
+
const _0x5e4924 = new Session(_0x48b7b2);
|
|
330
292
|
|
|
331
|
-
|
|
332
|
-
if (Object[_0x1c61('0x4e')](self['_activeSessions'])[_0x1c61('0x4f')] > 0x0) {
|
|
333
|
-
self[_0x1c61('0x12')][_0x1c61('0x1c')]('Autorejecting\x20incoming\x20call\x20' + session[_0x1c61('0x50')] + _0x1c61('0x51'));
|
|
293
|
+
_0x5e4924[_0x404c8b(0x196)](_0x42f2f5);
|
|
334
294
|
|
|
335
|
-
|
|
295
|
+
_0x48b7b2[_0x404c8b(0x154)]['playRingOnIncoming'] && _0x48b7b2[_0x404c8b(0x157)](ST_INCOMING);
|
|
336
296
|
|
|
297
|
+
if (_0x48b7b2[_0x404c8b(0x154)][_0x404c8b(0xdd)]) {
|
|
298
|
+
if (Object[_0x404c8b(0x259)](_0x48b7b2[_0x404c8b(0x129)])['length'] > 0x0) {
|
|
299
|
+
_0x48b7b2[_0x404c8b(0x277)][_0x404c8b(0x258)]('Autorejecting\x20incoming\x20call\x20' + _0x5e4924[_0x404c8b(0x108)] + _0x404c8b(0x144)), _0x5e4924[_0x404c8b(0x187)](0x1e6, 'Busy');
|
|
337
300
|
return;
|
|
338
|
-
} else
|
|
339
|
-
self['log']['debug'](_0x1c61('0x53'));
|
|
340
|
-
}
|
|
301
|
+
} else _0x48b7b2['log']['debug']('There\x20are\x20no\x20other\x20sessions,\x20adding\x20incoming\x20call');
|
|
341
302
|
}
|
|
342
303
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
session['_setSessionState'](_0x1c61('0x55'));
|
|
346
|
-
|
|
347
|
-
self[_0x1c61('0x56')](session);
|
|
304
|
+
_0x48b7b2[_0x404c8b(0x17e)](_0x5e4924), _0x5e4924[_0x404c8b(0x1e1)](_0x404c8b(0x192)), _0x48b7b2[_0x404c8b(0x140)](_0x5e4924);
|
|
348
305
|
}
|
|
349
|
-
})
|
|
306
|
+
}), this[_0x3e19bf(0x15e)]['on']('connecting', function () {
|
|
307
|
+
const _0x4e3946 = _0x3e19bf;
|
|
350
308
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
309
|
+
_0x48b7b2[_0x4e3946(0x1b9)](_0x4e3946(0x251));
|
|
310
|
+
}), this['_UA']['on'](_0x3e19bf(0x210), function () {
|
|
311
|
+
const _0x90aac = _0x3e19bf;
|
|
354
312
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
313
|
+
_0x48b7b2[_0x90aac(0x1b9)](_0x90aac(0x151));
|
|
314
|
+
}), this[_0x3e19bf(0x15e)]['on'](_0x3e19bf(0xdb), function () {
|
|
315
|
+
const _0x38734c = _0x3e19bf;
|
|
358
316
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
self[_0x1c61('0x5d')](_0x1c61('0x5e'));
|
|
365
|
-
});
|
|
366
|
-
|
|
367
|
-
this[_0x1c61('0x3')]['on'](_0x1c61('0x5f'), function () {
|
|
368
|
-
self[_0x1c61('0x5d')](_0x1c61('0x60'));
|
|
369
|
-
});
|
|
317
|
+
_0x48b7b2[_0x38734c(0x1b9)](_0x38734c(0x244));
|
|
318
|
+
}), this[_0x3e19bf(0x15e)]['on'](_0x3e19bf(0x14e), function () {
|
|
319
|
+
_0x48b7b2['_setConnectionState']('REGISTERED');
|
|
320
|
+
}), this[_0x3e19bf(0x15e)]['on'](_0x3e19bf(0x10a), function () {
|
|
321
|
+
const _0x41d417 = _0x3e19bf;
|
|
370
322
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
this[_0x1c61('0x3')][_0x1c61('0x63')]();
|
|
376
|
-
|
|
377
|
-
this['_isStarted'] = !![];
|
|
323
|
+
_0x48b7b2[_0x41d417(0x1b9)](_0x41d417(0x265));
|
|
324
|
+
}), this['_UA']['on']('registrationFailed', function () {
|
|
325
|
+
const _0x42aab0 = _0x3e19bf;
|
|
378
326
|
|
|
379
|
-
|
|
327
|
+
_0x48b7b2[_0x42aab0(0x1b9)](_0x42aab0(0xf8));
|
|
328
|
+
}), this[_0x3e19bf(0x15e)]['start'](), this['_isStarted'] = !![], this['log'][_0x3e19bf(0x258)](_0x3e19bf(0x168));
|
|
380
329
|
}
|
|
381
330
|
|
|
382
|
-
[
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
this[_0x1c61('0x3')][_0x1c61('0x67')]();
|
|
331
|
+
[a0_0x35184d(0x1bb)]() {
|
|
332
|
+
const _0x5f53d7 = a0_0x35184d;
|
|
333
|
+
if (!this[_0x5f53d7(0x1c8)]) throw new _common.Exceptions[_0x5f53d7(0x14c)]('Phone\x20is\x20not\x20started');
|
|
334
|
+
this['_UA'][_0x5f53d7(0x1ae)](), this[_0x5f53d7(0x15e)][_0x5f53d7(0x1bb)](), delete this[_0x5f53d7(0x15e)];
|
|
388
335
|
|
|
389
|
-
this[
|
|
390
|
-
|
|
391
|
-
delete this[_0x1c61('0x3')];
|
|
392
|
-
|
|
393
|
-
if (!this[_0x1c61('0x4')]) {
|
|
394
|
-
this['log'][_0x1c61('0x18')](_0x1c61('0x68'));
|
|
336
|
+
if (!this[_0x5f53d7(0x18d)]) {
|
|
337
|
+
this[_0x5f53d7(0x277)][_0x5f53d7(0xcf)]('Event\x20client\x20not\x20running,\x20not\x20stopping');
|
|
395
338
|
|
|
396
339
|
return;
|
|
397
340
|
}
|
|
398
341
|
|
|
399
342
|
try {
|
|
400
|
-
this[
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
} catch (_0xbe9d19) {
|
|
404
|
-
this[_0x1c61('0x12')][_0x1c61('0x24')]('Unable\x20to\x20disconnect\x20event\x20client');
|
|
343
|
+
this[_0x5f53d7(0x18d)][_0x5f53d7(0x1d1)](), delete this[_0x5f53d7(0x18d)];
|
|
344
|
+
} catch (_0x2f9732) {
|
|
345
|
+
this[_0x5f53d7(0x277)][_0x5f53d7(0x250)](_0x5f53d7(0x106));
|
|
405
346
|
}
|
|
406
347
|
|
|
407
|
-
this[
|
|
408
|
-
|
|
409
|
-
this['log'][_0x1c61('0x1c')](_0x1c61('0x6a'));
|
|
348
|
+
this[_0x5f53d7(0x1c8)] = ![], this[_0x5f53d7(0x277)][_0x5f53d7(0x258)](_0x5f53d7(0x19c));
|
|
410
349
|
}
|
|
411
350
|
|
|
412
|
-
[
|
|
413
|
-
let
|
|
351
|
+
[a0_0x35184d(0x274)](_0x3c9f9f) {
|
|
352
|
+
let _0x290d21 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
414
353
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
354
|
+
const _0x4acb00 = a0_0x35184d;
|
|
355
|
+
if (!this['_isStarted']) throw new _common.Exceptions[_0x4acb00(0x14c)](_0x4acb00(0x131));
|
|
356
|
+
if (this['_checkForConnectingCalls']()) throw _common.Exceptions['NotAllowed'](_0x4acb00(0x149));
|
|
418
357
|
|
|
419
|
-
|
|
420
|
-
throw _common.Exceptions[_0x1c61('0x6d')](_0x1c61('0x6e'));
|
|
421
|
-
}
|
|
358
|
+
this[_0x4acb00(0x175)]();
|
|
422
359
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
const callParams = Object[_0x1c61('0x27')]({
|
|
360
|
+
const _0x1e0866 = Object[_0x4acb00(0x17f)]({
|
|
426
361
|
'record': ![],
|
|
427
362
|
'maximumCallCost': 0x0,
|
|
428
363
|
'answerCallTimeout': 0x0,
|
|
@@ -430,308 +365,254 @@ class Phone extends _events.default {
|
|
|
430
365
|
'explicitShortCallerId': null,
|
|
431
366
|
'metaInfo': null,
|
|
432
367
|
'_isListenCall': ![]
|
|
433
|
-
},
|
|
434
|
-
|
|
435
|
-
number = number[_0x1c61('0x6f')]()[_0x1c61('0x70')](/ |\(|\)/g, '');
|
|
436
|
-
|
|
437
|
-
this[_0x1c61('0x12')][_0x1c61('0x1c')](_0x1c61('0x71') + number);
|
|
368
|
+
}, _0x290d21);
|
|
438
369
|
|
|
439
|
-
|
|
370
|
+
_0x3c9f9f = _0x3c9f9f['trim']()[_0x4acb00(0x20e)](/ |\(|\)/g, ''), this['log'][_0x4acb00(0x258)](_0x4acb00(0x1ef) + _0x3c9f9f);
|
|
440
371
|
|
|
441
|
-
|
|
372
|
+
let _0x7def15 = new Session(this);
|
|
442
373
|
|
|
443
|
-
this[
|
|
444
|
-
return session;
|
|
374
|
+
return _0x7def15[_0x4acb00(0x199)](_0x3c9f9f, _0x1e0866), this[_0x4acb00(0x17e)](_0x7def15), _0x7def15;
|
|
445
375
|
}
|
|
446
376
|
|
|
447
|
-
[
|
|
448
|
-
const
|
|
449
|
-
|
|
450
|
-
let mediaSwitch = _0x1c61('0x74') + s[0x1];
|
|
377
|
+
[a0_0x35184d(0x13a)](_0x522c08) {
|
|
378
|
+
const _0x162aa5 = a0_0x35184d,
|
|
379
|
+
_0x1b67e0 = _0x522c08[_0x162aa5(0x109)]('@');
|
|
451
380
|
|
|
452
|
-
|
|
381
|
+
let _0x55ec63 = _0x1b67e0[0x0],
|
|
382
|
+
_0x133dda = 'sip:' + _0x1b67e0[0x1];
|
|
453
383
|
|
|
454
|
-
return this[
|
|
455
|
-
'mediaSwitchURI':
|
|
384
|
+
return this['log'][_0x162aa5(0xcf)]('Initiating\x20listen\x20to\x20call\x20with\x20uuid\x20' + _0x55ec63 + _0x162aa5(0x219) + _0x133dda), this[_0x162aa5(0x274)]('listen-' + _0x55ec63, {
|
|
385
|
+
'mediaSwitchURI': _0x133dda,
|
|
456
386
|
'_isListenCall': !![]
|
|
457
387
|
});
|
|
458
388
|
}
|
|
459
389
|
|
|
460
|
-
[
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
390
|
+
[a0_0x35184d(0x1ad)](_0x505885) {
|
|
391
|
+
const _0x2921e4 = a0_0x35184d;
|
|
392
|
+
|
|
393
|
+
for (let _0x1ae5f5 in this[_0x2921e4(0x129)]) {
|
|
394
|
+
if (this[_0x2921e4(0x129)][_0x2921e4(0x10c)](_0x1ae5f5)) {
|
|
395
|
+
if (this[_0x2921e4(0x129)][_0x1ae5f5][_0x2921e4(0x108)] === _0x505885) return this[_0x2921e4(0x129)][_0x1ae5f5];
|
|
466
396
|
}
|
|
467
397
|
}
|
|
468
398
|
|
|
469
399
|
return null;
|
|
470
400
|
}
|
|
471
401
|
|
|
472
|
-
get [
|
|
473
|
-
|
|
402
|
+
get [a0_0x35184d(0x22c)]() {
|
|
403
|
+
const _0x4d58db = a0_0x35184d;
|
|
404
|
+
return this[_0x4d58db(0x154)];
|
|
474
405
|
}
|
|
475
406
|
|
|
476
|
-
get [
|
|
477
|
-
|
|
407
|
+
get [a0_0x35184d(0x24c)]() {
|
|
408
|
+
const _0x9589bf = a0_0x35184d;
|
|
409
|
+
let _0x379812 = [];
|
|
478
410
|
|
|
479
|
-
for (let
|
|
480
|
-
|
|
481
|
-
s[_0x1c61('0x7b')](this['_activeSessions'][key]);
|
|
482
|
-
}
|
|
411
|
+
for (let _0x2a145d in this['_activeSessions']) {
|
|
412
|
+
this[_0x9589bf(0x129)]['hasOwnProperty'](_0x2a145d) && _0x379812[_0x9589bf(0xfd)](this[_0x9589bf(0x129)][_0x2a145d]);
|
|
483
413
|
}
|
|
484
414
|
|
|
485
|
-
return
|
|
415
|
+
return _0x379812;
|
|
486
416
|
}
|
|
487
417
|
|
|
488
|
-
get [
|
|
489
|
-
return this[
|
|
418
|
+
get ['hasMediaPermission']() {
|
|
419
|
+
return this['_mediaPermission'];
|
|
490
420
|
}
|
|
491
421
|
|
|
492
|
-
get [
|
|
493
|
-
|
|
422
|
+
get [a0_0x35184d(0x24b)]() {
|
|
423
|
+
const _0x1c346b = a0_0x35184d;
|
|
424
|
+
return this[_0x1c346b(0x1e8)];
|
|
494
425
|
}
|
|
495
426
|
|
|
496
|
-
get [
|
|
497
|
-
|
|
427
|
+
get ['isStarted']() {
|
|
428
|
+
const _0x564d34 = a0_0x35184d;
|
|
429
|
+
return this[_0x564d34(0x1c8)];
|
|
498
430
|
}
|
|
499
431
|
|
|
500
|
-
get [
|
|
501
|
-
|
|
432
|
+
get [a0_0x35184d(0x25f)]() {
|
|
433
|
+
const _0x4cd77b = a0_0x35184d;
|
|
434
|
+
return _common.Tools[_0x4cd77b(0x1ca)]() || _common.Tools['browserIsFirefox']() || _common.Tools['browserIsOpera']() || _common.Tools['browserIsSafari']();
|
|
502
435
|
}
|
|
503
436
|
|
|
504
|
-
get [
|
|
505
|
-
|
|
437
|
+
get [a0_0x35184d(0x209)]() {
|
|
438
|
+
const _0x2bf85b = a0_0x35184d;
|
|
439
|
+
return this[_0x2bf85b(0x1f7)];
|
|
506
440
|
}
|
|
507
441
|
|
|
508
|
-
[
|
|
509
|
-
let
|
|
510
|
-
let callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
442
|
+
[a0_0x35184d(0x158)](_0x1bd8e5, _0x2fc88c) {
|
|
443
|
+
let _0x990bef = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0x0;
|
|
511
444
|
|
|
512
|
-
|
|
445
|
+
let _0x2eeacb = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
513
446
|
|
|
514
|
-
|
|
515
|
-
this[
|
|
516
|
-
this[_0x1c61('0xf')][_0x1c61('0x87')]['value'] = this[_0x1c61('0x5')][_0x1c61('0x88')];
|
|
517
|
-
const self = this;
|
|
518
|
-
this[_0x1c61('0xc')] = setTimeout(function () {
|
|
519
|
-
self['stopTone']();
|
|
447
|
+
const _0x13df61 = a0_0x35184d;
|
|
448
|
+
this[_0x13df61(0x277)][_0x13df61(0xcf)]('Playing\x20tone\x20' + _0x2fc88c + _0x13df61(0x1a7) + _0x990bef + _0x13df61(0x21b) + _0x1bd8e5 + _0x13df61(0x1c5)), this['_oscillator1'][_0x13df61(0x1b8)][_0x13df61(0x205)] = _0x2fc88c, this[_0x13df61(0x146)]['frequency'][_0x13df61(0x205)] = _0x990bef, this[_0x13df61(0x16e)][_0x13df61(0x1dc)][_0x13df61(0x205)] = this[_0x13df61(0x154)][_0x13df61(0x142)];
|
|
520
449
|
|
|
521
|
-
|
|
522
|
-
callback();
|
|
523
|
-
}
|
|
524
|
-
}, duration);
|
|
525
|
-
}
|
|
450
|
+
const _0x531960 = this;
|
|
526
451
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
clearTimeout(this[_0x1c61('0xc')]);
|
|
452
|
+
this[_0x13df61(0x223)] = setTimeout(function () {
|
|
453
|
+
const _0x5271f8 = _0x13df61;
|
|
454
|
+
_0x531960[_0x5271f8(0x213)](), _0x2eeacb && _0x2eeacb();
|
|
455
|
+
}, _0x1bd8e5);
|
|
532
456
|
}
|
|
533
457
|
|
|
534
|
-
[
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
this['_repeatToneSequence'] = sequences;
|
|
540
|
-
this[_0x1c61('0xe')] = 0x0;
|
|
541
|
-
this[_0x1c61('0x8b')] = !![];
|
|
458
|
+
[a0_0x35184d(0x213)]() {
|
|
459
|
+
const _0x512f0e = a0_0x35184d;
|
|
460
|
+
this[_0x512f0e(0xda)][_0x512f0e(0x1b8)][_0x512f0e(0x205)] = 0x0, this['_oscillator2']['frequency'][_0x512f0e(0x205)] = 0x0, this[_0x512f0e(0x16e)][_0x512f0e(0x1dc)][_0x512f0e(0x205)] = 0x0, clearTimeout(this[_0x512f0e(0x223)]);
|
|
461
|
+
}
|
|
542
462
|
|
|
543
|
-
|
|
463
|
+
['_startRepeatTone'](_0x5138b6) {
|
|
464
|
+
const _0x31991c = a0_0x35184d;
|
|
465
|
+
this[_0x31991c(0x277)][_0x31991c(0x258)](_0x31991c(0xe4)), this[_0x31991c(0x277)]['debug'](_0x5138b6), this[_0x31991c(0x136)] = _0x5138b6, this[_0x31991c(0x159)] = 0x0, this[_0x31991c(0xd5)] = !![], this[_0x31991c(0x1ce)]();
|
|
544
466
|
}
|
|
545
467
|
|
|
546
|
-
[
|
|
547
|
-
|
|
548
|
-
this[_0x1c61('0x12')][_0x1c61('0x18')]('Playing\x20repeated\x20tone,\x20pos\x20=\x20' + this[_0x1c61('0xe')]);
|
|
468
|
+
[a0_0x35184d(0x1ce)]() {
|
|
469
|
+
const _0x551500 = a0_0x35184d;
|
|
549
470
|
|
|
550
|
-
|
|
471
|
+
if (this[_0x551500(0xd5)]) {
|
|
472
|
+
this[_0x551500(0x277)][_0x551500(0xcf)](_0x551500(0x233) + this[_0x551500(0x159)]);
|
|
551
473
|
|
|
552
|
-
this[
|
|
474
|
+
let _0xa278a7 = this[_0x551500(0x136)][this[_0x551500(0x159)]];
|
|
553
475
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
}
|
|
476
|
+
this[_0x551500(0x159)]++;
|
|
477
|
+
this[_0x551500(0x159)] === this[_0x551500(0x136)][_0x551500(0x200)] && (this[_0x551500(0x159)] = 0x0);
|
|
557
478
|
|
|
558
|
-
const
|
|
479
|
+
const _0x581b1f = this;
|
|
559
480
|
|
|
560
|
-
this[
|
|
561
|
-
|
|
481
|
+
this[_0x551500(0x158)](_0xa278a7['d'], _0xa278a7['f1'], _0xa278a7['f2'], function () {
|
|
482
|
+
const _0x1496f8 = _0x551500;
|
|
483
|
+
setTimeout(_0x581b1f[_0x1496f8(0x1ce)][_0x1496f8(0xfa)](_0x581b1f), _0xa278a7['g']);
|
|
562
484
|
});
|
|
563
485
|
}
|
|
564
486
|
}
|
|
565
487
|
|
|
566
|
-
[
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
this[_0x1c61('0x8b')] = ![];
|
|
571
|
-
|
|
572
|
-
this[_0x1c61('0x89')]();
|
|
573
|
-
}
|
|
488
|
+
[a0_0x35184d(0xe5)]() {
|
|
489
|
+
const _0x4ab483 = a0_0x35184d;
|
|
490
|
+
this[_0x4ab483(0xd5)] && (this[_0x4ab483(0x277)][_0x4ab483(0x258)](_0x4ab483(0x1b7)), this[_0x4ab483(0xd5)] = ![], this[_0x4ab483(0x213)]());
|
|
574
491
|
}
|
|
575
492
|
|
|
576
|
-
[
|
|
577
|
-
const
|
|
493
|
+
[a0_0x35184d(0x148)]() {
|
|
494
|
+
const _0x12e171 = a0_0x35184d,
|
|
495
|
+
_0x2400c2 = window['AudioContext'] || window['webkitAudioContext'] || ![];
|
|
578
496
|
|
|
579
|
-
if (!
|
|
580
|
-
throw new _common.Exceptions[_0x1c61('0x6d')](_0x1c61('0x92'));
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
const ctx = new AudioContext();
|
|
584
|
-
this[_0x1c61('0x93')] = ctx[_0x1c61('0x94')]();
|
|
585
|
-
this[_0x1c61('0xa')][_0x1c61('0x95')] = this['_toneStreamNode'][_0x1c61('0x96')];
|
|
586
|
-
this[_0x1c61('0xf')] = ctx[_0x1c61('0x97')]();
|
|
587
|
-
this['_toneGainProcessor'][_0x1c61('0x87')][_0x1c61('0x85')] = 0x0;
|
|
588
|
-
|
|
589
|
-
this['_toneGainProcessor'][_0x1c61('0x3c')](this[_0x1c61('0x93')]);
|
|
590
|
-
|
|
591
|
-
this[_0x1c61('0x10')] = ctx[_0x1c61('0x98')]();
|
|
592
|
-
|
|
593
|
-
this[_0x1c61('0x10')]['connect'](this['_toneGainProcessor']);
|
|
594
|
-
|
|
595
|
-
this['_oscillator1'][_0x1c61('0x86')][_0x1c61('0x85')] = 0x0;
|
|
497
|
+
if (!_0x2400c2) throw new _common.Exceptions[_0x12e171(0x16d)](_0x12e171(0x208));
|
|
596
498
|
|
|
597
|
-
|
|
499
|
+
const _0x4083df = new _0x2400c2();
|
|
598
500
|
|
|
599
|
-
this[
|
|
600
|
-
|
|
601
|
-
this[_0x1c61('0x11')][_0x1c61('0x3c')](this['_toneGainProcessor']);
|
|
602
|
-
|
|
603
|
-
this[_0x1c61('0x11')][_0x1c61('0x86')][_0x1c61('0x85')] = 0x0;
|
|
604
|
-
|
|
605
|
-
this['_oscillator2'][_0x1c61('0x63')]();
|
|
501
|
+
this['_toneStreamNode'] = _0x4083df[_0x12e171(0x252)](), this[_0x12e171(0x216)]['srcObject'] = this[_0x12e171(0x23f)][_0x12e171(0x20b)], this[_0x12e171(0x16e)] = _0x4083df[_0x12e171(0xcd)](), this[_0x12e171(0x16e)][_0x12e171(0x1dc)][_0x12e171(0x205)] = 0x0, this[_0x12e171(0x16e)]['connect'](this[_0x12e171(0x23f)]), this[_0x12e171(0xda)] = _0x4083df[_0x12e171(0xd6)](), this[_0x12e171(0xda)][_0x12e171(0x1eb)](this[_0x12e171(0x16e)]), this[_0x12e171(0xda)][_0x12e171(0x1b8)][_0x12e171(0x205)] = 0x0, this[_0x12e171(0xda)][_0x12e171(0xd2)](), this['_oscillator2'] = _0x4083df[_0x12e171(0xd6)](), this['_oscillator2'][_0x12e171(0x1eb)](this[_0x12e171(0x16e)]), this[_0x12e171(0x146)][_0x12e171(0x1b8)][_0x12e171(0x205)] = 0x0, this[_0x12e171(0x146)][_0x12e171(0xd2)]();
|
|
606
502
|
}
|
|
607
503
|
|
|
608
|
-
[
|
|
609
|
-
|
|
504
|
+
[a0_0x35184d(0x175)]() {
|
|
505
|
+
const _0x422c16 = a0_0x35184d;
|
|
610
506
|
|
|
611
|
-
|
|
612
|
-
throw _common.Exceptions[_0x1c61('0x6d')](_0x1c61('0x99'));
|
|
613
|
-
}
|
|
507
|
+
this['log'][_0x422c16(0x258)](_0x422c16(0x141));
|
|
614
508
|
|
|
615
|
-
|
|
616
|
-
if (this[_0x1c61('0x78')][_0x1c61('0x79')](key)) {
|
|
617
|
-
let session = this[_0x1c61('0x78')][key];
|
|
509
|
+
if (this[_0x422c16(0xfe)]()) throw _common.Exceptions[_0x422c16(0x16d)]('A\x20session\x20is\x20currently\x20connecting');
|
|
618
510
|
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
511
|
+
for (let _0x4da42e in this[_0x422c16(0x129)]) {
|
|
512
|
+
if (this[_0x422c16(0x129)][_0x422c16(0x10c)](_0x4da42e)) {
|
|
513
|
+
let _0x38e2b6 = this['_activeSessions'][_0x4da42e];
|
|
514
|
+
_0x38e2b6[_0x422c16(0xd8)] === _0x422c16(0x103) && _0x38e2b6[_0x422c16(0x1c7)]();
|
|
622
515
|
}
|
|
623
516
|
}
|
|
624
517
|
}
|
|
625
518
|
|
|
626
|
-
[
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
this[_0x1c61('0x12')][_0x1c61('0x1c')](_0x1c61('0x9d') + session[_0x1c61('0x9c')] + ':\x20' + session[_0x1c61('0x50')]);
|
|
631
|
-
|
|
632
|
-
this[_0x1c61('0x78')][session[_0x1c61('0x9c')]] = session;
|
|
633
|
-
|
|
634
|
-
this[_0x1c61('0x12')][_0x1c61('0x18')](_0x1c61('0x9e') + Object[_0x1c61('0x4e')](this[_0x1c61('0x78')])['length'] + _0x1c61('0x9f'));
|
|
635
|
-
|
|
636
|
-
this[_0x1c61('0x12')][_0x1c61('0x18')](this['_activeSessions']);
|
|
519
|
+
[a0_0x35184d(0x17e)](_0x2fbd93) {
|
|
520
|
+
const _0x145d82 = a0_0x35184d;
|
|
521
|
+
this[_0x145d82(0x201)]++, _0x2fbd93['__containerId'] = this[_0x145d82(0x201)], this['log'][_0x145d82(0x258)]('Adding\x20new\x20session\x20' + _0x2fbd93[_0x145d82(0x105)] + ':\x20' + _0x2fbd93[_0x145d82(0x108)]), this[_0x145d82(0x129)][_0x2fbd93[_0x145d82(0x105)]] = _0x2fbd93, this[_0x145d82(0x277)][_0x145d82(0xcf)](_0x145d82(0x22b) + Object['keys'](this[_0x145d82(0x129)])[_0x145d82(0x200)] + _0x145d82(0x13f)), this[_0x145d82(0x277)][_0x145d82(0xcf)](this[_0x145d82(0x129)]);
|
|
637
522
|
|
|
638
523
|
try {
|
|
639
|
-
this[
|
|
640
|
-
'session':
|
|
524
|
+
this[_0x145d82(0x1af)](_0x145d82(0x15d), {
|
|
525
|
+
'session': _0x2fbd93
|
|
641
526
|
});
|
|
642
|
-
} catch (
|
|
643
|
-
this[
|
|
527
|
+
} catch (_0x295d5d) {
|
|
528
|
+
this[_0x145d82(0x277)][_0x145d82(0x247)](_0x145d82(0xcc) + _0x295d5d);
|
|
644
529
|
}
|
|
645
530
|
}
|
|
646
531
|
|
|
647
|
-
[
|
|
648
|
-
|
|
532
|
+
[a0_0x35184d(0x189)](_0x264167) {
|
|
533
|
+
const _0x157e01 = a0_0x35184d;
|
|
534
|
+
|
|
535
|
+
this[_0x157e01(0x277)][_0x157e01(0x258)]('Removing\x20session\x20' + _0x264167[_0x157e01(0x105)] + ':\x20' + _0x264167[_0x157e01(0x108)]);
|
|
649
536
|
|
|
650
537
|
try {
|
|
651
|
-
this[
|
|
652
|
-
'session':
|
|
538
|
+
this[_0x157e01(0x1af)](_0x157e01(0x125), {
|
|
539
|
+
'session': _0x264167
|
|
653
540
|
});
|
|
654
|
-
} catch (
|
|
655
|
-
this[
|
|
541
|
+
} catch (_0x26e238) {
|
|
542
|
+
this[_0x157e01(0x277)][_0x157e01(0x247)](_0x157e01(0x139) + _0x26e238);
|
|
656
543
|
}
|
|
657
544
|
|
|
658
|
-
delete this[
|
|
659
|
-
|
|
660
|
-
this['log'][_0x1c61('0x18')](_0x1c61('0x9e') + Object[_0x1c61('0x4e')](this[_0x1c61('0x78')])['length'] + _0x1c61('0xa5'));
|
|
545
|
+
delete this[_0x157e01(0x129)][_0x264167[_0x157e01(0x105)]], this[_0x157e01(0x277)][_0x157e01(0xcf)]('We\x20now\x20have\x20' + Object[_0x157e01(0x259)](this[_0x157e01(0x129)])[_0x157e01(0x200)] + '\x20sessions'), this[_0x157e01(0x277)]['debug'](this[_0x157e01(0x129)]), this[_0x157e01(0xe5)]();
|
|
546
|
+
}
|
|
661
547
|
|
|
662
|
-
|
|
548
|
+
['_sessionTerminated'](_0x387d07) {
|
|
549
|
+
const _0x494738 = a0_0x35184d;
|
|
663
550
|
|
|
664
|
-
this['
|
|
665
|
-
}
|
|
551
|
+
this[_0x494738(0x277)]['debug'](_0x494738(0x190) + _0x387d07[_0x494738(0x108)] + '\x20terminated,\x20removing\x20in\x20' + this['_options'][_0x494738(0x25e)] + _0x494738(0x1c5));
|
|
666
552
|
|
|
667
|
-
|
|
668
|
-
this[_0x1c61('0x12')][_0x1c61('0x18')]('Session\x20' + session['uuid'] + _0x1c61('0xa7') + this[_0x1c61('0x5')][_0x1c61('0xa8')] + '\x20ms');
|
|
553
|
+
const _0x41f3d7 = this;
|
|
669
554
|
|
|
670
|
-
const self = this;
|
|
671
555
|
setTimeout(function () {
|
|
672
|
-
|
|
556
|
+
_0x41f3d7['_removeSession'](_0x387d07);
|
|
673
557
|
}, this['_options']['autoRemoveSessionTime']);
|
|
674
558
|
}
|
|
675
559
|
|
|
676
|
-
[
|
|
677
|
-
|
|
678
|
-
if (this['_activeSessions'][_0x1c61('0x79')](key)) {
|
|
679
|
-
let session = this[_0x1c61('0x78')][key];
|
|
560
|
+
[a0_0x35184d(0xfe)]() {
|
|
561
|
+
const _0x1d889c = a0_0x35184d;
|
|
680
562
|
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
563
|
+
for (let _0x1f4fc6 in this[_0x1d889c(0x129)]) {
|
|
564
|
+
if (this[_0x1d889c(0x129)][_0x1d889c(0x10c)](_0x1f4fc6)) {
|
|
565
|
+
let _0x5e5385 = this[_0x1d889c(0x129)][_0x1f4fc6];
|
|
566
|
+
|
|
567
|
+
if (_0x5e5385[_0x1d889c(0xd8)] === 'INITIALIZING' || _0x5e5385[_0x1d889c(0xd8)] === _0x1d889c(0x1f0) || _0x5e5385[_0x1d889c(0xd8)] === _0x1d889c(0x10e) || _0x5e5385['state'] === _0x1d889c(0x192)) return !![];
|
|
684
568
|
}
|
|
685
569
|
}
|
|
686
570
|
|
|
687
571
|
return ![];
|
|
688
572
|
}
|
|
689
573
|
|
|
690
|
-
[
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
this[_0x1c61('0xac')] = state;
|
|
574
|
+
[a0_0x35184d(0x1b9)](_0x1ddbb5) {
|
|
575
|
+
const _0x3effc4 = a0_0x35184d;
|
|
576
|
+
this['log'][_0x3effc4(0x258)](_0x3effc4(0x114) + _0x1ddbb5), this[_0x3effc4(0x18f)] = _0x1ddbb5;
|
|
694
577
|
|
|
695
578
|
try {
|
|
696
|
-
this[
|
|
697
|
-
'state':
|
|
579
|
+
this[_0x3effc4(0x1af)](_0x3effc4(0x156), {
|
|
580
|
+
'state': _0x1ddbb5
|
|
698
581
|
});
|
|
699
|
-
} catch (
|
|
700
|
-
this[
|
|
582
|
+
} catch (_0x2bc6dc) {
|
|
583
|
+
this[_0x3effc4(0x277)][_0x3effc4(0x247)](_0x3effc4(0x107) + _0x2bc6dc);
|
|
701
584
|
}
|
|
702
585
|
}
|
|
703
586
|
|
|
704
|
-
[
|
|
587
|
+
['_fireIncomingCallEvent'](_0x353f5b) {
|
|
588
|
+
const _0x5d5410 = a0_0x35184d;
|
|
589
|
+
|
|
705
590
|
try {
|
|
706
|
-
this[
|
|
707
|
-
} catch (
|
|
708
|
-
this[
|
|
591
|
+
this[_0x5d5410(0x1af)](_0x5d5410(0x20f), _0x353f5b);
|
|
592
|
+
} catch (_0x2389f8) {
|
|
593
|
+
this['log'][_0x5d5410(0x247)](_0x5d5410(0x10d) + _0x2389f8);
|
|
709
594
|
}
|
|
710
595
|
}
|
|
711
596
|
|
|
712
|
-
[
|
|
713
|
-
let
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
e[_0x1c61('0xb4')] = _common.Tools[_0x1c61('0xb5')](e['duration']);
|
|
721
|
-
e[_0x1c61('0xb6')] = e[_0x1c61('0xb2')] ? _common.Tools[_0x1c61('0xb5')](e[_0x1c61('0xb2')]) : '';
|
|
722
|
-
e[_0x1c61('0xb7')] = e[_0x1c61('0xb3')] ? _common.Tools[_0x1c61('0xb5')](e[_0x1c61('0xb3')]) : '';
|
|
597
|
+
[a0_0x35184d(0x184)]() {
|
|
598
|
+
let _0xedd94a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
599
|
+
|
|
600
|
+
const _0x421366 = a0_0x35184d;
|
|
601
|
+
|
|
602
|
+
let _0x36d1fa;
|
|
603
|
+
|
|
604
|
+
_0x36d1fa = (0, _camelcaseKeys.default)(_0xedd94a), _0x36d1fa['recordings'] = (0, _camelcaseKeys.default)(_0xedd94a[_0x421366(0x254)]), _0x36d1fa[_0x421366(0x1a4)] = _0x36d1fa[_0x421366(0x1a4)] * 0x3e8, _0x36d1fa['answerDuration'] = _0x36d1fa['answerDuration'] * 0x3e8, _0x36d1fa['activeDuration'] = _0x36d1fa[_0x421366(0x1fa)] * 0x3e8, _0x36d1fa['durationStr'] = _common.Tools[_0x421366(0x16b)](_0x36d1fa[_0x421366(0x1a4)]), _0x36d1fa[_0x421366(0xc8)] = _0x36d1fa[_0x421366(0x12d)] ? _common.Tools[_0x421366(0x16b)](_0x36d1fa[_0x421366(0x12d)]) : '', _0x36d1fa[_0x421366(0xf7)] = _0x36d1fa[_0x421366(0x1fa)] ? _common.Tools[_0x421366(0x16b)](_0x36d1fa[_0x421366(0x1fa)]) : '';
|
|
723
605
|
|
|
724
606
|
try {
|
|
725
|
-
this[
|
|
726
|
-
} catch (
|
|
727
|
-
this[
|
|
607
|
+
this[_0x421366(0x1af)](_0x421366(0x102), _0x36d1fa);
|
|
608
|
+
} catch (_0x3259ca) {
|
|
609
|
+
this[_0x421366(0x277)][_0x421366(0x247)]('Exception\x20in\x20callDataInfo\x20event:\x20' + _0x3259ca);
|
|
728
610
|
}
|
|
729
611
|
}
|
|
730
612
|
|
|
731
|
-
[
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
}
|
|
613
|
+
['_checkMediaPermission']() {
|
|
614
|
+
const _0x46efd0 = a0_0x35184d;
|
|
615
|
+
if (!this[_0x46efd0(0x15f)]) throw new _common.Exceptions[_0x46efd0(0xf4)]();
|
|
735
616
|
}
|
|
736
617
|
|
|
737
618
|
}
|
|
@@ -739,361 +620,194 @@ class Phone extends _events.default {
|
|
|
739
620
|
exports.Phone = Phone;
|
|
740
621
|
|
|
741
622
|
class Session extends _events.default {
|
|
742
|
-
constructor(
|
|
743
|
-
|
|
744
|
-
this[
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
this['
|
|
750
|
-
|
|
751
|
-
this[_0x1c61('0xbf')] = ![];
|
|
752
|
-
this[_0x1c61('0xc0')] = ![];
|
|
753
|
-
this[_0x1c61('0xc1')] = null;
|
|
754
|
-
this['_callBeginTime'] = null;
|
|
755
|
-
this[_0x1c61('0xc2')] = null;
|
|
756
|
-
this['_callEndTime'] = null;
|
|
757
|
-
this[_0x1c61('0xc3')] = null;
|
|
758
|
-
this[_0x1c61('0xc4')] = null;
|
|
759
|
-
this['_destinationNumber'] = null;
|
|
760
|
-
this[_0x1c61('0xc5')] = null;
|
|
761
|
-
this[_0x1c61('0xc6')] = null;
|
|
762
|
-
this[_0x1c61('0xc7')] = ![];
|
|
763
|
-
this['_whisperMode'] = null;
|
|
764
|
-
this['_manualDisposition'] = null;
|
|
765
|
-
this[_0x1c61('0xc8')] = null;
|
|
766
|
-
this[_0x1c61('0xc9')] = null;
|
|
767
|
-
this[_0x1c61('0xca')] = 0x0;
|
|
768
|
-
this[_0x1c61('0xcb')] = null;
|
|
769
|
-
this[_0x1c61('0xcc')] = null;
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
[_0x1c61('0x72')](number, callParams) {
|
|
773
|
-
this[_0x1c61('0xbc')] = _common.Tools['createUUID']();
|
|
774
|
-
|
|
775
|
-
this[_0x1c61('0x12')]['debug'](_0x1c61('0xcd') + number + '\x20[' + this[_0x1c61('0xbc')] + ']');
|
|
776
|
-
|
|
777
|
-
this[_0x1c61('0xce')] = number;
|
|
778
|
-
let options = {
|
|
623
|
+
constructor(_0xc7e78a) {
|
|
624
|
+
const _0x33de8e = a0_0x35184d;
|
|
625
|
+
super(), this[_0x33de8e(0x171)] = _0xc7e78a, this['log'] = _0xc7e78a[_0x33de8e(0x277)], this[_0x33de8e(0x14a)] = null, this['_webRTCSession'] = null, this[_0x33de8e(0x13c)] = null, this['_iceCandidateTimer'] = null, this[_0x33de8e(0x12b)] = ![], this[_0x33de8e(0x1dd)] = ![], this[_0x33de8e(0x117)] = ![], this[_0x33de8e(0x120)] = null, this[_0x33de8e(0xef)] = null, this['_callAnswerTime'] = null, this['_callEndTime'] = null, this[_0x33de8e(0x116)] = null, this[_0x33de8e(0x134)] = null, this[_0x33de8e(0x1c6)] = null, this[_0x33de8e(0x1d3)] = null, this[_0x33de8e(0x1be)] = null, this[_0x33de8e(0x1ec)] = ![], this[_0x33de8e(0x1b1)] = null, this[_0x33de8e(0x25d)] = null, this['_rtcpStatsTimer'] = null, this['_currentReport'] = null, this[_0x33de8e(0xfb)] = 0x0, this[_0x33de8e(0x234)] = null, this['_mediaSwitch'] = null;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
['newOutboundSession'](_0x489345, _0x1ad14a) {
|
|
629
|
+
const _0x41b825 = a0_0x35184d;
|
|
630
|
+
this['_callUUID'] = _common.Tools[_0x41b825(0x26a)](), this[_0x41b825(0x277)][_0x41b825(0xcf)](_0x41b825(0x13e) + _0x489345 + '\x20[' + this['_callUUID'] + ']'), this[_0x41b825(0xd3)] = _0x489345;
|
|
631
|
+
let _0x472d3b = {
|
|
779
632
|
'mediaConstraints': {
|
|
780
633
|
'audio': !![],
|
|
781
634
|
'video': ![]
|
|
782
635
|
},
|
|
783
636
|
'pcConfig': {
|
|
784
637
|
'iceServers': [{
|
|
785
|
-
'urls': [
|
|
638
|
+
'urls': [_0x41b825(0x167)]
|
|
786
639
|
}]
|
|
787
640
|
},
|
|
788
|
-
'extraHeaders': [
|
|
641
|
+
'extraHeaders': [_0x41b825(0x1bd) + this[_0x41b825(0x171)][_0x41b825(0x22c)][_0x41b825(0x1ba)], _0x41b825(0x162) + this[_0x41b825(0x14a)], _0x41b825(0x195) + _0x1ad14a[_0x41b825(0x1a2)]]
|
|
789
642
|
};
|
|
643
|
+
_0x1ad14a[_0x41b825(0x1e2)] && _0x472d3b[_0x41b825(0x226)][_0x41b825(0xfd)]('X-CID-Number-Id:\x20' + _0x1ad14a['explicitCallerId']);
|
|
644
|
+
_0x1ad14a[_0x41b825(0x224)] && _0x472d3b[_0x41b825(0x226)][_0x41b825(0xfd)]('X-Short-CID-Id:\x20' + _0x1ad14a[_0x41b825(0x224)]);
|
|
645
|
+
_0x1ad14a['metaInfo'] && _0x472d3b['extraHeaders']['push'](_0x41b825(0x1e7) + encodeURI(_0x1ad14a['metaInfo'][_0x41b825(0x227)]()[_0x41b825(0x26b)](0x0, 0xff)));
|
|
790
646
|
|
|
791
|
-
if (
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
if (callParams[_0x1c61('0xd4')]) {
|
|
796
|
-
options[_0x1c61('0xd5')][_0x1c61('0x7b')]('X-Short-CID-Id:\x20' + callParams['explicitShortCallerId']);
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
if (callParams[_0x1c61('0xd6')]) {
|
|
800
|
-
options['extraHeaders'][_0x1c61('0x7b')]('X-Meta-Info:\x20' + encodeURI(callParams[_0x1c61('0xd6')]['toString']()['substr'](0x0, 0xff)));
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
if (callParams[_0x1c61('0xd7')]) {
|
|
804
|
-
if (isNaN(callParams[_0x1c61('0xd7')])) {
|
|
805
|
-
throw new _common.Exceptions['InvalidParameter'](_0x1c61('0xd8'));
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
this[_0x1c61('0x12')][_0x1c61('0x18')](_0x1c61('0xd9') + callParams[_0x1c61('0xd7')] + '\x20days');
|
|
809
|
-
|
|
810
|
-
options['extraHeaders'][_0x1c61('0x7b')](_0x1c61('0xda') + callParams[_0x1c61('0xd7')]);
|
|
811
|
-
|
|
812
|
-
this[_0x1c61('0xc0')] = !![];
|
|
813
|
-
} else {
|
|
814
|
-
this[_0x1c61('0xc0')] = ![];
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
this['_isListenCall'] = callParams[_0x1c61('0xc7')];
|
|
647
|
+
if (_0x1ad14a[_0x41b825(0x1b4)]) {
|
|
648
|
+
if (isNaN(_0x1ad14a[_0x41b825(0x1b4)])) throw new _common.Exceptions['InvalidParameter'](_0x41b825(0x172));
|
|
649
|
+
this[_0x41b825(0x277)][_0x41b825(0xcf)](_0x41b825(0x1de) + _0x1ad14a['record'] + _0x41b825(0x246)), _0x472d3b['extraHeaders'][_0x41b825(0xfd)](_0x41b825(0x1f9) + _0x1ad14a[_0x41b825(0x1b4)]), this[_0x41b825(0x117)] = !![];
|
|
650
|
+
} else this['_isRecording'] = ![];
|
|
818
651
|
|
|
819
|
-
|
|
820
|
-
|
|
652
|
+
this[_0x41b825(0x1ec)] = _0x1ad14a['_isListenCall'];
|
|
653
|
+
if (_0x1ad14a['mediaSwitchURI']) this[_0x41b825(0x277)][_0x41b825(0xcf)](_0x41b825(0x1f1) + _0x1ad14a[_0x41b825(0x174)]), _0x472d3b[_0x41b825(0x226)]['push'](_0x41b825(0x23a) + _0x1ad14a[_0x41b825(0x174)]);else {
|
|
654
|
+
const _0x3e4138 = this[_0x41b825(0x1d8)]();
|
|
821
655
|
|
|
822
|
-
|
|
823
|
-
} else {
|
|
824
|
-
const otherSessions = this[_0x1c61('0xde')]();
|
|
825
|
-
|
|
826
|
-
if (otherSessions[_0x1c61('0x4f')] > 0x0) {
|
|
827
|
-
if (otherSessions[0x0]['_mediaSwitch']) {
|
|
828
|
-
this[_0x1c61('0x12')][_0x1c61('0x18')](_0x1c61('0xdf') + otherSessions[0x0][_0x1c61('0xcc')]);
|
|
829
|
-
|
|
830
|
-
options[_0x1c61('0xd5')]['push']('X-RMS:\x20sip:' + otherSessions[0x0][_0x1c61('0xcc')]);
|
|
831
|
-
} else {
|
|
832
|
-
this[_0x1c61('0x12')][_0x1c61('0x24')](_0x1c61('0xe0'));
|
|
833
|
-
}
|
|
834
|
-
} else {
|
|
835
|
-
this[_0x1c61('0x12')]['debug'](_0x1c61('0xe1'));
|
|
836
|
-
}
|
|
656
|
+
_0x3e4138[_0x41b825(0x200)] > 0x0 ? _0x3e4138[0x0][_0x41b825(0x112)] ? (this[_0x41b825(0x277)]['debug'](_0x41b825(0x14d) + _0x3e4138[0x0][_0x41b825(0x112)]), _0x472d3b[_0x41b825(0x226)][_0x41b825(0xfd)](_0x41b825(0xde) + _0x3e4138[0x0][_0x41b825(0x112)])) : this[_0x41b825(0x277)][_0x41b825(0x250)](_0x41b825(0x23b)) : this[_0x41b825(0x277)][_0x41b825(0xcf)]('No\x20other\x20active\x20calls,\x20no\x20media\x20switch\x20grouping\x20requested');
|
|
837
657
|
}
|
|
838
658
|
|
|
839
|
-
const
|
|
659
|
+
const _0x31c3a9 = _0x41b825(0x12c) + _0x489345 + _0x41b825(0x17b);
|
|
840
660
|
|
|
841
661
|
try {
|
|
842
|
-
this[
|
|
843
|
-
} catch (
|
|
844
|
-
this[
|
|
845
|
-
|
|
846
|
-
return null;
|
|
662
|
+
this[_0x41b825(0x10b)](this[_0x41b825(0x171)][_0x41b825(0x15e)][_0x41b825(0x274)](_0x31c3a9, _0x472d3b));
|
|
663
|
+
} catch (_0x2006de) {
|
|
664
|
+
return this['log'][_0x41b825(0x247)](_0x41b825(0x20d), _0x2006de), null;
|
|
847
665
|
}
|
|
848
666
|
|
|
849
|
-
|
|
850
|
-
this['_setAnswerCallTimeout'](callParams[_0x1c61('0xe3')]);
|
|
851
|
-
}
|
|
667
|
+
_0x1ad14a[_0x41b825(0x237)] && this[_0x41b825(0x1bc)](_0x1ad14a[_0x41b825(0x237)]);
|
|
852
668
|
}
|
|
853
669
|
|
|
854
|
-
[
|
|
855
|
-
|
|
856
|
-
this[
|
|
857
|
-
this[_0x1c61('0xc6')] = unescape(newSessionRequest[_0x1c61('0xe5')][_0x1c61('0xe6')](_0x1c61('0xea'), 0x0));
|
|
858
|
-
this[_0x1c61('0xeb')] = newSessionRequest['request']['from'][_0x1c61('0xec')];
|
|
859
|
-
this['_originatingNumber'] = newSessionRequest[_0x1c61('0xe5')][_0x1c61('0xed')]['uri'][_0x1c61('0xee')];
|
|
860
|
-
|
|
861
|
-
this[_0x1c61('0x12')][_0x1c61('0x1c')](_0x1c61('0xef') + this['_originatingNumber'] + '\x20[' + this[_0x1c61('0xbc')] + ']');
|
|
862
|
-
|
|
863
|
-
this[_0x1c61('0x12')][_0x1c61('0x18')](newSessionRequest);
|
|
864
|
-
|
|
865
|
-
this[_0x1c61('0xcc')] = newSessionRequest['request'][_0x1c61('0xe6')](_0x1c61('0xf0'));
|
|
866
|
-
|
|
867
|
-
this[_0x1c61('0x12')]['debug'](_0x1c61('0xf1') + this[_0x1c61('0xcc')]);
|
|
868
|
-
|
|
869
|
-
this[_0x1c61('0xe2')](newSessionRequest['session']);
|
|
670
|
+
[a0_0x35184d(0x196)](_0x1f720f) {
|
|
671
|
+
const _0x2c15ec = a0_0x35184d;
|
|
672
|
+
this[_0x2c15ec(0x14a)] = _0x1f720f[_0x2c15ec(0x152)][_0x2c15ec(0xf3)](_0x2c15ec(0xfc), 0x0), this[_0x2c15ec(0x1c6)] = _0x1f720f[_0x2c15ec(0x152)]['getHeader']('X-DID', 0x0), this[_0x2c15ec(0x1be)] = unescape(_0x1f720f['request'][_0x2c15ec(0xf3)](_0x2c15ec(0x1a0), 0x0)), this[_0x2c15ec(0xd1)] = _0x1f720f['request'][_0x2c15ec(0x253)][_0x2c15ec(0x261)], this[_0x2c15ec(0x134)] = _0x1f720f[_0x2c15ec(0x152)][_0x2c15ec(0x253)]['uri'][_0x2c15ec(0x11e)], this['log'][_0x2c15ec(0x258)]('Incoming\x20call\x20from\x20' + this[_0x2c15ec(0x134)] + '\x20[' + this['_callUUID'] + ']'), this[_0x2c15ec(0x277)][_0x2c15ec(0xcf)](_0x1f720f), this[_0x2c15ec(0x112)] = _0x1f720f[_0x2c15ec(0x152)][_0x2c15ec(0xf3)](_0x2c15ec(0x207)), this[_0x2c15ec(0x277)]['debug'](_0x2c15ec(0x165) + this[_0x2c15ec(0x112)]), this[_0x2c15ec(0x10b)](_0x1f720f[_0x2c15ec(0x257)]);
|
|
870
673
|
}
|
|
871
674
|
|
|
872
|
-
[
|
|
873
|
-
const
|
|
675
|
+
[a0_0x35184d(0x1d8)]() {
|
|
676
|
+
const _0x59615b = a0_0x35184d,
|
|
677
|
+
_0x3f47f3 = this[_0x59615b(0x171)][_0x59615b(0x24c)];
|
|
874
678
|
|
|
875
|
-
let
|
|
679
|
+
let _0x285ec1 = [];
|
|
876
680
|
|
|
877
|
-
for (let
|
|
878
|
-
|
|
879
|
-
if (allSessions[key][_0x1c61('0x9c')] !== this[_0x1c61('0x9c')]) {
|
|
880
|
-
s['push'](allSessions[key]);
|
|
881
|
-
}
|
|
882
|
-
}
|
|
681
|
+
for (let _0xd48dea in _0x3f47f3) {
|
|
682
|
+
_0x3f47f3[_0xd48dea] && _0x3f47f3[_0xd48dea][_0x59615b(0x105)] !== this[_0x59615b(0x105)] && _0x285ec1[_0x59615b(0xfd)](_0x3f47f3[_0xd48dea]);
|
|
883
683
|
}
|
|
884
684
|
|
|
885
|
-
return
|
|
685
|
+
return _0x285ec1;
|
|
886
686
|
}
|
|
887
687
|
|
|
888
|
-
[
|
|
889
|
-
|
|
890
|
-
this[
|
|
891
|
-
const self = this;
|
|
892
|
-
|
|
893
|
-
this[_0x1c61('0xf2')]['on'](_0x1c61('0xf3'), function (event) {
|
|
894
|
-
const c = event[_0x1c61('0xf4')];
|
|
895
|
-
|
|
896
|
-
self[_0x1c61('0x12')]['debug'](_0x1c61('0xf5') + c[_0x1c61('0xf4')]);
|
|
897
|
-
|
|
898
|
-
if (c[_0x1c61('0xf6')] === _0x1c61('0xf7') && c[_0x1c61('0xf8')] !== null && c[_0x1c61('0xf9')] !== null) {
|
|
899
|
-
self[_0x1c61('0x12')][_0x1c61('0x1c')](_0x1c61('0xfa') + c['candidate']);
|
|
900
|
-
|
|
901
|
-
if (self[_0x1c61('0xfb')] != null) clearTimeout(self['_iceCandidateTimer']);
|
|
902
|
-
|
|
903
|
-
event[_0x1c61('0xfc')]();
|
|
904
|
-
} else {
|
|
905
|
-
if (self[_0x1c61('0xfb')] != null) clearTimeout(self[_0x1c61('0xfb')]);
|
|
906
|
-
self[_0x1c61('0xfb')] = setTimeout(function (data) {
|
|
907
|
-
self[_0x1c61('0x12')]['debug'](_0x1c61('0xfd') + self[_0x1c61('0xbb')][_0x1c61('0xd0')][_0x1c61('0xfe')] + '\x20ms)\x20reached');
|
|
908
|
-
|
|
909
|
-
data[_0x1c61('0xfc')]();
|
|
910
|
-
}, self[_0x1c61('0xbb')][_0x1c61('0xd0')][_0x1c61('0xfe')], event);
|
|
911
|
-
}
|
|
912
|
-
});
|
|
913
|
-
|
|
914
|
-
this[_0x1c61('0xf2')]['on'](_0x1c61('0x57'), function () {
|
|
915
|
-
self[_0x1c61('0xff')]();
|
|
688
|
+
[a0_0x35184d(0x10b)](_0x4e7a5f) {
|
|
689
|
+
const _0x327ece = a0_0x35184d;
|
|
690
|
+
this[_0x327ece(0x214)] = _0x4e7a5f, this[_0x327ece(0xef)] = Date[_0x327ece(0x21f)]();
|
|
916
691
|
|
|
917
|
-
|
|
692
|
+
const _0x3737d9 = this;
|
|
918
693
|
|
|
919
|
-
|
|
920
|
-
|
|
694
|
+
this[_0x327ece(0x214)]['on'](_0x327ece(0x1b0), function (_0x214824) {
|
|
695
|
+
const _0x1711a3 = _0x327ece,
|
|
696
|
+
_0x5f093d = _0x214824[_0x1711a3(0x145)];
|
|
921
697
|
|
|
922
|
-
|
|
923
|
-
if (self[_0x1c61('0xbb')][_0x1c61('0xd0')][_0x1c61('0x103')]) {
|
|
924
|
-
self[_0x1c61('0xbb')][_0x1c61('0x4c')](ST_CALLINIT);
|
|
925
|
-
}
|
|
698
|
+
_0x3737d9[_0x1711a3(0x277)][_0x1711a3(0xcf)](_0x1711a3(0x115) + _0x5f093d[_0x1711a3(0x145)]);
|
|
926
699
|
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
this['_webRTCSession']['on'](_0x1c61('0x105'), function (data) {
|
|
930
|
-
if (data[_0x1c61('0x4a')] === 'remote') {
|
|
931
|
-
self[_0x1c61('0x101')](_0x1c61('0x106'), {
|
|
932
|
-
'code': data[_0x1c61('0x107')][_0x1c61('0x108')]
|
|
933
|
-
});
|
|
934
|
-
|
|
935
|
-
self[_0x1c61('0xbb')][_0x1c61('0x8e')]();
|
|
936
|
-
|
|
937
|
-
if (data[_0x1c61('0x107')][_0x1c61('0x108')] === 0xb4) {
|
|
938
|
-
self[_0x1c61('0xbb')][_0x1c61('0x4c')](ST_RINGBACK);
|
|
939
|
-
}
|
|
700
|
+
if (_0x5f093d['type'] === _0x1711a3(0xf9) && _0x5f093d[_0x1711a3(0x13d)] !== null && _0x5f093d['relatedPort'] !== null) {
|
|
701
|
+
_0x3737d9['log']['info'](_0x1711a3(0x124) + _0x5f093d[_0x1711a3(0x145)]);
|
|
940
702
|
|
|
941
|
-
if (
|
|
942
|
-
self[_0x1c61('0xcb')] = setTimeout(function () {
|
|
943
|
-
self[_0x1c61('0x12')][_0x1c61('0x1c')](_0x1c61('0x109') + self[_0x1c61('0xca')] + _0x1c61('0x10a'));
|
|
703
|
+
if (_0x3737d9['_iceCandidateTimer'] != null) clearTimeout(_0x3737d9[_0x1711a3(0xec)]);
|
|
944
704
|
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
});
|
|
954
|
-
|
|
955
|
-
this[_0x1c61('0xf2')]['on'](_0x1c61('0x10b'), function (data) {
|
|
956
|
-
self['_phone'][_0x1c61('0x8e')]();
|
|
957
|
-
|
|
958
|
-
self[_0x1c61('0xc2')] = Date[_0x1c61('0x10c')]();
|
|
959
|
-
|
|
960
|
-
if (self[_0x1c61('0xca')]) {
|
|
961
|
-
clearTimeout(self[_0x1c61('0xcb')]);
|
|
962
|
-
self['_answerCallTimeout'] = 0x0;
|
|
705
|
+
_0x214824[_0x1711a3(0xf2)]();
|
|
706
|
+
} else {
|
|
707
|
+
if (_0x3737d9[_0x1711a3(0xec)] != null) clearTimeout(_0x3737d9[_0x1711a3(0xec)]);
|
|
708
|
+
_0x3737d9[_0x1711a3(0xec)] = setTimeout(function (_0x56b7ca) {
|
|
709
|
+
const _0x1243f7 = _0x1711a3;
|
|
710
|
+
_0x3737d9[_0x1243f7(0x277)]['debug'](_0x1243f7(0x232) + _0x3737d9['_phone']['options'][_0x1243f7(0x12e)] + _0x1243f7(0x147)), _0x56b7ca[_0x1243f7(0xf2)]();
|
|
711
|
+
}, _0x3737d9[_0x1711a3(0x171)][_0x1711a3(0x22c)][_0x1711a3(0x12e)], _0x214824);
|
|
963
712
|
}
|
|
713
|
+
}), this[_0x327ece(0x214)]['on']('connecting', function () {
|
|
714
|
+
const _0x143d7a = _0x327ece;
|
|
715
|
+
_0x3737d9['_startDurationUpdateTimer'](), _0x3737d9[_0x143d7a(0xcb)](), _0x3737d9[_0x143d7a(0x1e1)]('INITIALIZING');
|
|
716
|
+
}), this[_0x327ece(0x214)]['on']('sending', function () {
|
|
717
|
+
const _0x26ef8f = _0x327ece;
|
|
718
|
+
_0x3737d9[_0x26ef8f(0x171)][_0x26ef8f(0x22c)]['playCallInitializedTone'] && _0x3737d9[_0x26ef8f(0x171)][_0x26ef8f(0x157)](ST_CALLINIT), _0x3737d9[_0x26ef8f(0x1e1)](_0x26ef8f(0x1f0));
|
|
719
|
+
}), this[_0x327ece(0x214)]['on']('progress', function (_0x7361e4) {
|
|
720
|
+
const _0x2542a7 = _0x327ece;
|
|
721
|
+
_0x7361e4[_0x2542a7(0x1e0)] === 'remote' && (_0x3737d9['_setSessionState']('PROGRESS', {
|
|
722
|
+
'code': _0x7361e4['response'][_0x2542a7(0x153)]
|
|
723
|
+
}), _0x3737d9[_0x2542a7(0x171)][_0x2542a7(0xe5)](), _0x7361e4[_0x2542a7(0x22f)][_0x2542a7(0x153)] === 0xb4 && _0x3737d9[_0x2542a7(0x171)]['_startRepeatTone'](ST_RINGBACK), _0x3737d9['_answerCallTimeout'] && (_0x3737d9[_0x2542a7(0x234)] = setTimeout(function () {
|
|
724
|
+
const _0x35ccda = _0x2542a7;
|
|
725
|
+
|
|
726
|
+
_0x3737d9[_0x35ccda(0x277)][_0x35ccda(0x258)](_0x35ccda(0x1f5) + _0x3737d9[_0x35ccda(0xfb)] + _0x35ccda(0x1d2));
|
|
964
727
|
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
self[_0x1c61('0x12')]['debug'](_0x1c61('0x10f'));
|
|
970
|
-
} else {
|
|
971
|
-
self[_0x1c61('0x12')][_0x1c61('0x18')]('No\x20call\x20recording\x20started\x20yet');
|
|
728
|
+
try {
|
|
729
|
+
_0x3737d9['hangup']();
|
|
730
|
+
} catch (_0x9afee0) {
|
|
731
|
+
_0x3737d9[_0x35ccda(0x277)]['info'](_0x35ccda(0x25a));
|
|
972
732
|
}
|
|
733
|
+
}, _0x3737d9[_0x2542a7(0xfb)] * 0x3e8)));
|
|
734
|
+
}), this[_0x327ece(0x214)]['on'](_0x327ece(0xc6), function (_0x5a7f3a) {
|
|
735
|
+
const _0x4286ad = _0x327ece;
|
|
736
|
+
_0x3737d9[_0x4286ad(0x171)][_0x4286ad(0xe5)](), _0x3737d9[_0x4286ad(0x12f)] = Date[_0x4286ad(0x21f)]();
|
|
737
|
+
_0x3737d9[_0x4286ad(0xfb)] && (clearTimeout(_0x3737d9[_0x4286ad(0x234)]), _0x3737d9[_0x4286ad(0xfb)] = 0x0);
|
|
973
738
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
}
|
|
977
|
-
});
|
|
978
|
-
|
|
979
|
-
this[_0x1c61('0xf2')]['on'](_0x1c61('0x110'), function () {
|
|
980
|
-
self['_setSessionState'](_0x1c61('0x9a'));
|
|
981
|
-
});
|
|
982
|
-
|
|
983
|
-
this['_webRTCSession']['on'](_0x1c61('0x111'), function () {
|
|
984
|
-
self[_0x1c61('0xbb')][_0x1c61('0x8e')]();
|
|
739
|
+
if (_0x5a7f3a[_0x4286ad(0x1e0)] === _0x4286ad(0xc4)) {
|
|
740
|
+
const _0x266816 = _0x5a7f3a[_0x4286ad(0x22f)][_0x4286ad(0xf3)]('X-Recording');
|
|
985
741
|
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
if (self[_0x1c61('0xca')]) {
|
|
989
|
-
clearTimeout(self[_0x1c61('0xcb')]);
|
|
742
|
+
_0x266816 === 'true' ? _0x3737d9[_0x4286ad(0x277)][_0x4286ad(0xcf)](_0x4286ad(0x21a)) : _0x3737d9['log'][_0x4286ad(0xcf)](_0x4286ad(0x262)), _0x3737d9[_0x4286ad(0x112)] = _0x5a7f3a['response']['getHeader']('X-MS'), _0x3737d9[_0x4286ad(0x277)][_0x4286ad(0xcf)](_0x4286ad(0x165) + _0x3737d9[_0x4286ad(0x112)]);
|
|
990
743
|
}
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
let
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
m = '';
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
self['_setSessionState'](_0x1c61('0x117'), {
|
|
1012
|
-
'cause': data[_0x1c61('0x118')],
|
|
1013
|
-
'message': m
|
|
1014
|
-
});
|
|
1015
|
-
});
|
|
1016
|
-
this['_webRTCSession']['on'](_0x1c61('0x119'), function (data) {
|
|
1017
|
-
self[_0x1c61('0x12')]['debug'](_0x1c61('0x11a'), data);
|
|
1018
|
-
});
|
|
1019
|
-
|
|
1020
|
-
this[_0x1c61('0xf2')]['on'](_0x1c61('0x11b'), function (data) {
|
|
1021
|
-
self[_0x1c61('0x12')][_0x1c61('0x18')](_0x1c61('0x11c'), data);
|
|
1022
|
-
});
|
|
1023
|
-
|
|
1024
|
-
this[_0x1c61('0xf2')]['on'](_0x1c61('0x9b'), function () {
|
|
1025
|
-
self[_0x1c61('0xbe')] = !![];
|
|
1026
|
-
self['_fireHoldStateEvent']();
|
|
1027
|
-
|
|
1028
|
-
self[_0x1c61('0x101')]('ON_HOLD');
|
|
1029
|
-
});
|
|
1030
|
-
|
|
1031
|
-
this[_0x1c61('0xf2')]['on'](_0x1c61('0x11d'), function () {
|
|
1032
|
-
self[_0x1c61('0xbe')] = ![];
|
|
1033
|
-
|
|
1034
|
-
self[_0x1c61('0x11e')]();
|
|
1035
|
-
|
|
1036
|
-
self[_0x1c61('0x101')](_0x1c61('0x9a'));
|
|
1037
|
-
});
|
|
1038
|
-
|
|
1039
|
-
this['_webRTCSession']['on'](_0x1c61('0x11f'), function (data) {
|
|
1040
|
-
self[_0x1c61('0x12')]['debug'](_0x1c61('0x120'), data);
|
|
1041
|
-
|
|
1042
|
-
self[_0x1c61('0xbf')] = !![];
|
|
1043
|
-
|
|
1044
|
-
self[_0x1c61('0x121')]();
|
|
1045
|
-
});
|
|
1046
|
-
|
|
1047
|
-
this[_0x1c61('0xf2')]['on'](_0x1c61('0x122'), function (data) {
|
|
1048
|
-
self[_0x1c61('0x12')]['debug'](_0x1c61('0x123'), data);
|
|
1049
|
-
|
|
1050
|
-
self[_0x1c61('0xbf')] = ![];
|
|
1051
|
-
|
|
1052
|
-
self[_0x1c61('0x121')]();
|
|
1053
|
-
});
|
|
1054
|
-
|
|
1055
|
-
this[_0x1c61('0xf2')]['on'](_0x1c61('0x124'), function (data) {
|
|
1056
|
-
self[_0x1c61('0x12')]['debug']('Session\x20reinvite', data);
|
|
1057
|
-
});
|
|
1058
|
-
|
|
1059
|
-
this[_0x1c61('0xf2')]['on'](_0x1c61('0x125'), function (data) {
|
|
1060
|
-
self[_0x1c61('0x12')][_0x1c61('0x18')](_0x1c61('0x126'), data);
|
|
1061
|
-
});
|
|
1062
|
-
|
|
1063
|
-
this[_0x1c61('0xf2')]['on']('getusermediafailed', function (data) {
|
|
1064
|
-
self[_0x1c61('0x12')][_0x1c61('0x22')](_0x1c61('0x127'), data);
|
|
1065
|
-
});
|
|
1066
|
-
|
|
1067
|
-
if (self[_0x1c61('0xf2')][_0x1c61('0x128')]) {
|
|
1068
|
-
self[_0x1c61('0x129')](self['_webRTCSession']);
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
this[_0x1c61('0x12')][_0x1c61('0x18')](_0x1c61('0x12a'));
|
|
1072
|
-
|
|
1073
|
-
this['log'][_0x1c61('0x18')](this);
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
[_0x1c61('0x12b')]() {
|
|
1077
|
-
let disposition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1078
|
-
|
|
1079
|
-
if (!disposition) {
|
|
1080
|
-
this[_0x1c61('0x12')]['info'](_0x1c61('0x12c'));
|
|
1081
|
-
|
|
1082
|
-
this[_0x1c61('0xf2')][_0x1c61('0x12d')]();
|
|
1083
|
-
} else {
|
|
1084
|
-
this[_0x1c61('0x12')][_0x1c61('0x1c')](_0x1c61('0x12e') + disposition);
|
|
1085
|
-
|
|
1086
|
-
this[_0x1c61('0x12f')] = disposition;
|
|
1087
|
-
|
|
1088
|
-
this[_0x1c61('0xf2')]['terminate']({
|
|
1089
|
-
'extraHeaders': [_0x1c61('0x130') + disposition]
|
|
744
|
+
}), this['_webRTCSession']['on']('confirmed', function () {
|
|
745
|
+
const _0x1b6c83 = _0x327ece;
|
|
746
|
+
|
|
747
|
+
_0x3737d9[_0x1b6c83(0x1e1)](_0x1b6c83(0x103));
|
|
748
|
+
}), this['_webRTCSession']['on'](_0x327ece(0x104), function () {
|
|
749
|
+
const _0x3f6830 = _0x327ece;
|
|
750
|
+
_0x3737d9[_0x3f6830(0x171)]['_endRepeatTone'](), _0x3737d9[_0x3f6830(0x230)] = Date[_0x3f6830(0x21f)](), _0x3737d9['_answerCallTimeout'] && clearTimeout(_0x3737d9[_0x3f6830(0x234)]), _0x3737d9[_0x3f6830(0x1e1)](_0x3f6830(0x183));
|
|
751
|
+
}), this[_0x327ece(0x214)]['on']('failed', function (_0x376898) {
|
|
752
|
+
const _0x3c807d = _0x327ece;
|
|
753
|
+
_0x3737d9[_0x3c807d(0x171)][_0x3c807d(0xe5)](), _0x3737d9['_callEndTime'] = Date[_0x3c807d(0x21f)]();
|
|
754
|
+
_0x3737d9[_0x3c807d(0xfb)] && clearTimeout(_0x3737d9[_0x3c807d(0x234)]);
|
|
755
|
+
|
|
756
|
+
let _0x4d39ff;
|
|
757
|
+
|
|
758
|
+
_0x376898[_0x3c807d(0x24a)] ? _0x4d39ff = _0x376898[_0x3c807d(0x24a)][_0x3c807d(0x153)] + '\x20' + _0x376898['message'][_0x3c807d(0x239)] : _0x4d39ff = '', _0x3737d9['_setSessionState'](_0x3c807d(0x19f), {
|
|
759
|
+
'cause': _0x376898[_0x3c807d(0x20c)],
|
|
760
|
+
'message': _0x4d39ff
|
|
1090
761
|
});
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
762
|
+
}), this['_webRTCSession']['on'](_0x327ece(0x24f), function (_0x518ccb) {
|
|
763
|
+
const _0x570226 = _0x327ece;
|
|
764
|
+
|
|
765
|
+
_0x3737d9[_0x570226(0x277)][_0x570226(0xcf)]('Session\x20DTMF', _0x518ccb);
|
|
766
|
+
}), this[_0x327ece(0x214)]['on'](_0x327ece(0x218), function (_0x3cbdd0) {
|
|
767
|
+
const _0x337911 = _0x327ece;
|
|
768
|
+
|
|
769
|
+
_0x3737d9[_0x337911(0x277)][_0x337911(0xcf)]('New\x20session\x20info', _0x3cbdd0);
|
|
770
|
+
}), this[_0x327ece(0x214)]['on'](_0x327ece(0x1c7), function () {
|
|
771
|
+
const _0x1b2ee7 = _0x327ece;
|
|
772
|
+
_0x3737d9['_isOnHold'] = !![], _0x3737d9[_0x1b2ee7(0x23d)](), _0x3737d9['_setSessionState'](_0x1b2ee7(0xca));
|
|
773
|
+
}), this['_webRTCSession']['on'](_0x327ece(0x185), function () {
|
|
774
|
+
const _0x232b5d = _0x327ece;
|
|
775
|
+
_0x3737d9[_0x232b5d(0x12b)] = ![], _0x3737d9[_0x232b5d(0x23d)](), _0x3737d9[_0x232b5d(0x1e1)](_0x232b5d(0x103));
|
|
776
|
+
}), this[_0x327ece(0x214)]['on'](_0x327ece(0x215), function (_0xc3017a) {
|
|
777
|
+
const _0x195e1f = _0x327ece;
|
|
778
|
+
_0x3737d9[_0x195e1f(0x277)][_0x195e1f(0xcf)]('Microphone\x20muted', _0xc3017a), _0x3737d9[_0x195e1f(0x1dd)] = !![], _0x3737d9[_0x195e1f(0x24e)]();
|
|
779
|
+
}), this['_webRTCSession']['on']('unmuted', function (_0x41ece5) {
|
|
780
|
+
const _0x2620eb = _0x327ece;
|
|
781
|
+
_0x3737d9[_0x2620eb(0x277)][_0x2620eb(0xcf)]('Microphone\x20unmuted', _0x41ece5), _0x3737d9[_0x2620eb(0x1dd)] = ![], _0x3737d9['_fireMuteStateEvent']();
|
|
782
|
+
}), this['_webRTCSession']['on'](_0x327ece(0x119), function (_0x135dc9) {
|
|
783
|
+
const _0x27d8e = _0x327ece;
|
|
784
|
+
|
|
785
|
+
_0x3737d9[_0x27d8e(0x277)][_0x27d8e(0xcf)](_0x27d8e(0x186), _0x135dc9);
|
|
786
|
+
}), this[_0x327ece(0x214)]['on'](_0x327ece(0x256), function (_0x560fb6) {
|
|
787
|
+
const _0x2ec07d = _0x327ece;
|
|
788
|
+
|
|
789
|
+
_0x3737d9['log']['debug'](_0x2ec07d(0x18a), _0x560fb6);
|
|
790
|
+
}), this['_webRTCSession']['on'](_0x327ece(0x1ab), function (_0x330581) {
|
|
791
|
+
const _0x266a70 = _0x327ece;
|
|
792
|
+
|
|
793
|
+
_0x3737d9[_0x266a70(0x277)][_0x266a70(0x247)](_0x266a70(0x198), _0x330581);
|
|
794
|
+
}), _0x3737d9[_0x327ece(0x214)]['connection'] && _0x3737d9[_0x327ece(0x1cc)](_0x3737d9[_0x327ece(0x214)]), this[_0x327ece(0x277)][_0x327ece(0xcf)](_0x327ece(0x11d)), this[_0x327ece(0x277)][_0x327ece(0xcf)](this);
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
[a0_0x35184d(0x1da)]() {
|
|
798
|
+
let _0x9c04b8 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
799
|
+
|
|
800
|
+
const _0xc6240b = a0_0x35184d;
|
|
801
|
+
!_0x9c04b8 ? (this[_0xc6240b(0x277)][_0xc6240b(0x258)](_0xc6240b(0xc9)), this[_0xc6240b(0x214)]['terminate']()) : (this[_0xc6240b(0x277)][_0xc6240b(0x258)](_0xc6240b(0x221) + _0x9c04b8), this[_0xc6240b(0x25d)] = _0x9c04b8, this[_0xc6240b(0x214)][_0xc6240b(0xe3)]({
|
|
802
|
+
'extraHeaders': ['X-HDISP:\x20' + _0x9c04b8]
|
|
803
|
+
}));
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
[a0_0x35184d(0x235)]() {
|
|
807
|
+
let _0xb41583 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
808
|
+
|
|
809
|
+
const _0x153906 = a0_0x35184d;
|
|
810
|
+
let _0x33c89b = {
|
|
1097
811
|
'mediaConstraints': {
|
|
1098
812
|
'audio': !![],
|
|
1099
813
|
'video': ![]
|
|
@@ -1103,360 +817,294 @@ class Session extends _events.default {
|
|
|
1103
817
|
'urls': ['stun:stun.l.google.com:19302']
|
|
1104
818
|
}]
|
|
1105
819
|
},
|
|
1106
|
-
'extraHeaders': ['X-Call-token:\x20' + this[
|
|
820
|
+
'extraHeaders': ['X-Call-token:\x20' + this['_phone']['options'][_0x153906(0x1ba)]]
|
|
1107
821
|
};
|
|
1108
|
-
|
|
1109
|
-
if (metaInfo) {
|
|
1110
|
-
options['extraHeaders'][_0x1c61('0x7b')](_0x1c61('0x132') + encodeURI(metaInfo['toString']()[_0x1c61('0x133')](0x0, 0xff)));
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
this['_webRTCSession'][_0x1c61('0x131')](options);
|
|
1114
|
-
|
|
1115
|
-
this['_handleRemoteAudio'](this['_webRTCSession']);
|
|
822
|
+
_0xb41583 && _0x33c89b['extraHeaders'][_0x153906(0xfd)](_0x153906(0x1e7) + encodeURI(_0xb41583[_0x153906(0x227)]()[_0x153906(0x26b)](0x0, 0xff))), this[_0x153906(0x214)][_0x153906(0x235)](_0x33c89b), this[_0x153906(0x1cc)](this['_webRTCSession']);
|
|
1116
823
|
}
|
|
1117
824
|
|
|
1118
|
-
[
|
|
1119
|
-
let
|
|
1120
|
-
let reasonPhrase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _0x1c61('0x134');
|
|
825
|
+
[a0_0x35184d(0x187)]() {
|
|
826
|
+
let _0x39c653 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0x25b;
|
|
1121
827
|
|
|
1122
|
-
|
|
828
|
+
let _0xa28556 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : a0_0x35184d(0x19b);
|
|
1123
829
|
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
'
|
|
830
|
+
const _0x1c32d9 = a0_0x35184d;
|
|
831
|
+
this['log'][_0x1c32d9(0x258)](_0x1c32d9(0xd0)), this[_0x1c32d9(0x214)]['terminate']({
|
|
832
|
+
'status_code': _0x39c653,
|
|
833
|
+
'reason_phrase': _0xa28556
|
|
1127
834
|
});
|
|
1128
835
|
}
|
|
1129
836
|
|
|
1130
|
-
get [
|
|
1131
|
-
|
|
837
|
+
get [a0_0x35184d(0x108)]() {
|
|
838
|
+
const _0x5db6cb = a0_0x35184d;
|
|
839
|
+
return this[_0x5db6cb(0x14a)];
|
|
1132
840
|
}
|
|
1133
841
|
|
|
1134
|
-
get [
|
|
1135
|
-
|
|
842
|
+
get [a0_0x35184d(0xd3)]() {
|
|
843
|
+
const _0x19835d = a0_0x35184d;
|
|
844
|
+
return this[_0x19835d(0x1c6)];
|
|
1136
845
|
}
|
|
1137
846
|
|
|
1138
|
-
get [
|
|
1139
|
-
|
|
847
|
+
get [a0_0x35184d(0x1cd)]() {
|
|
848
|
+
const _0x9e7eb8 = a0_0x35184d;
|
|
849
|
+
return this[_0x9e7eb8(0x1be)];
|
|
1140
850
|
}
|
|
1141
851
|
|
|
1142
852
|
get ['originatingNumber']() {
|
|
1143
|
-
|
|
853
|
+
const _0x2f86cd = a0_0x35184d;
|
|
854
|
+
return this[_0x2f86cd(0x134)];
|
|
1144
855
|
}
|
|
1145
856
|
|
|
1146
|
-
set [
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
this[_0x1c61('0xe8')] = number;
|
|
857
|
+
set [a0_0x35184d(0xd3)](_0x352858) {
|
|
858
|
+
const _0x3e6914 = a0_0x35184d;
|
|
859
|
+
this[_0x3e6914(0x277)][_0x3e6914(0xcf)](_0x3e6914(0x11c) + _0x352858), this['_destinationNumber'] = _0x352858;
|
|
1150
860
|
}
|
|
1151
861
|
|
|
1152
|
-
get [
|
|
1153
|
-
|
|
862
|
+
get [a0_0x35184d(0xd8)]() {
|
|
863
|
+
const _0x289148 = a0_0x35184d;
|
|
864
|
+
return this[_0x289148(0x13c)];
|
|
1154
865
|
}
|
|
1155
866
|
|
|
1156
|
-
get [
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
return '
|
|
1160
|
-
} else if (this[_0x1c61('0xf2')]['direction'] === 'incoming') {
|
|
1161
|
-
this[_0x1c61('0x12')]['debug'](_0x1c61('0x139'));
|
|
1162
|
-
|
|
1163
|
-
return _0x1c61('0x13a');
|
|
1164
|
-
} else if (this[_0x1c61('0xf2')]['direction'] === _0x1c61('0x13b')) {
|
|
1165
|
-
this[_0x1c61('0x12')][_0x1c61('0x18')]('Call\x20direction\x20is\x20OUTBOUND');
|
|
1166
|
-
|
|
1167
|
-
return 'OUTBOUND';
|
|
1168
|
-
} else {
|
|
1169
|
-
this[_0x1c61('0x12')][_0x1c61('0x22')](_0x1c61('0x13c') + this[_0x1c61('0xf2')][_0x1c61('0x13d')]);
|
|
1170
|
-
|
|
1171
|
-
return _0x1c61('0x13e');
|
|
867
|
+
get [a0_0x35184d(0x126)]() {
|
|
868
|
+
const _0x37de0f = a0_0x35184d;
|
|
869
|
+
if (this['_isListenCall']) return this[_0x37de0f(0x277)]['debug']('Call\x20direction\x20is\x20LISTEN'), _0x37de0f(0x1d5);else {
|
|
870
|
+
if (this[_0x37de0f(0x214)][_0x37de0f(0x126)] === 'incoming') return this[_0x37de0f(0x277)][_0x37de0f(0xcf)](_0x37de0f(0x229)), _0x37de0f(0x1d0);else return this[_0x37de0f(0x214)][_0x37de0f(0x126)] === _0x37de0f(0x26d) ? (this[_0x37de0f(0x277)]['debug']('Call\x20direction\x20is\x20OUTBOUND'), _0x37de0f(0x242)) : (this[_0x37de0f(0x277)]['error'](_0x37de0f(0x1d9) + this['_webRTCSession'][_0x37de0f(0x126)]), _0x37de0f(0x238));
|
|
1172
871
|
}
|
|
1173
872
|
}
|
|
1174
873
|
|
|
1175
|
-
[
|
|
1176
|
-
const
|
|
1177
|
-
|
|
874
|
+
[a0_0x35184d(0x16c)]() {
|
|
875
|
+
const _0x2e33ed = a0_0x35184d,
|
|
876
|
+
_0x468080 = {
|
|
877
|
+
'extraHeaders': ['Record:\x20on']
|
|
1178
878
|
};
|
|
1179
879
|
|
|
1180
|
-
this[
|
|
880
|
+
this[_0x2e33ed(0x277)][_0x2e33ed(0xcf)](_0x2e33ed(0x1b5));
|
|
1181
881
|
|
|
1182
|
-
const
|
|
882
|
+
const _0x5ac582 = this;
|
|
1183
883
|
|
|
1184
|
-
this[
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
884
|
+
this[_0x2e33ed(0x214)]['once'](_0x2e33ed(0x218), _0x24058f => {
|
|
885
|
+
const _0x59a152 = _0x2e33ed;
|
|
886
|
+
_0x24058f['originator'] === _0x59a152(0x133) && (_0x24058f[_0x59a152(0x258)]['on'](_0x59a152(0x240), function () {
|
|
887
|
+
const _0x3a8d95 = _0x59a152;
|
|
888
|
+
_0x5ac582[_0x3a8d95(0x277)]['info']('Recording\x20started\x20successfully'), _0x5ac582[_0x3a8d95(0x117)] = !![];
|
|
1189
889
|
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
self[_0x1c61('0x12')]['error'](_0x1c61('0x147') + self[_0x1c61('0xc1')]);
|
|
1204
|
-
|
|
1205
|
-
self[_0x1c61('0x148')]();
|
|
1206
|
-
});
|
|
1207
|
-
}
|
|
1208
|
-
});
|
|
1209
|
-
|
|
1210
|
-
this[_0x1c61('0xf2')][_0x1c61('0x149')](_0x1c61('0x14a'), null, opt);
|
|
890
|
+
try {
|
|
891
|
+
_0x5ac582[_0x3a8d95(0x1af)](_0x3a8d95(0x1c2), {
|
|
892
|
+
'state': !![],
|
|
893
|
+
'error': null
|
|
894
|
+
});
|
|
895
|
+
} catch (_0x290181) {
|
|
896
|
+
_0x5ac582[_0x3a8d95(0x277)]['error'](_0x3a8d95(0x24d) + _0x290181);
|
|
897
|
+
}
|
|
898
|
+
}), _0x24058f[_0x59a152(0x258)]['on'](_0x59a152(0x161), function (_0x1e5787) {
|
|
899
|
+
const _0x33b11f = _0x59a152;
|
|
900
|
+
_0x5ac582[_0x33b11f(0x120)] = _0x1e5787[_0x33b11f(0x22f)][_0x33b11f(0x239)], _0x5ac582[_0x33b11f(0x277)][_0x33b11f(0x247)]('Recording\x20start\x20failed:\x20' + _0x5ac582[_0x33b11f(0x120)]), _0x5ac582[_0x33b11f(0x177)]();
|
|
901
|
+
}));
|
|
902
|
+
}), this[_0x2e33ed(0x214)][_0x2e33ed(0x1e5)](_0x2e33ed(0x181), null, _0x468080);
|
|
1211
903
|
}
|
|
1212
904
|
|
|
1213
|
-
[
|
|
1214
|
-
const
|
|
1215
|
-
|
|
905
|
+
['stopRecording']() {
|
|
906
|
+
const _0x18f638 = a0_0x35184d,
|
|
907
|
+
_0x56b212 = {
|
|
908
|
+
'extraHeaders': [_0x18f638(0x118)]
|
|
1216
909
|
};
|
|
1217
910
|
|
|
1218
|
-
this[
|
|
1219
|
-
|
|
1220
|
-
const self = this;
|
|
911
|
+
this[_0x18f638(0x277)][_0x18f638(0xcf)](_0x18f638(0x25c));
|
|
1221
912
|
|
|
1222
|
-
|
|
1223
|
-
data[_0x1c61('0x1c')]['on'](_0x1c61('0x143'), function () {
|
|
1224
|
-
self[_0x1c61('0x12')][_0x1c61('0x1c')]('Recording\x20stopped\x20successfully');
|
|
913
|
+
const _0x162e9a = this;
|
|
1225
914
|
|
|
1226
|
-
|
|
915
|
+
this['_webRTCSession'][_0x18f638(0x263)](_0x18f638(0x218), _0x197195 => {
|
|
916
|
+
const _0x1f0de5 = _0x18f638;
|
|
917
|
+
_0x197195['info']['on'](_0x1f0de5(0x240), function () {
|
|
918
|
+
const _0x336a64 = _0x1f0de5;
|
|
919
|
+
_0x162e9a[_0x336a64(0x277)][_0x336a64(0x258)]('Recording\x20stopped\x20successfully'), _0x162e9a[_0x336a64(0x117)] = ![];
|
|
1227
920
|
|
|
1228
921
|
try {
|
|
1229
|
-
|
|
922
|
+
_0x162e9a[_0x336a64(0x1af)]('recordingStateChange', {
|
|
1230
923
|
'state': ![],
|
|
1231
924
|
'error': null
|
|
1232
925
|
});
|
|
1233
|
-
} catch (
|
|
1234
|
-
|
|
926
|
+
} catch (_0x2711bd) {
|
|
927
|
+
_0x162e9a['log'][_0x336a64(0x247)](_0x336a64(0x24d) + _0x2711bd);
|
|
1235
928
|
}
|
|
1236
|
-
})
|
|
929
|
+
}), _0x197195['info']['on']('failed', function (_0x17c6f1) {
|
|
930
|
+
const _0x29611f = _0x1f0de5;
|
|
1237
931
|
|
|
1238
|
-
|
|
1239
|
-
self[_0x1c61('0x12')][_0x1c61('0x22')](_0x1c61('0x14e') + data[_0x1c61('0x107')][_0x1c61('0x116')]);
|
|
932
|
+
_0x162e9a['log']['error'](_0x29611f(0x155) + _0x17c6f1[_0x29611f(0x22f)]['reason_phrase']);
|
|
1240
933
|
|
|
1241
934
|
try {
|
|
1242
|
-
|
|
1243
|
-
'state':
|
|
1244
|
-
'error':
|
|
935
|
+
_0x162e9a[_0x29611f(0x1af)](_0x29611f(0x1c2), {
|
|
936
|
+
'state': _0x162e9a[_0x29611f(0x117)],
|
|
937
|
+
'error': _0x17c6f1[_0x29611f(0x22f)][_0x29611f(0x239)]
|
|
1245
938
|
});
|
|
1246
|
-
} catch (
|
|
1247
|
-
|
|
939
|
+
} catch (_0x86e83a) {
|
|
940
|
+
_0x162e9a[_0x29611f(0x277)]['error'](_0x29611f(0x24d) + _0x86e83a);
|
|
1248
941
|
}
|
|
1249
942
|
});
|
|
1250
|
-
});
|
|
1251
|
-
|
|
1252
|
-
this[_0x1c61('0xf2')][_0x1c61('0x149')](_0x1c61('0x14a'), null, opt);
|
|
943
|
+
}), this[_0x18f638(0x214)][_0x18f638(0x1e5)](_0x18f638(0x181), null, _0x56b212);
|
|
1253
944
|
}
|
|
1254
945
|
|
|
1255
946
|
['toggleRecording']() {
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
return !![];
|
|
1259
|
-
} else {
|
|
1260
|
-
this[_0x1c61('0x14b')]();
|
|
1261
|
-
|
|
1262
|
-
return ![];
|
|
1263
|
-
}
|
|
947
|
+
const _0x55d403 = a0_0x35184d;
|
|
948
|
+
return !this[_0x55d403(0x117)] ? (this[_0x55d403(0x16c)](), !![]) : (this[_0x55d403(0x160)](), ![]);
|
|
1264
949
|
}
|
|
1265
950
|
|
|
1266
|
-
get [
|
|
1267
|
-
|
|
951
|
+
get [a0_0x35184d(0x1e3)]() {
|
|
952
|
+
const _0x46d2b5 = a0_0x35184d;
|
|
953
|
+
return this[_0x46d2b5(0x117)];
|
|
1268
954
|
}
|
|
1269
955
|
|
|
1270
|
-
[
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
this['_webRTCSession'][_0x1c61('0x150')]();
|
|
956
|
+
[a0_0x35184d(0x231)]() {
|
|
957
|
+
const _0x38a9df = a0_0x35184d;
|
|
958
|
+
this[_0x38a9df(0x277)][_0x38a9df(0x258)](_0x38a9df(0x1ed)), this[_0x38a9df(0x214)][_0x38a9df(0x22a)]();
|
|
1274
959
|
}
|
|
1275
960
|
|
|
1276
|
-
[
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
this[_0x1c61('0xf2')][_0x1c61('0x152')]();
|
|
961
|
+
[a0_0x35184d(0x26f)]() {
|
|
962
|
+
const _0x57bdf6 = a0_0x35184d;
|
|
963
|
+
this[_0x57bdf6(0x277)][_0x57bdf6(0x258)](_0x57bdf6(0x1f4)), this['_webRTCSession'][_0x57bdf6(0xf6)]();
|
|
1280
964
|
}
|
|
1281
965
|
|
|
1282
|
-
[
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
} else {
|
|
1286
|
-
this[_0x1c61('0x155')]();
|
|
1287
|
-
}
|
|
966
|
+
['toggleMute']() {
|
|
967
|
+
const _0x1e5511 = a0_0x35184d;
|
|
968
|
+
!this[_0x1e5511(0x1dd)] ? this['muteMic']() : this['unmuteMic']();
|
|
1288
969
|
}
|
|
1289
970
|
|
|
1290
|
-
get [
|
|
1291
|
-
|
|
971
|
+
get [a0_0x35184d(0x243)]() {
|
|
972
|
+
const _0xdebb45 = a0_0x35184d;
|
|
973
|
+
return this[_0xdebb45(0x1dd)];
|
|
1292
974
|
}
|
|
1293
975
|
|
|
1294
|
-
[
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
this[_0x1c61('0xf2')][_0x1c61('0x9b')]();
|
|
976
|
+
['hold']() {
|
|
977
|
+
const _0x2c024d = a0_0x35184d;
|
|
978
|
+
this[_0x2c024d(0x277)][_0x2c024d(0x258)](_0x2c024d(0xdc)), this[_0x2c024d(0x214)][_0x2c024d(0x1c7)]();
|
|
1298
979
|
}
|
|
1299
980
|
|
|
1300
|
-
[
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
this[_0x1c61('0xbb')][_0x1c61('0x158')]();
|
|
1304
|
-
|
|
1305
|
-
this[_0x1c61('0xf2')][_0x1c61('0x11d')]();
|
|
981
|
+
[a0_0x35184d(0x185)]() {
|
|
982
|
+
const _0x50a9fb = a0_0x35184d;
|
|
983
|
+
this[_0x50a9fb(0x277)]['info']('Uncall\x20call'), this[_0x50a9fb(0x171)][_0x50a9fb(0x175)](), this['_webRTCSession'][_0x50a9fb(0x185)]();
|
|
1306
984
|
}
|
|
1307
985
|
|
|
1308
|
-
[
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
} else {
|
|
1312
|
-
this[_0x1c61('0x11d')]();
|
|
1313
|
-
}
|
|
986
|
+
[a0_0x35184d(0x25b)]() {
|
|
987
|
+
const _0x5dc077 = a0_0x35184d;
|
|
988
|
+
!this[_0x5dc077(0x12b)] ? this[_0x5dc077(0x1c7)]() : this[_0x5dc077(0x185)]();
|
|
1314
989
|
}
|
|
1315
990
|
|
|
1316
|
-
get [
|
|
1317
|
-
|
|
991
|
+
get [a0_0x35184d(0x1ff)]() {
|
|
992
|
+
const _0x2337f8 = a0_0x35184d;
|
|
993
|
+
return this[_0x2337f8(0x12b)];
|
|
1318
994
|
}
|
|
1319
995
|
|
|
1320
|
-
[
|
|
1321
|
-
let
|
|
1322
|
-
|
|
1323
|
-
if (!(code in DTMF_FREQUENCY_TABLE)) {
|
|
1324
|
-
throw new _common.Exceptions[_0x1c61('0x15a')](_0x1c61('0x15b'));
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
this[_0x1c61('0x12')][_0x1c61('0x1c')](_0x1c61('0x15c') + code);
|
|
1328
|
-
|
|
1329
|
-
this[_0x1c61('0xf2')]['sendDTMF'](code);
|
|
996
|
+
[a0_0x35184d(0x264)](_0x520a56) {
|
|
997
|
+
let _0xf1da67 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !![];
|
|
1330
998
|
|
|
1331
|
-
|
|
1332
|
-
|
|
999
|
+
const _0x4121b8 = a0_0x35184d;
|
|
1000
|
+
if (!(_0x520a56 in DTMF_FREQUENCY_TABLE)) throw new _common.Exceptions[_0x4121b8(0x266)](_0x4121b8(0x1b6));
|
|
1001
|
+
this[_0x4121b8(0x277)][_0x4121b8(0x258)](_0x4121b8(0x1bf) + _0x520a56), this[_0x4121b8(0x214)][_0x4121b8(0x264)](_0x520a56);
|
|
1333
1002
|
|
|
1334
|
-
|
|
1335
|
-
|
|
1003
|
+
if (_0xf1da67) {
|
|
1004
|
+
const _0x32ca07 = DTMF_FREQUENCY_TABLE[_0x520a56];
|
|
1005
|
+
if (this[_0x4121b8(0x1dd)]) this[_0x4121b8(0x277)][_0x4121b8(0xcf)](_0x4121b8(0x19d)), this[_0x4121b8(0x171)][_0x4121b8(0x158)](0x1f4, _0x32ca07[0x0], _0x32ca07[0x1]);else {
|
|
1006
|
+
this[_0x4121b8(0x277)][_0x4121b8(0xcf)](_0x4121b8(0xc7)), this[_0x4121b8(0x214)]['mute']();
|
|
1336
1007
|
|
|
1337
|
-
|
|
1338
|
-
} else {
|
|
1339
|
-
this['log'][_0x1c61('0x18')](_0x1c61('0x15e'));
|
|
1340
|
-
|
|
1341
|
-
this['_webRTCSession']['mute']();
|
|
1342
|
-
const self = this;
|
|
1343
|
-
|
|
1344
|
-
this[_0x1c61('0xbb')][_0x1c61('0x8d')](0x1f4, f[0x0], f[0x1], function () {
|
|
1345
|
-
self['log']['debug']('Unmute\x20mic\x20after\x20DTMF');
|
|
1008
|
+
const _0x27567f = this;
|
|
1346
1009
|
|
|
1347
|
-
|
|
1010
|
+
this['_phone'][_0x4121b8(0x158)](0x1f4, _0x32ca07[0x0], _0x32ca07[0x1], function () {
|
|
1011
|
+
const _0x573577 = _0x4121b8;
|
|
1012
|
+
_0x27567f[_0x573577(0x277)][_0x573577(0xcf)]('Unmute\x20mic\x20after\x20DTMF'), _0x27567f[_0x573577(0x214)][_0x573577(0xf6)]();
|
|
1348
1013
|
});
|
|
1349
1014
|
}
|
|
1350
1015
|
}
|
|
1351
1016
|
}
|
|
1352
1017
|
|
|
1353
|
-
[
|
|
1354
|
-
|
|
1018
|
+
[a0_0x35184d(0x163)](_0x58160c) {
|
|
1019
|
+
const _0x5d5cf9 = a0_0x35184d;
|
|
1355
1020
|
|
|
1356
|
-
|
|
1357
|
-
'replaces': dstSession[_0x1c61('0xf2')]
|
|
1358
|
-
});
|
|
1021
|
+
this[_0x5d5cf9(0x277)]['info'](_0x5d5cf9(0x176) + this[_0x5d5cf9(0x108)] + _0x5d5cf9(0x15a) + _0x58160c[_0x5d5cf9(0x108)]);
|
|
1359
1022
|
|
|
1360
|
-
const
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
referSubscriber['on'](_0x1c61('0x166'), function (cause) {
|
|
1365
|
-
self[_0x1c61('0x12')]['error'](_0x1c61('0x167') + cause);
|
|
1366
|
-
});
|
|
1367
|
-
referSubscriber['on'](_0x1c61('0x113'), function (cause) {
|
|
1368
|
-
self[_0x1c61('0x12')][_0x1c61('0x22')](_0x1c61('0x168') + cause);
|
|
1369
|
-
});
|
|
1370
|
-
}
|
|
1023
|
+
const _0x46b7ba = this['_webRTCSession']['refer'](this[_0x5d5cf9(0x214)][_0x5d5cf9(0x101)][_0x5d5cf9(0xed)], {
|
|
1024
|
+
'replaces': _0x58160c[_0x5d5cf9(0x214)]
|
|
1025
|
+
}),
|
|
1026
|
+
_0x4b7ee4 = this;
|
|
1371
1027
|
|
|
1372
|
-
|
|
1373
|
-
|
|
1028
|
+
_0x46b7ba['on'](_0x5d5cf9(0x21e), function () {
|
|
1029
|
+
const _0x199abc = _0x5d5cf9;
|
|
1374
1030
|
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1031
|
+
_0x4b7ee4['log'][_0x199abc(0x258)](_0x199abc(0xce));
|
|
1032
|
+
}), _0x46b7ba['on'](_0x5d5cf9(0x1fe), function (_0x2d20b2) {
|
|
1033
|
+
const _0x26e6b0 = _0x5d5cf9;
|
|
1378
1034
|
|
|
1379
|
-
|
|
1035
|
+
_0x4b7ee4[_0x26e6b0(0x277)][_0x26e6b0(0x247)](_0x26e6b0(0x1e9) + _0x2d20b2);
|
|
1036
|
+
}), _0x46b7ba['on'](_0x5d5cf9(0x161), function (_0x59d684) {
|
|
1037
|
+
const _0x12168c = _0x5d5cf9;
|
|
1380
1038
|
|
|
1381
|
-
|
|
1382
|
-
'call_uuid': this[_0x1c61('0x50')],
|
|
1383
|
-
'call_command': 'playback',
|
|
1384
|
-
'media_file_id': media_file_id,
|
|
1385
|
-
'hangup_after': hangup_after
|
|
1039
|
+
_0x4b7ee4[_0x12168c(0x277)]['error'](_0x12168c(0x178) + _0x59d684);
|
|
1386
1040
|
});
|
|
1387
|
-
|
|
1388
|
-
if (hangup_after) {
|
|
1389
|
-
this[_0x1c61('0xbb')][_0x1c61('0x7')]['srcObject'] = null;
|
|
1390
|
-
|
|
1391
|
-
p[_0x1c61('0x20')](() => {
|
|
1392
|
-
this[_0x1c61('0x101')](_0x1c61('0x16c'));
|
|
1393
|
-
});
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
return p;
|
|
1397
1041
|
}
|
|
1398
1042
|
|
|
1399
|
-
[
|
|
1400
|
-
let
|
|
1043
|
+
[a0_0x35184d(0x271)](_0x3de786) {
|
|
1044
|
+
let _0x53bfb1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ![];
|
|
1401
1045
|
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
}
|
|
1046
|
+
const _0x26b660 = a0_0x35184d;
|
|
1047
|
+
if (!this[_0x26b660(0x171)][_0x26b660(0x154)][_0x26b660(0x1ac)]) throw new _common.Exceptions['NotAllowed'](_0x26b660(0x135));
|
|
1405
1048
|
|
|
1406
|
-
|
|
1407
|
-
throw new _common.Exceptions['InvalidOptions'](_0x1c61('0x16f'));
|
|
1408
|
-
}
|
|
1049
|
+
this[_0x26b660(0x277)]['info']('Playback\x20media\x20file\x20' + _0x3de786 + '\x20hangup\x20after\x20' + _0x53bfb1);
|
|
1409
1050
|
|
|
1410
|
-
|
|
1051
|
+
const _0x2ec2a9 = this[_0x26b660(0x171)]['_eventClient'][_0x26b660(0x1b2)](_0x26b660(0xe7), {
|
|
1052
|
+
'call_uuid': this[_0x26b660(0x108)],
|
|
1053
|
+
'call_command': 'playback',
|
|
1054
|
+
'media_file_id': _0x3de786,
|
|
1055
|
+
'hangup_after': _0x53bfb1
|
|
1056
|
+
});
|
|
1411
1057
|
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
}
|
|
1058
|
+
return _0x53bfb1 && (this[_0x26b660(0x171)]['_remoteAudioElement'][_0x26b660(0xeb)] = null, this[_0x26b660(0x214)]['mute'](), _0x2ec2a9['then'](() => {
|
|
1059
|
+
const _0x184bd6 = _0x26b660;
|
|
1415
1060
|
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1061
|
+
this[_0x184bd6(0x1e1)](_0x184bd6(0x111));
|
|
1062
|
+
})), _0x2ec2a9;
|
|
1063
|
+
}
|
|
1419
1064
|
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
}
|
|
1065
|
+
[a0_0x35184d(0x11a)]() {
|
|
1066
|
+
let _0x3038c4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0x0;
|
|
1423
1067
|
|
|
1424
|
-
|
|
1068
|
+
const _0x582d5f = a0_0x35184d;
|
|
1069
|
+
if (!this['direction'] === _0x582d5f(0x1d5)) throw new _common.Exceptions[_0x582d5f(0x16d)](_0x582d5f(0x203));
|
|
1070
|
+
if (_0x3038c4 < 0x0 || _0x3038c4 > 0x2) throw new _common.Exceptions[_0x582d5f(0x194)]('Invalid\x20mode');
|
|
1425
1071
|
|
|
1426
|
-
|
|
1072
|
+
let _0x11b105;
|
|
1427
1073
|
|
|
1428
|
-
this[
|
|
1074
|
+
_0x3038c4 === 0x0 && (_0x11b105 = 0x0), _0x3038c4 === 0x1 && (_0x11b105 = 0x2), _0x3038c4 === 0x2 && (_0x11b105 = 0x3), this['sendDTMF'](_0x11b105, ![]), this['_whisperMode'] = _0x3038c4, this[_0x582d5f(0x217)]();
|
|
1429
1075
|
}
|
|
1430
1076
|
|
|
1431
|
-
[
|
|
1432
|
-
const
|
|
1077
|
+
[a0_0x35184d(0x1d4)]() {
|
|
1078
|
+
const _0x34be96 = a0_0x35184d,
|
|
1079
|
+
_0x48cffe = this;
|
|
1433
1080
|
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1081
|
+
!this['_durationUpdTimerObj'] && (this[_0x34be96(0x116)] = setInterval(function () {
|
|
1082
|
+
const _0x387caf = _0x34be96,
|
|
1083
|
+
_0x375d05 = _0x48cffe[_0x387caf(0x12f)] ? Date[_0x387caf(0x21f)]() - _0x48cffe[_0x387caf(0x12f)] : null,
|
|
1084
|
+
_0x4c3e97 = {
|
|
1085
|
+
'uuid': _0x48cffe['_callUUID'],
|
|
1086
|
+
'beginTime': _0x48cffe[_0x387caf(0xef)],
|
|
1087
|
+
'answerTime': _0x48cffe[_0x387caf(0x12f)],
|
|
1088
|
+
'endTime': _0x48cffe[_0x387caf(0x230)],
|
|
1089
|
+
'duration': Date[_0x387caf(0x21f)]() - _0x48cffe['_callBeginTime'],
|
|
1090
|
+
'durationStr': _common.Tools['createDurationString'](Date[_0x387caf(0x21f)]() - _0x48cffe[_0x387caf(0xef)]),
|
|
1091
|
+
'activeDuration': _0x375d05,
|
|
1092
|
+
'activeDurationStr': _0x375d05 ? _common.Tools[_0x387caf(0x16b)](_0x375d05) : ''
|
|
1093
|
+
};
|
|
1447
1094
|
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
}
|
|
1095
|
+
try {
|
|
1096
|
+
_0x48cffe['emit'](_0x387caf(0x1c9), _0x4c3e97);
|
|
1097
|
+
} catch (_0x35584f) {
|
|
1098
|
+
_0x48cffe[_0x387caf(0x277)][_0x387caf(0x247)](_0x387caf(0x197) + _0x35584f);
|
|
1099
|
+
}
|
|
1100
|
+
}, 0x3e8));
|
|
1455
1101
|
}
|
|
1456
1102
|
|
|
1457
|
-
[
|
|
1458
|
-
|
|
1459
|
-
|
|
1103
|
+
[a0_0x35184d(0xcb)]() {
|
|
1104
|
+
const _0x1a4f61 = a0_0x35184d;
|
|
1105
|
+
|
|
1106
|
+
if (!this[_0x1a4f61(0x1a3)]) {
|
|
1107
|
+
const _0x30e52e = {
|
|
1460
1108
|
'outboundPacketsSent': 0x0,
|
|
1461
1109
|
'outboundBytesSent': 0x0,
|
|
1462
1110
|
'outboundPacketsLost': 0x0,
|
|
@@ -1467,40 +1115,27 @@ class Session extends _events.default {
|
|
|
1467
1115
|
'inboundJitter': 0x0,
|
|
1468
1116
|
'roundTripTime': 0x0
|
|
1469
1117
|
};
|
|
1470
|
-
this[
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
deltaReport[_0x1c61('0x179')] = report['bytesSent'] - this[_0x1c61('0xc9')][_0x1c61('0x179')];
|
|
1118
|
+
this[_0x1a4f61(0x267)] = Object[_0x1a4f61(0x17f)]({}, _0x30e52e), this[_0x1a4f61(0x1a3)] = setInterval(() => {
|
|
1119
|
+
const _0x1b0703 = _0x1a4f61;
|
|
1120
|
+
|
|
1121
|
+
this[_0x1b0703(0x214)][_0x1b0703(0x273)][_0x1b0703(0x204)]()[_0x1b0703(0x1a5)](_0x50aa2d => {
|
|
1122
|
+
const _0x1a6192 = _0x1b0703;
|
|
1123
|
+
|
|
1124
|
+
let _0x7ff17c = Object[_0x1a6192(0x17f)]({}, _0x30e52e),
|
|
1125
|
+
_0x235051 = Object['assign']({}, _0x30e52e);
|
|
1126
|
+
|
|
1127
|
+
for (let _0x2770cf of _0x50aa2d[_0x1a6192(0x15b)]()) {
|
|
1128
|
+
switch (_0x2770cf['type']) {
|
|
1129
|
+
case _0x1a6192(0x22e):
|
|
1130
|
+
_0x7ff17c[_0x1a6192(0x100)] = _0x2770cf[_0x1a6192(0x180)], _0x235051['outboundPacketsSent'] = _0x2770cf[_0x1a6192(0x180)] - this[_0x1a6192(0x267)][_0x1a6192(0x100)], _0x7ff17c['outboundBytesSent'] = _0x2770cf[_0x1a6192(0x122)], _0x235051['outboundBytesSent'] = _0x2770cf['bytesSent'] - this[_0x1a6192(0x267)][_0x1a6192(0xee)];
|
|
1484
1131
|
break;
|
|
1485
1132
|
|
|
1486
|
-
case
|
|
1487
|
-
|
|
1488
|
-
deltaReport['inboundPacketsReceived'] = report[_0x1c61('0x17d')] - this['_currentReport']['inboundPacketsReceived'];
|
|
1489
|
-
totalReport[_0x1c61('0x17e')] = report['bytesReceived'];
|
|
1490
|
-
deltaReport[_0x1c61('0x17e')] = report[_0x1c61('0x17f')] - this['_currentReport'][_0x1c61('0x17e')];
|
|
1491
|
-
totalReport[_0x1c61('0x180')] = report[_0x1c61('0x181')];
|
|
1492
|
-
deltaReport[_0x1c61('0x180')] = report[_0x1c61('0x181')] - this[_0x1c61('0xc9')][_0x1c61('0x180')];
|
|
1493
|
-
totalReport[_0x1c61('0x182')] = report[_0x1c61('0x183')] * 0x3e8;
|
|
1494
|
-
deltaReport['inboundJitter'] = report[_0x1c61('0x183')] * 0x3e8;
|
|
1133
|
+
case _0x1a6192(0x110):
|
|
1134
|
+
_0x7ff17c['inboundPacketsReceived'] = _0x2770cf[_0x1a6192(0xf0)], _0x235051[_0x1a6192(0x19e)] = _0x2770cf['packetsReceived'] - this[_0x1a6192(0x267)][_0x1a6192(0x19e)], _0x7ff17c['inboundBytesReceived'] = _0x2770cf['bytesReceived'], _0x235051[_0x1a6192(0x150)] = _0x2770cf[_0x1a6192(0x123)] - this[_0x1a6192(0x267)][_0x1a6192(0x150)], _0x7ff17c[_0x1a6192(0x228)] = _0x2770cf[_0x1a6192(0x1e4)], _0x235051[_0x1a6192(0x228)] = _0x2770cf[_0x1a6192(0x1e4)] - this[_0x1a6192(0x267)]['inboundPacketsLost'], _0x7ff17c[_0x1a6192(0x211)] = _0x2770cf['jitter'] * 0x3e8, _0x235051[_0x1a6192(0x211)] = _0x2770cf['jitter'] * 0x3e8;
|
|
1495
1135
|
break;
|
|
1496
1136
|
|
|
1497
|
-
case
|
|
1498
|
-
|
|
1499
|
-
deltaReport['outboundPacketsLost'] = report[_0x1c61('0x181')] - this[_0x1c61('0xc9')][_0x1c61('0x185')];
|
|
1500
|
-
totalReport['outboundJitter'] = report[_0x1c61('0x183')] * 0x3e8;
|
|
1501
|
-
deltaReport[_0x1c61('0x186')] = report[_0x1c61('0x183')] * 0x3e8;
|
|
1502
|
-
totalReport['roundTripTime'] = report[_0x1c61('0x187')] * 0x3e8;
|
|
1503
|
-
deltaReport['roundTripTime'] = report[_0x1c61('0x187')] * 0x3e8;
|
|
1137
|
+
case _0x1a6192(0xe0):
|
|
1138
|
+
_0x7ff17c[_0x1a6192(0x19a)] = _0x2770cf[_0x1a6192(0x1e4)], _0x235051[_0x1a6192(0x19a)] = _0x2770cf[_0x1a6192(0x1e4)] - this[_0x1a6192(0x267)][_0x1a6192(0x19a)], _0x7ff17c[_0x1a6192(0x1c1)] = _0x2770cf['jitter'] * 0x3e8, _0x235051[_0x1a6192(0x1c1)] = _0x2770cf[_0x1a6192(0x202)] * 0x3e8, _0x7ff17c[_0x1a6192(0xe8)] = _0x2770cf[_0x1a6192(0xe8)] * 0x3e8, _0x235051[_0x1a6192(0xe8)] = _0x2770cf[_0x1a6192(0xe8)] * 0x3e8;
|
|
1504
1139
|
break;
|
|
1505
1140
|
|
|
1506
1141
|
default:
|
|
@@ -1508,18 +1143,18 @@ class Session extends _events.default {
|
|
|
1508
1143
|
}
|
|
1509
1144
|
}
|
|
1510
1145
|
|
|
1511
|
-
this[
|
|
1146
|
+
this['_currentReport'] = this[_0x1a6192(0x10f)](_0x7ff17c);
|
|
1512
1147
|
|
|
1513
|
-
if (
|
|
1514
|
-
const
|
|
1515
|
-
'total': this[
|
|
1516
|
-
'delta': this[
|
|
1148
|
+
if (_0x7ff17c[_0x1a6192(0xe8)]) {
|
|
1149
|
+
const _0x416aee = {
|
|
1150
|
+
'total': this[_0x1a6192(0x267)],
|
|
1151
|
+
'delta': this[_0x1a6192(0x10f)](_0x235051)
|
|
1517
1152
|
};
|
|
1518
1153
|
|
|
1519
1154
|
try {
|
|
1520
|
-
this[
|
|
1521
|
-
} catch (
|
|
1522
|
-
this[
|
|
1155
|
+
this[_0x1a6192(0x1af)](_0x1a6192(0x1c3), _0x416aee);
|
|
1156
|
+
} catch (_0x12436f) {
|
|
1157
|
+
this[_0x1a6192(0x277)]['error'](_0x1a6192(0x1fc) + _0x12436f);
|
|
1523
1158
|
}
|
|
1524
1159
|
}
|
|
1525
1160
|
});
|
|
@@ -1527,209 +1162,172 @@ class Session extends _events.default {
|
|
|
1527
1162
|
}
|
|
1528
1163
|
}
|
|
1529
1164
|
|
|
1530
|
-
[
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
const
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1165
|
+
[a0_0x35184d(0x10f)](_0x3349d4) {
|
|
1166
|
+
const _0x2bdc76 = a0_0x35184d;
|
|
1167
|
+
_0x3349d4[_0x2bdc76(0xea)] = _0x3349d4[_0x2bdc76(0x19a)] / _0x3349d4[_0x2bdc76(0x100)], _0x3349d4['inboundPacketLossPct'] = _0x3349d4[_0x2bdc76(0x228)] / _0x3349d4['inboundPacketsReceived'], _0x3349d4['effectiveLatency'] = _0x3349d4[_0x2bdc76(0xe8)] + (_0x3349d4[_0x2bdc76(0x211)] + _0x3349d4[_0x2bdc76(0x1c1)]) + 0xa;
|
|
1168
|
+
|
|
1169
|
+
const _0xe8010b = (_0x3349d4[_0x2bdc76(0xea)] + _0x3349d4[_0x2bdc76(0x188)]) * 0x64,
|
|
1170
|
+
_0xc6948d = 0x5f * _0xe8010b / (_0xe8010b + 0xa),
|
|
1171
|
+
_0x15a781 = _0x3349d4[_0x2bdc76(0x22d)] * 0.1;
|
|
1172
|
+
|
|
1173
|
+
_0x3349d4['rFactor'] = Math['max'](0x0, 0x64 - _0xc6948d - _0x15a781), _0x3349d4[_0x2bdc76(0x143)] = 0x1 + 0.035 * _0x3349d4[_0x2bdc76(0x275)] + 0.000007 * _0x3349d4[_0x2bdc76(0x275)] * (_0x3349d4[_0x2bdc76(0x275)] - 0x3c) * (0x64 - _0x3349d4['rFactor']);
|
|
1539
1174
|
|
|
1540
1175
|
switch (!![]) {
|
|
1541
|
-
case
|
|
1542
|
-
|
|
1176
|
+
case _0x3349d4['rFactor'] < 0x32:
|
|
1177
|
+
_0x3349d4['qualityString'] = _0x2bdc76(0xc5);
|
|
1543
1178
|
break;
|
|
1544
1179
|
|
|
1545
|
-
case
|
|
1546
|
-
|
|
1180
|
+
case _0x3349d4['rFactor'] < 0x46:
|
|
1181
|
+
_0x3349d4['qualityString'] = _0x2bdc76(0x13b);
|
|
1547
1182
|
break;
|
|
1548
1183
|
|
|
1549
|
-
case
|
|
1550
|
-
|
|
1184
|
+
case _0x3349d4['rFactor'] < 0x50:
|
|
1185
|
+
_0x3349d4[_0x2bdc76(0x130)] = _0x2bdc76(0x128);
|
|
1551
1186
|
break;
|
|
1552
1187
|
|
|
1553
|
-
case
|
|
1554
|
-
|
|
1188
|
+
case _0x3349d4[_0x2bdc76(0x275)] < 0x5a:
|
|
1189
|
+
_0x3349d4[_0x2bdc76(0x130)] = _0x2bdc76(0x16a);
|
|
1555
1190
|
break;
|
|
1556
1191
|
|
|
1557
|
-
case
|
|
1558
|
-
|
|
1192
|
+
case _0x3349d4['rFactor'] <= 0x64:
|
|
1193
|
+
_0x3349d4[_0x2bdc76(0x130)] = 'Excellent';
|
|
1559
1194
|
break;
|
|
1560
1195
|
|
|
1561
1196
|
default:
|
|
1562
|
-
|
|
1197
|
+
_0x3349d4['qualityString'] = _0x2bdc76(0x212);
|
|
1563
1198
|
}
|
|
1564
1199
|
|
|
1565
|
-
return
|
|
1200
|
+
return _0x3349d4;
|
|
1566
1201
|
}
|
|
1567
1202
|
|
|
1568
|
-
[
|
|
1569
|
-
let
|
|
1203
|
+
[a0_0x35184d(0x1e1)](_0x2a3c7b) {
|
|
1204
|
+
let _0x1224b6 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1570
1205
|
|
|
1571
|
-
|
|
1206
|
+
const _0x154ce8 = a0_0x35184d;
|
|
1572
1207
|
|
|
1573
|
-
|
|
1574
|
-
this[_0x1c61('0x12')][_0x1c61('0x18')](info);
|
|
1575
|
-
}
|
|
1208
|
+
this['log'][_0x154ce8(0xcf)](_0x154ce8(0x1fb) + _0x2a3c7b);
|
|
1576
1209
|
|
|
1577
|
-
this[
|
|
1210
|
+
_0x1224b6 && this[_0x154ce8(0x277)][_0x154ce8(0xcf)](_0x1224b6);
|
|
1211
|
+
this[_0x154ce8(0x13c)] = _0x2a3c7b;
|
|
1578
1212
|
|
|
1579
1213
|
try {
|
|
1580
|
-
this[
|
|
1581
|
-
'state':
|
|
1582
|
-
'uuid': this[
|
|
1583
|
-
},
|
|
1584
|
-
} catch (
|
|
1585
|
-
this[
|
|
1214
|
+
this[_0x154ce8(0x1af)](_0x154ce8(0x249), Object['assign']({
|
|
1215
|
+
'state': _0x2a3c7b,
|
|
1216
|
+
'uuid': this[_0x154ce8(0x14a)]
|
|
1217
|
+
}, _0x1224b6));
|
|
1218
|
+
} catch (_0x4a4a3e) {
|
|
1219
|
+
this[_0x154ce8(0x277)]['error'](_0x154ce8(0x14f) + _0x4a4a3e);
|
|
1586
1220
|
}
|
|
1587
1221
|
|
|
1588
|
-
|
|
1589
|
-
this[_0x1c61('0xc5')] = this[_0x1c61('0x12f')] || _0x1c61('0x198');
|
|
1590
|
-
|
|
1591
|
-
this[_0x1c61('0x199')]();
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
if (state === _0x1c61('0x117')) {
|
|
1595
|
-
if (info[_0x1c61('0x118')] === _0x1c61('0x19a')) {
|
|
1596
|
-
this[_0x1c61('0xc5')] = 'TEMP_UNAVAIL';
|
|
1597
|
-
|
|
1598
|
-
if (this['_phone'][_0x1c61('0xd0')]['playSignalTones']) {
|
|
1599
|
-
this[_0x1c61('0xbb')][_0x1c61('0x4c')](ST_TEMP_UNAVAIL);
|
|
1600
|
-
}
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
if (info[_0x1c61('0x118')] === _0x1c61('0x19b')) {
|
|
1604
|
-
this['_callDisposition'] = _0x1c61('0x19c');
|
|
1605
|
-
|
|
1606
|
-
if (this[_0x1c61('0xbb')]['options'][_0x1c61('0x19d')]) {
|
|
1607
|
-
this['_phone'][_0x1c61('0x4c')](ST_INVALID_NUMBER);
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
if (info[_0x1c61('0x118')] === _0x1c61('0x19e')) {
|
|
1612
|
-
this[_0x1c61('0xc5')] = this[_0x1c61('0x12f')] || _0x1c61('0x19f');
|
|
1613
|
-
}
|
|
1222
|
+
_0x2a3c7b === _0x154ce8(0x183) && (this['_callDisposition'] = this['_manualDisposition'] || _0x154ce8(0x21c), this[_0x154ce8(0xd7)]());
|
|
1614
1223
|
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
}
|
|
1224
|
+
if (_0x2a3c7b === _0x154ce8(0x19f)) {
|
|
1225
|
+
_0x1224b6[_0x154ce8(0x20c)] === _0x154ce8(0x16f) && (this[_0x154ce8(0x1d3)] = _0x154ce8(0x18c), this[_0x154ce8(0x171)][_0x154ce8(0x22c)]['playSignalTones'] && this[_0x154ce8(0x171)][_0x154ce8(0x157)](ST_TEMP_UNAVAIL));
|
|
1226
|
+
_0x1224b6[_0x154ce8(0x20c)] === _0x154ce8(0x245) && (this[_0x154ce8(0x1d3)] = _0x154ce8(0x21d), this['_phone'][_0x154ce8(0x22c)][_0x154ce8(0xe6)] && this['_phone'][_0x154ce8(0x157)](ST_INVALID_NUMBER));
|
|
1227
|
+
_0x1224b6['cause'] === _0x154ce8(0x1aa) && (this[_0x154ce8(0x1d3)] = this[_0x154ce8(0x25d)] || _0x154ce8(0x260));
|
|
1228
|
+
_0x1224b6[_0x154ce8(0x20c)] === _0x154ce8(0xe9) && (this[_0x154ce8(0x126)] === 'INBOUND' ? this[_0x154ce8(0x1d3)] = 'REJECTED' : this[_0x154ce8(0x1d3)] = _0x154ce8(0x241));
|
|
1229
|
+
_0x1224b6[_0x154ce8(0x20c)] === _0x154ce8(0x1c4) && (this[_0x154ce8(0x1d3)] = 'BUSY', this[_0x154ce8(0x171)][_0x154ce8(0x22c)][_0x154ce8(0xe6)] && this[_0x154ce8(0x171)][_0x154ce8(0x157)](ST_BUSY));
|
|
1622
1230
|
|
|
1623
|
-
if (
|
|
1624
|
-
this['_callDisposition'] = _0x1c61('0x1a4');
|
|
1231
|
+
if (this[_0x154ce8(0x214)][_0x154ce8(0x126)] === _0x154ce8(0x193)) {}
|
|
1625
1232
|
|
|
1626
|
-
|
|
1627
|
-
this[_0x1c61('0xbb')]['_startRepeatTone'](ST_BUSY);
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
if (this[_0x1c61('0xf2')][_0x1c61('0x13d')] === 'incoming') {}
|
|
1632
|
-
|
|
1633
|
-
this['_callFinished']();
|
|
1233
|
+
this[_0x154ce8(0xd7)]();
|
|
1634
1234
|
}
|
|
1635
1235
|
}
|
|
1636
1236
|
|
|
1637
|
-
[
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
this[_0x1c61('0x1a6')]();
|
|
1641
|
-
|
|
1642
|
-
clearInterval(this[_0x1c61('0xc3')]);
|
|
1643
|
-
clearInterval(this['_rtcpStatsTimer']);
|
|
1644
|
-
|
|
1645
|
-
this[_0x1c61('0xbb')][_0x1c61('0xa6')](this);
|
|
1237
|
+
[a0_0x35184d(0xd7)]() {
|
|
1238
|
+
const _0x3af1d8 = a0_0x35184d;
|
|
1239
|
+
this['log'][_0x3af1d8(0x258)]('Call\x20finished'), this[_0x3af1d8(0x255)](), clearInterval(this[_0x3af1d8(0x116)]), clearInterval(this[_0x3af1d8(0x1a3)]), this[_0x3af1d8(0x171)][_0x3af1d8(0xf1)](this);
|
|
1646
1240
|
}
|
|
1647
1241
|
|
|
1648
|
-
[
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
this[_0x1c61('0xca')] = timeout;
|
|
1242
|
+
['_setAnswerCallTimeout'](_0x9d53d4) {
|
|
1243
|
+
const _0x2d7dde = a0_0x35184d;
|
|
1244
|
+
this[_0x2d7dde(0x277)][_0x2d7dde(0xcf)](_0x2d7dde(0x248) + _0x9d53d4), this[_0x2d7dde(0xfb)] = _0x9d53d4;
|
|
1652
1245
|
}
|
|
1653
1246
|
|
|
1654
|
-
[
|
|
1247
|
+
[a0_0x35184d(0x177)]() {
|
|
1248
|
+
const _0x18c465 = a0_0x35184d;
|
|
1249
|
+
|
|
1655
1250
|
try {
|
|
1656
|
-
this[
|
|
1657
|
-
'state': this[
|
|
1658
|
-
'error': this[
|
|
1251
|
+
this[_0x18c465(0x1af)](_0x18c465(0x1c2), {
|
|
1252
|
+
'state': this[_0x18c465(0x117)],
|
|
1253
|
+
'error': this['_recordingError']
|
|
1659
1254
|
});
|
|
1660
|
-
} catch (
|
|
1661
|
-
this[
|
|
1255
|
+
} catch (_0x4f5a20) {
|
|
1256
|
+
this[_0x18c465(0x277)][_0x18c465(0x247)]('Exception\x20in\x20recording\x20state\x20change\x20event:\x20' + _0x4f5a20);
|
|
1662
1257
|
}
|
|
1663
1258
|
}
|
|
1664
1259
|
|
|
1665
|
-
[
|
|
1260
|
+
[a0_0x35184d(0x24e)]() {
|
|
1261
|
+
const _0x292031 = a0_0x35184d;
|
|
1262
|
+
|
|
1666
1263
|
try {
|
|
1667
|
-
this[
|
|
1264
|
+
this[_0x292031(0x1af)](_0x292031(0x1cf), {
|
|
1668
1265
|
'state': this['_isMuted']
|
|
1669
1266
|
});
|
|
1670
|
-
} catch (
|
|
1671
|
-
this[
|
|
1267
|
+
} catch (_0x1b55a) {
|
|
1268
|
+
this['log'][_0x292031(0x247)](_0x292031(0x1f6) + _0x1b55a);
|
|
1672
1269
|
}
|
|
1673
1270
|
}
|
|
1674
1271
|
|
|
1675
|
-
[
|
|
1272
|
+
[a0_0x35184d(0x23d)]() {
|
|
1273
|
+
const _0x17279d = a0_0x35184d;
|
|
1274
|
+
|
|
1676
1275
|
try {
|
|
1677
|
-
this[
|
|
1678
|
-
'state': this[
|
|
1276
|
+
this[_0x17279d(0x1af)]('holdStateChange', {
|
|
1277
|
+
'state': this[_0x17279d(0x12b)]
|
|
1679
1278
|
});
|
|
1680
|
-
} catch (
|
|
1681
|
-
this[
|
|
1279
|
+
} catch (_0x22c4f7) {
|
|
1280
|
+
this[_0x17279d(0x277)][_0x17279d(0x247)](_0x17279d(0x268) + _0x22c4f7);
|
|
1682
1281
|
}
|
|
1683
1282
|
}
|
|
1684
1283
|
|
|
1685
|
-
[
|
|
1284
|
+
['_fireWhisperModeChangeEvent']() {
|
|
1285
|
+
const _0x24e3aa = a0_0x35184d;
|
|
1286
|
+
|
|
1686
1287
|
try {
|
|
1687
|
-
this[
|
|
1688
|
-
'mode': this[
|
|
1288
|
+
this[_0x24e3aa(0x1af)](_0x24e3aa(0x1c0), {
|
|
1289
|
+
'mode': this[_0x24e3aa(0x1b1)]
|
|
1689
1290
|
});
|
|
1690
|
-
} catch (
|
|
1691
|
-
this[
|
|
1291
|
+
} catch (_0x301208) {
|
|
1292
|
+
this[_0x24e3aa(0x277)][_0x24e3aa(0x247)](_0x24e3aa(0xd9) + _0x301208);
|
|
1692
1293
|
}
|
|
1693
1294
|
}
|
|
1694
1295
|
|
|
1695
|
-
[
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
'
|
|
1702
|
-
'
|
|
1703
|
-
'
|
|
1704
|
-
'
|
|
1705
|
-
'
|
|
1706
|
-
'
|
|
1707
|
-
'
|
|
1708
|
-
'
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
e[_0x1c61('0x1af')] = this[_0x1c61('0xc9')];
|
|
1296
|
+
[a0_0x35184d(0x255)]() {
|
|
1297
|
+
const _0x359f8d = a0_0x35184d;
|
|
1298
|
+
|
|
1299
|
+
let _0x4a6871;
|
|
1300
|
+
|
|
1301
|
+
_0x4a6871 = {
|
|
1302
|
+
'uuid': this[_0x359f8d(0x14a)],
|
|
1303
|
+
'direction': this[_0x359f8d(0x126)],
|
|
1304
|
+
'disposition': this[_0x359f8d(0x1d3)],
|
|
1305
|
+
'originatingNumber': this['_originatingNumber'],
|
|
1306
|
+
'destinationNumber': this[_0x359f8d(0x1c6)],
|
|
1307
|
+
'duration': this['_callEndTime'] - this[_0x359f8d(0xef)],
|
|
1308
|
+
'answerDuration': this[_0x359f8d(0x12f)] ? this['_callAnswerTime'] - this[_0x359f8d(0xef)] : null,
|
|
1309
|
+
'activeDuration': this[_0x359f8d(0x12f)] ? this[_0x359f8d(0x230)] - this[_0x359f8d(0x12f)] : null,
|
|
1310
|
+
'startTime': new Date(this[_0x359f8d(0xef)])[_0x359f8d(0x137)](),
|
|
1311
|
+
'endTime': new Date(this[_0x359f8d(0x230)])[_0x359f8d(0x137)](),
|
|
1312
|
+
'answerTime': this[_0x359f8d(0x12f)] ? new Date(this[_0x359f8d(0x12f)])['toISOString']() : null
|
|
1313
|
+
}, _0x4a6871['durationStr'] = _common.Tools[_0x359f8d(0x16b)](_0x4a6871[_0x359f8d(0x1a4)]), _0x4a6871[_0x359f8d(0xc8)] = _0x4a6871[_0x359f8d(0x12d)] ? _common.Tools[_0x359f8d(0x16b)](_0x4a6871[_0x359f8d(0x12d)]) : '', _0x4a6871[_0x359f8d(0xf7)] = _0x4a6871[_0x359f8d(0x1fa)] ? _common.Tools[_0x359f8d(0x16b)](_0x4a6871[_0x359f8d(0x1fa)]) : '', _0x4a6871['callQualityReport'] = this[_0x359f8d(0x267)];
|
|
1714
1314
|
|
|
1715
1315
|
try {
|
|
1716
|
-
this[
|
|
1717
|
-
} catch (
|
|
1718
|
-
this[
|
|
1316
|
+
this[_0x359f8d(0x1af)](_0x359f8d(0x1a9), _0x4a6871);
|
|
1317
|
+
} catch (_0x138a2b) {
|
|
1318
|
+
this[_0x359f8d(0x277)]['error'](_0x359f8d(0x220) + _0x138a2b);
|
|
1719
1319
|
}
|
|
1720
1320
|
}
|
|
1721
1321
|
|
|
1722
|
-
[
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
const self = this;
|
|
1726
|
-
|
|
1727
|
-
session['connection']['ontrack'] = function (event) {
|
|
1728
|
-
self[_0x1c61('0x12')]['debug'](_0x1c61('0x1b2'));
|
|
1322
|
+
[a0_0x35184d(0x1cc)](_0x4f7c43) {
|
|
1323
|
+
const _0x327370 = a0_0x35184d;
|
|
1324
|
+
this['_phone']['_endRepeatTone']();
|
|
1729
1325
|
|
|
1730
|
-
|
|
1326
|
+
const _0x52f8db = this;
|
|
1731
1327
|
|
|
1732
|
-
|
|
1328
|
+
_0x4f7c43[_0x327370(0x1cb)][_0x327370(0x20a)] = function (_0x3d1579) {
|
|
1329
|
+
const _0x282f74 = _0x327370;
|
|
1330
|
+
_0x52f8db[_0x282f74(0x277)]['debug'](_0x282f74(0xe1)), _0x52f8db['log'][_0x282f74(0xcf)](_0x3d1579), _0x52f8db[_0x282f74(0x171)][_0x282f74(0x1f7)][_0x282f74(0xeb)] = _0x3d1579[_0x282f74(0x1f8)][0x0];
|
|
1733
1331
|
};
|
|
1734
1332
|
}
|
|
1735
1333
|
|