@webex/calling 3.8.1-web-workers-keepalive.2 → 3.9.0-multiple-llm.1
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/dist/CallHistory/CallHistory.js +51 -46
- package/dist/CallHistory/CallHistory.js.map +1 -1
- package/dist/CallHistory/CallHistory.test.js +146 -147
- package/dist/CallHistory/CallHistory.test.js.map +1 -1
- package/dist/CallHistory/callHistoryFixtures.js.map +1 -1
- package/dist/CallHistory/constants.js.map +1 -1
- package/dist/CallHistory/types.js.map +1 -1
- package/dist/CallSettings/CallSettings.js +8 -8
- package/dist/CallSettings/CallSettings.js.map +1 -1
- package/dist/CallSettings/CallSettings.test.js +1 -1
- package/dist/CallSettings/CallSettings.test.js.map +1 -1
- package/dist/CallSettings/UcmBackendConnector.js +12 -11
- package/dist/CallSettings/UcmBackendConnector.js.map +1 -1
- package/dist/CallSettings/UcmBackendConnector.test.js +9 -10
- package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.js +68 -61
- package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.test.js +168 -102
- package/dist/CallSettings/WxCallBackendConnector.test.js.map +1 -1
- package/dist/CallSettings/constants.js.map +1 -1
- package/dist/CallSettings/testFixtures.js.map +1 -1
- package/dist/CallSettings/types.js.map +1 -1
- package/dist/CallingClient/CallingClient.js +491 -200
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +501 -294
- package/dist/CallingClient/CallingClient.test.js.map +1 -1
- package/dist/CallingClient/callRecordFixtures.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.js +2 -2
- package/dist/CallingClient/calling/CallerId/index.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.test.js +8 -7
- package/dist/CallingClient/calling/CallerId/index.test.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/types.js.map +1 -1
- package/dist/CallingClient/calling/call.js +369 -333
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +411 -410
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/calling/callManager.js +3 -4
- package/dist/CallingClient/calling/callManager.js.map +1 -1
- package/dist/CallingClient/calling/callManager.test.js +67 -68
- package/dist/CallingClient/calling/callManager.test.js.map +1 -1
- package/dist/CallingClient/calling/index.js.map +1 -1
- package/dist/CallingClient/calling/types.js.map +1 -1
- package/dist/CallingClient/callingClientFixtures.js.map +1 -1
- package/dist/CallingClient/constants.js +10 -8
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/CallingClient/line/index.js +10 -11
- package/dist/CallingClient/line/index.js.map +1 -1
- package/dist/CallingClient/line/line.test.js +10 -9
- package/dist/CallingClient/line/line.test.js.map +1 -1
- package/dist/CallingClient/line/types.js.map +1 -1
- package/dist/CallingClient/registration/index.js.map +1 -1
- package/dist/CallingClient/registration/register.js +321 -232
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +242 -160
- package/dist/CallingClient/registration/register.test.js.map +1 -1
- package/dist/CallingClient/registration/registerFixtures.js.map +1 -1
- package/dist/CallingClient/registration/types.js.map +1 -1
- package/dist/CallingClient/registration/webWorker.js +5 -4
- package/dist/CallingClient/registration/webWorker.js.map +1 -1
- package/dist/CallingClient/registration/webWorker.test.js +14 -14
- package/dist/CallingClient/registration/webWorker.test.js.map +1 -1
- package/dist/CallingClient/registration/webWorkerStr.js.map +1 -1
- package/dist/CallingClient/types.js.map +1 -1
- package/dist/CallingClient/windowsChromiumIceWarmupUtils.js +142 -0
- package/dist/CallingClient/windowsChromiumIceWarmupUtils.js.map +1 -0
- package/dist/Contacts/ContactsClient.js +244 -238
- package/dist/Contacts/ContactsClient.js.map +1 -1
- package/dist/Contacts/ContactsClient.test.js +89 -90
- package/dist/Contacts/ContactsClient.test.js.map +1 -1
- package/dist/Contacts/constants.js +2 -2
- package/dist/Contacts/constants.js.map +1 -1
- package/dist/Contacts/contactFixtures.js.map +1 -1
- package/dist/Contacts/types.js.map +1 -1
- package/dist/Errors/catalog/CallError.js +2 -2
- package/dist/Errors/catalog/CallError.js.map +1 -1
- package/dist/Errors/catalog/CallingDeviceError.js +2 -2
- package/dist/Errors/catalog/CallingDeviceError.js.map +1 -1
- package/dist/Errors/catalog/ExtendedError.js +3 -3
- package/dist/Errors/catalog/ExtendedError.js.map +1 -1
- package/dist/Errors/catalog/LineError.js +2 -2
- package/dist/Errors/catalog/LineError.js.map +1 -1
- package/dist/Errors/index.js.map +1 -1
- package/dist/Errors/types.js.map +1 -1
- package/dist/Events/impl/index.js +2 -2
- package/dist/Events/impl/index.js.map +1 -1
- package/dist/Events/types.js.map +1 -1
- package/dist/Logger/index.js.map +1 -1
- package/dist/Logger/index.test.js.map +1 -1
- package/dist/Logger/types.js.map +1 -1
- package/dist/Metrics/index.js +166 -84
- package/dist/Metrics/index.js.map +1 -1
- package/dist/Metrics/index.test.js +60 -0
- package/dist/Metrics/index.test.js.map +1 -1
- package/dist/Metrics/types.js +15 -1
- package/dist/Metrics/types.js.map +1 -1
- package/dist/SDKConnector/index.js +0 -1
- package/dist/SDKConnector/index.js.map +1 -1
- package/dist/SDKConnector/index.test.js.map +1 -1
- package/dist/SDKConnector/types.js.map +1 -1
- package/dist/SDKConnector/utils.js.map +1 -1
- package/dist/SDKConnector/utils.test.js.map +1 -1
- package/dist/Voicemail/BroadworksBackendConnector.js +42 -39
- package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -1
- package/dist/Voicemail/BroadworksBackendConnector.test.js +119 -120
- package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/UcmBackendConnector.js +54 -47
- package/dist/Voicemail/UcmBackendConnector.js.map +1 -1
- package/dist/Voicemail/UcmBackendConnector.test.js +73 -74
- package/dist/Voicemail/UcmBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/Voicemail.js +12 -11
- package/dist/Voicemail/Voicemail.js.map +1 -1
- package/dist/Voicemail/Voicemail.test.js +2 -2
- package/dist/Voicemail/Voicemail.test.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.js +78 -70
- package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.test.js +184 -185
- package/dist/Voicemail/WxCallBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/constants.js.map +1 -1
- package/dist/Voicemail/types.js.map +1 -1
- package/dist/Voicemail/voicemailFixture.js.map +1 -1
- package/dist/api.js.map +1 -1
- package/dist/common/Utils.js +97 -72
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +283 -143
- package/dist/common/Utils.test.js.map +1 -1
- package/dist/common/constants.js.map +1 -1
- package/dist/common/index.js.map +1 -1
- package/dist/common/testUtil.js +1 -1
- package/dist/common/testUtil.js.map +1 -1
- package/dist/common/types.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/module/CallHistory/CallHistory.js +4 -0
- package/dist/module/CallSettings/UcmBackendConnector.js +1 -0
- package/dist/module/CallSettings/WxCallBackendConnector.js +8 -1
- package/dist/module/CallingClient/CallingClient.js +197 -40
- package/dist/module/CallingClient/calling/call.js +79 -43
- package/dist/module/CallingClient/constants.js +9 -6
- package/dist/module/CallingClient/line/index.js +3 -3
- package/dist/module/CallingClient/registration/register.js +50 -14
- package/dist/module/CallingClient/registration/webWorker.js +2 -1
- package/dist/module/CallingClient/windowsChromiumIceWarmupUtils.js +59 -0
- package/dist/module/Contacts/ContactsClient.js +23 -17
- package/dist/module/Contacts/constants.js +1 -1
- package/dist/module/Metrics/index.js +86 -32
- package/dist/module/Metrics/types.js +14 -0
- package/dist/module/Voicemail/BroadworksBackendConnector.js +3 -0
- package/dist/module/Voicemail/UcmBackendConnector.js +6 -0
- package/dist/module/Voicemail/WxCallBackendConnector.js +8 -0
- package/dist/module/common/Utils.js +35 -11
- package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
- package/dist/types/CallSettings/UcmBackendConnector.d.ts.map +1 -1
- package/dist/types/CallSettings/WxCallBackendConnector.d.ts.map +1 -1
- package/dist/types/CallSettings/types.d.ts +1 -1
- package/dist/types/CallSettings/types.d.ts.map +1 -1
- package/dist/types/CallingClient/CallingClient.d.ts +12 -1
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/types.d.ts +2 -1
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +9 -6
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/CallingClient/line/index.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts +1 -0
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/types.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/webWorker.d.ts +2 -1
- package/dist/types/CallingClient/registration/webWorker.d.ts.map +1 -1
- package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts +5 -0
- package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts.map +1 -0
- package/dist/types/Contacts/ContactsClient.d.ts.map +1 -1
- package/dist/types/Contacts/constants.d.ts +1 -1
- package/dist/types/Contacts/constants.d.ts.map +1 -1
- package/dist/types/Metrics/index.d.ts.map +1 -1
- package/dist/types/Metrics/types.d.ts +18 -3
- package/dist/types/Metrics/types.d.ts.map +1 -1
- package/dist/types/Voicemail/BroadworksBackendConnector.d.ts.map +1 -1
- package/dist/types/Voicemail/UcmBackendConnector.d.ts.map +1 -1
- package/dist/types/Voicemail/WxCallBackendConnector.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/dist/types/common/types.d.ts +1 -0
- package/dist/types/common/types.d.ts.map +1 -1
- package/package.json +10 -9
|
@@ -40,13 +40,13 @@ var _constants2 = require("./constants");
|
|
|
40
40
|
var _line = _interopRequireDefault(require("./line"));
|
|
41
41
|
var _types4 = require("../Metrics/types");
|
|
42
42
|
var _Metrics = require("../Metrics");
|
|
43
|
-
|
|
44
|
-
function _interopRequireWildcard(e, r) { if (!
|
|
45
|
-
function _createForOfIteratorHelper(
|
|
46
|
-
function _unsupportedIterableToArray(
|
|
47
|
-
function _arrayLikeToArray(
|
|
48
|
-
function _createSuper(
|
|
49
|
-
function _isNativeReflectConstruct() {
|
|
43
|
+
var _windowsChromiumIceWarmupUtils = _interopRequireDefault(require("./windowsChromiumIceWarmupUtils"));
|
|
44
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
45
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && r[_Symbol$iterator] || r["@@iterator"]; if (!t) { if (_Array$isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
46
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
47
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
48
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = _Reflect$construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
49
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable no-underscore-dangle */ /* eslint-disable valid-jsdoc */ /* eslint-disable @typescript-eslint/no-shadow */
|
|
50
50
|
/**
|
|
51
51
|
* The `CallingClient` module provides a set of APIs for line registration and calling functionalities within the SDK.
|
|
52
52
|
*
|
|
@@ -80,6 +80,119 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
80
80
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mobiusHost", void 0);
|
|
81
81
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaEngine", void 0);
|
|
82
82
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lineDict", {});
|
|
83
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isNetworkDown", false);
|
|
84
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "networkDownTimestamp", '');
|
|
85
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "networkUpTimestamp", '');
|
|
86
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mercuryDownTimestamp", '');
|
|
87
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mercuryUpTimestamp", '');
|
|
88
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleNetworkOffline", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
89
|
+
var line;
|
|
90
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
91
|
+
while (1) switch (_context.prev = _context.next) {
|
|
92
|
+
case 0:
|
|
93
|
+
_this.networkDownTimestamp = new Date().toISOString();
|
|
94
|
+
_context.next = 3;
|
|
95
|
+
return _this.checkNetworkReachability();
|
|
96
|
+
case 3:
|
|
97
|
+
_this.isNetworkDown = !_context.sent;
|
|
98
|
+
_Logger.default.warn("Network has gone down, wait for it to come back up", {
|
|
99
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
100
|
+
method: _constants2.METHODS.NETWORK_OFFLINE
|
|
101
|
+
});
|
|
102
|
+
if (_this.isNetworkDown) {
|
|
103
|
+
line = (0, _values.default)(_this.lineDict)[0];
|
|
104
|
+
line.registration.clearKeepaliveTimer();
|
|
105
|
+
}
|
|
106
|
+
case 6:
|
|
107
|
+
case "end":
|
|
108
|
+
return _context.stop();
|
|
109
|
+
}
|
|
110
|
+
}, _callee);
|
|
111
|
+
})));
|
|
112
|
+
// Wondering if we should keep this for timestamp recording purpose
|
|
113
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleNetworkOnline", function () {
|
|
114
|
+
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
115
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
116
|
+
method: _constants2.METHODS.NETWORK_ONLINE
|
|
117
|
+
});
|
|
118
|
+
_this.networkUpTimestamp = new Date().toISOString();
|
|
119
|
+
});
|
|
120
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleMercuryOffline", function () {
|
|
121
|
+
_Logger.default.warn("Mercury down, waiting for connection to be up", {
|
|
122
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
123
|
+
method: _constants2.METHODS.MERCURY_OFFLINE
|
|
124
|
+
});
|
|
125
|
+
_this.mercuryDownTimestamp = new Date().toISOString();
|
|
126
|
+
_this.metricManager.submitConnectionMetrics(_types4.METRIC_EVENT.CONNECTION_ERROR, _types4.CONNECTION_ACTION.MERCURY_DOWN, _types4.METRIC_TYPE.BEHAVIORAL, _this.mercuryDownTimestamp, _this.mercuryUpTimestamp);
|
|
127
|
+
});
|
|
128
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleMercuryOnline", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
129
|
+
var callCheckInterval;
|
|
130
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
131
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
132
|
+
case 0:
|
|
133
|
+
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
134
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
135
|
+
method: _constants2.METHODS.MERCURY_ONLINE
|
|
136
|
+
});
|
|
137
|
+
_this.mercuryUpTimestamp = new Date().toISOString();
|
|
138
|
+
if (!_this.isNetworkDown) {
|
|
139
|
+
_context3.next = 10;
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
callCheckInterval = setInterval(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
143
|
+
var line;
|
|
144
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
145
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
146
|
+
case 0:
|
|
147
|
+
if ((0, _keys.default)(_this.callManager.getActiveCalls()).length) {
|
|
148
|
+
_context2.next = 10;
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
clearInterval(callCheckInterval);
|
|
152
|
+
line = (0, _values.default)(_this.lineDict)[0];
|
|
153
|
+
if (!(line.getStatus() !== _types3.RegistrationStatus.IDLE)) {
|
|
154
|
+
_context2.next = 9;
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
_context2.next = 6;
|
|
158
|
+
return line.registration.handleConnectionRestoration(_this.isNetworkDown);
|
|
159
|
+
case 6:
|
|
160
|
+
_this.isNetworkDown = _context2.sent;
|
|
161
|
+
_context2.next = 10;
|
|
162
|
+
break;
|
|
163
|
+
case 9:
|
|
164
|
+
_this.isNetworkDown = false;
|
|
165
|
+
case 10:
|
|
166
|
+
case "end":
|
|
167
|
+
return _context2.stop();
|
|
168
|
+
}
|
|
169
|
+
}, _callee2);
|
|
170
|
+
})), _constants2.NETWORK_FLAP_TIMEOUT);
|
|
171
|
+
if (!(0, _keys.default)(_this.callManager.getActiveCalls()).length) {
|
|
172
|
+
_context3.next = 7;
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
_context3.next = 7;
|
|
176
|
+
return _this.checkCallStatus();
|
|
177
|
+
case 7:
|
|
178
|
+
_this.metricManager.submitConnectionMetrics(_types4.METRIC_EVENT.CONNECTION_ERROR, _types4.CONNECTION_ACTION.NETWORK_FLAP, _types4.METRIC_TYPE.BEHAVIORAL, _this.networkDownTimestamp, _this.networkUpTimestamp);
|
|
179
|
+
_context3.next = 14;
|
|
180
|
+
break;
|
|
181
|
+
case 10:
|
|
182
|
+
if (!(0, _keys.default)(_this.callManager.getActiveCalls()).length) {
|
|
183
|
+
_context3.next = 13;
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
_context3.next = 13;
|
|
187
|
+
return _this.checkCallStatus();
|
|
188
|
+
case 13:
|
|
189
|
+
_this.metricManager.submitConnectionMetrics(_types4.METRIC_EVENT.CONNECTION_ERROR, _types4.CONNECTION_ACTION.MERCURY_UP, _types4.METRIC_TYPE.BEHAVIORAL, _this.mercuryDownTimestamp, _this.mercuryUpTimestamp);
|
|
190
|
+
case 14:
|
|
191
|
+
case "end":
|
|
192
|
+
return _context3.stop();
|
|
193
|
+
}
|
|
194
|
+
}, _callee3);
|
|
195
|
+
})));
|
|
83
196
|
/**
|
|
84
197
|
* Handler registered for ALL_CALLS_CLEARED event emitted by callManager.
|
|
85
198
|
*
|
|
@@ -87,10 +200,10 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
87
200
|
* will be attempted here on receiving a notification from callManager that all
|
|
88
201
|
* calls are cleaned up.
|
|
89
202
|
*/
|
|
90
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "callsClearedHandler", /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
203
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "callsClearedHandler", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
91
204
|
var registration;
|
|
92
|
-
return _regenerator.default.wrap(function
|
|
93
|
-
while (1) switch (
|
|
205
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
206
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
94
207
|
case 0:
|
|
95
208
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
96
209
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
@@ -100,35 +213,35 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
100
213
|
// it will change once we have proper lineId and multiple lines as well
|
|
101
214
|
registration = (0, _values.default)(_this.lineDict)[0].registration;
|
|
102
215
|
if (registration.isDeviceRegistered()) {
|
|
103
|
-
|
|
216
|
+
_context5.next = 5;
|
|
104
217
|
break;
|
|
105
218
|
}
|
|
106
|
-
|
|
107
|
-
return _this.mutex.runExclusive(
|
|
108
|
-
return _regenerator.default.wrap(function
|
|
109
|
-
while (1) switch (
|
|
219
|
+
_context5.next = 5;
|
|
220
|
+
return _this.mutex.runExclusive(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
221
|
+
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
222
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
110
223
|
case 0:
|
|
111
224
|
if (!registration.isReconnectPending()) {
|
|
112
|
-
|
|
225
|
+
_context4.next = 4;
|
|
113
226
|
break;
|
|
114
227
|
}
|
|
115
228
|
_Logger.default.info('All calls cleared, reconnecting', {
|
|
116
229
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
117
230
|
method: _constants2.CALLS_CLEARED_HANDLER_UTIL
|
|
118
231
|
});
|
|
119
|
-
|
|
232
|
+
_context4.next = 4;
|
|
120
233
|
return registration.reconnectOnFailure(_constants2.CALLS_CLEARED_HANDLER_UTIL);
|
|
121
234
|
case 4:
|
|
122
235
|
case "end":
|
|
123
|
-
return
|
|
236
|
+
return _context4.stop();
|
|
124
237
|
}
|
|
125
|
-
},
|
|
238
|
+
}, _callee4);
|
|
126
239
|
})));
|
|
127
240
|
case 5:
|
|
128
241
|
case "end":
|
|
129
|
-
return
|
|
242
|
+
return _context5.stop();
|
|
130
243
|
}
|
|
131
|
-
},
|
|
244
|
+
}, _callee5);
|
|
132
245
|
})));
|
|
133
246
|
_this.sdkConnector = _SDKConnector.default;
|
|
134
247
|
if (!_this.sdkConnector.getWebex()) {
|
|
@@ -137,7 +250,6 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
137
250
|
if (config !== null && config !== void 0 && (_config$logger = config.logger) !== null && _config$logger !== void 0 && _config$logger.level && webex.logger.config) {
|
|
138
251
|
webex.logger.config.level = config.logger.level; // override the webex logger level
|
|
139
252
|
}
|
|
140
|
-
|
|
141
253
|
_Logger.default.setWebexLogger(webex.logger);
|
|
142
254
|
}
|
|
143
255
|
_this.mutex = new _asyncMutex.Mutex();
|
|
@@ -203,15 +315,25 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
203
315
|
method: _this.constructor.name
|
|
204
316
|
});
|
|
205
317
|
}
|
|
206
|
-
|
|
318
|
+
|
|
319
|
+
// TODO: This is a temp fix - https://jira-eng-sjc12.cisco.com/jira/browse/CAI-6809
|
|
320
|
+
if (_this.webex.internal.services._hostCatalog) {
|
|
321
|
+
_this.mobiusClusters = mobiusServiceHost && _this.webex.internal.services._hostCatalog[mobiusServiceHost] || _this.webex.internal.services._hostCatalog[_constants2.MOBIUS_US_PROD] || _this.webex.internal.services._hostCatalog[_constants2.MOBIUS_EU_PROD] || _this.webex.internal.services._hostCatalog[_constants2.MOBIUS_US_INT] || _this.webex.internal.services._hostCatalog[_constants2.MOBIUS_EU_INT];
|
|
322
|
+
} else {
|
|
323
|
+
// @ts-ignore
|
|
324
|
+
var mobiusObject = _this.webex.internal.services._services.find(
|
|
325
|
+
// @ts-ignore
|
|
326
|
+
function (item) {
|
|
327
|
+
return item.serviceName === 'mobius';
|
|
328
|
+
});
|
|
329
|
+
_this.mobiusClusters = [mobiusObject.serviceUrls[0].baseUrl];
|
|
330
|
+
}
|
|
207
331
|
_this.mobiusHost = '';
|
|
208
332
|
_this.registerSessionsListener();
|
|
209
333
|
_this.registerCallsClearedListener();
|
|
210
334
|
return _this;
|
|
211
335
|
}
|
|
212
336
|
|
|
213
|
-
// async calls required to run after constructor
|
|
214
|
-
|
|
215
337
|
/**
|
|
216
338
|
* Initializes the `CallingClient` by performing the following steps:
|
|
217
339
|
*
|
|
@@ -226,24 +348,59 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
226
348
|
*/
|
|
227
349
|
(0, _createClass2.default)(CallingClient, [{
|
|
228
350
|
key: "init",
|
|
229
|
-
value: function () {
|
|
230
|
-
var _init = (0, _asyncToGenerator2.default)(
|
|
231
|
-
|
|
232
|
-
|
|
351
|
+
value: (function () {
|
|
352
|
+
var _init = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
353
|
+
var _window, _window$navigator;
|
|
354
|
+
var ua;
|
|
355
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
356
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
233
357
|
case 0:
|
|
234
|
-
|
|
358
|
+
if (!(typeof window !== 'undefined' && (_window = window) !== null && _window !== void 0 && (_window$navigator = _window.navigator) !== null && _window$navigator !== void 0 && _window$navigator.userAgent)) {
|
|
359
|
+
_context6.next = 13;
|
|
360
|
+
break;
|
|
361
|
+
}
|
|
362
|
+
ua = window.navigator.userAgent;
|
|
363
|
+
if (!ua.toLowerCase().includes('windows')) {
|
|
364
|
+
_context6.next = 13;
|
|
365
|
+
break;
|
|
366
|
+
}
|
|
367
|
+
_Logger.default.info('Starting ICE warmup for Windows Chromium based browser', {
|
|
368
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
369
|
+
method: 'init'
|
|
370
|
+
});
|
|
371
|
+
_context6.prev = 4;
|
|
372
|
+
_context6.next = 7;
|
|
373
|
+
return (0, _windowsChromiumIceWarmupUtils.default)({
|
|
374
|
+
iceServers: [],
|
|
375
|
+
timeoutMs: 1000
|
|
376
|
+
});
|
|
377
|
+
case 7:
|
|
378
|
+
_Logger.default.info("ICE warmup completed", {
|
|
379
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
380
|
+
method: 'init'
|
|
381
|
+
});
|
|
382
|
+
_context6.next = 13;
|
|
383
|
+
break;
|
|
384
|
+
case 10:
|
|
385
|
+
_context6.prev = 10;
|
|
386
|
+
_context6.t0 = _context6["catch"](4);
|
|
387
|
+
_Logger.default.warn("ICE warmup failed: ".concat(_context6.t0), {
|
|
388
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
389
|
+
method: 'init'
|
|
390
|
+
});
|
|
391
|
+
case 13:
|
|
392
|
+
_context6.next = 15;
|
|
235
393
|
return this.getMobiusServers();
|
|
236
|
-
case
|
|
237
|
-
|
|
394
|
+
case 15:
|
|
395
|
+
_context6.next = 17;
|
|
238
396
|
return this.createLine();
|
|
239
|
-
case
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
case 5:
|
|
397
|
+
case 17:
|
|
398
|
+
this.setupNetworkEventListeners();
|
|
399
|
+
case 18:
|
|
243
400
|
case "end":
|
|
244
|
-
return
|
|
401
|
+
return _context6.stop();
|
|
245
402
|
}
|
|
246
|
-
},
|
|
403
|
+
}, _callee6, this, [[4, 10]]);
|
|
247
404
|
}));
|
|
248
405
|
function init() {
|
|
249
406
|
return _init.apply(this, arguments);
|
|
@@ -251,98 +408,171 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
251
408
|
return init;
|
|
252
409
|
}()
|
|
253
410
|
/**
|
|
254
|
-
*
|
|
411
|
+
* Ping a reliable external endpoint with a short timeout to infer connectivity.
|
|
255
412
|
*/
|
|
413
|
+
)
|
|
256
414
|
}, {
|
|
257
|
-
key: "
|
|
415
|
+
key: "checkNetworkReachability",
|
|
258
416
|
value: (function () {
|
|
259
|
-
var
|
|
260
|
-
var
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
while (1) switch (_context5.prev = _context5.next) {
|
|
417
|
+
var _checkNetworkReachability = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
418
|
+
var controller, timeoutId;
|
|
419
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
420
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
264
421
|
case 0:
|
|
265
|
-
|
|
422
|
+
_context7.prev = 0;
|
|
423
|
+
controller = new AbortController();
|
|
424
|
+
timeoutId = setTimeout(function () {
|
|
425
|
+
return controller.abort();
|
|
426
|
+
}, 3000); // Using a common connectivity check endpoint that returns 204 with minimal payload.
|
|
427
|
+
// no-cors mode yields an opaque response but a successful fetch implies reachability.
|
|
428
|
+
_context7.next = 5;
|
|
429
|
+
return fetch('https://www.google.com/generate_204', {
|
|
430
|
+
method: 'GET',
|
|
431
|
+
cache: 'no-cache',
|
|
432
|
+
mode: 'no-cors',
|
|
433
|
+
signal: controller.signal
|
|
434
|
+
});
|
|
435
|
+
case 5:
|
|
436
|
+
clearTimeout(timeoutId);
|
|
437
|
+
return _context7.abrupt("return", true);
|
|
438
|
+
case 9:
|
|
439
|
+
_context7.prev = 9;
|
|
440
|
+
_context7.t0 = _context7["catch"](0);
|
|
441
|
+
_Logger.default.warn("Network connectivity probe failed: ".concat(_context7.t0), {
|
|
266
442
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
267
|
-
method:
|
|
443
|
+
method: 'pingExternal'
|
|
268
444
|
});
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
445
|
+
return _context7.abrupt("return", false);
|
|
446
|
+
case 13:
|
|
447
|
+
case "end":
|
|
448
|
+
return _context7.stop();
|
|
449
|
+
}
|
|
450
|
+
}, _callee7, null, [[0, 9]]);
|
|
451
|
+
}));
|
|
452
|
+
function checkNetworkReachability() {
|
|
453
|
+
return _checkNetworkReachability.apply(this, arguments);
|
|
454
|
+
}
|
|
455
|
+
return checkNetworkReachability;
|
|
456
|
+
}())
|
|
457
|
+
}, {
|
|
458
|
+
key: "checkCallStatus",
|
|
459
|
+
value: function () {
|
|
460
|
+
var _checkCallStatus = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
461
|
+
var loggerContext, calls, _iterator, _step, _loop;
|
|
462
|
+
return _regenerator.default.wrap(function _callee8$(_context9) {
|
|
463
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
464
|
+
case 0:
|
|
465
|
+
loggerContext = {
|
|
466
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
467
|
+
method: 'checkCallStatus'
|
|
468
|
+
};
|
|
469
|
+
calls = (0, _values.default)(this.callManager.getActiveCalls());
|
|
470
|
+
_iterator = _createForOfIteratorHelper(calls);
|
|
471
|
+
_context9.prev = 3;
|
|
472
|
+
_loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
|
|
473
|
+
var call;
|
|
474
|
+
return _regenerator.default.wrap(function _loop$(_context8) {
|
|
475
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
275
476
|
case 0:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
477
|
+
call = _step.value;
|
|
478
|
+
call.postStatus().then(function () {
|
|
479
|
+
_Logger.default.info("Call is active", loggerContext);
|
|
480
|
+
/*
|
|
481
|
+
* Media Renegotiation Possibility if call keepalive succeeds,
|
|
482
|
+
* for cases like WebRTC disconnect and media inactivity.
|
|
483
|
+
*/
|
|
484
|
+
}).catch(function (err) {
|
|
485
|
+
_Logger.default.warn("Call Keepalive failed: ".concat(err), loggerContext);
|
|
486
|
+
call.sendCallStateMachineEvt({
|
|
487
|
+
type: 'E_SEND_CALL_DISCONNECT'
|
|
280
488
|
});
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
}
|
|
284
|
-
if (!(retry && _this2.webex.internal.mercury.connected)) {
|
|
285
|
-
_context4.next = 9;
|
|
286
|
-
break;
|
|
287
|
-
}
|
|
288
|
-
if (!(line.getStatus() !== _types3.RegistrationStatus.IDLE)) {
|
|
289
|
-
_context4.next = 8;
|
|
290
|
-
break;
|
|
291
|
-
}
|
|
292
|
-
_context4.next = 5;
|
|
293
|
-
return line.registration.handleConnectionRestoration(retry);
|
|
294
|
-
case 5:
|
|
295
|
-
retry = _context4.sent;
|
|
296
|
-
_context4.next = 9;
|
|
297
|
-
break;
|
|
298
|
-
case 8:
|
|
299
|
-
retry = false;
|
|
300
|
-
case 9:
|
|
489
|
+
});
|
|
490
|
+
case 2:
|
|
301
491
|
case "end":
|
|
302
|
-
return
|
|
492
|
+
return _context8.stop();
|
|
303
493
|
}
|
|
304
|
-
},
|
|
305
|
-
})
|
|
306
|
-
|
|
494
|
+
}, _loop);
|
|
495
|
+
});
|
|
496
|
+
_iterator.s();
|
|
497
|
+
case 6:
|
|
498
|
+
if ((_step = _iterator.n()).done) {
|
|
499
|
+
_context9.next = 10;
|
|
500
|
+
break;
|
|
501
|
+
}
|
|
502
|
+
return _context9.delegateYield(_loop(), "t0", 8);
|
|
503
|
+
case 8:
|
|
504
|
+
_context9.next = 6;
|
|
505
|
+
break;
|
|
506
|
+
case 10:
|
|
507
|
+
_context9.next = 15;
|
|
508
|
+
break;
|
|
509
|
+
case 12:
|
|
510
|
+
_context9.prev = 12;
|
|
511
|
+
_context9.t1 = _context9["catch"](3);
|
|
512
|
+
_iterator.e(_context9.t1);
|
|
513
|
+
case 15:
|
|
514
|
+
_context9.prev = 15;
|
|
515
|
+
_iterator.f();
|
|
516
|
+
return _context9.finish(15);
|
|
517
|
+
case 18:
|
|
307
518
|
case "end":
|
|
308
|
-
return
|
|
519
|
+
return _context9.stop();
|
|
309
520
|
}
|
|
310
|
-
},
|
|
521
|
+
}, _callee8, this, [[3, 12, 15, 18]]);
|
|
311
522
|
}));
|
|
312
|
-
function
|
|
313
|
-
return
|
|
523
|
+
function checkCallStatus() {
|
|
524
|
+
return _checkCallStatus.apply(this, arguments);
|
|
314
525
|
}
|
|
315
|
-
return
|
|
526
|
+
return checkCallStatus;
|
|
316
527
|
}()
|
|
528
|
+
}, {
|
|
529
|
+
key: "setupNetworkEventListeners",
|
|
530
|
+
value: function setupNetworkEventListeners() {
|
|
531
|
+
var _this2 = this;
|
|
532
|
+
if (typeof window !== 'undefined' && window.addEventListener) {
|
|
533
|
+
window.addEventListener('online', this.handleNetworkOnline);
|
|
534
|
+
window.addEventListener('offline', this.handleNetworkOffline);
|
|
535
|
+
}
|
|
536
|
+
this.webex.internal.mercury.on('offline', function () {
|
|
537
|
+
_this2.handleMercuryOffline();
|
|
538
|
+
});
|
|
539
|
+
this.webex.internal.mercury.on('online', function () {
|
|
540
|
+
_this2.handleMercuryOnline();
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
|
|
317
544
|
/**
|
|
318
545
|
* Fetches countryCode and region of the client.
|
|
319
546
|
*/
|
|
320
|
-
)
|
|
321
547
|
}, {
|
|
322
548
|
key: "getClientRegionInfo",
|
|
323
549
|
value: (function () {
|
|
324
|
-
var _getClientRegionInfo = (0, _asyncToGenerator2.default)(
|
|
550
|
+
var _getClientRegionInfo = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
325
551
|
var _this3 = this;
|
|
326
|
-
var regionInfo,
|
|
327
|
-
return _regenerator.default.wrap(function
|
|
328
|
-
while (1) switch (
|
|
552
|
+
var abort, regionInfo, _iterator2, _step2, _loop2, _ret;
|
|
553
|
+
return _regenerator.default.wrap(function _callee9$(_context1) {
|
|
554
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
329
555
|
case 0:
|
|
330
556
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
331
557
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
332
558
|
method: _constants2.METHODS.GET_CLIENT_REGION_INFO
|
|
333
559
|
});
|
|
334
560
|
regionInfo = {};
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
var mobius, temp, myIP, response, clientRegionInfo, extendedError;
|
|
339
|
-
return _regenerator.default.wrap(function
|
|
340
|
-
while (1) switch (
|
|
561
|
+
_iterator2 = _createForOfIteratorHelper(this.mobiusClusters);
|
|
562
|
+
_context1.prev = 3;
|
|
563
|
+
_loop2 = /*#__PURE__*/_regenerator.default.mark(function _loop2() {
|
|
564
|
+
var mobius, _temp$headers, _response$headers, _response$headers2, _response$headers$tra, _response$headers3, temp, myIP, response, clientRegionInfo, extendedError;
|
|
565
|
+
return _regenerator.default.wrap(function _loop2$(_context0) {
|
|
566
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
341
567
|
case 0:
|
|
342
|
-
mobius =
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
568
|
+
mobius = _step2.value;
|
|
569
|
+
if (mobius.host) {
|
|
570
|
+
_this3.mobiusHost = "https://".concat(mobius.host).concat(_constants2.API_V1);
|
|
571
|
+
} else {
|
|
572
|
+
_this3.mobiusHost = mobius;
|
|
573
|
+
}
|
|
574
|
+
_context0.prev = 2;
|
|
575
|
+
_context0.next = 5;
|
|
346
576
|
return _this3.webex.request({
|
|
347
577
|
uri: "".concat(_this3.mobiusHost).concat(_constants2.URL_ENDPOINT).concat(_constants2.IP_ENDPOINT),
|
|
348
578
|
method: _types3.HTTP_METHODS.GET,
|
|
@@ -350,79 +580,116 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
350
580
|
service: _types3.ALLOWED_SERVICES.MOBIUS
|
|
351
581
|
});
|
|
352
582
|
case 5:
|
|
353
|
-
temp =
|
|
583
|
+
temp = _context0.sent;
|
|
584
|
+
_Logger.default.log("Response trackingId: ".concat(temp === null || temp === void 0 ? void 0 : (_temp$headers = temp.headers) === null || _temp$headers === void 0 ? void 0 : _temp$headers.trackingid), {
|
|
585
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
586
|
+
method: _constants2.METHODS.GET_CLIENT_REGION_INFO
|
|
587
|
+
});
|
|
354
588
|
myIP = temp.body.ipv4; // eslint-disable-next-line no-await-in-loop
|
|
355
|
-
|
|
589
|
+
_context0.next = 10;
|
|
356
590
|
return _this3.webex.request({
|
|
357
591
|
uri: "".concat(_constants2.DISCOVERY_URL, "/").concat(myIP),
|
|
358
592
|
method: _types3.HTTP_METHODS.GET,
|
|
359
593
|
addAuthHeader: false,
|
|
360
594
|
headers: (0, _defineProperty2.default)({}, _constants2.SPARK_USER_AGENT, null)
|
|
361
595
|
});
|
|
362
|
-
case
|
|
363
|
-
response =
|
|
596
|
+
case 10:
|
|
597
|
+
response = _context0.sent;
|
|
598
|
+
_Logger.default.log("Response trackingId: ".concat(response === null || response === void 0 ? void 0 : (_response$headers = response.headers) === null || _response$headers === void 0 ? void 0 : _response$headers.trackingid), {
|
|
599
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
600
|
+
method: _constants2.METHODS.GET_CLIENT_REGION_INFO
|
|
601
|
+
});
|
|
364
602
|
clientRegionInfo = response.body;
|
|
365
603
|
regionInfo.clientRegion = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.clientRegion ? clientRegionInfo.clientRegion : '';
|
|
366
604
|
regionInfo.countryCode = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.countryCode ? clientRegionInfo.countryCode : '';
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
605
|
+
_Logger.default.log("Successfully fetched Client region info: ".concat(regionInfo.clientRegion, ", countryCode: ").concat(regionInfo.countryCode, ", and response trackingid: ").concat(response === null || response === void 0 ? void 0 : (_response$headers2 = response.headers) === null || _response$headers2 === void 0 ? void 0 : _response$headers2.trackingid), {
|
|
606
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
607
|
+
method: _constants2.METHODS.GET_CLIENT_REGION_INFO
|
|
608
|
+
});
|
|
609
|
+
|
|
610
|
+
// Metrics for region info - trying clusters in loop
|
|
611
|
+
_this3.metricManager.submitRegionInfoMetric(_types4.METRIC_EVENT.MOBIUS_DISCOVERY, _types4.MOBIUS_SERVER_ACTION.REGION_INFO, _types4.METRIC_TYPE.BEHAVIORAL, _this3.mobiusHost, clientRegionInfo.clientRegion, clientRegionInfo.countryCode, (_response$headers$tra = response === null || response === void 0 ? void 0 : (_response$headers3 = response.headers) === null || _response$headers3 === void 0 ? void 0 : _response$headers3.trackingid) !== null && _response$headers$tra !== void 0 ? _response$headers$tra : '');
|
|
612
|
+
return _context0.abrupt("return", 0);
|
|
613
|
+
case 20:
|
|
614
|
+
_context0.prev = 20;
|
|
615
|
+
_context0.t0 = _context0["catch"](2);
|
|
616
|
+
extendedError = new Error("Failed to get client region info: ".concat(_context0.t0));
|
|
372
617
|
_Logger.default.error(extendedError, {
|
|
373
618
|
method: _constants2.METHODS.GET_CLIENT_REGION_INFO,
|
|
374
619
|
file: _constants2.CALLING_CLIENT_FILE
|
|
375
620
|
});
|
|
376
|
-
|
|
621
|
+
|
|
622
|
+
// eslint-disable-next-line no-await-in-loop
|
|
623
|
+
_context0.next = 26;
|
|
624
|
+
return (0, _Utils.handleCallingClientErrors)(_context0.t0, function (clientError) {
|
|
377
625
|
var _headers$trackingId, _headers3;
|
|
378
|
-
_this3.metricManager.submitRegistrationMetric(_types4.METRIC_EVENT.REGISTRATION_ERROR, _types4.REG_ACTION.REGISTER, _types4.METRIC_TYPE.BEHAVIORAL, _constants2.GET_MOBIUS_SERVERS_UTIL, 'UNKNOWN', (_headers$trackingId = (_headers3 =
|
|
626
|
+
_this3.metricManager.submitRegistrationMetric(_types4.METRIC_EVENT.REGISTRATION_ERROR, _types4.REG_ACTION.REGISTER, _types4.METRIC_TYPE.BEHAVIORAL, _constants2.GET_MOBIUS_SERVERS_UTIL, 'UNKNOWN', (_headers$trackingId = (_headers3 = _context0.t0.headers) === null || _headers3 === void 0 ? void 0 : _headers3.trackingId) !== null && _headers$trackingId !== void 0 ? _headers$trackingId : '', undefined, clientError);
|
|
379
627
|
_this3.emit(_types2.CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
|
|
380
628
|
}, {
|
|
381
629
|
method: _constants2.GET_MOBIUS_SERVERS_UTIL,
|
|
382
630
|
file: _constants2.CALLING_CLIENT_FILE
|
|
383
631
|
});
|
|
632
|
+
case 26:
|
|
633
|
+
abort = _context0.sent;
|
|
384
634
|
regionInfo.clientRegion = '';
|
|
385
635
|
regionInfo.countryCode = '';
|
|
386
|
-
|
|
636
|
+
if (!abort) {
|
|
637
|
+
_context0.next = 33;
|
|
638
|
+
break;
|
|
639
|
+
}
|
|
640
|
+
_context0.next = 32;
|
|
641
|
+
return (0, _Utils.uploadLogs)();
|
|
642
|
+
case 32:
|
|
643
|
+
return _context0.abrupt("return", {
|
|
644
|
+
v: regionInfo
|
|
645
|
+
});
|
|
646
|
+
case 33:
|
|
387
647
|
case "end":
|
|
388
|
-
return
|
|
648
|
+
return _context0.stop();
|
|
389
649
|
}
|
|
390
|
-
},
|
|
650
|
+
}, _loop2, null, [[2, 20]]);
|
|
391
651
|
});
|
|
392
|
-
|
|
652
|
+
_iterator2.s();
|
|
393
653
|
case 6:
|
|
394
|
-
if ((
|
|
395
|
-
|
|
654
|
+
if ((_step2 = _iterator2.n()).done) {
|
|
655
|
+
_context1.next = 15;
|
|
396
656
|
break;
|
|
397
657
|
}
|
|
398
|
-
return
|
|
658
|
+
return _context1.delegateYield(_loop2(), "t0", 8);
|
|
399
659
|
case 8:
|
|
400
|
-
|
|
401
|
-
|
|
660
|
+
_ret = _context1.t0;
|
|
661
|
+
if (!(_ret === 0)) {
|
|
662
|
+
_context1.next = 11;
|
|
402
663
|
break;
|
|
403
664
|
}
|
|
404
|
-
return
|
|
405
|
-
case
|
|
406
|
-
|
|
665
|
+
return _context1.abrupt("break", 15);
|
|
666
|
+
case 11:
|
|
667
|
+
if (!_ret) {
|
|
668
|
+
_context1.next = 13;
|
|
669
|
+
break;
|
|
670
|
+
}
|
|
671
|
+
return _context1.abrupt("return", _ret.v);
|
|
672
|
+
case 13:
|
|
673
|
+
_context1.next = 6;
|
|
407
674
|
break;
|
|
408
|
-
case
|
|
409
|
-
|
|
675
|
+
case 15:
|
|
676
|
+
_context1.next = 20;
|
|
410
677
|
break;
|
|
411
|
-
case 14:
|
|
412
|
-
_context7.prev = 14;
|
|
413
|
-
_context7.t1 = _context7["catch"](3);
|
|
414
|
-
_iterator.e(_context7.t1);
|
|
415
678
|
case 17:
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
679
|
+
_context1.prev = 17;
|
|
680
|
+
_context1.t1 = _context1["catch"](3);
|
|
681
|
+
_iterator2.e(_context1.t1);
|
|
419
682
|
case 20:
|
|
420
|
-
|
|
421
|
-
|
|
683
|
+
_context1.prev = 20;
|
|
684
|
+
_iterator2.f();
|
|
685
|
+
return _context1.finish(20);
|
|
686
|
+
case 23:
|
|
687
|
+
return _context1.abrupt("return", regionInfo);
|
|
688
|
+
case 24:
|
|
422
689
|
case "end":
|
|
423
|
-
return
|
|
690
|
+
return _context1.stop();
|
|
424
691
|
}
|
|
425
|
-
},
|
|
692
|
+
}, _callee9, this, [[3, 17, 20, 23]]);
|
|
426
693
|
}));
|
|
427
694
|
function getClientRegionInfo() {
|
|
428
695
|
return _getClientRegionInfo.apply(this, arguments);
|
|
@@ -436,15 +703,15 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
436
703
|
}, {
|
|
437
704
|
key: "getMobiusServers",
|
|
438
705
|
value: (function () {
|
|
439
|
-
var _getMobiusServers = (0, _asyncToGenerator2.default)(
|
|
706
|
+
var _getMobiusServers = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
|
|
440
707
|
var _this$sdkConfig3,
|
|
441
708
|
_this$sdkConfig3$disc,
|
|
442
709
|
_this$sdkConfig4,
|
|
443
710
|
_this$sdkConfig4$disc,
|
|
444
711
|
_this4 = this;
|
|
445
|
-
var useDefault, clientRegion, countryCode, _this$sdkConfig5, _this$sdkConfig5$disc, _this$sdkConfig6, _this$sdkConfig6$disc, regionInfo,
|
|
446
|
-
return _regenerator.default.wrap(function
|
|
447
|
-
while (1) switch (
|
|
712
|
+
var useDefault, clientRegion, countryCode, _this$sdkConfig5, _this$sdkConfig5$disc, _this$sdkConfig6, _this$sdkConfig6$disc, regionInfo, _response$headers4, _response$headers$tra2, _response$headers5, response, mobiusServers, mobiusUris, extendedError, abort;
|
|
713
|
+
return _regenerator.default.wrap(function _callee0$(_context10) {
|
|
714
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
448
715
|
case 0:
|
|
449
716
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
450
717
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
@@ -459,7 +726,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
459
726
|
*/
|
|
460
727
|
useDefault = false;
|
|
461
728
|
if (!((_this$sdkConfig3 = this.sdkConfig) !== null && _this$sdkConfig3 !== void 0 && (_this$sdkConfig3$disc = _this$sdkConfig3.discovery) !== null && _this$sdkConfig3$disc !== void 0 && _this$sdkConfig3$disc.country && (_this$sdkConfig4 = this.sdkConfig) !== null && _this$sdkConfig4 !== void 0 && (_this$sdkConfig4$disc = _this$sdkConfig4.discovery) !== null && _this$sdkConfig4$disc !== void 0 && _this$sdkConfig4$disc.region)) {
|
|
462
|
-
|
|
729
|
+
_context10.next = 9;
|
|
463
730
|
break;
|
|
464
731
|
}
|
|
465
732
|
_Logger.default.log('Updating region and country from the SDK config', {
|
|
@@ -469,27 +736,30 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
469
736
|
clientRegion = (_this$sdkConfig5 = this.sdkConfig) === null || _this$sdkConfig5 === void 0 ? void 0 : (_this$sdkConfig5$disc = _this$sdkConfig5.discovery) === null || _this$sdkConfig5$disc === void 0 ? void 0 : _this$sdkConfig5$disc.region;
|
|
470
737
|
countryCode = (_this$sdkConfig6 = this.sdkConfig) === null || _this$sdkConfig6 === void 0 ? void 0 : (_this$sdkConfig6$disc = _this$sdkConfig6.discovery) === null || _this$sdkConfig6$disc === void 0 ? void 0 : _this$sdkConfig6$disc.country;
|
|
471
738
|
this.mobiusHost = this.webex.internal.services._serviceUrls.mobius;
|
|
472
|
-
|
|
739
|
+
_context10.next = 15;
|
|
473
740
|
break;
|
|
474
741
|
case 9:
|
|
475
742
|
_Logger.default.log('Updating region and country through Region discovery', {
|
|
476
743
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
477
744
|
method: _constants2.GET_MOBIUS_SERVERS_UTIL
|
|
478
745
|
});
|
|
479
|
-
|
|
746
|
+
_context10.next = 12;
|
|
480
747
|
return this.getClientRegionInfo();
|
|
481
748
|
case 12:
|
|
482
|
-
regionInfo =
|
|
749
|
+
regionInfo = _context10.sent;
|
|
483
750
|
clientRegion = regionInfo.clientRegion;
|
|
484
751
|
countryCode = regionInfo.countryCode;
|
|
485
752
|
case 15:
|
|
486
753
|
if (!(clientRegion && countryCode)) {
|
|
487
|
-
|
|
754
|
+
_context10.next = 43;
|
|
488
755
|
break;
|
|
489
756
|
}
|
|
490
|
-
_Logger.default.log("Found Region: ".concat(clientRegion, " and country: ").concat(countryCode, ", going to fetch Mobius server"),
|
|
491
|
-
|
|
492
|
-
|
|
757
|
+
_Logger.default.log("Found Region: ".concat(clientRegion, " and country: ").concat(countryCode, ", going to fetch Mobius server"), {
|
|
758
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
759
|
+
method: _constants2.GET_MOBIUS_SERVERS_UTIL
|
|
760
|
+
});
|
|
761
|
+
_context10.prev = 17;
|
|
762
|
+
_context10.next = 20;
|
|
493
763
|
return this.webex.request({
|
|
494
764
|
uri: "".concat(this.mobiusHost).concat(_constants2.URL_ENDPOINT, "?regionCode=").concat(clientRegion, "&countryCode=").concat(countryCode),
|
|
495
765
|
method: _types3.HTTP_METHODS.GET,
|
|
@@ -497,54 +767,75 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
497
767
|
service: _types3.ALLOWED_SERVICES.MOBIUS
|
|
498
768
|
});
|
|
499
769
|
case 20:
|
|
500
|
-
|
|
501
|
-
_Logger.default.log(
|
|
502
|
-
|
|
770
|
+
response = _context10.sent;
|
|
771
|
+
_Logger.default.log("Mobius Server found for the region. Response trackingId: ".concat(response === null || response === void 0 ? void 0 : (_response$headers4 = response.headers) === null || _response$headers4 === void 0 ? void 0 : _response$headers4.trackingid), {
|
|
772
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
773
|
+
method: _constants2.GET_MOBIUS_SERVERS_UTIL
|
|
774
|
+
});
|
|
775
|
+
mobiusServers = response.body; // Metrics for mobius servers
|
|
776
|
+
this.metricManager.submitMobiusServersMetric(_types4.METRIC_EVENT.MOBIUS_DISCOVERY, _types4.MOBIUS_SERVER_ACTION.MOBIUS_SERVERS, _types4.METRIC_TYPE.BEHAVIORAL, mobiusServers, (_response$headers$tra2 = response === null || response === void 0 ? void 0 : (_response$headers5 = response.headers) === null || _response$headers5 === void 0 ? void 0 : _response$headers5.trackingid) !== null && _response$headers$tra2 !== void 0 ? _response$headers$tra2 : '');
|
|
777
|
+
|
|
503
778
|
/* update arrays of Mobius Uris. */
|
|
504
779
|
mobiusUris = (0, _Utils.filterMobiusUris)(mobiusServers, this.mobiusHost);
|
|
505
780
|
this.primaryMobiusUris = mobiusUris.primary;
|
|
506
781
|
this.backupMobiusUris = mobiusUris.backup;
|
|
507
|
-
_Logger.default.
|
|
508
|
-
|
|
782
|
+
_Logger.default.log("Final list of Mobius Servers, primary: ".concat(mobiusUris.primary, " and backup: ").concat(mobiusUris.backup), {
|
|
783
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
784
|
+
method: _constants2.GET_MOBIUS_SERVERS_UTIL
|
|
785
|
+
});
|
|
786
|
+
_context10.next = 41;
|
|
509
787
|
break;
|
|
510
|
-
case
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
extendedError = new Error("Failed to get Mobius servers: ".concat(
|
|
788
|
+
case 30:
|
|
789
|
+
_context10.prev = 30;
|
|
790
|
+
_context10.t0 = _context10["catch"](17);
|
|
791
|
+
extendedError = new Error("Failed to get Mobius servers: ".concat(_context10.t0));
|
|
514
792
|
_Logger.default.error(extendedError, {
|
|
515
793
|
method: _constants2.METHODS.GET_MOBIUS_SERVERS,
|
|
516
794
|
file: _constants2.CALLING_CLIENT_FILE
|
|
517
795
|
});
|
|
518
|
-
|
|
796
|
+
_context10.next = 36;
|
|
797
|
+
return (0, _Utils.handleCallingClientErrors)(_context10.t0, function (clientError) {
|
|
519
798
|
var _headers$trackingId2, _headers5;
|
|
520
|
-
_this4.metricManager.submitRegistrationMetric(_types4.METRIC_EVENT.REGISTRATION_ERROR, _types4.REG_ACTION.REGISTER, _types4.METRIC_TYPE.BEHAVIORAL, _constants2.GET_MOBIUS_SERVERS_UTIL, 'UNKNOWN', (_headers$trackingId2 = (_headers5 =
|
|
799
|
+
_this4.metricManager.submitRegistrationMetric(_types4.METRIC_EVENT.REGISTRATION_ERROR, _types4.REG_ACTION.REGISTER, _types4.METRIC_TYPE.BEHAVIORAL, _constants2.GET_MOBIUS_SERVERS_UTIL, 'UNKNOWN', (_headers$trackingId2 = (_headers5 = _context10.t0.headers) === null || _headers5 === void 0 ? void 0 : _headers5.trackingId) !== null && _headers$trackingId2 !== void 0 ? _headers$trackingId2 : '', undefined, clientError);
|
|
521
800
|
_this4.emit(_types2.CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
|
|
522
801
|
}, {
|
|
523
802
|
method: _constants2.GET_MOBIUS_SERVERS_UTIL,
|
|
524
803
|
file: _constants2.CALLING_CLIENT_FILE
|
|
525
804
|
});
|
|
805
|
+
case 36:
|
|
806
|
+
abort = _context10.sent;
|
|
807
|
+
if (!abort) {
|
|
808
|
+
_context10.next = 40;
|
|
809
|
+
break;
|
|
810
|
+
}
|
|
811
|
+
_context10.next = 40;
|
|
812
|
+
return (0, _Utils.uploadLogs)();
|
|
813
|
+
case 40:
|
|
526
814
|
useDefault = true;
|
|
527
|
-
case
|
|
528
|
-
|
|
815
|
+
case 41:
|
|
816
|
+
_context10.next = 44;
|
|
529
817
|
break;
|
|
530
|
-
case
|
|
818
|
+
case 43:
|
|
531
819
|
/* Setting this to true because region info is possibly undefined */
|
|
532
820
|
useDefault = true;
|
|
533
|
-
case
|
|
821
|
+
case 44:
|
|
534
822
|
/* Use a default URL if Mobius discovery fails either because of region info failure
|
|
535
823
|
* or because the discovered Mobius couldn't be reached
|
|
536
824
|
*/
|
|
537
825
|
|
|
538
826
|
if (useDefault) {
|
|
539
|
-
_Logger.default.warn("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers",
|
|
827
|
+
_Logger.default.warn("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", {
|
|
828
|
+
file: _constants2.CALLING_CLIENT_FILE,
|
|
829
|
+
method: _constants2.GET_MOBIUS_SERVERS_UTIL
|
|
830
|
+
});
|
|
540
831
|
this.mobiusHost = "https://".concat(this.mobiusClusters[0].host).concat(_constants2.API_V1);
|
|
541
832
|
this.primaryMobiusUris = ["".concat(this.mobiusHost).concat(_constants2.URL_ENDPOINT)];
|
|
542
833
|
}
|
|
543
|
-
case
|
|
834
|
+
case 45:
|
|
544
835
|
case "end":
|
|
545
|
-
return
|
|
836
|
+
return _context10.stop();
|
|
546
837
|
}
|
|
547
|
-
},
|
|
838
|
+
}, _callee0, this, [[17, 30]]);
|
|
548
839
|
}));
|
|
549
840
|
function getMobiusServers() {
|
|
550
841
|
return _getMobiusServers.apply(this, arguments);
|
|
@@ -595,25 +886,25 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
595
886
|
method: _constants2.METHODS.REGISTER_SESSIONS_LISTENER
|
|
596
887
|
});
|
|
597
888
|
this.sdkConnector.registerListener(_types2.MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE, /*#__PURE__*/function () {
|
|
598
|
-
var
|
|
889
|
+
var _ref6 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1(event) {
|
|
599
890
|
var sessionArr, i;
|
|
600
|
-
return _regenerator.default.wrap(function
|
|
601
|
-
while (1) switch (
|
|
891
|
+
return _regenerator.default.wrap(function _callee1$(_context11) {
|
|
892
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
602
893
|
case 0:
|
|
603
894
|
if (!(event && event.data.userSessions.userSessions)) {
|
|
604
|
-
|
|
895
|
+
_context11.next = 7;
|
|
605
896
|
break;
|
|
606
897
|
}
|
|
607
898
|
sessionArr = event === null || event === void 0 ? void 0 : event.data.userSessions.userSessions;
|
|
608
899
|
if (!(sessionArr.length === 1)) {
|
|
609
|
-
|
|
900
|
+
_context11.next = 5;
|
|
610
901
|
break;
|
|
611
902
|
}
|
|
612
903
|
if (!(sessionArr[0].sessionType !== _types2.SessionType.WEBEX_CALLING)) {
|
|
613
|
-
|
|
904
|
+
_context11.next = 5;
|
|
614
905
|
break;
|
|
615
906
|
}
|
|
616
|
-
return
|
|
907
|
+
return _context11.abrupt("return");
|
|
617
908
|
case 5:
|
|
618
909
|
for (i = 0; i < sessionArr.length; i += 1) {
|
|
619
910
|
if (sessionArr[i].sessionType !== _types2.SessionType.WEBEX_CALLING) {
|
|
@@ -623,12 +914,12 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
623
914
|
_this5.emit(_types2.CALLING_CLIENT_EVENT_KEYS.USER_SESSION_INFO, event);
|
|
624
915
|
case 7:
|
|
625
916
|
case "end":
|
|
626
|
-
return
|
|
917
|
+
return _context11.stop();
|
|
627
918
|
}
|
|
628
|
-
},
|
|
919
|
+
}, _callee1);
|
|
629
920
|
}));
|
|
630
921
|
return function (_x) {
|
|
631
|
-
return
|
|
922
|
+
return _ref6.apply(this, arguments);
|
|
632
923
|
};
|
|
633
924
|
}());
|
|
634
925
|
}
|
|
@@ -640,11 +931,11 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
640
931
|
}, {
|
|
641
932
|
key: "createLine",
|
|
642
933
|
value: (function () {
|
|
643
|
-
var _createLine = (0, _asyncToGenerator2.default)(
|
|
934
|
+
var _createLine = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
|
644
935
|
var _this$sdkConfig7, _this$sdkConfig8;
|
|
645
936
|
var line;
|
|
646
|
-
return _regenerator.default.wrap(function
|
|
647
|
-
while (1) switch (
|
|
937
|
+
return _regenerator.default.wrap(function _callee10$(_context12) {
|
|
938
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
648
939
|
case 0:
|
|
649
940
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
650
941
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
@@ -654,9 +945,9 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
654
945
|
this.lineDict[line.lineId] = line;
|
|
655
946
|
case 3:
|
|
656
947
|
case "end":
|
|
657
|
-
return
|
|
948
|
+
return _context12.stop();
|
|
658
949
|
}
|
|
659
|
-
},
|
|
950
|
+
}, _callee10, this);
|
|
660
951
|
}));
|
|
661
952
|
function createLine() {
|
|
662
953
|
return _createLine.apply(this, arguments);
|
|
@@ -721,27 +1012,27 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
721
1012
|
}, {
|
|
722
1013
|
key: "uploadLogs",
|
|
723
1014
|
value: (function () {
|
|
724
|
-
var _uploadLogs2 = (0, _asyncToGenerator2.default)(
|
|
1015
|
+
var _uploadLogs2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11() {
|
|
725
1016
|
var result;
|
|
726
|
-
return _regenerator.default.wrap(function
|
|
727
|
-
while (1) switch (
|
|
1017
|
+
return _regenerator.default.wrap(function _callee11$(_context13) {
|
|
1018
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
728
1019
|
case 0:
|
|
729
|
-
|
|
1020
|
+
_context13.next = 2;
|
|
730
1021
|
return (0, _Utils.uploadLogs)({}, true);
|
|
731
1022
|
case 2:
|
|
732
|
-
result =
|
|
1023
|
+
result = _context13.sent;
|
|
733
1024
|
if (result) {
|
|
734
|
-
|
|
1025
|
+
_context13.next = 5;
|
|
735
1026
|
break;
|
|
736
1027
|
}
|
|
737
1028
|
throw new Error('Failed to upload logs: No response received.');
|
|
738
1029
|
case 5:
|
|
739
|
-
return
|
|
1030
|
+
return _context13.abrupt("return", result);
|
|
740
1031
|
case 6:
|
|
741
1032
|
case "end":
|
|
742
|
-
return
|
|
1033
|
+
return _context13.stop();
|
|
743
1034
|
}
|
|
744
|
-
},
|
|
1035
|
+
}, _callee11);
|
|
745
1036
|
}));
|
|
746
1037
|
function uploadLogs() {
|
|
747
1038
|
return _uploadLogs2.apply(this, arguments);
|
|
@@ -757,24 +1048,24 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
757
1048
|
* @param config - Config to start the CallingClient with.
|
|
758
1049
|
*/
|
|
759
1050
|
var createClient = exports.createClient = /*#__PURE__*/function () {
|
|
760
|
-
var
|
|
1051
|
+
var _ref7 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(webex, config) {
|
|
761
1052
|
var callingClientInstance;
|
|
762
|
-
return _regenerator.default.wrap(function
|
|
763
|
-
while (1) switch (
|
|
1053
|
+
return _regenerator.default.wrap(function _callee12$(_context14) {
|
|
1054
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
764
1055
|
case 0:
|
|
765
1056
|
callingClientInstance = new CallingClient(webex, config);
|
|
766
|
-
|
|
1057
|
+
_context14.next = 3;
|
|
767
1058
|
return callingClientInstance.init();
|
|
768
1059
|
case 3:
|
|
769
|
-
return
|
|
1060
|
+
return _context14.abrupt("return", callingClientInstance);
|
|
770
1061
|
case 4:
|
|
771
1062
|
case "end":
|
|
772
|
-
return
|
|
1063
|
+
return _context14.stop();
|
|
773
1064
|
}
|
|
774
|
-
},
|
|
1065
|
+
}, _callee12);
|
|
775
1066
|
}));
|
|
776
1067
|
return function createClient(_x2, _x3) {
|
|
777
|
-
return
|
|
1068
|
+
return _ref7.apply(this, arguments);
|
|
778
1069
|
};
|
|
779
1070
|
}();
|
|
780
1071
|
//# sourceMappingURL=CallingClient.js.map
|