@webex/calling 3.9.0 → 3.10.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.
- 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 +66 -59
- package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.test.js +108 -109
- 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 +457 -201
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +458 -315
- 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 +9 -6
- 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 +280 -201
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +251 -180
- 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 +25 -10
- package/dist/CallingClient/registration/webWorker.js.map +1 -1
- package/dist/CallingClient/registration/webWorker.test.js +85 -38
- package/dist/CallingClient/registration/webWorker.test.js.map +1 -1
- package/dist/CallingClient/registration/webWorkerStr.js +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 +221 -104
- package/dist/Metrics/index.js.map +1 -1
- package/dist/Metrics/index.test.js +112 -23
- 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 +84 -65
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +111 -117
- 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 +7 -0
- package/dist/module/CallingClient/CallingClient.js +174 -32
- package/dist/module/CallingClient/calling/call.js +79 -43
- package/dist/module/CallingClient/constants.js +8 -4
- package/dist/module/CallingClient/line/index.js +3 -3
- package/dist/module/CallingClient/registration/register.js +34 -10
- package/dist/module/CallingClient/registration/webWorker.js +17 -3
- package/dist/module/CallingClient/registration/webWorkerStr.js +19 -3
- 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 +142 -55
- 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 +27 -10
- 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/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 +8 -4
- 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/webWorker.d.ts +2 -1
- package/dist/types/CallingClient/registration/webWorker.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/webWorkerStr.d.ts +1 -1
- package/dist/types/CallingClient/registration/webWorkerStr.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 -8
|
@@ -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();
|
|
@@ -222,8 +334,6 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
222
334
|
return _this;
|
|
223
335
|
}
|
|
224
336
|
|
|
225
|
-
// async calls required to run after constructor
|
|
226
|
-
|
|
227
337
|
/**
|
|
228
338
|
* Initializes the `CallingClient` by performing the following steps:
|
|
229
339
|
*
|
|
@@ -238,24 +348,59 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
238
348
|
*/
|
|
239
349
|
(0, _createClass2.default)(CallingClient, [{
|
|
240
350
|
key: "init",
|
|
241
|
-
value: function () {
|
|
242
|
-
var _init = (0, _asyncToGenerator2.default)(
|
|
243
|
-
|
|
244
|
-
|
|
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) {
|
|
245
357
|
case 0:
|
|
246
|
-
|
|
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;
|
|
247
393
|
return this.getMobiusServers();
|
|
248
|
-
case
|
|
249
|
-
|
|
394
|
+
case 15:
|
|
395
|
+
_context6.next = 17;
|
|
250
396
|
return this.createLine();
|
|
251
|
-
case
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
case 5:
|
|
397
|
+
case 17:
|
|
398
|
+
this.setupNetworkEventListeners();
|
|
399
|
+
case 18:
|
|
255
400
|
case "end":
|
|
256
|
-
return
|
|
401
|
+
return _context6.stop();
|
|
257
402
|
}
|
|
258
|
-
},
|
|
403
|
+
}, _callee6, this, [[4, 10]]);
|
|
259
404
|
}));
|
|
260
405
|
function init() {
|
|
261
406
|
return _init.apply(this, arguments);
|
|
@@ -263,102 +408,171 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
263
408
|
return init;
|
|
264
409
|
}()
|
|
265
410
|
/**
|
|
266
|
-
*
|
|
411
|
+
* Ping a reliable external endpoint with a short timeout to infer connectivity.
|
|
267
412
|
*/
|
|
413
|
+
)
|
|
268
414
|
}, {
|
|
269
|
-
key: "
|
|
415
|
+
key: "checkNetworkReachability",
|
|
270
416
|
value: (function () {
|
|
271
|
-
var
|
|
272
|
-
var
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
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) {
|
|
276
421
|
case 0:
|
|
277
|
-
|
|
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), {
|
|
278
442
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
279
|
-
method:
|
|
443
|
+
method: 'pingExternal'
|
|
280
444
|
});
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
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) {
|
|
287
476
|
case 0:
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
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'
|
|
292
488
|
});
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
296
|
-
if (!(retry && _this2.webex.internal.mercury.connected)) {
|
|
297
|
-
_context4.next = 9;
|
|
298
|
-
break;
|
|
299
|
-
}
|
|
300
|
-
if (!(line.getStatus() !== _types3.RegistrationStatus.IDLE)) {
|
|
301
|
-
_context4.next = 8;
|
|
302
|
-
break;
|
|
303
|
-
}
|
|
304
|
-
_context4.next = 5;
|
|
305
|
-
return line.registration.handleConnectionRestoration(retry);
|
|
306
|
-
case 5:
|
|
307
|
-
retry = _context4.sent;
|
|
308
|
-
_context4.next = 9;
|
|
309
|
-
break;
|
|
310
|
-
case 8:
|
|
311
|
-
retry = false;
|
|
312
|
-
case 9:
|
|
489
|
+
});
|
|
490
|
+
case 2:
|
|
313
491
|
case "end":
|
|
314
|
-
return
|
|
492
|
+
return _context8.stop();
|
|
315
493
|
}
|
|
316
|
-
},
|
|
317
|
-
})
|
|
318
|
-
|
|
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:
|
|
319
518
|
case "end":
|
|
320
|
-
return
|
|
519
|
+
return _context9.stop();
|
|
321
520
|
}
|
|
322
|
-
},
|
|
521
|
+
}, _callee8, this, [[3, 12, 15, 18]]);
|
|
323
522
|
}));
|
|
324
|
-
function
|
|
325
|
-
return
|
|
523
|
+
function checkCallStatus() {
|
|
524
|
+
return _checkCallStatus.apply(this, arguments);
|
|
326
525
|
}
|
|
327
|
-
return
|
|
526
|
+
return checkCallStatus;
|
|
328
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
|
+
|
|
329
544
|
/**
|
|
330
545
|
* Fetches countryCode and region of the client.
|
|
331
546
|
*/
|
|
332
|
-
)
|
|
333
547
|
}, {
|
|
334
548
|
key: "getClientRegionInfo",
|
|
335
549
|
value: (function () {
|
|
336
|
-
var _getClientRegionInfo = (0, _asyncToGenerator2.default)(
|
|
550
|
+
var _getClientRegionInfo = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
337
551
|
var _this3 = this;
|
|
338
|
-
var abort, regionInfo,
|
|
339
|
-
return _regenerator.default.wrap(function
|
|
340
|
-
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) {
|
|
341
555
|
case 0:
|
|
342
556
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
343
557
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
344
558
|
method: _constants2.METHODS.GET_CLIENT_REGION_INFO
|
|
345
559
|
});
|
|
346
560
|
regionInfo = {};
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
var mobius, temp, myIP, response, clientRegionInfo, extendedError;
|
|
351
|
-
return _regenerator.default.wrap(function
|
|
352
|
-
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) {
|
|
353
567
|
case 0:
|
|
354
|
-
mobius =
|
|
568
|
+
mobius = _step2.value;
|
|
355
569
|
if (mobius.host) {
|
|
356
570
|
_this3.mobiusHost = "https://".concat(mobius.host).concat(_constants2.API_V1);
|
|
357
571
|
} else {
|
|
358
572
|
_this3.mobiusHost = mobius;
|
|
359
573
|
}
|
|
360
|
-
|
|
361
|
-
|
|
574
|
+
_context0.prev = 2;
|
|
575
|
+
_context0.next = 5;
|
|
362
576
|
return _this3.webex.request({
|
|
363
577
|
uri: "".concat(_this3.mobiusHost).concat(_constants2.URL_ENDPOINT).concat(_constants2.IP_ENDPOINT),
|
|
364
578
|
method: _types3.HTTP_METHODS.GET,
|
|
@@ -366,98 +580,116 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
366
580
|
service: _types3.ALLOWED_SERVICES.MOBIUS
|
|
367
581
|
});
|
|
368
582
|
case 5:
|
|
369
|
-
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
|
+
});
|
|
370
588
|
myIP = temp.body.ipv4; // eslint-disable-next-line no-await-in-loop
|
|
371
|
-
|
|
589
|
+
_context0.next = 10;
|
|
372
590
|
return _this3.webex.request({
|
|
373
591
|
uri: "".concat(_constants2.DISCOVERY_URL, "/").concat(myIP),
|
|
374
592
|
method: _types3.HTTP_METHODS.GET,
|
|
375
593
|
addAuthHeader: false,
|
|
376
594
|
headers: (0, _defineProperty2.default)({}, _constants2.SPARK_USER_AGENT, null)
|
|
377
595
|
});
|
|
378
|
-
case
|
|
379
|
-
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
|
+
});
|
|
380
602
|
clientRegionInfo = response.body;
|
|
381
603
|
regionInfo.clientRegion = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.clientRegion ? clientRegionInfo.clientRegion : '';
|
|
382
604
|
regionInfo.countryCode = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.countryCode ? clientRegionInfo.countryCode : '';
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
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));
|
|
388
617
|
_Logger.default.error(extendedError, {
|
|
389
618
|
method: _constants2.METHODS.GET_CLIENT_REGION_INFO,
|
|
390
619
|
file: _constants2.CALLING_CLIENT_FILE
|
|
391
620
|
});
|
|
392
621
|
|
|
393
622
|
// eslint-disable-next-line no-await-in-loop
|
|
394
|
-
|
|
395
|
-
return (0, _Utils.handleCallingClientErrors)(
|
|
623
|
+
_context0.next = 26;
|
|
624
|
+
return (0, _Utils.handleCallingClientErrors)(_context0.t0, function (clientError) {
|
|
396
625
|
var _headers$trackingId, _headers3;
|
|
397
|
-
_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);
|
|
398
627
|
_this3.emit(_types2.CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
|
|
399
628
|
}, {
|
|
400
629
|
method: _constants2.GET_MOBIUS_SERVERS_UTIL,
|
|
401
630
|
file: _constants2.CALLING_CLIENT_FILE
|
|
402
631
|
});
|
|
403
|
-
case
|
|
404
|
-
abort =
|
|
632
|
+
case 26:
|
|
633
|
+
abort = _context0.sent;
|
|
405
634
|
regionInfo.clientRegion = '';
|
|
406
635
|
regionInfo.countryCode = '';
|
|
407
636
|
if (!abort) {
|
|
408
|
-
|
|
637
|
+
_context0.next = 33;
|
|
409
638
|
break;
|
|
410
639
|
}
|
|
411
|
-
|
|
640
|
+
_context0.next = 32;
|
|
641
|
+
return (0, _Utils.uploadLogs)();
|
|
642
|
+
case 32:
|
|
643
|
+
return _context0.abrupt("return", {
|
|
412
644
|
v: regionInfo
|
|
413
645
|
});
|
|
414
|
-
case
|
|
646
|
+
case 33:
|
|
415
647
|
case "end":
|
|
416
|
-
return
|
|
648
|
+
return _context0.stop();
|
|
417
649
|
}
|
|
418
|
-
},
|
|
650
|
+
}, _loop2, null, [[2, 20]]);
|
|
419
651
|
});
|
|
420
|
-
|
|
652
|
+
_iterator2.s();
|
|
421
653
|
case 6:
|
|
422
|
-
if ((
|
|
423
|
-
|
|
654
|
+
if ((_step2 = _iterator2.n()).done) {
|
|
655
|
+
_context1.next = 15;
|
|
424
656
|
break;
|
|
425
657
|
}
|
|
426
|
-
return
|
|
658
|
+
return _context1.delegateYield(_loop2(), "t0", 8);
|
|
427
659
|
case 8:
|
|
428
|
-
_ret =
|
|
660
|
+
_ret = _context1.t0;
|
|
429
661
|
if (!(_ret === 0)) {
|
|
430
|
-
|
|
662
|
+
_context1.next = 11;
|
|
431
663
|
break;
|
|
432
664
|
}
|
|
433
|
-
return
|
|
665
|
+
return _context1.abrupt("break", 15);
|
|
434
666
|
case 11:
|
|
435
667
|
if (!_ret) {
|
|
436
|
-
|
|
668
|
+
_context1.next = 13;
|
|
437
669
|
break;
|
|
438
670
|
}
|
|
439
|
-
return
|
|
671
|
+
return _context1.abrupt("return", _ret.v);
|
|
440
672
|
case 13:
|
|
441
|
-
|
|
673
|
+
_context1.next = 6;
|
|
442
674
|
break;
|
|
443
675
|
case 15:
|
|
444
|
-
|
|
676
|
+
_context1.next = 20;
|
|
445
677
|
break;
|
|
446
678
|
case 17:
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
679
|
+
_context1.prev = 17;
|
|
680
|
+
_context1.t1 = _context1["catch"](3);
|
|
681
|
+
_iterator2.e(_context1.t1);
|
|
450
682
|
case 20:
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
return
|
|
683
|
+
_context1.prev = 20;
|
|
684
|
+
_iterator2.f();
|
|
685
|
+
return _context1.finish(20);
|
|
454
686
|
case 23:
|
|
455
|
-
return
|
|
687
|
+
return _context1.abrupt("return", regionInfo);
|
|
456
688
|
case 24:
|
|
457
689
|
case "end":
|
|
458
|
-
return
|
|
690
|
+
return _context1.stop();
|
|
459
691
|
}
|
|
460
|
-
},
|
|
692
|
+
}, _callee9, this, [[3, 17, 20, 23]]);
|
|
461
693
|
}));
|
|
462
694
|
function getClientRegionInfo() {
|
|
463
695
|
return _getClientRegionInfo.apply(this, arguments);
|
|
@@ -471,15 +703,15 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
471
703
|
}, {
|
|
472
704
|
key: "getMobiusServers",
|
|
473
705
|
value: (function () {
|
|
474
|
-
var _getMobiusServers = (0, _asyncToGenerator2.default)(
|
|
706
|
+
var _getMobiusServers = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
|
|
475
707
|
var _this$sdkConfig3,
|
|
476
708
|
_this$sdkConfig3$disc,
|
|
477
709
|
_this$sdkConfig4,
|
|
478
710
|
_this$sdkConfig4$disc,
|
|
479
711
|
_this4 = this;
|
|
480
|
-
var useDefault, clientRegion, countryCode, _this$sdkConfig5, _this$sdkConfig5$disc, _this$sdkConfig6, _this$sdkConfig6$disc, regionInfo,
|
|
481
|
-
return _regenerator.default.wrap(function
|
|
482
|
-
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) {
|
|
483
715
|
case 0:
|
|
484
716
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
485
717
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
@@ -494,7 +726,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
494
726
|
*/
|
|
495
727
|
useDefault = false;
|
|
496
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)) {
|
|
497
|
-
|
|
729
|
+
_context10.next = 9;
|
|
498
730
|
break;
|
|
499
731
|
}
|
|
500
732
|
_Logger.default.log('Updating region and country from the SDK config', {
|
|
@@ -504,27 +736,30 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
504
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;
|
|
505
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;
|
|
506
738
|
this.mobiusHost = this.webex.internal.services._serviceUrls.mobius;
|
|
507
|
-
|
|
739
|
+
_context10.next = 15;
|
|
508
740
|
break;
|
|
509
741
|
case 9:
|
|
510
742
|
_Logger.default.log('Updating region and country through Region discovery', {
|
|
511
743
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
512
744
|
method: _constants2.GET_MOBIUS_SERVERS_UTIL
|
|
513
745
|
});
|
|
514
|
-
|
|
746
|
+
_context10.next = 12;
|
|
515
747
|
return this.getClientRegionInfo();
|
|
516
748
|
case 12:
|
|
517
|
-
regionInfo =
|
|
749
|
+
regionInfo = _context10.sent;
|
|
518
750
|
clientRegion = regionInfo.clientRegion;
|
|
519
751
|
countryCode = regionInfo.countryCode;
|
|
520
752
|
case 15:
|
|
521
753
|
if (!(clientRegion && countryCode)) {
|
|
522
|
-
|
|
754
|
+
_context10.next = 43;
|
|
523
755
|
break;
|
|
524
756
|
}
|
|
525
|
-
_Logger.default.log("Found Region: ".concat(clientRegion, " and country: ").concat(countryCode, ", going to fetch Mobius server"),
|
|
526
|
-
|
|
527
|
-
|
|
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;
|
|
528
763
|
return this.webex.request({
|
|
529
764
|
uri: "".concat(this.mobiusHost).concat(_constants2.URL_ENDPOINT, "?regionCode=").concat(clientRegion, "&countryCode=").concat(countryCode),
|
|
530
765
|
method: _types3.HTTP_METHODS.GET,
|
|
@@ -532,54 +767,75 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
532
767
|
service: _types3.ALLOWED_SERVICES.MOBIUS
|
|
533
768
|
});
|
|
534
769
|
case 20:
|
|
535
|
-
|
|
536
|
-
_Logger.default.log(
|
|
537
|
-
|
|
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
|
+
|
|
538
778
|
/* update arrays of Mobius Uris. */
|
|
539
779
|
mobiusUris = (0, _Utils.filterMobiusUris)(mobiusServers, this.mobiusHost);
|
|
540
780
|
this.primaryMobiusUris = mobiusUris.primary;
|
|
541
781
|
this.backupMobiusUris = mobiusUris.backup;
|
|
542
|
-
_Logger.default.
|
|
543
|
-
|
|
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;
|
|
544
787
|
break;
|
|
545
|
-
case
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
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));
|
|
549
792
|
_Logger.default.error(extendedError, {
|
|
550
793
|
method: _constants2.METHODS.GET_MOBIUS_SERVERS,
|
|
551
794
|
file: _constants2.CALLING_CLIENT_FILE
|
|
552
795
|
});
|
|
553
|
-
|
|
796
|
+
_context10.next = 36;
|
|
797
|
+
return (0, _Utils.handleCallingClientErrors)(_context10.t0, function (clientError) {
|
|
554
798
|
var _headers$trackingId2, _headers5;
|
|
555
|
-
_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);
|
|
556
800
|
_this4.emit(_types2.CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
|
|
557
801
|
}, {
|
|
558
802
|
method: _constants2.GET_MOBIUS_SERVERS_UTIL,
|
|
559
803
|
file: _constants2.CALLING_CLIENT_FILE
|
|
560
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:
|
|
561
814
|
useDefault = true;
|
|
562
|
-
case
|
|
563
|
-
|
|
815
|
+
case 41:
|
|
816
|
+
_context10.next = 44;
|
|
564
817
|
break;
|
|
565
|
-
case
|
|
818
|
+
case 43:
|
|
566
819
|
/* Setting this to true because region info is possibly undefined */
|
|
567
820
|
useDefault = true;
|
|
568
|
-
case
|
|
821
|
+
case 44:
|
|
569
822
|
/* Use a default URL if Mobius discovery fails either because of region info failure
|
|
570
823
|
* or because the discovered Mobius couldn't be reached
|
|
571
824
|
*/
|
|
572
825
|
|
|
573
826
|
if (useDefault) {
|
|
574
|
-
_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
|
+
});
|
|
575
831
|
this.mobiusHost = "https://".concat(this.mobiusClusters[0].host).concat(_constants2.API_V1);
|
|
576
832
|
this.primaryMobiusUris = ["".concat(this.mobiusHost).concat(_constants2.URL_ENDPOINT)];
|
|
577
833
|
}
|
|
578
|
-
case
|
|
834
|
+
case 45:
|
|
579
835
|
case "end":
|
|
580
|
-
return
|
|
836
|
+
return _context10.stop();
|
|
581
837
|
}
|
|
582
|
-
},
|
|
838
|
+
}, _callee0, this, [[17, 30]]);
|
|
583
839
|
}));
|
|
584
840
|
function getMobiusServers() {
|
|
585
841
|
return _getMobiusServers.apply(this, arguments);
|
|
@@ -630,25 +886,25 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
630
886
|
method: _constants2.METHODS.REGISTER_SESSIONS_LISTENER
|
|
631
887
|
});
|
|
632
888
|
this.sdkConnector.registerListener(_types2.MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE, /*#__PURE__*/function () {
|
|
633
|
-
var
|
|
889
|
+
var _ref6 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1(event) {
|
|
634
890
|
var sessionArr, i;
|
|
635
|
-
return _regenerator.default.wrap(function
|
|
636
|
-
while (1) switch (
|
|
891
|
+
return _regenerator.default.wrap(function _callee1$(_context11) {
|
|
892
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
637
893
|
case 0:
|
|
638
894
|
if (!(event && event.data.userSessions.userSessions)) {
|
|
639
|
-
|
|
895
|
+
_context11.next = 7;
|
|
640
896
|
break;
|
|
641
897
|
}
|
|
642
898
|
sessionArr = event === null || event === void 0 ? void 0 : event.data.userSessions.userSessions;
|
|
643
899
|
if (!(sessionArr.length === 1)) {
|
|
644
|
-
|
|
900
|
+
_context11.next = 5;
|
|
645
901
|
break;
|
|
646
902
|
}
|
|
647
903
|
if (!(sessionArr[0].sessionType !== _types2.SessionType.WEBEX_CALLING)) {
|
|
648
|
-
|
|
904
|
+
_context11.next = 5;
|
|
649
905
|
break;
|
|
650
906
|
}
|
|
651
|
-
return
|
|
907
|
+
return _context11.abrupt("return");
|
|
652
908
|
case 5:
|
|
653
909
|
for (i = 0; i < sessionArr.length; i += 1) {
|
|
654
910
|
if (sessionArr[i].sessionType !== _types2.SessionType.WEBEX_CALLING) {
|
|
@@ -658,12 +914,12 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
658
914
|
_this5.emit(_types2.CALLING_CLIENT_EVENT_KEYS.USER_SESSION_INFO, event);
|
|
659
915
|
case 7:
|
|
660
916
|
case "end":
|
|
661
|
-
return
|
|
917
|
+
return _context11.stop();
|
|
662
918
|
}
|
|
663
|
-
},
|
|
919
|
+
}, _callee1);
|
|
664
920
|
}));
|
|
665
921
|
return function (_x) {
|
|
666
|
-
return
|
|
922
|
+
return _ref6.apply(this, arguments);
|
|
667
923
|
};
|
|
668
924
|
}());
|
|
669
925
|
}
|
|
@@ -675,11 +931,11 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
675
931
|
}, {
|
|
676
932
|
key: "createLine",
|
|
677
933
|
value: (function () {
|
|
678
|
-
var _createLine = (0, _asyncToGenerator2.default)(
|
|
934
|
+
var _createLine = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
|
679
935
|
var _this$sdkConfig7, _this$sdkConfig8;
|
|
680
936
|
var line;
|
|
681
|
-
return _regenerator.default.wrap(function
|
|
682
|
-
while (1) switch (
|
|
937
|
+
return _regenerator.default.wrap(function _callee10$(_context12) {
|
|
938
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
683
939
|
case 0:
|
|
684
940
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
685
941
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
@@ -689,9 +945,9 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
689
945
|
this.lineDict[line.lineId] = line;
|
|
690
946
|
case 3:
|
|
691
947
|
case "end":
|
|
692
|
-
return
|
|
948
|
+
return _context12.stop();
|
|
693
949
|
}
|
|
694
|
-
},
|
|
950
|
+
}, _callee10, this);
|
|
695
951
|
}));
|
|
696
952
|
function createLine() {
|
|
697
953
|
return _createLine.apply(this, arguments);
|
|
@@ -756,27 +1012,27 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
756
1012
|
}, {
|
|
757
1013
|
key: "uploadLogs",
|
|
758
1014
|
value: (function () {
|
|
759
|
-
var _uploadLogs2 = (0, _asyncToGenerator2.default)(
|
|
1015
|
+
var _uploadLogs2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11() {
|
|
760
1016
|
var result;
|
|
761
|
-
return _regenerator.default.wrap(function
|
|
762
|
-
while (1) switch (
|
|
1017
|
+
return _regenerator.default.wrap(function _callee11$(_context13) {
|
|
1018
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
763
1019
|
case 0:
|
|
764
|
-
|
|
1020
|
+
_context13.next = 2;
|
|
765
1021
|
return (0, _Utils.uploadLogs)({}, true);
|
|
766
1022
|
case 2:
|
|
767
|
-
result =
|
|
1023
|
+
result = _context13.sent;
|
|
768
1024
|
if (result) {
|
|
769
|
-
|
|
1025
|
+
_context13.next = 5;
|
|
770
1026
|
break;
|
|
771
1027
|
}
|
|
772
1028
|
throw new Error('Failed to upload logs: No response received.');
|
|
773
1029
|
case 5:
|
|
774
|
-
return
|
|
1030
|
+
return _context13.abrupt("return", result);
|
|
775
1031
|
case 6:
|
|
776
1032
|
case "end":
|
|
777
|
-
return
|
|
1033
|
+
return _context13.stop();
|
|
778
1034
|
}
|
|
779
|
-
},
|
|
1035
|
+
}, _callee11);
|
|
780
1036
|
}));
|
|
781
1037
|
function uploadLogs() {
|
|
782
1038
|
return _uploadLogs2.apply(this, arguments);
|
|
@@ -792,24 +1048,24 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
792
1048
|
* @param config - Config to start the CallingClient with.
|
|
793
1049
|
*/
|
|
794
1050
|
var createClient = exports.createClient = /*#__PURE__*/function () {
|
|
795
|
-
var
|
|
1051
|
+
var _ref7 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(webex, config) {
|
|
796
1052
|
var callingClientInstance;
|
|
797
|
-
return _regenerator.default.wrap(function
|
|
798
|
-
while (1) switch (
|
|
1053
|
+
return _regenerator.default.wrap(function _callee12$(_context14) {
|
|
1054
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
799
1055
|
case 0:
|
|
800
1056
|
callingClientInstance = new CallingClient(webex, config);
|
|
801
|
-
|
|
1057
|
+
_context14.next = 3;
|
|
802
1058
|
return callingClientInstance.init();
|
|
803
1059
|
case 3:
|
|
804
|
-
return
|
|
1060
|
+
return _context14.abrupt("return", callingClientInstance);
|
|
805
1061
|
case 4:
|
|
806
1062
|
case "end":
|
|
807
|
-
return
|
|
1063
|
+
return _context14.stop();
|
|
808
1064
|
}
|
|
809
|
-
},
|
|
1065
|
+
}, _callee12);
|
|
810
1066
|
}));
|
|
811
1067
|
return function createClient(_x2, _x3) {
|
|
812
|
-
return
|
|
1068
|
+
return _ref7.apply(this, arguments);
|
|
813
1069
|
};
|
|
814
1070
|
}();
|
|
815
1071
|
//# sourceMappingURL=CallingClient.js.map
|