@telegenta/webclient 2.0.11 → 3.0.0

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.
Files changed (102) hide show
  1. package/README.md +102 -81
  2. package/demos/add_phone_number.html +8 -7
  3. package/demos/calldata_available.html +5 -5
  4. package/demos/embedded_config.html +95 -95
  5. package/demos/event_client.html +226 -226
  6. package/demos/phone_client.html +564 -558
  7. package/dist/telegenta.js +3627 -0
  8. package/dist/telegenta.min.js +1 -0
  9. package/docs/EventClient.html +3 -1093
  10. package/docs/InvalidMediaDevice.html +3 -0
  11. package/docs/InvalidOptions.html +3 -0
  12. package/docs/InvalidParameter.html +3 -0
  13. package/docs/LogHandler.html +7 -0
  14. package/docs/MediaNotPrepared.html +3 -0
  15. package/docs/NoActiveSession.html +3 -0
  16. package/docs/NotAllowed.html +3 -0
  17. package/docs/NotReady.html +3 -0
  18. package/docs/Phone.html +4 -2837
  19. package/docs/Request.html +3 -0
  20. package/docs/Requestor.html +3 -0
  21. package/docs/Session.html +3 -2599
  22. package/docs/UnableToConnect.html +3 -0
  23. package/docs/data/search.json +1 -0
  24. package/docs/event-client.js.html +346 -0
  25. package/docs/exceptions.js.html +94 -0
  26. package/docs/fonts/Inconsolata-Regular.ttf +0 -0
  27. package/docs/fonts/OpenSans-Regular.ttf +0 -0
  28. package/docs/fonts/WorkSans-Bold.ttf +0 -0
  29. package/docs/global.html +5 -4950
  30. package/docs/index.html +3 -66
  31. package/docs/logger.js.html +106 -0
  32. package/docs/phone-client.js.html +2155 -0
  33. package/docs/requestor.js.html +223 -0
  34. package/docs/scripts/core.js +726 -0
  35. package/docs/scripts/core.min.js +23 -0
  36. package/docs/scripts/resize.js +90 -0
  37. package/docs/scripts/search.js +265 -0
  38. package/docs/scripts/search.min.js +6 -0
  39. package/docs/scripts/{prettify → third-party}/Apache-License-2.0.txt +202 -202
  40. package/docs/scripts/third-party/fuse.js +9 -0
  41. package/docs/scripts/third-party/hljs-line-num-original.js +369 -0
  42. package/docs/scripts/third-party/hljs-line-num.js +1 -0
  43. package/docs/scripts/third-party/hljs-original.js +5171 -0
  44. package/docs/scripts/third-party/hljs.js +1 -0
  45. package/docs/scripts/third-party/popper.js +5 -0
  46. package/docs/scripts/third-party/tippy.js +1 -0
  47. package/docs/scripts/third-party/tocbot.js +672 -0
  48. package/docs/scripts/third-party/tocbot.min.js +1 -0
  49. package/docs/styles/clean-jsdoc-theme-base.css +1159 -0
  50. package/docs/styles/clean-jsdoc-theme-dark.css +412 -0
  51. package/docs/styles/clean-jsdoc-theme-light.css +482 -0
  52. package/docs/styles/clean-jsdoc-theme-scrollbar.css +30 -0
  53. package/docs/styles/clean-jsdoc-theme-without-scrollbar.min.css +1 -0
  54. package/docs/styles/clean-jsdoc-theme.min.css +1 -0
  55. package/package.json +46 -34
  56. package/babel.config.js +0 -16
  57. package/browser/telegenta.min.js +0 -1
  58. package/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
  59. package/docs/fonts/OpenSans-Bold-webfont.svg +0 -1830
  60. package/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
  61. package/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  62. package/docs/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
  63. package/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  64. package/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
  65. package/docs/fonts/OpenSans-Italic-webfont.svg +0 -1830
  66. package/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
  67. package/docs/fonts/OpenSans-Light-webfont.eot +0 -0
  68. package/docs/fonts/OpenSans-Light-webfont.svg +0 -1831
  69. package/docs/fonts/OpenSans-Light-webfont.woff +0 -0
  70. package/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  71. package/docs/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
  72. package/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  73. package/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
  74. package/docs/fonts/OpenSans-Regular-webfont.svg +0 -1831
  75. package/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
  76. package/docs/fonts/OpenSans-Semibold-webfont.eot +0 -0
  77. package/docs/fonts/OpenSans-Semibold-webfont.svg +0 -1830
  78. package/docs/fonts/OpenSans-Semibold-webfont.ttf +0 -0
  79. package/docs/fonts/OpenSans-Semibold-webfont.woff +0 -0
  80. package/docs/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
  81. package/docs/fonts/OpenSans-SemiboldItalic-webfont.svg +0 -1830
  82. package/docs/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  83. package/docs/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
  84. package/docs/scripts/linenumber.js +0 -25
  85. package/docs/scripts/prettify/lang-css.js +0 -2
  86. package/docs/scripts/prettify/prettify.js +0 -28
  87. package/docs/styles/jsdoc-default.css +0 -692
  88. package/docs/styles/prettify-jsdoc.css +0 -111
  89. package/docs/styles/prettify-tomorrow.css +0 -132
  90. package/embedded_client/embedded_phone.js +0 -325
  91. package/embedded_client/index.html +0 -201
  92. package/embedded_client/server.php +0 -28
  93. package/embedded_client/styles.css +0 -310
  94. package/embedded_client/tiny_rest_client.php +0 -73
  95. package/embedded_client/webphone_sprites.png +0 -0
  96. package/es5/event-client.js +0 -322
  97. package/es5/index.js +0 -44
  98. package/es5/phone-client.js +0 -1739
  99. package/src/event-client.js +0 -1
  100. package/src/index.js +0 -10
  101. package/src/phone-client.js +0 -1
  102. package/webpack.config.js +0 -39
@@ -1,1739 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Session = exports.Phone = void 0;
7
-
8
- var _events = _interopRequireDefault(require("events"));
9
-
10
- var _jssip = _interopRequireDefault(require("jssip"));
11
-
12
- var _common = require("@telegenta/common");
13
-
14
- var _eventClient = require("./event-client");
15
-
16
- var _camelcaseKeys = _interopRequireDefault(require("camelcase-keys"));
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
- var _0x571f = ['muteStateChange', 'holdStateChange', 'Exception\x20in\x20hold\x20state\x20change\x20event:\x20', 'whisperModeChange', 'Exception\x20in\x20whisper\x20mode\x20change\x20event:\x20', 'toISOString', 'callQualityReport', 'callEnded', 'Exception\x20in\x20callEnded\x20event:\x20', 'ontrack', 'Start\x20media\x20output\x20(track):', '_mediaPermission', '_mediaPermissionError', '_UA', '_connectionState', '_isStarted', '_eventClient', '_options', '_sessionCounter', '_activeSessions', '_remoteAudioElement', 'autoplay', '_toneAudioElement', 'AUDIO', '_toneTimer', '_repeatToneActive', '_repeatToneSequence', '_toneGainProcessor', 'log', 'LogHandler', 'INFO', 'level', 'DEBUG', 'debug', 'JsSIP:*', 'disable', 'info', 'Get\x20media\x20permission', 'getUserMedia', 'then', 'error', 'start', '_checkMediaPermission', 'warning', 'Phone\x20already\x20started,\x20stopping\x20first', 'stop', 'assign', '_initToneGenerator', 'provisionToken', 'Using\x20provisioning\x20token\x20authorization', 'wssServer', 'wss_server', 'eventServer', 'authorizationUsername', 'wss_username', 'wss_password', 'wss_token', 'Using\x20manual\x20specified\x20credentials', 'InvalidOptions', 'Missing\x20username', 'password', 'callToken', 'useCallDataInfoEvent', 'Enabled\x20event\x20service\x20because\x20\x27useCallDataInfoEvent\x27\x20is\x20enabled', 'connectEventService', 'connect', 'Connected\x20to\x20event\x20server', 'calldata_available', 'subscribe', '_fireCallDataInfoEvent', 'Event\x20callback\x20failed:\x20', 'Subscription\x20successful\x20ID\x20=\x20', 'Subscribe\x20failed:\x20', 'Unable\x20to\x20connect\x20to\x20event\x20server:\x20', 'UnableToConnect', 'Unable\x20to\x20connect\x20phone\x20websocket:\x20', 'Starting\x20phone', '@telegenta.com', 'New\x20RTCSession', 'remote', 'newInboundSession', 'playRingOnIncoming', '_startRepeatTone', 'autoBusyIncoming', 'keys', 'length', 'Autorejecting\x20incoming\x20call\x20', 'uuid', '\x20because\x20there\x20is\x20already\x20active\x20calls', 'reject', 'Busy', '_addSession', '_setSessionState', 'INCOMING', '_fireIncomingCallEvent', 'CONNECTING', 'connected', '_setConnectionState', 'CONNECTED', 'disconnected', 'registered', 'REGISTERED', 'unregistered', 'UNREGISTERED', 'registrationFailed', 'REGISTRATION_FAILED', 'NotReady', 'Phone\x20is\x20not\x20started', 'Event\x20client\x20not\x20running,\x20not\x20stopping', 'disconnect', 'Unable\x20to\x20disconnect\x20event\x20client', 'call', '_checkForConnectingCalls', 'NotAllowed', 'Unable\x20to\x20make\x20new\x20calls\x20while\x20others\x20are\x20connecting', 'holdAllCalls', 'trim', 'replace', 'Calling\x20number:\x20', 'split', 'sip:', 'Initiating\x20listen\x20to\x20call\x20with\x20uuid\x20', '\x20on\x20media\x20switch\x20', 'listen-', 'getSessionByUUID', 'hasOwnProperty', 'options', 'push', 'hasMediaPermission', 'hasMediaPermissionError', 'browserSupported', 'browserIsFirefox', 'browserIsOpera', 'browserIsSafari', 'remoteAudioElement', 'playTone', 'Playing\x20tone\x20', '\x20/\x20', '\x20for\x20', '\x20ms', '_oscillator1', 'frequency', 'value', '_oscillator2', 'gain', 'toneVolume', 'stopTone', 'Repeating\x20tone\x20sequence\x20started', '_doRepeatTone', 'Playing\x20repeated\x20tone,\x20pos\x20=\x20', '_repeatToneSequencePos', '_endRepeatTone', 'webkitAudioContext', 'Audio\x20API\x20not\x20supported\x20by\x20this\x20browser', '_toneStreamNode', 'createMediaStreamDestination', 'srcObject', 'stream', 'createOscillator', 'state', 'ACTIVE', 'hold', '__containerId', 'Adding\x20new\x20session\x20', '\x20sessions:', 'emit', 'sessionCreated', 'Exception\x20in\x20sessionCreated\x20event:\x20', 'Removing\x20session\x20', 'sessionRemoved', 'Exception\x20in\x20sessionRemoved\x20event:\x20', 'Session\x20', '_removeSession', 'autoRemoveSessionTime', 'INITIALIZING', 'Connection\x20state:\x20', 'connectionStateChange', 'incomingCall', 'Exception\x20in\x20incomingCall\x20event:\x20', 'recordings', 'answerDuration', 'durationStr', 'createDurationString', 'duration', 'answerDurationStr', 'activeDurationStr', 'activeDuration', 'callDataInfo', 'Exception\x20in\x20callDataInfo\x20event:\x20', '_callUUID', '_webRTCSession', '_sessionState', '_isOnHold', '_isMuted', '_isRecording', '_recordingError', '_callBeginTime', '_callAnswerTime', '_callEndTime', '_durationUpdTimerObj', '_originatingNumber', '_destinationNumber', '_callDisposition', '_localNumberName', '_isListenCall', '_currentReport', '_answerCallTimeout', '_answerCallTimer', '_mediaSwitch', 'createUUID', 'Created\x20new\x20outbound\x20session\x20to:\x20', 'destinationNumber', 'X-Call-token:\x20', '_phone', 'X-Max-cost:\x20', 'maximumCallCost', 'extraHeaders', 'X-CID-Number-Id:\x20', 'explicitCallerId', 'X-Short-CID-Id:\x20', 'explicitShortCallerId', 'X-Meta-Info:\x20', 'toString', 'substr', 'record', 'InvalidParameter', 'Recording\x20enabled\x20and\x20kept\x20for\x20', '\x20days', 'X-Record:\x20', 'mediaSwitchURI', 'X-RMS:\x20', 'getOtherSessions', 'X-RMS:\x20sip:', 'Other\x20sessions\x20exist\x20but\x20media\x20switch\x20address\x20is\x20invalid', '_initWebRTCSession', 'answerCallTimeout', '_setAnswerCallTimeout', 'request', 'getHeader', 'X-P-UUID', 'X-DID-NAME', 'from', 'uri', 'user', 'Incoming\x20call\x20from\x20', 'X-MS', 'Media\x20switch\x20handling\x20call:\x20', 'session', 'sessions', 'candidate', 'type', 'relatedPort', 'Accepting\x20ICE\x20candidate:\x20', '_iceCandidateTimer', 'ready', 'ICE\x20Timeout\x20(', 'iceGatherTimeout', '\x20ms)\x20reached', 'connecting', '_startRTCPStatsUpdateTimer', 'sending', 'CALLING', 'progress', 'originator', 'PROGRESS', 'response', 'status_code', 'Answer\x20call\x20timeout\x20after\x20', 'accepted', 'X-Recording', 'Call\x20is\x20being\x20prerecorded', 'No\x20call\x20recording\x20started\x20yet', 'ended', 'now', 'TERMINATED', 'failed', 'message', 'reason_phrase', 'FAILED', 'cause', 'dtmf', 'Session\x20DTMF', 'newInfo', 'New\x20session\x20info', '_fireHoldStateEvent', 'ON_HOLD', 'unhold', 'muted', 'Microphone\x20muted', '_fireMuteStateEvent', 'unmuted', 'Microphone\x20unmuted', 'reinvite', 'Session\x20reinvite', 'Session\x20update', 'getusermediafailed', 'Getusermedia\x20failed', 'connection', '_handleRemoteAudio', 'WebRTCSession\x20object:', 'hangup', 'Hanging\x20up\x20call', 'terminate', 'Hanging\x20up\x20call\x20with\x20disposition\x20', '_manualDisposition', 'X-HDISP:\x20', 'answer', 'stun:stun.l.google.com:19302', 'Rejected\x20call', 'Rejecting\x20call', 'direction', 'LISTEN', 'incoming', 'INBOUND', 'Call\x20direction\x20is\x20OUTBOUND', 'OUTBOUND', 'Unknown\x20call\x20direction:\x20', 'startRecording', 'Record:\x20on', 'Request\x20start\x20recording', 'once', 'succeeded', 'Recording\x20started\x20successfully', 'Recording\x20start\x20failed:\x20', 'sendInfo', 'application/info', 'stopRecording', 'Record:\x20off', 'Request\x20stop\x20recording', 'Recording\x20stopped\x20successfully', 'Exception\x20in\x20recordingStateChange\x20event:\x20', 'recordingStateChange', 'isRecording', 'muteMic', 'Mute\x20microphone', 'mute', 'unmuteMic', 'Unmute\x20microphone', 'unmute', 'isMuted', 'Hold\x20call', 'isOnHold', 'sendDTMF', 'Invalid\x20DTMF\x20code', 'Sending\x20DTMF:\x20', 'Mic\x20already\x20muted,\x20just\x20sending\x20DTMF', 'Mute\x20mic\x20while\x20sending\x20DTMF', 'Unmute\x20mic\x20after\x20DTMF', 'transfer', 'Transferring\x20', '\x20=>\x20', 'refer', 'requestSucceeded', 'Transfer\x20completed\x20successfully', 'requestFailed', 'Transfer\x20rejected:\x20', 'Transfer\x20failed:\x20', 'playback', 'Event\x20service\x20not\x20enabled', 'Playback\x20media\x20file\x20', '\x20hangup\x20after\x20', 'call_command', 'PLAYBACK', 'setWhisperMode', 'Call\x20is\x20not\x20correct\x20type\x20(listen)', 'Invalid\x20mode', '_fireWhisperModeChangeEvent', '_startDurationUpdateTimer', 'Exception\x20in\x20call\x20duration\x20update\x20event:\x20', '_rtcpStatsTimer', 'getStats', 'values', 'outbound-rtp', 'outboundPacketsSent', 'packetsSent', 'outboundBytesSent', 'bytesSent', 'inbound-rtp', 'inboundPacketsReceived', 'packetsReceived', 'bytesReceived', 'inboundBytesReceived', 'inboundPacketsLost', 'packetsLost', 'inboundJitter', 'jitter', 'remote-inbound-rtp', 'outboundPacketsLost', 'outboundJitter', 'roundTripTime', '_calcReportMetrics', 'callQualityReportUpdate', 'Exception\x20in\x20call\x20quality\x20report\x20update\x20event:\x20', 'outboundPacketLossPct', 'inboundPacketLossPct', 'effectiveLatency', 'rFactor', 'Bad', 'qualityString', 'Fair', 'Good', 'Excellent', 'Error', 'Session\x20state:\x20', 'sessionStateChange', 'NORMAL', '_callFinished', 'Unavailable', 'TEMP_UNAVAIL', 'playSignalTones', 'INVALID_NUMBER', 'Canceled', 'NO_ANSWER', 'Rejected', 'REJECTED', 'BARRED', 'BUSY', 'Call\x20finished', '_fireCallEndedEvent', '_sessionTerminated', 'Setting\x20answer\x20call\x20timeout\x20to:\x20'];
21
-
22
- (function (_0x7ebfd7, _0x4048a2) {
23
- var _0x38b4df = function _0x38b4df(_0x3fa5a8) {
24
- while (--_0x3fa5a8) {
25
- _0x7ebfd7['push'](_0x7ebfd7['shift']());
26
- }
27
- };
28
-
29
- _0x38b4df(++_0x4048a2);
30
- })(_0x571f, 0x1b0);
31
-
32
- var _0x2b52 = function _0x2b52(_0x538dac, _0x480a7e) {
33
- _0x538dac = _0x538dac - 0x0;
34
- var _0x3a6337 = _0x571f[_0x538dac];
35
- return _0x3a6337;
36
- };
37
-
38
- const options = {
39
- 'wssServer': 'wss://api.telegenta.com/sip/',
40
- 'eventServer': 'wss://api.telegenta.com/es/',
41
- 'provisionToken': null,
42
- 'authorizationUsername': null,
43
- 'password': null,
44
- 'callToken': null,
45
- 'register': !![],
46
- 'iceGatherTimeout': 0xbb8,
47
- 'playSignalTones': !![],
48
- 'logger': null,
49
- 'logLevel': 0x3,
50
- 'connectEventService': ![],
51
- 'useCallDataInfoEvent': ![],
52
- 'toneVolume': 0.3,
53
- 'autoBusyIncoming': !![],
54
- 'autoRemoveSessionTime': 0xbb8,
55
- 'playRingOnIncoming': !![],
56
- 'playCallInitializedTone': ![]
57
- };
58
- const DTMF_FREQUENCY_TABLE = {
59
- '1': [0x4b9, 0x2b9],
60
- '2': [0x538, 0x2b9],
61
- '3': [0x5c5, 0x2b9],
62
- 'a': [0x661, 0x2b9],
63
- '4': [0x4b9, 0x302],
64
- '5': [0x538, 0x302],
65
- '6': [0x5c5, 0x302],
66
- 'b': [0x661, 0x302],
67
- '7': [0x4b9, 0x354],
68
- '8': [0x538, 0x354],
69
- '9': [0x5c5, 0x354],
70
- 'c': [0x661, 0x354],
71
- '*': [0x4b9, 0x3ad],
72
- '0': [0x538, 0x3ad],
73
- '#': [0x5c5, 0x3ad],
74
- 'd': [0x661, 0x3ad]
75
- };
76
- const ST_TEMP_UNAVAIL = [{
77
- 'd': 0xfa,
78
- 'f1': 0x1a9,
79
- 'f2': 0x0,
80
- 'g': 0xfa
81
- }];
82
- const ST_BUSY = [{
83
- 'd': 0x1f4,
84
- 'f1': 0x1a9,
85
- 'f2': 0x0,
86
- 'g': 0x1f4
87
- }];
88
- const ST_INVALID_NUMBER = [{
89
- 'd': 0x14d,
90
- 'f1': 0x3b6,
91
- 'f2': 0x0,
92
- 'g': 0x0
93
- }, {
94
- 'd': 0x14d,
95
- 'f1': 0x578,
96
- 'f2': 0x0,
97
- 'g': 0x0
98
- }, {
99
- 'd': 0x14d,
100
- 'f1': 0x708,
101
- 'f2': 0x0,
102
- 'g': 0x3e8
103
- }];
104
- const ST_CALLINIT = [{
105
- 'd': 0xc8,
106
- 'f1': 0x1f4,
107
- 'f2': 0x0,
108
- 'g': 0x0
109
- }, {
110
- 'd': 0xc8,
111
- 'f1': 0x2bc,
112
- 'f2': 0x0,
113
- 'g': 0x1388
114
- }];
115
- const ST_RINGBACK = [{
116
- 'd': 0x3e8,
117
- 'f1': 0x1a9,
118
- 'f2': 0x0,
119
- 'g': 0xfa0
120
- }];
121
- const ST_INCOMING = [{
122
- 'd': 0x96,
123
- 'f1': 0x190,
124
- 'f2': 0x0,
125
- 'g': 0x0
126
- }, {
127
- 'd': 0x96,
128
- 'f1': 0x258,
129
- 'f2': 0x0,
130
- 'g': 0x0
131
- }, {
132
- 'd': 0x96,
133
- 'f1': 0x190,
134
- 'f2': 0x0,
135
- 'g': 0x0
136
- }, {
137
- 'd': 0x96,
138
- 'f1': 0x258,
139
- 'f2': 0x0,
140
- 'g': 0x0
141
- }, {
142
- 'd': 0x96,
143
- 'f1': 0x190,
144
- 'f2': 0x0,
145
- 'g': 0x0
146
- }, {
147
- 'd': 0x96,
148
- 'f1': 0x258,
149
- 'f2': 0x0,
150
- 'g': 0xbb8
151
- }];
152
-
153
- class Phone extends _events.default {
154
- constructor() {
155
- let logger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
156
- super();
157
- this[_0x2b52('0x0')] = ![];
158
- this[_0x2b52('0x1')] = ![];
159
- this[_0x2b52('0x2')] = null;
160
- this[_0x2b52('0x3')] = null;
161
- this[_0x2b52('0x4')] = ![];
162
- this[_0x2b52('0x5')] = null;
163
- this[_0x2b52('0x6')] = null;
164
- this[_0x2b52('0x7')] = 0x0;
165
- this[_0x2b52('0x8')] = {};
166
- this[_0x2b52('0x9')] = document['createElement']('AUDIO');
167
- this[_0x2b52('0x9')][_0x2b52('0xa')] = !![];
168
- this[_0x2b52('0xb')] = document['createElement'](_0x2b52('0xc'));
169
- this[_0x2b52('0xb')][_0x2b52('0xa')] = !![];
170
- this[_0x2b52('0xd')] = null;
171
- this[_0x2b52('0xe')] = ![];
172
- this[_0x2b52('0xf')] = [];
173
- this['_repeatToneSequencePos'] = 0x0;
174
- this[_0x2b52('0x10')] = null;
175
- this['_oscillator1'] = null;
176
- this['_oscillator2'] = null;
177
- this[_0x2b52('0x11')] = logger ? logger : new _common.Logger[_0x2b52('0x12')](_common.Logger['LOGLVL'][_0x2b52('0x13')]);
178
-
179
- if (this[_0x2b52('0x11')][_0x2b52('0x14')] === _common.Logger['LOGLVL'][_0x2b52('0x15')]) {
180
- _jssip.default[_0x2b52('0x16')]['disable'](_0x2b52('0x17'));
181
- } else {
182
- _jssip.default[_0x2b52('0x16')][_0x2b52('0x18')]('JsSIP:*');
183
- }
184
- }
185
-
186
- ['prepareMedia']() {
187
- this['log'][_0x2b52('0x19')](_0x2b52('0x1a'));
188
-
189
- const self = this;
190
- const constraints = {
191
- 'audio': !![],
192
- 'video': ![]
193
- };
194
- return new Promise(function (resolve, reject) {
195
- navigator['mediaDevices'][_0x2b52('0x1b')](constraints)[_0x2b52('0x1c')](() => {
196
- self['_mediaPermission'] = !![];
197
- self[_0x2b52('0x1')] = ![];
198
-
199
- self[_0x2b52('0x11')][_0x2b52('0x19')]('Media\x20permission\x20granted');
200
-
201
- resolve();
202
- }, err => {
203
- self[_0x2b52('0x0')] = ![];
204
- self['_mediaPermissionError'] = !![];
205
-
206
- self['log'][_0x2b52('0x1d')]('Denied\x20media\x20permission:\x20' + err);
207
-
208
- reject(err);
209
- });
210
- });
211
- }
212
-
213
- [_0x2b52('0x1e')](phoneOptions) {
214
- this[_0x2b52('0x1f')]();
215
-
216
- if (this[_0x2b52('0x4')]) {
217
- this[_0x2b52('0x11')][_0x2b52('0x20')](_0x2b52('0x21'));
218
-
219
- this[_0x2b52('0x22')]();
220
- }
221
-
222
- this[_0x2b52('0x6')] = Object[_0x2b52('0x23')](options, phoneOptions);
223
-
224
- this[_0x2b52('0x24')]();
225
-
226
- if (this[_0x2b52('0x6')]['provisionToken']) {
227
- let pt = null;
228
-
229
- try {
230
- pt = JSON['parse'](atob(this[_0x2b52('0x6')][_0x2b52('0x25')]));
231
- } catch (_0x46f239) {
232
- throw new _common.Exceptions['InvalidOptions'](_0x2b52('0x25'), 'Invalid\x20token');
233
- }
234
-
235
- this[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x26'));
236
-
237
- this[_0x2b52('0x6')][_0x2b52('0x27')] = pt[_0x2b52('0x28')];
238
- this[_0x2b52('0x6')][_0x2b52('0x29')] = pt['event_server'];
239
- this[_0x2b52('0x6')][_0x2b52('0x2a')] = pt[_0x2b52('0x2b')];
240
- this[_0x2b52('0x6')]['password'] = pt[_0x2b52('0x2c')];
241
- this['_options']['callToken'] = pt[_0x2b52('0x2d')];
242
- } else {
243
- this[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x2e'));
244
-
245
- if (!this[_0x2b52('0x6')][_0x2b52('0x2a')]) {
246
- throw new _common.Exceptions[_0x2b52('0x2f')](_0x2b52('0x2a'), _0x2b52('0x30'));
247
- }
248
-
249
- if (!this[_0x2b52('0x6')]['password']) {
250
- throw new _common.Exceptions[_0x2b52('0x2f')](_0x2b52('0x31'), 'Missing\x20password');
251
- }
252
-
253
- if (!this[_0x2b52('0x6')]['callToken']) {
254
- throw new _common.Exceptions[_0x2b52('0x2f')](_0x2b52('0x32'), 'Missing\x20call\x20token');
255
- }
256
- }
257
-
258
- if (this[_0x2b52('0x6')][_0x2b52('0x33')] && !this[_0x2b52('0x6')]['connectEventService']) {
259
- this[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x34'));
260
-
261
- this[_0x2b52('0x6')][_0x2b52('0x35')] = !![];
262
- }
263
-
264
- if (this[_0x2b52('0x6')]['connectEventService']) {
265
- this[_0x2b52('0x5')] = new _eventClient.EventClient(this[_0x2b52('0x11')]);
266
-
267
- this[_0x2b52('0x5')][_0x2b52('0x36')](this[_0x2b52('0x6')]['eventServer'])['then'](() => {
268
- this[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x37'));
269
-
270
- if (this[_0x2b52('0x6')][_0x2b52('0x33')]) {
271
- let eventSpec = {
272
- 'event_name': _0x2b52('0x38'),
273
- 'call_token': this['_options'][_0x2b52('0x32')]
274
- };
275
-
276
- this[_0x2b52('0x5')][_0x2b52('0x39')](eventSpec, data => {
277
- try {
278
- this['log'][_0x2b52('0x16')]('Received\x20remote\x20call\x20data\x20info');
279
-
280
- this[_0x2b52('0x11')]['debug'](data);
281
-
282
- this[_0x2b52('0x3a')](data);
283
- } catch (_0x5884cb) {
284
- this[_0x2b52('0x11')]['error'](_0x2b52('0x3b') + _0x5884cb);
285
- }
286
- })['then'](subscriptionId => {
287
- this['log']['info'](_0x2b52('0x3c') + subscriptionId);
288
- }, reason => {
289
- this['log']['error'](_0x2b52('0x3d') + reason);
290
- });
291
- }
292
- }, reason => {
293
- this[_0x2b52('0x11')][_0x2b52('0x1d')](_0x2b52('0x3e') + reason);
294
- });
295
- }
296
-
297
- let wsSocket = null;
298
-
299
- try {
300
- wsSocket = new _jssip.default['WebSocketInterface'](this[_0x2b52('0x6')][_0x2b52('0x27')]);
301
- } catch (_0x57272f) {
302
- throw new _common.Exceptions[_0x2b52('0x3f')](_0x2b52('0x40') + _0x57272f);
303
- }
304
-
305
- this[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x41'));
306
-
307
- this[_0x2b52('0x11')][_0x2b52('0x16')](this[_0x2b52('0x6')]);
308
-
309
- this[_0x2b52('0x2')] = new _jssip.default['UA']({
310
- 'sockets': [wsSocket],
311
- 'authorization_user': this[_0x2b52('0x6')][_0x2b52('0x2a')],
312
- 'password': this['_options'][_0x2b52('0x31')],
313
- 'register': this['_options']['register'],
314
- 'display_name': this[_0x2b52('0x6')]['authorizationUsername'],
315
- 'uri': this[_0x2b52('0x6')][_0x2b52('0x2a')] + _0x2b52('0x42'),
316
- 'session_timers': ![]
317
- });
318
- const self = this;
319
- this['_UA']['on']('newRTCSession', function (data) {
320
- self[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0x43'));
321
-
322
- if (data['originator'] === _0x2b52('0x44')) {
323
- const session = new Session(self);
324
-
325
- session[_0x2b52('0x45')](data);
326
-
327
- if (self['_options'][_0x2b52('0x46')]) {
328
- self[_0x2b52('0x47')](ST_INCOMING);
329
- }
330
-
331
- if (self['_options'][_0x2b52('0x48')]) {
332
- if (Object[_0x2b52('0x49')](self[_0x2b52('0x8')])[_0x2b52('0x4a')] > 0x0) {
333
- self[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x4b') + session[_0x2b52('0x4c')] + _0x2b52('0x4d'));
334
-
335
- session[_0x2b52('0x4e')](0x1e6, _0x2b52('0x4f'));
336
-
337
- return;
338
- } else {
339
- self[_0x2b52('0x11')][_0x2b52('0x16')]('There\x20are\x20no\x20other\x20sessions,\x20adding\x20incoming\x20call');
340
- }
341
- }
342
-
343
- self[_0x2b52('0x50')](session);
344
-
345
- session[_0x2b52('0x51')](_0x2b52('0x52'));
346
-
347
- self[_0x2b52('0x53')](session);
348
- }
349
- });
350
-
351
- this[_0x2b52('0x2')]['on']('connecting', function () {
352
- self['_setConnectionState'](_0x2b52('0x54'));
353
- });
354
-
355
- this[_0x2b52('0x2')]['on'](_0x2b52('0x55'), function () {
356
- self[_0x2b52('0x56')](_0x2b52('0x57'));
357
- });
358
-
359
- this[_0x2b52('0x2')]['on'](_0x2b52('0x58'), function () {
360
- self[_0x2b52('0x56')]('DISCONNECTED');
361
- });
362
-
363
- this[_0x2b52('0x2')]['on'](_0x2b52('0x59'), function () {
364
- self['_setConnectionState'](_0x2b52('0x5a'));
365
- });
366
-
367
- this['_UA']['on'](_0x2b52('0x5b'), function () {
368
- self[_0x2b52('0x56')](_0x2b52('0x5c'));
369
- });
370
-
371
- this[_0x2b52('0x2')]['on'](_0x2b52('0x5d'), function () {
372
- self['_setConnectionState'](_0x2b52('0x5e'));
373
- });
374
-
375
- this[_0x2b52('0x2')][_0x2b52('0x1e')]();
376
-
377
- this[_0x2b52('0x4')] = !![];
378
-
379
- this[_0x2b52('0x11')][_0x2b52('0x19')]('Successfully\x20started\x20phone');
380
- }
381
-
382
- [_0x2b52('0x22')]() {
383
- if (!this[_0x2b52('0x4')]) {
384
- throw new _common.Exceptions[_0x2b52('0x5f')](_0x2b52('0x60'));
385
- }
386
-
387
- this[_0x2b52('0x2')]['removeAllListeners']();
388
-
389
- this[_0x2b52('0x2')][_0x2b52('0x22')]();
390
-
391
- delete this[_0x2b52('0x2')];
392
-
393
- if (!this[_0x2b52('0x5')]) {
394
- this[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0x61'));
395
-
396
- return;
397
- }
398
-
399
- try {
400
- this[_0x2b52('0x5')][_0x2b52('0x62')]();
401
-
402
- delete this['_eventClient'];
403
- } catch (_0x56956c) {
404
- this[_0x2b52('0x11')]['warning'](_0x2b52('0x63'));
405
- }
406
-
407
- this[_0x2b52('0x4')] = ![];
408
-
409
- this[_0x2b52('0x11')][_0x2b52('0x19')]('Phone\x20client\x20successfully\x20stopped');
410
- }
411
-
412
- [_0x2b52('0x64')](number) {
413
- let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
414
-
415
- if (!this[_0x2b52('0x4')]) {
416
- throw new _common.Exceptions[_0x2b52('0x5f')](_0x2b52('0x60'));
417
- }
418
-
419
- if (this[_0x2b52('0x65')]()) {
420
- throw _common.Exceptions[_0x2b52('0x66')](_0x2b52('0x67'));
421
- }
422
-
423
- this[_0x2b52('0x68')]();
424
-
425
- const callParams = Object[_0x2b52('0x23')]({
426
- 'record': ![],
427
- 'maximumCallCost': 0x0,
428
- 'answerCallTimeout': 0x0,
429
- 'explicitCallerId': null,
430
- 'explicitShortCallerId': null,
431
- 'metaInfo': null,
432
- '_isListenCall': ![]
433
- }, params);
434
-
435
- number = number[_0x2b52('0x69')]()[_0x2b52('0x6a')](/ |\(|\)/g, '');
436
-
437
- this[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x6b') + number);
438
-
439
- let session = new Session(this);
440
- session['newOutboundSession'](number, callParams);
441
-
442
- this[_0x2b52('0x50')](session);
443
-
444
- return session;
445
- }
446
-
447
- ['listen'](listenKey) {
448
- const s = listenKey[_0x2b52('0x6c')]('@');
449
-
450
- let callUUID = s[0x0];
451
- let mediaSwitch = _0x2b52('0x6d') + s[0x1];
452
-
453
- this[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0x6e') + callUUID + _0x2b52('0x6f') + mediaSwitch);
454
-
455
- return this[_0x2b52('0x64')](_0x2b52('0x70') + callUUID, {
456
- 'mediaSwitchURI': mediaSwitch,
457
- '_isListenCall': !![]
458
- });
459
- }
460
-
461
- [_0x2b52('0x71')](uuid) {
462
- for (let key in this[_0x2b52('0x8')]) {
463
- if (this['_activeSessions'][_0x2b52('0x72')](key)) {
464
- if (this[_0x2b52('0x8')][key][_0x2b52('0x4c')] === uuid) {
465
- return this[_0x2b52('0x8')][key];
466
- }
467
- }
468
- }
469
-
470
- return null;
471
- }
472
-
473
- get [_0x2b52('0x73')]() {
474
- return this['_options'];
475
- }
476
-
477
- get ['sessions']() {
478
- let s = [];
479
-
480
- for (let key in this[_0x2b52('0x8')]) {
481
- if (this[_0x2b52('0x8')][_0x2b52('0x72')](key)) {
482
- s[_0x2b52('0x74')](this[_0x2b52('0x8')][key]);
483
- }
484
- }
485
-
486
- return s;
487
- }
488
-
489
- get [_0x2b52('0x75')]() {
490
- return this[_0x2b52('0x0')];
491
- }
492
-
493
- get [_0x2b52('0x76')]() {
494
- return this[_0x2b52('0x1')];
495
- }
496
-
497
- get ['isStarted']() {
498
- return this[_0x2b52('0x4')];
499
- }
500
-
501
- get [_0x2b52('0x77')]() {
502
- return _common.Tools['browserIsChrome']() || _common.Tools[_0x2b52('0x78')]() || _common.Tools[_0x2b52('0x79')]() || _common.Tools[_0x2b52('0x7a')]();
503
- }
504
-
505
- get [_0x2b52('0x7b')]() {
506
- return this[_0x2b52('0x9')];
507
- }
508
-
509
- [_0x2b52('0x7c')](duration, freq1) {
510
- let freq2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0x0;
511
- let callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
512
-
513
- this[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0x7d') + freq1 + _0x2b52('0x7e') + freq2 + _0x2b52('0x7f') + duration + _0x2b52('0x80'));
514
-
515
- this[_0x2b52('0x81')][_0x2b52('0x82')][_0x2b52('0x83')] = freq1;
516
- this[_0x2b52('0x84')][_0x2b52('0x82')][_0x2b52('0x83')] = freq2;
517
- this[_0x2b52('0x10')][_0x2b52('0x85')][_0x2b52('0x83')] = this['_options'][_0x2b52('0x86')];
518
- const self = this;
519
- this['_toneTimer'] = setTimeout(function () {
520
- self[_0x2b52('0x87')]();
521
-
522
- if (callback) {
523
- callback();
524
- }
525
- }, duration);
526
- }
527
-
528
- [_0x2b52('0x87')]() {
529
- this[_0x2b52('0x81')][_0x2b52('0x82')][_0x2b52('0x83')] = 0x0;
530
- this[_0x2b52('0x84')]['frequency'][_0x2b52('0x83')] = 0x0;
531
- this['_toneGainProcessor'][_0x2b52('0x85')][_0x2b52('0x83')] = 0x0;
532
- clearTimeout(this[_0x2b52('0xd')]);
533
- }
534
-
535
- [_0x2b52('0x47')](sequences) {
536
- this[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x88'));
537
-
538
- this['log'][_0x2b52('0x16')](sequences);
539
-
540
- this[_0x2b52('0xf')] = sequences;
541
- this['_repeatToneSequencePos'] = 0x0;
542
- this[_0x2b52('0xe')] = !![];
543
-
544
- this[_0x2b52('0x89')]();
545
- }
546
-
547
- [_0x2b52('0x89')]() {
548
- if (this[_0x2b52('0xe')]) {
549
- this[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0x8a') + this['_repeatToneSequencePos']);
550
-
551
- let toneDef = this[_0x2b52('0xf')][this[_0x2b52('0x8b')]];
552
-
553
- this[_0x2b52('0x8b')]++;
554
-
555
- if (this[_0x2b52('0x8b')] === this[_0x2b52('0xf')][_0x2b52('0x4a')]) {
556
- this[_0x2b52('0x8b')] = 0x0;
557
- }
558
-
559
- const self = this;
560
-
561
- this[_0x2b52('0x7c')](toneDef['d'], toneDef['f1'], toneDef['f2'], function () {
562
- setTimeout(self[_0x2b52('0x89')]['bind'](self), toneDef['g']);
563
- });
564
- }
565
- }
566
-
567
- [_0x2b52('0x8c')]() {
568
- if (this[_0x2b52('0xe')]) {
569
- this[_0x2b52('0x11')][_0x2b52('0x19')]('Repeating\x20tone\x20stopped');
570
-
571
- this['_repeatToneActive'] = ![];
572
-
573
- this[_0x2b52('0x87')]();
574
- }
575
- }
576
-
577
- ['_initToneGenerator']() {
578
- const AudioContext = window['AudioContext'] || window[_0x2b52('0x8d')] || ![];
579
-
580
- if (!AudioContext) {
581
- throw new _common.Exceptions['NotAllowed'](_0x2b52('0x8e'));
582
- }
583
-
584
- const ctx = new AudioContext();
585
- this[_0x2b52('0x8f')] = ctx[_0x2b52('0x90')]();
586
- this[_0x2b52('0xb')][_0x2b52('0x91')] = this[_0x2b52('0x8f')][_0x2b52('0x92')];
587
- this[_0x2b52('0x10')] = ctx['createGain']();
588
- this[_0x2b52('0x10')]['gain'][_0x2b52('0x83')] = 0x0;
589
-
590
- this['_toneGainProcessor'][_0x2b52('0x36')](this[_0x2b52('0x8f')]);
591
-
592
- this[_0x2b52('0x81')] = ctx[_0x2b52('0x93')]();
593
- this['_oscillator1']['connect'](this[_0x2b52('0x10')]);
594
- this[_0x2b52('0x81')][_0x2b52('0x82')][_0x2b52('0x83')] = 0x0;
595
-
596
- this[_0x2b52('0x81')][_0x2b52('0x1e')]();
597
-
598
- this['_oscillator2'] = ctx[_0x2b52('0x93')]();
599
-
600
- this[_0x2b52('0x84')]['connect'](this[_0x2b52('0x10')]);
601
-
602
- this['_oscillator2'][_0x2b52('0x82')][_0x2b52('0x83')] = 0x0;
603
-
604
- this[_0x2b52('0x84')][_0x2b52('0x1e')]();
605
- }
606
-
607
- ['holdAllCalls']() {
608
- this[_0x2b52('0x11')]['info']('Holding\x20all\x20active\x20sessions');
609
-
610
- if (this[_0x2b52('0x65')]()) {
611
- throw _common.Exceptions[_0x2b52('0x66')]('A\x20session\x20is\x20currently\x20connecting');
612
- }
613
-
614
- for (let key in this[_0x2b52('0x8')]) {
615
- if (this['_activeSessions'][_0x2b52('0x72')](key)) {
616
- let session = this[_0x2b52('0x8')][key];
617
-
618
- if (session[_0x2b52('0x94')] === _0x2b52('0x95')) {
619
- session[_0x2b52('0x96')]();
620
- }
621
- }
622
- }
623
- }
624
-
625
- ['_addSession'](session) {
626
- this[_0x2b52('0x7')]++;
627
- session[_0x2b52('0x97')] = this[_0x2b52('0x7')];
628
-
629
- this['log'][_0x2b52('0x19')](_0x2b52('0x98') + session[_0x2b52('0x97')] + ':\x20' + session[_0x2b52('0x4c')]);
630
-
631
- this['_activeSessions'][session[_0x2b52('0x97')]] = session;
632
-
633
- this['log'][_0x2b52('0x16')]('We\x20now\x20have\x20' + Object[_0x2b52('0x49')](this['_activeSessions'])['length'] + _0x2b52('0x99'));
634
-
635
- this[_0x2b52('0x11')][_0x2b52('0x16')](this['_activeSessions']);
636
-
637
- try {
638
- this[_0x2b52('0x9a')](_0x2b52('0x9b'), {
639
- 'session': session
640
- });
641
- } catch (_0x48e4f5) {
642
- this[_0x2b52('0x11')][_0x2b52('0x1d')](_0x2b52('0x9c') + _0x48e4f5);
643
- }
644
- }
645
-
646
- ['_removeSession'](session) {
647
- this[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x9d') + session[_0x2b52('0x97')] + ':\x20' + session[_0x2b52('0x4c')]);
648
-
649
- try {
650
- this['emit'](_0x2b52('0x9e'), {
651
- 'session': session
652
- });
653
- } catch (_0x2847a2) {
654
- this[_0x2b52('0x11')][_0x2b52('0x1d')](_0x2b52('0x9f') + _0x2847a2);
655
- }
656
-
657
- delete this['_activeSessions'][session[_0x2b52('0x97')]];
658
-
659
- this[_0x2b52('0x11')][_0x2b52('0x16')]('We\x20now\x20have\x20' + Object[_0x2b52('0x49')](this['_activeSessions'])[_0x2b52('0x4a')] + '\x20sessions');
660
-
661
- this[_0x2b52('0x11')][_0x2b52('0x16')](this['_activeSessions']);
662
-
663
- this[_0x2b52('0x8c')]();
664
- }
665
-
666
- ['_sessionTerminated'](session) {
667
- this[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0xa0') + session[_0x2b52('0x4c')] + '\x20terminated,\x20removing\x20in\x20' + this[_0x2b52('0x6')]['autoRemoveSessionTime'] + _0x2b52('0x80'));
668
-
669
- const self = this;
670
- setTimeout(function () {
671
- self[_0x2b52('0xa1')](session);
672
- }, this[_0x2b52('0x6')][_0x2b52('0xa2')]);
673
- }
674
-
675
- [_0x2b52('0x65')]() {
676
- for (let key in this[_0x2b52('0x8')]) {
677
- if (this[_0x2b52('0x8')][_0x2b52('0x72')](key)) {
678
- let session = this[_0x2b52('0x8')][key];
679
-
680
- if (session[_0x2b52('0x94')] === _0x2b52('0xa3') || session[_0x2b52('0x94')] === 'CALLING' || session[_0x2b52('0x94')] === 'PROGRESS' || session[_0x2b52('0x94')] === 'INCOMING') {
681
- return !![];
682
- }
683
- }
684
- }
685
-
686
- return ![];
687
- }
688
-
689
- [_0x2b52('0x56')](state) {
690
- this[_0x2b52('0x11')]['info'](_0x2b52('0xa4') + state);
691
-
692
- this[_0x2b52('0x3')] = state;
693
-
694
- try {
695
- this['emit'](_0x2b52('0xa5'), {
696
- 'state': state
697
- });
698
- } catch (_0x46efb6) {
699
- this[_0x2b52('0x11')]['error']('Exception\x20in\x20connectionStateChange\x20event:\x20' + _0x46efb6);
700
- }
701
- }
702
-
703
- [_0x2b52('0x53')](session) {
704
- try {
705
- this[_0x2b52('0x9a')](_0x2b52('0xa6'), session);
706
- } catch (_0x1fb729) {
707
- this['log'][_0x2b52('0x1d')](_0x2b52('0xa7') + _0x1fb729);
708
- }
709
- }
710
-
711
- [_0x2b52('0x3a')]() {
712
- let eventData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
713
- let e;
714
- e = (0, _camelcaseKeys.default)(eventData);
715
- e[_0x2b52('0xa8')] = (0, _camelcaseKeys.default)(eventData[_0x2b52('0xa8')]);
716
- e['duration'] = e['duration'] * 0x3e8;
717
- e['answerDuration'] = e[_0x2b52('0xa9')] * 0x3e8;
718
- e['activeDuration'] = e['activeDuration'] * 0x3e8;
719
- e[_0x2b52('0xaa')] = _common.Tools[_0x2b52('0xab')](e[_0x2b52('0xac')]);
720
- e[_0x2b52('0xad')] = e[_0x2b52('0xa9')] ? _common.Tools[_0x2b52('0xab')](e['answerDuration']) : '';
721
- e[_0x2b52('0xae')] = e['activeDuration'] ? _common.Tools['createDurationString'](e[_0x2b52('0xaf')]) : '';
722
-
723
- try {
724
- this[_0x2b52('0x9a')](_0x2b52('0xb0'), e);
725
- } catch (_0x14d3a3) {
726
- this['log'][_0x2b52('0x1d')](_0x2b52('0xb1') + _0x14d3a3);
727
- }
728
- }
729
-
730
- [_0x2b52('0x1f')]() {
731
- if (!this[_0x2b52('0x0')]) {
732
- throw new _common.Exceptions['MediaNotPrepared']();
733
- }
734
- }
735
-
736
- }
737
-
738
- exports.Phone = Phone;
739
-
740
- class Session extends _events.default {
741
- constructor(phone) {
742
- super();
743
- this['_phone'] = phone;
744
- this[_0x2b52('0x11')] = phone[_0x2b52('0x11')];
745
- this[_0x2b52('0xb2')] = null;
746
- this[_0x2b52('0xb3')] = null;
747
- this[_0x2b52('0xb4')] = null;
748
- this['_iceCandidateTimer'] = null;
749
- this[_0x2b52('0xb5')] = ![];
750
- this[_0x2b52('0xb6')] = ![];
751
- this[_0x2b52('0xb7')] = ![];
752
- this[_0x2b52('0xb8')] = null;
753
- this[_0x2b52('0xb9')] = null;
754
- this[_0x2b52('0xba')] = null;
755
- this[_0x2b52('0xbb')] = null;
756
- this[_0x2b52('0xbc')] = null;
757
- this[_0x2b52('0xbd')] = null;
758
- this[_0x2b52('0xbe')] = null;
759
- this[_0x2b52('0xbf')] = null;
760
- this[_0x2b52('0xc0')] = null;
761
- this[_0x2b52('0xc1')] = ![];
762
- this['_whisperMode'] = null;
763
- this['_manualDisposition'] = null;
764
- this['_rtcpStatsTimer'] = null;
765
- this[_0x2b52('0xc2')] = null;
766
- this[_0x2b52('0xc3')] = 0x0;
767
- this[_0x2b52('0xc4')] = null;
768
- this[_0x2b52('0xc5')] = null;
769
- }
770
-
771
- ['newOutboundSession'](number, callParams) {
772
- this[_0x2b52('0xb2')] = _common.Tools[_0x2b52('0xc6')]();
773
-
774
- this['log'][_0x2b52('0x16')](_0x2b52('0xc7') + number + '\x20[' + this[_0x2b52('0xb2')] + ']');
775
-
776
- this[_0x2b52('0xc8')] = number;
777
- let options = {
778
- 'mediaConstraints': {
779
- 'audio': !![],
780
- 'video': ![]
781
- },
782
- 'pcConfig': {
783
- 'iceServers': [{
784
- 'urls': ['stun:stun.l.google.com:19302']
785
- }]
786
- },
787
- 'extraHeaders': [_0x2b52('0xc9') + this[_0x2b52('0xca')]['options']['callToken'], 'X-P-UUID:\x20' + this[_0x2b52('0xb2')], _0x2b52('0xcb') + callParams[_0x2b52('0xcc')]]
788
- };
789
-
790
- if (callParams['explicitCallerId']) {
791
- options[_0x2b52('0xcd')][_0x2b52('0x74')](_0x2b52('0xce') + callParams[_0x2b52('0xcf')]);
792
- }
793
-
794
- if (callParams['explicitShortCallerId']) {
795
- options[_0x2b52('0xcd')][_0x2b52('0x74')](_0x2b52('0xd0') + callParams[_0x2b52('0xd1')]);
796
- }
797
-
798
- if (callParams['metaInfo']) {
799
- options[_0x2b52('0xcd')]['push'](_0x2b52('0xd2') + encodeURI(callParams['metaInfo'][_0x2b52('0xd3')]()[_0x2b52('0xd4')](0x0, 0xff)));
800
- }
801
-
802
- if (callParams['record']) {
803
- if (isNaN(callParams[_0x2b52('0xd5')])) {
804
- throw new _common.Exceptions[_0x2b52('0xd6')]('Record\x20parameter\x20must\x20be\x20a\x20number');
805
- }
806
-
807
- this[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0xd7') + callParams[_0x2b52('0xd5')] + _0x2b52('0xd8'));
808
-
809
- options[_0x2b52('0xcd')]['push'](_0x2b52('0xd9') + callParams[_0x2b52('0xd5')]);
810
-
811
- this['_isRecording'] = !![];
812
- } else {
813
- this[_0x2b52('0xb7')] = ![];
814
- }
815
-
816
- this['_isListenCall'] = callParams[_0x2b52('0xc1')];
817
-
818
- if (callParams[_0x2b52('0xda')]) {
819
- this[_0x2b52('0x11')][_0x2b52('0x16')]('Requesting\x20specific\x20media\x20switch\x20' + callParams[_0x2b52('0xda')]);
820
-
821
- options[_0x2b52('0xcd')][_0x2b52('0x74')](_0x2b52('0xdb') + callParams[_0x2b52('0xda')]);
822
- } else {
823
- const otherSessions = this[_0x2b52('0xdc')]();
824
-
825
- if (otherSessions[_0x2b52('0x4a')] > 0x0) {
826
- if (otherSessions[0x0]['_mediaSwitch']) {
827
- this['log'][_0x2b52('0x16')]('Requesting\x20call\x20grouping\x20on\x20media\x20switch\x20' + otherSessions[0x0][_0x2b52('0xc5')]);
828
-
829
- options[_0x2b52('0xcd')][_0x2b52('0x74')](_0x2b52('0xdd') + otherSessions[0x0][_0x2b52('0xc5')]);
830
- } else {
831
- this[_0x2b52('0x11')][_0x2b52('0x20')](_0x2b52('0xde'));
832
- }
833
- } else {
834
- this[_0x2b52('0x11')][_0x2b52('0x16')]('No\x20other\x20active\x20calls,\x20no\x20media\x20switch\x20grouping\x20requested');
835
- }
836
- }
837
-
838
- const uri = 'sip:' + number + _0x2b52('0x42');
839
-
840
- try {
841
- this[_0x2b52('0xdf')](this[_0x2b52('0xca')]['_UA'][_0x2b52('0x64')](uri, options));
842
- } catch (_0x947053) {
843
- this['log'][_0x2b52('0x1d')]('Error\x20starting\x20call:', _0x947053);
844
-
845
- return null;
846
- }
847
-
848
- if (callParams[_0x2b52('0xe0')]) {
849
- this[_0x2b52('0xe1')](callParams[_0x2b52('0xe0')]);
850
- }
851
- }
852
-
853
- [_0x2b52('0x45')](newSessionRequest) {
854
- this[_0x2b52('0xb2')] = newSessionRequest[_0x2b52('0xe2')][_0x2b52('0xe3')](_0x2b52('0xe4'), 0x0);
855
- this[_0x2b52('0xbe')] = newSessionRequest[_0x2b52('0xe2')]['getHeader']('X-DID', 0x0);
856
- this[_0x2b52('0xc0')] = unescape(newSessionRequest[_0x2b52('0xe2')][_0x2b52('0xe3')](_0x2b52('0xe5'), 0x0));
857
- this['_originName'] = newSessionRequest[_0x2b52('0xe2')][_0x2b52('0xe6')]['display_name'];
858
- this[_0x2b52('0xbd')] = newSessionRequest['request'][_0x2b52('0xe6')][_0x2b52('0xe7')][_0x2b52('0xe8')];
859
-
860
- this['log'][_0x2b52('0x19')](_0x2b52('0xe9') + this[_0x2b52('0xbd')] + '\x20[' + this[_0x2b52('0xb2')] + ']');
861
-
862
- this[_0x2b52('0x11')][_0x2b52('0x16')](newSessionRequest);
863
-
864
- this[_0x2b52('0xc5')] = newSessionRequest['request'][_0x2b52('0xe3')](_0x2b52('0xea'));
865
-
866
- this[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0xeb') + this[_0x2b52('0xc5')]);
867
-
868
- this[_0x2b52('0xdf')](newSessionRequest[_0x2b52('0xec')]);
869
- }
870
-
871
- [_0x2b52('0xdc')]() {
872
- const allSessions = this[_0x2b52('0xca')][_0x2b52('0xed')];
873
-
874
- let s = [];
875
-
876
- for (let key in allSessions) {
877
- if (allSessions[key]) {
878
- if (allSessions[key]['__containerId'] !== this[_0x2b52('0x97')]) {
879
- s[_0x2b52('0x74')](allSessions[key]);
880
- }
881
- }
882
- }
883
-
884
- return s;
885
- }
886
-
887
- ['_initWebRTCSession'](webRTCSession) {
888
- this['_webRTCSession'] = webRTCSession;
889
- this['_callBeginTime'] = Date['now']();
890
- const self = this;
891
-
892
- this[_0x2b52('0xb3')]['on']('icecandidate', function (event) {
893
- const c = event['candidate'];
894
-
895
- self[_0x2b52('0x11')][_0x2b52('0x16')]('Got\x20ICE\x20candidate:\x20' + c[_0x2b52('0xee')]);
896
-
897
- if (c[_0x2b52('0xef')] === 'srflx' && c['relatedAddress'] !== null && c[_0x2b52('0xf0')] !== null) {
898
- self[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0xf1') + c[_0x2b52('0xee')]);
899
-
900
- if (self[_0x2b52('0xf2')] != null) clearTimeout(self[_0x2b52('0xf2')]);
901
-
902
- event[_0x2b52('0xf3')]();
903
- } else {
904
- if (self['_iceCandidateTimer'] != null) clearTimeout(self[_0x2b52('0xf2')]);
905
- self[_0x2b52('0xf2')] = setTimeout(function (data) {
906
- self['log'][_0x2b52('0x16')](_0x2b52('0xf4') + self[_0x2b52('0xca')][_0x2b52('0x73')][_0x2b52('0xf5')] + _0x2b52('0xf6'));
907
-
908
- data['ready']();
909
- }, self[_0x2b52('0xca')][_0x2b52('0x73')]['iceGatherTimeout'], event);
910
- }
911
- });
912
-
913
- this['_webRTCSession']['on'](_0x2b52('0xf7'), function () {
914
- self['_startDurationUpdateTimer']();
915
-
916
- self[_0x2b52('0xf8')]();
917
-
918
- self[_0x2b52('0x51')]('INITIALIZING');
919
- });
920
-
921
- this[_0x2b52('0xb3')]['on'](_0x2b52('0xf9'), function () {
922
- if (self[_0x2b52('0xca')][_0x2b52('0x73')]['playCallInitializedTone']) {
923
- self['_phone'][_0x2b52('0x47')](ST_CALLINIT);
924
- }
925
-
926
- self[_0x2b52('0x51')](_0x2b52('0xfa'));
927
- });
928
-
929
- this[_0x2b52('0xb3')]['on'](_0x2b52('0xfb'), function (data) {
930
- if (data[_0x2b52('0xfc')] === 'remote') {
931
- self[_0x2b52('0x51')](_0x2b52('0xfd'), {
932
- 'code': data[_0x2b52('0xfe')][_0x2b52('0xff')]
933
- });
934
-
935
- self[_0x2b52('0xca')][_0x2b52('0x8c')]();
936
-
937
- if (data[_0x2b52('0xfe')][_0x2b52('0xff')] === 0xb4) {
938
- self[_0x2b52('0xca')][_0x2b52('0x47')](ST_RINGBACK);
939
- }
940
-
941
- if (self[_0x2b52('0xc3')]) {
942
- self['_answerCallTimer'] = setTimeout(function () {
943
- self[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x100') + self[_0x2b52('0xc3')] + '\x20seconds');
944
-
945
- try {
946
- self['hangup']();
947
- } catch (_0x37f186) {
948
- self['log'][_0x2b52('0x19')]('No\x20active\x20session,\x20ignoring\x20answer\x20call\x20timeout');
949
- }
950
- }, self[_0x2b52('0xc3')] * 0x3e8);
951
- }
952
- }
953
- });
954
-
955
- this['_webRTCSession']['on'](_0x2b52('0x101'), function (data) {
956
- self[_0x2b52('0xca')][_0x2b52('0x8c')]();
957
-
958
- self[_0x2b52('0xba')] = Date['now']();
959
-
960
- if (self[_0x2b52('0xc3')]) {
961
- clearTimeout(self[_0x2b52('0xc4')]);
962
- self[_0x2b52('0xc3')] = 0x0;
963
- }
964
-
965
- if (data['originator'] === 'remote') {
966
- const recState = data[_0x2b52('0xfe')]['getHeader'](_0x2b52('0x102'));
967
-
968
- if (recState === 'true') {
969
- self[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0x103'));
970
- } else {
971
- self[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0x104'));
972
- }
973
-
974
- self[_0x2b52('0xc5')] = data[_0x2b52('0xfe')][_0x2b52('0xe3')](_0x2b52('0xea'));
975
-
976
- self[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0xeb') + self['_mediaSwitch']);
977
- }
978
- });
979
-
980
- this[_0x2b52('0xb3')]['on']('confirmed', function () {
981
- self[_0x2b52('0x51')](_0x2b52('0x95'));
982
- });
983
-
984
- this[_0x2b52('0xb3')]['on'](_0x2b52('0x105'), function () {
985
- self[_0x2b52('0xca')]['_endRepeatTone']();
986
-
987
- self[_0x2b52('0xbb')] = Date[_0x2b52('0x106')]();
988
-
989
- if (self[_0x2b52('0xc3')]) {
990
- clearTimeout(self[_0x2b52('0xc4')]);
991
- }
992
-
993
- self[_0x2b52('0x51')](_0x2b52('0x107'));
994
- });
995
-
996
- this[_0x2b52('0xb3')]['on'](_0x2b52('0x108'), function (data) {
997
- self[_0x2b52('0xca')][_0x2b52('0x8c')]();
998
-
999
- self[_0x2b52('0xbb')] = Date[_0x2b52('0x106')]();
1000
-
1001
- if (self[_0x2b52('0xc3')]) {
1002
- clearTimeout(self['_answerCallTimer']);
1003
- }
1004
-
1005
- let m;
1006
-
1007
- if (data[_0x2b52('0x109')]) {
1008
- m = data['message'][_0x2b52('0xff')] + '\x20' + data['message'][_0x2b52('0x10a')];
1009
- } else {
1010
- m = '';
1011
- }
1012
-
1013
- self['_setSessionState'](_0x2b52('0x10b'), {
1014
- 'cause': data[_0x2b52('0x10c')],
1015
- 'message': m
1016
- });
1017
- });
1018
-
1019
- this[_0x2b52('0xb3')]['on'](_0x2b52('0x10d'), function (data) {
1020
- self[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0x10e'), data);
1021
- });
1022
-
1023
- this[_0x2b52('0xb3')]['on'](_0x2b52('0x10f'), function (data) {
1024
- self['log'][_0x2b52('0x16')](_0x2b52('0x110'), data);
1025
- });
1026
-
1027
- this[_0x2b52('0xb3')]['on']('hold', function () {
1028
- self['_isOnHold'] = !![];
1029
-
1030
- self[_0x2b52('0x111')]();
1031
-
1032
- self['_setSessionState'](_0x2b52('0x112'));
1033
- });
1034
-
1035
- this['_webRTCSession']['on'](_0x2b52('0x113'), function () {
1036
- self['_isOnHold'] = ![];
1037
-
1038
- self[_0x2b52('0x111')]();
1039
-
1040
- self[_0x2b52('0x51')](_0x2b52('0x95'));
1041
- });
1042
-
1043
- this[_0x2b52('0xb3')]['on'](_0x2b52('0x114'), function (data) {
1044
- self['log']['debug'](_0x2b52('0x115'), data);
1045
- self[_0x2b52('0xb6')] = !![];
1046
-
1047
- self[_0x2b52('0x116')]();
1048
- });
1049
-
1050
- this['_webRTCSession']['on'](_0x2b52('0x117'), function (data) {
1051
- self[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0x118'), data);
1052
-
1053
- self[_0x2b52('0xb6')] = ![];
1054
-
1055
- self[_0x2b52('0x116')]();
1056
- });
1057
- this['_webRTCSession']['on'](_0x2b52('0x119'), function (data) {
1058
- self[_0x2b52('0x11')]['debug'](_0x2b52('0x11a'), data);
1059
- });
1060
-
1061
- this[_0x2b52('0xb3')]['on']('update', function (data) {
1062
- self['log']['debug'](_0x2b52('0x11b'), data);
1063
- });
1064
-
1065
- this['_webRTCSession']['on'](_0x2b52('0x11c'), function (data) {
1066
- self[_0x2b52('0x11')]['error'](_0x2b52('0x11d'), data);
1067
- });
1068
-
1069
- if (self[_0x2b52('0xb3')][_0x2b52('0x11e')]) {
1070
- self[_0x2b52('0x11f')](self[_0x2b52('0xb3')]);
1071
- }
1072
-
1073
- this[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0x120'));
1074
-
1075
- this[_0x2b52('0x11')][_0x2b52('0x16')](this);
1076
- }
1077
-
1078
- [_0x2b52('0x121')]() {
1079
- let disposition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
1080
-
1081
- if (!disposition) {
1082
- this['log'][_0x2b52('0x19')](_0x2b52('0x122'));
1083
-
1084
- this['_webRTCSession'][_0x2b52('0x123')]();
1085
- } else {
1086
- this[_0x2b52('0x11')]['info'](_0x2b52('0x124') + disposition);
1087
-
1088
- this[_0x2b52('0x125')] = disposition;
1089
-
1090
- this['_webRTCSession'][_0x2b52('0x123')]({
1091
- 'extraHeaders': [_0x2b52('0x126') + disposition]
1092
- });
1093
- }
1094
- }
1095
-
1096
- [_0x2b52('0x127')]() {
1097
- let metaInfo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
1098
- let options = {
1099
- 'mediaConstraints': {
1100
- 'audio': !![],
1101
- 'video': ![]
1102
- },
1103
- 'pcConfig': {
1104
- 'iceServers': [{
1105
- 'urls': [_0x2b52('0x128')]
1106
- }]
1107
- },
1108
- 'extraHeaders': [_0x2b52('0xc9') + this[_0x2b52('0xca')][_0x2b52('0x73')][_0x2b52('0x32')]]
1109
- };
1110
-
1111
- if (metaInfo) {
1112
- options['extraHeaders'][_0x2b52('0x74')](_0x2b52('0xd2') + encodeURI(metaInfo['toString']()[_0x2b52('0xd4')](0x0, 0xff)));
1113
- }
1114
-
1115
- this['_webRTCSession']['answer'](options);
1116
- this['_handleRemoteAudio'](this[_0x2b52('0xb3')]);
1117
- }
1118
-
1119
- [_0x2b52('0x4e')]() {
1120
- let statusCode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0x25b;
1121
- let reasonPhrase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _0x2b52('0x129');
1122
-
1123
- this['log'][_0x2b52('0x19')](_0x2b52('0x12a'));
1124
-
1125
- this['_webRTCSession']['terminate']({
1126
- 'status_code': statusCode,
1127
- 'reason_phrase': reasonPhrase
1128
- });
1129
- }
1130
-
1131
- get [_0x2b52('0x4c')]() {
1132
- return this[_0x2b52('0xb2')];
1133
- }
1134
-
1135
- get [_0x2b52('0xc8')]() {
1136
- return this[_0x2b52('0xbe')];
1137
- }
1138
-
1139
- get ['localNumberName']() {
1140
- return this[_0x2b52('0xc0')];
1141
- }
1142
-
1143
- get ['originatingNumber']() {
1144
- return this[_0x2b52('0xbd')];
1145
- }
1146
-
1147
- set [_0x2b52('0xc8')](number) {
1148
- this['log'][_0x2b52('0x16')]('Setting\x20destination\x20number\x20to:\x20' + number);
1149
-
1150
- this[_0x2b52('0xbe')] = number;
1151
- }
1152
-
1153
- get [_0x2b52('0x94')]() {
1154
- return this[_0x2b52('0xb4')];
1155
- }
1156
-
1157
- get [_0x2b52('0x12b')]() {
1158
- if (this[_0x2b52('0xc1')]) {
1159
- this[_0x2b52('0x11')][_0x2b52('0x16')]('Call\x20direction\x20is\x20LISTEN');
1160
-
1161
- return _0x2b52('0x12c');
1162
- } else if (this[_0x2b52('0xb3')]['direction'] === _0x2b52('0x12d')) {
1163
- this['log'][_0x2b52('0x16')]('Call\x20direction\x20is\x20INBOUND');
1164
-
1165
- return _0x2b52('0x12e');
1166
- } else if (this['_webRTCSession']['direction'] === 'outgoing') {
1167
- this[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0x12f'));
1168
-
1169
- return _0x2b52('0x130');
1170
- } else {
1171
- this[_0x2b52('0x11')][_0x2b52('0x1d')](_0x2b52('0x131') + this[_0x2b52('0xb3')][_0x2b52('0x12b')]);
1172
-
1173
- return 'UNKNOWN';
1174
- }
1175
- }
1176
-
1177
- [_0x2b52('0x132')]() {
1178
- const opt = {
1179
- 'extraHeaders': [_0x2b52('0x133')]
1180
- };
1181
-
1182
- this[_0x2b52('0x11')][_0x2b52('0x16')](_0x2b52('0x134'));
1183
-
1184
- const self = this;
1185
-
1186
- this[_0x2b52('0xb3')][_0x2b52('0x135')](_0x2b52('0x10f'), data => {
1187
- if (data[_0x2b52('0xfc')] === 'local') {
1188
- data[_0x2b52('0x19')]['on'](_0x2b52('0x136'), function () {
1189
- self[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x137'));
1190
-
1191
- self['_isRecording'] = !![];
1192
-
1193
- try {
1194
- self[_0x2b52('0x9a')]('recordingStateChange', {
1195
- 'state': !![],
1196
- 'error': null
1197
- });
1198
- } catch (_0x542ae6) {
1199
- self[_0x2b52('0x11')][_0x2b52('0x1d')]('Exception\x20in\x20recordingStateChange\x20event:\x20' + _0x542ae6);
1200
- }
1201
- });
1202
-
1203
- data[_0x2b52('0x19')]['on']('failed', function (data) {
1204
- self[_0x2b52('0xb8')] = data['response'][_0x2b52('0x10a')];
1205
-
1206
- self[_0x2b52('0x11')]['error'](_0x2b52('0x138') + self[_0x2b52('0xb8')]);
1207
-
1208
- self['_fireRecordingStateEvent']();
1209
- });
1210
- }
1211
- });
1212
-
1213
- this[_0x2b52('0xb3')][_0x2b52('0x139')](_0x2b52('0x13a'), null, opt);
1214
- }
1215
-
1216
- [_0x2b52('0x13b')]() {
1217
- const opt = {
1218
- 'extraHeaders': [_0x2b52('0x13c')]
1219
- };
1220
-
1221
- this[_0x2b52('0x11')]['debug'](_0x2b52('0x13d'));
1222
-
1223
- const self = this;
1224
- this['_webRTCSession']['once'](_0x2b52('0x10f'), data => {
1225
- data['info']['on'](_0x2b52('0x136'), function () {
1226
- self[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x13e'));
1227
-
1228
- self[_0x2b52('0xb7')] = ![];
1229
-
1230
- try {
1231
- self[_0x2b52('0x9a')]('recordingStateChange', {
1232
- 'state': ![],
1233
- 'error': null
1234
- });
1235
- } catch (_0x5d2fdc) {
1236
- self['log'][_0x2b52('0x1d')](_0x2b52('0x13f') + _0x5d2fdc);
1237
- }
1238
- });
1239
- data['info']['on'](_0x2b52('0x108'), function (data) {
1240
- self[_0x2b52('0x11')][_0x2b52('0x1d')]('Recording\x20stopped\x20failed:\x20' + data[_0x2b52('0xfe')][_0x2b52('0x10a')]);
1241
-
1242
- try {
1243
- self[_0x2b52('0x9a')](_0x2b52('0x140'), {
1244
- 'state': self['_isRecording'],
1245
- 'error': data[_0x2b52('0xfe')][_0x2b52('0x10a')]
1246
- });
1247
- } catch (_0x37fc8f) {
1248
- self[_0x2b52('0x11')][_0x2b52('0x1d')]('Exception\x20in\x20recordingStateChange\x20event:\x20' + _0x37fc8f);
1249
- }
1250
- });
1251
- });
1252
-
1253
- this['_webRTCSession'][_0x2b52('0x139')]('application/info', null, opt);
1254
- }
1255
-
1256
- ['toggleRecording']() {
1257
- if (!this[_0x2b52('0xb7')]) {
1258
- this[_0x2b52('0x132')]();
1259
-
1260
- return !![];
1261
- } else {
1262
- this[_0x2b52('0x13b')]();
1263
-
1264
- return ![];
1265
- }
1266
- }
1267
-
1268
- get [_0x2b52('0x141')]() {
1269
- return this[_0x2b52('0xb7')];
1270
- }
1271
-
1272
- [_0x2b52('0x142')]() {
1273
- this[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x143'));
1274
-
1275
- this['_webRTCSession'][_0x2b52('0x144')]();
1276
- }
1277
-
1278
- [_0x2b52('0x145')]() {
1279
- this[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x146'));
1280
-
1281
- this[_0x2b52('0xb3')][_0x2b52('0x147')]();
1282
- }
1283
-
1284
- ['toggleMute']() {
1285
- if (!this[_0x2b52('0xb6')]) {
1286
- this[_0x2b52('0x142')]();
1287
- } else {
1288
- this[_0x2b52('0x145')]();
1289
- }
1290
- }
1291
-
1292
- get [_0x2b52('0x148')]() {
1293
- return this[_0x2b52('0xb6')];
1294
- }
1295
-
1296
- [_0x2b52('0x96')]() {
1297
- this[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x149'));
1298
-
1299
- this[_0x2b52('0xb3')][_0x2b52('0x96')]();
1300
- }
1301
-
1302
- [_0x2b52('0x113')]() {
1303
- this[_0x2b52('0x11')][_0x2b52('0x19')]('Uncall\x20call');
1304
-
1305
- this[_0x2b52('0xca')][_0x2b52('0x68')]();
1306
-
1307
- this[_0x2b52('0xb3')][_0x2b52('0x113')]();
1308
- }
1309
-
1310
- ['toggleHold']() {
1311
- if (!this['_isOnHold']) {
1312
- this[_0x2b52('0x96')]();
1313
- } else {
1314
- this['unhold']();
1315
- }
1316
- }
1317
-
1318
- get [_0x2b52('0x14a')]() {
1319
- return this['_isOnHold'];
1320
- }
1321
-
1322
- [_0x2b52('0x14b')](code) {
1323
- let playLocal = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !![];
1324
-
1325
- if (!(code in DTMF_FREQUENCY_TABLE)) {
1326
- throw new _common.Exceptions[_0x2b52('0xd6')](_0x2b52('0x14c'));
1327
- }
1328
-
1329
- this[_0x2b52('0x11')]['info'](_0x2b52('0x14d') + code);
1330
-
1331
- this[_0x2b52('0xb3')][_0x2b52('0x14b')](code);
1332
-
1333
- if (playLocal) {
1334
- const f = DTMF_FREQUENCY_TABLE[code];
1335
-
1336
- if (this[_0x2b52('0xb6')]) {
1337
- this['log'][_0x2b52('0x16')](_0x2b52('0x14e'));
1338
-
1339
- this[_0x2b52('0xca')][_0x2b52('0x7c')](0x1f4, f[0x0], f[0x1]);
1340
- } else {
1341
- this[_0x2b52('0x11')]['debug'](_0x2b52('0x14f'));
1342
-
1343
- this[_0x2b52('0xb3')][_0x2b52('0x144')]();
1344
-
1345
- const self = this;
1346
-
1347
- this[_0x2b52('0xca')]['playTone'](0x1f4, f[0x0], f[0x1], function () {
1348
- self[_0x2b52('0x11')]['debug'](_0x2b52('0x150'));
1349
-
1350
- self['_webRTCSession'][_0x2b52('0x147')]();
1351
- });
1352
- }
1353
- }
1354
- }
1355
-
1356
- [_0x2b52('0x151')](dstSession) {
1357
- this[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x152') + this[_0x2b52('0x4c')] + _0x2b52('0x153') + dstSession[_0x2b52('0x4c')]);
1358
-
1359
- const referSubscriber = this[_0x2b52('0xb3')][_0x2b52('0x154')](this[_0x2b52('0xb3')]['_request']['ruri'], {
1360
- 'replaces': dstSession[_0x2b52('0xb3')]
1361
- });
1362
-
1363
- const self = this;
1364
- referSubscriber['on'](_0x2b52('0x155'), function () {
1365
- self[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x156'));
1366
- });
1367
- referSubscriber['on'](_0x2b52('0x157'), function (cause) {
1368
- self[_0x2b52('0x11')]['error'](_0x2b52('0x158') + cause);
1369
- });
1370
- referSubscriber['on'](_0x2b52('0x108'), function (cause) {
1371
- self['log'][_0x2b52('0x1d')](_0x2b52('0x159') + cause);
1372
- });
1373
- }
1374
-
1375
- [_0x2b52('0x15a')](media_file_id) {
1376
- let hangup_after = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ![];
1377
-
1378
- if (!this[_0x2b52('0xca')]['_options'][_0x2b52('0x35')]) {
1379
- throw new _common.Exceptions[_0x2b52('0x66')](_0x2b52('0x15b'));
1380
- }
1381
-
1382
- this[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x15c') + media_file_id + _0x2b52('0x15d') + hangup_after);
1383
-
1384
- const p = this[_0x2b52('0xca')][_0x2b52('0x5')]['fireEvent'](_0x2b52('0x15e'), {
1385
- 'call_uuid': this[_0x2b52('0x4c')],
1386
- 'call_command': _0x2b52('0x15a'),
1387
- 'media_file_id': media_file_id,
1388
- 'hangup_after': hangup_after
1389
- });
1390
-
1391
- if (hangup_after) {
1392
- this['_phone'][_0x2b52('0x9')][_0x2b52('0x91')] = null;
1393
-
1394
- p[_0x2b52('0x1c')](() => {
1395
- this['_setSessionState'](_0x2b52('0x15f'));
1396
- });
1397
- }
1398
-
1399
- return p;
1400
- }
1401
-
1402
- [_0x2b52('0x160')]() {
1403
- let mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0x0;
1404
-
1405
- if (!this[_0x2b52('0x12b')] === 'LISTEN') {
1406
- throw new _common.Exceptions[_0x2b52('0x66')](_0x2b52('0x161'));
1407
- }
1408
-
1409
- if (mode < 0x0 || mode > 0x2) {
1410
- throw new _common.Exceptions['InvalidOptions'](_0x2b52('0x162'));
1411
- }
1412
-
1413
- let t_dtmf_mode;
1414
-
1415
- if (mode === 0x0) {
1416
- t_dtmf_mode = 0x0;
1417
- }
1418
-
1419
- if (mode === 0x1) {
1420
- t_dtmf_mode = 0x2;
1421
- }
1422
-
1423
- if (mode === 0x2) {
1424
- t_dtmf_mode = 0x3;
1425
- }
1426
-
1427
- this['sendDTMF'](t_dtmf_mode, ![]);
1428
- this['_whisperMode'] = mode;
1429
-
1430
- this[_0x2b52('0x163')]();
1431
- }
1432
-
1433
- [_0x2b52('0x164')]() {
1434
- const self = this;
1435
-
1436
- if (!this['_durationUpdTimerObj']) {
1437
- this[_0x2b52('0xbc')] = setInterval(function () {
1438
- const activeDuration = self[_0x2b52('0xba')] ? Date[_0x2b52('0x106')]() - self[_0x2b52('0xba')] : null;
1439
- const e = {
1440
- 'uuid': self[_0x2b52('0xb2')],
1441
- 'beginTime': self['_callBeginTime'],
1442
- 'answerTime': self[_0x2b52('0xba')],
1443
- 'endTime': self[_0x2b52('0xbb')],
1444
- 'duration': Date[_0x2b52('0x106')]() - self[_0x2b52('0xb9')],
1445
- 'durationStr': _common.Tools[_0x2b52('0xab')](Date[_0x2b52('0x106')]() - self[_0x2b52('0xb9')]),
1446
- 'activeDuration': activeDuration,
1447
- 'activeDurationStr': activeDuration ? _common.Tools[_0x2b52('0xab')](activeDuration) : ''
1448
- };
1449
-
1450
- try {
1451
- self['emit']('callDurationUpdate', e);
1452
- } catch (_0x84d80f) {
1453
- self[_0x2b52('0x11')][_0x2b52('0x1d')](_0x2b52('0x165') + _0x84d80f);
1454
- }
1455
- }, 0x3e8);
1456
- }
1457
- }
1458
-
1459
- [_0x2b52('0xf8')]() {
1460
- if (!this[_0x2b52('0x166')]) {
1461
- const emptyReport = {
1462
- 'outboundPacketsSent': 0x0,
1463
- 'outboundBytesSent': 0x0,
1464
- 'outboundPacketsLost': 0x0,
1465
- 'outboundJitter': 0x0,
1466
- 'inboundPacketsReceived': 0x0,
1467
- 'inboundBytesReceived': 0x0,
1468
- 'inboundPacketsLost': 0x0,
1469
- 'inboundJitter': 0x0,
1470
- 'roundTripTime': 0x0
1471
- };
1472
- this[_0x2b52('0xc2')] = Object['assign']({}, emptyReport);
1473
- this['_rtcpStatsTimer'] = setInterval(() => {
1474
- this[_0x2b52('0xb3')]['_connection'][_0x2b52('0x167')]()[_0x2b52('0x1c')](data => {
1475
- let totalReport = Object[_0x2b52('0x23')]({}, emptyReport);
1476
-
1477
- let deltaReport = Object[_0x2b52('0x23')]({}, emptyReport);
1478
-
1479
- for (let report of data[_0x2b52('0x168')]()) {
1480
- switch (report[_0x2b52('0xef')]) {
1481
- case _0x2b52('0x169'):
1482
- totalReport[_0x2b52('0x16a')] = report[_0x2b52('0x16b')];
1483
- deltaReport['outboundPacketsSent'] = report[_0x2b52('0x16b')] - this['_currentReport'][_0x2b52('0x16a')];
1484
- totalReport[_0x2b52('0x16c')] = report[_0x2b52('0x16d')];
1485
- deltaReport['outboundBytesSent'] = report[_0x2b52('0x16d')] - this[_0x2b52('0xc2')][_0x2b52('0x16c')];
1486
- break;
1487
-
1488
- case _0x2b52('0x16e'):
1489
- totalReport[_0x2b52('0x16f')] = report['packetsReceived'];
1490
- deltaReport[_0x2b52('0x16f')] = report[_0x2b52('0x170')] - this[_0x2b52('0xc2')][_0x2b52('0x16f')];
1491
- totalReport['inboundBytesReceived'] = report[_0x2b52('0x171')];
1492
- deltaReport[_0x2b52('0x172')] = report[_0x2b52('0x171')] - this[_0x2b52('0xc2')][_0x2b52('0x172')];
1493
- totalReport[_0x2b52('0x173')] = report[_0x2b52('0x174')];
1494
- deltaReport[_0x2b52('0x173')] = report[_0x2b52('0x174')] - this[_0x2b52('0xc2')]['inboundPacketsLost'];
1495
- totalReport[_0x2b52('0x175')] = report[_0x2b52('0x176')] * 0x3e8;
1496
- deltaReport['inboundJitter'] = report[_0x2b52('0x176')] * 0x3e8;
1497
- break;
1498
-
1499
- case _0x2b52('0x177'):
1500
- totalReport[_0x2b52('0x178')] = report[_0x2b52('0x174')];
1501
- deltaReport[_0x2b52('0x178')] = report[_0x2b52('0x174')] - this[_0x2b52('0xc2')][_0x2b52('0x178')];
1502
- totalReport[_0x2b52('0x179')] = report[_0x2b52('0x176')] * 0x3e8;
1503
- deltaReport['outboundJitter'] = report[_0x2b52('0x176')] * 0x3e8;
1504
- totalReport[_0x2b52('0x17a')] = report[_0x2b52('0x17a')] * 0x3e8;
1505
- deltaReport[_0x2b52('0x17a')] = report[_0x2b52('0x17a')] * 0x3e8;
1506
- break;
1507
-
1508
- default:
1509
- break;
1510
- }
1511
- }
1512
-
1513
- this[_0x2b52('0xc2')] = this[_0x2b52('0x17b')](totalReport);
1514
-
1515
- if (totalReport[_0x2b52('0x17a')]) {
1516
- const finalReport = {
1517
- 'total': this[_0x2b52('0xc2')],
1518
- 'delta': this[_0x2b52('0x17b')](deltaReport)
1519
- };
1520
-
1521
- try {
1522
- this[_0x2b52('0x9a')](_0x2b52('0x17c'), finalReport);
1523
- } catch (_0x5a116e) {
1524
- this[_0x2b52('0x11')]['error'](_0x2b52('0x17d') + _0x5a116e);
1525
- }
1526
- }
1527
- });
1528
- }, 0x1388);
1529
- }
1530
- }
1531
-
1532
- [_0x2b52('0x17b')](report) {
1533
- report[_0x2b52('0x17e')] = report['outboundPacketsLost'] / report[_0x2b52('0x16a')];
1534
- report[_0x2b52('0x17f')] = report['inboundPacketsLost'] / report[_0x2b52('0x16f')];
1535
- report[_0x2b52('0x180')] = report[_0x2b52('0x17a')] + (report[_0x2b52('0x175')] + report[_0x2b52('0x179')]) + 0xa;
1536
- const lossRate = (report[_0x2b52('0x17e')] + report[_0x2b52('0x17f')]) * 0x64;
1537
- const lossEffect = 0x5f * lossRate / (lossRate + 0xa);
1538
- const latencyEffect = report[_0x2b52('0x180')] * 0.1;
1539
- report[_0x2b52('0x181')] = Math['max'](0x0, 0x64 - lossEffect - latencyEffect);
1540
- report['mos'] = 0x1 + 0.035 * report['rFactor'] + 0.000007 * report[_0x2b52('0x181')] * (report['rFactor'] - 0x3c) * (0x64 - report[_0x2b52('0x181')]);
1541
-
1542
- switch (!![]) {
1543
- case report['rFactor'] < 0x32:
1544
- report['qualityString'] = _0x2b52('0x182');
1545
- break;
1546
-
1547
- case report['rFactor'] < 0x46:
1548
- report[_0x2b52('0x183')] = 'Poor';
1549
- break;
1550
-
1551
- case report[_0x2b52('0x181')] < 0x50:
1552
- report['qualityString'] = _0x2b52('0x184');
1553
- break;
1554
-
1555
- case report[_0x2b52('0x181')] < 0x5a:
1556
- report[_0x2b52('0x183')] = _0x2b52('0x185');
1557
- break;
1558
-
1559
- case report[_0x2b52('0x181')] <= 0x64:
1560
- report[_0x2b52('0x183')] = _0x2b52('0x186');
1561
- break;
1562
-
1563
- default:
1564
- report[_0x2b52('0x183')] = _0x2b52('0x187');
1565
- }
1566
-
1567
- return report;
1568
- }
1569
-
1570
- [_0x2b52('0x51')](state) {
1571
- let info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
1572
-
1573
- this['log'][_0x2b52('0x16')](_0x2b52('0x188') + state);
1574
-
1575
- if (info) {
1576
- this[_0x2b52('0x11')][_0x2b52('0x16')](info);
1577
- }
1578
-
1579
- this['_sessionState'] = state;
1580
-
1581
- try {
1582
- this[_0x2b52('0x9a')](_0x2b52('0x189'), Object[_0x2b52('0x23')]({
1583
- 'state': state,
1584
- 'uuid': this['_callUUID']
1585
- }, info));
1586
- } catch (_0x57aa89) {
1587
- this[_0x2b52('0x11')][_0x2b52('0x1d')]('Exception\x20in\x20sessionStateChange\x20event:' + _0x57aa89);
1588
- }
1589
-
1590
- if (state === _0x2b52('0x107')) {
1591
- this[_0x2b52('0xbf')] = this['_manualDisposition'] || _0x2b52('0x18a');
1592
-
1593
- this[_0x2b52('0x18b')]();
1594
- }
1595
-
1596
- if (state === 'FAILED') {
1597
- if (info['cause'] === _0x2b52('0x18c')) {
1598
- this[_0x2b52('0xbf')] = _0x2b52('0x18d');
1599
-
1600
- if (this[_0x2b52('0xca')][_0x2b52('0x73')][_0x2b52('0x18e')]) {
1601
- this[_0x2b52('0xca')]['_startRepeatTone'](ST_TEMP_UNAVAIL);
1602
- }
1603
- }
1604
-
1605
- if (info['cause'] === 'Not\x20Found') {
1606
- this['_callDisposition'] = _0x2b52('0x18f');
1607
-
1608
- if (this['_phone']['options'][_0x2b52('0x18e')]) {
1609
- this[_0x2b52('0xca')]['_startRepeatTone'](ST_INVALID_NUMBER);
1610
- }
1611
- }
1612
-
1613
- if (info['cause'] === _0x2b52('0x190')) {
1614
- this[_0x2b52('0xbf')] = this[_0x2b52('0x125')] || _0x2b52('0x191');
1615
- }
1616
-
1617
- if (info['cause'] === _0x2b52('0x192')) {
1618
- if (this['direction'] === 'INBOUND') {
1619
- this[_0x2b52('0xbf')] = _0x2b52('0x193');
1620
- } else {
1621
- this[_0x2b52('0xbf')] = _0x2b52('0x194');
1622
- }
1623
- }
1624
-
1625
- if (info[_0x2b52('0x10c')] === _0x2b52('0x4f')) {
1626
- this[_0x2b52('0xbf')] = _0x2b52('0x195');
1627
-
1628
- if (this['_phone'][_0x2b52('0x73')][_0x2b52('0x18e')]) {
1629
- this[_0x2b52('0xca')]['_startRepeatTone'](ST_BUSY);
1630
- }
1631
- }
1632
-
1633
- if (this['_webRTCSession'][_0x2b52('0x12b')] === _0x2b52('0x12d')) {}
1634
-
1635
- this[_0x2b52('0x18b')]();
1636
- }
1637
- }
1638
-
1639
- ['_callFinished']() {
1640
- this[_0x2b52('0x11')][_0x2b52('0x19')](_0x2b52('0x196'));
1641
-
1642
- this[_0x2b52('0x197')]();
1643
-
1644
- clearInterval(this[_0x2b52('0xbc')]);
1645
- clearInterval(this['_rtcpStatsTimer']);
1646
-
1647
- this['_phone'][_0x2b52('0x198')](this);
1648
- }
1649
-
1650
- [_0x2b52('0xe1')](timeout) {
1651
- this['log']['debug'](_0x2b52('0x199') + timeout);
1652
- this[_0x2b52('0xc3')] = timeout;
1653
- }
1654
-
1655
- ['_fireRecordingStateEvent']() {
1656
- try {
1657
- this[_0x2b52('0x9a')](_0x2b52('0x140'), {
1658
- 'state': this[_0x2b52('0xb7')],
1659
- 'error': this[_0x2b52('0xb8')]
1660
- });
1661
- } catch (_0x4eaf6e) {
1662
- this[_0x2b52('0x11')][_0x2b52('0x1d')]('Exception\x20in\x20recording\x20state\x20change\x20event:\x20' + _0x4eaf6e);
1663
- }
1664
- }
1665
-
1666
- ['_fireMuteStateEvent']() {
1667
- try {
1668
- this['emit'](_0x2b52('0x19a'), {
1669
- 'state': this[_0x2b52('0xb6')]
1670
- });
1671
- } catch (_0x1288e8) {
1672
- this[_0x2b52('0x11')][_0x2b52('0x1d')]('Exception\x20in\x20mute\x20state\x20change\x20event:\x20' + _0x1288e8);
1673
- }
1674
- }
1675
-
1676
- [_0x2b52('0x111')]() {
1677
- try {
1678
- this['emit'](_0x2b52('0x19b'), {
1679
- 'state': this[_0x2b52('0xb5')]
1680
- });
1681
- } catch (_0x2fc4e0) {
1682
- this['log'][_0x2b52('0x1d')](_0x2b52('0x19c') + _0x2fc4e0);
1683
- }
1684
- }
1685
-
1686
- [_0x2b52('0x163')]() {
1687
- try {
1688
- this[_0x2b52('0x9a')](_0x2b52('0x19d'), {
1689
- 'mode': this['_whisperMode']
1690
- });
1691
- } catch (_0x1cc8a1) {
1692
- this['log'][_0x2b52('0x1d')](_0x2b52('0x19e') + _0x1cc8a1);
1693
- }
1694
- }
1695
-
1696
- [_0x2b52('0x197')]() {
1697
- let e;
1698
- e = {
1699
- 'uuid': this[_0x2b52('0xb2')],
1700
- 'direction': this[_0x2b52('0x12b')],
1701
- 'disposition': this[_0x2b52('0xbf')],
1702
- 'originatingNumber': this[_0x2b52('0xbd')],
1703
- 'destinationNumber': this[_0x2b52('0xbe')],
1704
- 'duration': this[_0x2b52('0xbb')] - this[_0x2b52('0xb9')],
1705
- 'answerDuration': this[_0x2b52('0xba')] ? this[_0x2b52('0xba')] - this[_0x2b52('0xb9')] : null,
1706
- 'activeDuration': this[_0x2b52('0xba')] ? this[_0x2b52('0xbb')] - this[_0x2b52('0xba')] : null,
1707
- 'startTime': new Date(this[_0x2b52('0xb9')])['toISOString'](),
1708
- 'endTime': new Date(this[_0x2b52('0xbb')])[_0x2b52('0x19f')](),
1709
- 'answerTime': this['_callAnswerTime'] ? new Date(this[_0x2b52('0xba')])[_0x2b52('0x19f')]() : null
1710
- };
1711
- e['durationStr'] = _common.Tools['createDurationString'](e['duration']);
1712
- e[_0x2b52('0xad')] = e[_0x2b52('0xa9')] ? _common.Tools['createDurationString'](e[_0x2b52('0xa9')]) : '';
1713
- e[_0x2b52('0xae')] = e[_0x2b52('0xaf')] ? _common.Tools['createDurationString'](e[_0x2b52('0xaf')]) : '';
1714
- e[_0x2b52('0x1a0')] = this['_currentReport'];
1715
-
1716
- try {
1717
- this['emit'](_0x2b52('0x1a1'), e);
1718
- } catch (_0x5dc5dd) {
1719
- this[_0x2b52('0x11')]['error'](_0x2b52('0x1a2') + _0x5dc5dd);
1720
- }
1721
- }
1722
-
1723
- ['_handleRemoteAudio'](session) {
1724
- this[_0x2b52('0xca')][_0x2b52('0x8c')]();
1725
-
1726
- const self = this;
1727
-
1728
- session[_0x2b52('0x11e')][_0x2b52('0x1a3')] = function (event) {
1729
- self[_0x2b52('0x11')]['debug'](_0x2b52('0x1a4'));
1730
-
1731
- self['log'][_0x2b52('0x16')](event);
1732
-
1733
- self[_0x2b52('0xca')][_0x2b52('0x9')][_0x2b52('0x91')] = event['streams'][0x0];
1734
- };
1735
- }
1736
-
1737
- }
1738
-
1739
- exports.Session = Session;