@webex/calling 3.8.1 → 3.9.0-multi-llms.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 +530 -219
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +500 -291
- 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 +11 -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 +12 -17
- 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 +557 -442
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +526 -395
- 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 +116 -0
- package/dist/CallingClient/registration/webWorker.js.map +1 -0
- package/dist/CallingClient/registration/webWorker.test.js +256 -0
- package/dist/CallingClient/registration/webWorker.test.js.map +1 -0
- package/dist/CallingClient/registration/webWorkerStr.js +15 -0
- package/dist/CallingClient/registration/webWorkerStr.js.map +1 -0
- 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 +2 -0
- 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 +175 -86
- package/dist/Metrics/index.js.map +1 -1
- package/dist/Metrics/index.test.js +70 -4
- 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 +125 -99
- 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 +8 -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 +199 -42
- package/dist/module/CallingClient/calling/call.js +79 -43
- package/dist/module/CallingClient/constants.js +10 -6
- package/dist/module/CallingClient/line/index.js +3 -3
- package/dist/module/CallingClient/registration/register.js +111 -72
- package/dist/module/CallingClient/registration/webWorker.js +60 -0
- package/dist/module/CallingClient/registration/webWorkerStr.js +93 -0
- 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/Errors/types.js +2 -0
- package/dist/module/Metrics/index.js +94 -33
- 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 +37 -12
- package/dist/module/common/types.js +7 -0
- 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 +10 -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 +2 -2
- 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 +3 -0
- package/dist/types/CallingClient/registration/webWorker.d.ts.map +1 -0
- package/dist/types/CallingClient/registration/webWorkerStr.d.ts +3 -0
- package/dist/types/CallingClient/registration/webWorkerStr.d.ts.map +1 -0
- 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/Errors/types.d.ts +2 -0
- package/dist/types/Errors/types.d.ts.map +1 -1
- package/dist/types/Metrics/index.d.ts.map +1 -1
- package/dist/types/Metrics/types.d.ts +20 -4
- 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 +13 -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();
|
|
@@ -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,159 +408,288 @@ 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
|
|
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
|
-
|
|
339
|
-
|
|
340
|
-
|
|
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) {
|
|
567
|
+
case 0:
|
|
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;
|
|
576
|
+
return _this3.webex.request({
|
|
577
|
+
uri: "".concat(_this3.mobiusHost).concat(_constants2.URL_ENDPOINT).concat(_constants2.IP_ENDPOINT),
|
|
578
|
+
method: _types3.HTTP_METHODS.GET,
|
|
579
|
+
headers: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants2.CISCO_DEVICE_URL, _this3.webex.internal.device.url), _constants2.SPARK_USER_AGENT, _constants2.CALLING_USER_AGENT),
|
|
580
|
+
service: _types3.ALLOWED_SERVICES.MOBIUS
|
|
581
|
+
});
|
|
582
|
+
case 5:
|
|
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
|
+
});
|
|
588
|
+
myIP = temp.body.ipv4; // eslint-disable-next-line no-await-in-loop
|
|
589
|
+
_context0.next = 10;
|
|
590
|
+
return _this3.webex.request({
|
|
591
|
+
uri: "".concat(_constants2.DISCOVERY_URL, "/").concat(myIP),
|
|
592
|
+
method: _types3.HTTP_METHODS.GET,
|
|
593
|
+
addAuthHeader: false,
|
|
594
|
+
headers: (0, _defineProperty2.default)({}, _constants2.SPARK_USER_AGENT, null)
|
|
595
|
+
});
|
|
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
|
+
});
|
|
602
|
+
clientRegionInfo = response.body;
|
|
603
|
+
regionInfo.clientRegion = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.clientRegion ? clientRegionInfo.clientRegion : '';
|
|
604
|
+
regionInfo.countryCode = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.countryCode ? clientRegionInfo.countryCode : '';
|
|
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));
|
|
617
|
+
_Logger.default.error(extendedError, {
|
|
618
|
+
method: _constants2.METHODS.GET_CLIENT_REGION_INFO,
|
|
619
|
+
file: _constants2.CALLING_CLIENT_FILE
|
|
620
|
+
});
|
|
621
|
+
|
|
622
|
+
// eslint-disable-next-line no-await-in-loop
|
|
623
|
+
_context0.next = 26;
|
|
624
|
+
return (0, _Utils.handleCallingClientErrors)(_context0.t0, function (clientError) {
|
|
625
|
+
var _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);
|
|
627
|
+
_this3.emit(_types2.CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
|
|
628
|
+
}, {
|
|
629
|
+
method: _constants2.GET_MOBIUS_SERVERS_UTIL,
|
|
630
|
+
file: _constants2.CALLING_CLIENT_FILE
|
|
631
|
+
});
|
|
632
|
+
case 26:
|
|
633
|
+
abort = _context0.sent;
|
|
634
|
+
regionInfo.clientRegion = '';
|
|
635
|
+
regionInfo.countryCode = '';
|
|
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:
|
|
647
|
+
case "end":
|
|
648
|
+
return _context0.stop();
|
|
649
|
+
}
|
|
650
|
+
}, _loop2, null, [[2, 20]]);
|
|
651
|
+
});
|
|
652
|
+
_iterator2.s();
|
|
653
|
+
case 6:
|
|
654
|
+
if ((_step2 = _iterator2.n()).done) {
|
|
655
|
+
_context1.next = 15;
|
|
341
656
|
break;
|
|
342
657
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
service: _types3.ALLOWED_SERVICES.MOBIUS
|
|
352
|
-
});
|
|
658
|
+
return _context1.delegateYield(_loop2(), "t0", 8);
|
|
659
|
+
case 8:
|
|
660
|
+
_ret = _context1.t0;
|
|
661
|
+
if (!(_ret === 0)) {
|
|
662
|
+
_context1.next = 11;
|
|
663
|
+
break;
|
|
664
|
+
}
|
|
665
|
+
return _context1.abrupt("break", 15);
|
|
353
666
|
case 11:
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
headers: (0, _defineProperty2.default)({}, _constants2.SPARK_USER_AGENT, null)
|
|
362
|
-
});
|
|
363
|
-
case 15:
|
|
364
|
-
response = _context6.sent;
|
|
365
|
-
clientRegionInfo = response.body;
|
|
366
|
-
regionInfo.clientRegion = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.clientRegion ? clientRegionInfo.clientRegion : '';
|
|
367
|
-
regionInfo.countryCode = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.countryCode ? clientRegionInfo.countryCode : '';
|
|
368
|
-
return _context6.abrupt("break", 31);
|
|
369
|
-
case 22:
|
|
370
|
-
_context6.prev = 22;
|
|
371
|
-
_context6.t0 = _context6["catch"](8);
|
|
372
|
-
extendedError = new Error("Failed to get client region info: ".concat(_context6.t0));
|
|
373
|
-
_Logger.default.error(extendedError, {
|
|
374
|
-
method: _constants2.METHODS.GET_CLIENT_REGION_INFO,
|
|
375
|
-
file: _constants2.CALLING_CLIENT_FILE
|
|
376
|
-
});
|
|
377
|
-
(0, _Utils.handleCallingClientErrors)(_context6.t0, function (clientError) {
|
|
378
|
-
_this3.metricManager.submitRegistrationMetric(_types4.METRIC_EVENT.REGISTRATION_ERROR, _types4.REG_ACTION.REGISTER, _types4.METRIC_TYPE.BEHAVIORAL, clientError);
|
|
379
|
-
_this3.emit(_types2.CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
|
|
380
|
-
}, {
|
|
381
|
-
method: _constants2.GET_MOBIUS_SERVERS_UTIL,
|
|
382
|
-
file: _constants2.CALLING_CLIENT_FILE
|
|
383
|
-
});
|
|
384
|
-
regionInfo.clientRegion = '';
|
|
385
|
-
regionInfo.countryCode = '';
|
|
386
|
-
case 29:
|
|
387
|
-
_context6.next = 5;
|
|
667
|
+
if (!_ret) {
|
|
668
|
+
_context1.next = 13;
|
|
669
|
+
break;
|
|
670
|
+
}
|
|
671
|
+
return _context1.abrupt("return", _ret.v);
|
|
672
|
+
case 13:
|
|
673
|
+
_context1.next = 6;
|
|
388
674
|
break;
|
|
389
|
-
case
|
|
390
|
-
|
|
675
|
+
case 15:
|
|
676
|
+
_context1.next = 20;
|
|
391
677
|
break;
|
|
392
|
-
case
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
case
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
return
|
|
400
|
-
case
|
|
401
|
-
return
|
|
402
|
-
case
|
|
678
|
+
case 17:
|
|
679
|
+
_context1.prev = 17;
|
|
680
|
+
_context1.t1 = _context1["catch"](3);
|
|
681
|
+
_iterator2.e(_context1.t1);
|
|
682
|
+
case 20:
|
|
683
|
+
_context1.prev = 20;
|
|
684
|
+
_iterator2.f();
|
|
685
|
+
return _context1.finish(20);
|
|
686
|
+
case 23:
|
|
687
|
+
return _context1.abrupt("return", regionInfo);
|
|
688
|
+
case 24:
|
|
403
689
|
case "end":
|
|
404
|
-
return
|
|
690
|
+
return _context1.stop();
|
|
405
691
|
}
|
|
406
|
-
},
|
|
692
|
+
}, _callee9, this, [[3, 17, 20, 23]]);
|
|
407
693
|
}));
|
|
408
694
|
function getClientRegionInfo() {
|
|
409
695
|
return _getClientRegionInfo.apply(this, arguments);
|
|
@@ -417,15 +703,15 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
417
703
|
}, {
|
|
418
704
|
key: "getMobiusServers",
|
|
419
705
|
value: (function () {
|
|
420
|
-
var _getMobiusServers = (0, _asyncToGenerator2.default)(
|
|
706
|
+
var _getMobiusServers = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
|
|
421
707
|
var _this$sdkConfig3,
|
|
422
708
|
_this$sdkConfig3$disc,
|
|
423
709
|
_this$sdkConfig4,
|
|
424
710
|
_this$sdkConfig4$disc,
|
|
425
711
|
_this4 = this;
|
|
426
|
-
var useDefault, clientRegion, countryCode, _this$sdkConfig5, _this$sdkConfig5$disc, _this$sdkConfig6, _this$sdkConfig6$disc, regionInfo,
|
|
427
|
-
return _regenerator.default.wrap(function
|
|
428
|
-
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) {
|
|
429
715
|
case 0:
|
|
430
716
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
431
717
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
@@ -440,7 +726,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
440
726
|
*/
|
|
441
727
|
useDefault = false;
|
|
442
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)) {
|
|
443
|
-
|
|
729
|
+
_context10.next = 9;
|
|
444
730
|
break;
|
|
445
731
|
}
|
|
446
732
|
_Logger.default.log('Updating region and country from the SDK config', {
|
|
@@ -450,27 +736,30 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
450
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;
|
|
451
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;
|
|
452
738
|
this.mobiusHost = this.webex.internal.services._serviceUrls.mobius;
|
|
453
|
-
|
|
739
|
+
_context10.next = 15;
|
|
454
740
|
break;
|
|
455
741
|
case 9:
|
|
456
742
|
_Logger.default.log('Updating region and country through Region discovery', {
|
|
457
743
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
458
744
|
method: _constants2.GET_MOBIUS_SERVERS_UTIL
|
|
459
745
|
});
|
|
460
|
-
|
|
746
|
+
_context10.next = 12;
|
|
461
747
|
return this.getClientRegionInfo();
|
|
462
748
|
case 12:
|
|
463
|
-
regionInfo =
|
|
749
|
+
regionInfo = _context10.sent;
|
|
464
750
|
clientRegion = regionInfo.clientRegion;
|
|
465
751
|
countryCode = regionInfo.countryCode;
|
|
466
752
|
case 15:
|
|
467
753
|
if (!(clientRegion && countryCode)) {
|
|
468
|
-
|
|
754
|
+
_context10.next = 43;
|
|
469
755
|
break;
|
|
470
756
|
}
|
|
471
|
-
_Logger.default.log("Found Region: ".concat(clientRegion, " and country: ").concat(countryCode, ", going to fetch Mobius server"),
|
|
472
|
-
|
|
473
|
-
|
|
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;
|
|
474
763
|
return this.webex.request({
|
|
475
764
|
uri: "".concat(this.mobiusHost).concat(_constants2.URL_ENDPOINT, "?regionCode=").concat(clientRegion, "&countryCode=").concat(countryCode),
|
|
476
765
|
method: _types3.HTTP_METHODS.GET,
|
|
@@ -478,53 +767,75 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
478
767
|
service: _types3.ALLOWED_SERVICES.MOBIUS
|
|
479
768
|
});
|
|
480
769
|
case 20:
|
|
481
|
-
|
|
482
|
-
_Logger.default.log(
|
|
483
|
-
|
|
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
|
+
|
|
484
778
|
/* update arrays of Mobius Uris. */
|
|
485
779
|
mobiusUris = (0, _Utils.filterMobiusUris)(mobiusServers, this.mobiusHost);
|
|
486
780
|
this.primaryMobiusUris = mobiusUris.primary;
|
|
487
781
|
this.backupMobiusUris = mobiusUris.backup;
|
|
488
|
-
_Logger.default.
|
|
489
|
-
|
|
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;
|
|
490
787
|
break;
|
|
491
|
-
case
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
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));
|
|
495
792
|
_Logger.default.error(extendedError, {
|
|
496
793
|
method: _constants2.METHODS.GET_MOBIUS_SERVERS,
|
|
497
794
|
file: _constants2.CALLING_CLIENT_FILE
|
|
498
795
|
});
|
|
499
|
-
|
|
500
|
-
|
|
796
|
+
_context10.next = 36;
|
|
797
|
+
return (0, _Utils.handleCallingClientErrors)(_context10.t0, function (clientError) {
|
|
798
|
+
var _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);
|
|
501
800
|
_this4.emit(_types2.CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
|
|
502
801
|
}, {
|
|
503
802
|
method: _constants2.GET_MOBIUS_SERVERS_UTIL,
|
|
504
803
|
file: _constants2.CALLING_CLIENT_FILE
|
|
505
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:
|
|
506
814
|
useDefault = true;
|
|
507
|
-
case
|
|
508
|
-
|
|
815
|
+
case 41:
|
|
816
|
+
_context10.next = 44;
|
|
509
817
|
break;
|
|
510
|
-
case
|
|
818
|
+
case 43:
|
|
511
819
|
/* Setting this to true because region info is possibly undefined */
|
|
512
820
|
useDefault = true;
|
|
513
|
-
case
|
|
821
|
+
case 44:
|
|
514
822
|
/* Use a default URL if Mobius discovery fails either because of region info failure
|
|
515
823
|
* or because the discovered Mobius couldn't be reached
|
|
516
824
|
*/
|
|
517
825
|
|
|
518
826
|
if (useDefault) {
|
|
519
|
-
_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
|
+
});
|
|
520
831
|
this.mobiusHost = "https://".concat(this.mobiusClusters[0].host).concat(_constants2.API_V1);
|
|
521
832
|
this.primaryMobiusUris = ["".concat(this.mobiusHost).concat(_constants2.URL_ENDPOINT)];
|
|
522
833
|
}
|
|
523
|
-
case
|
|
834
|
+
case 45:
|
|
524
835
|
case "end":
|
|
525
|
-
return
|
|
836
|
+
return _context10.stop();
|
|
526
837
|
}
|
|
527
|
-
},
|
|
838
|
+
}, _callee0, this, [[17, 30]]);
|
|
528
839
|
}));
|
|
529
840
|
function getMobiusServers() {
|
|
530
841
|
return _getMobiusServers.apply(this, arguments);
|
|
@@ -575,25 +886,25 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
575
886
|
method: _constants2.METHODS.REGISTER_SESSIONS_LISTENER
|
|
576
887
|
});
|
|
577
888
|
this.sdkConnector.registerListener(_types2.MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE, /*#__PURE__*/function () {
|
|
578
|
-
var
|
|
889
|
+
var _ref6 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1(event) {
|
|
579
890
|
var sessionArr, i;
|
|
580
|
-
return _regenerator.default.wrap(function
|
|
581
|
-
while (1) switch (
|
|
891
|
+
return _regenerator.default.wrap(function _callee1$(_context11) {
|
|
892
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
582
893
|
case 0:
|
|
583
894
|
if (!(event && event.data.userSessions.userSessions)) {
|
|
584
|
-
|
|
895
|
+
_context11.next = 7;
|
|
585
896
|
break;
|
|
586
897
|
}
|
|
587
898
|
sessionArr = event === null || event === void 0 ? void 0 : event.data.userSessions.userSessions;
|
|
588
899
|
if (!(sessionArr.length === 1)) {
|
|
589
|
-
|
|
900
|
+
_context11.next = 5;
|
|
590
901
|
break;
|
|
591
902
|
}
|
|
592
903
|
if (!(sessionArr[0].sessionType !== _types2.SessionType.WEBEX_CALLING)) {
|
|
593
|
-
|
|
904
|
+
_context11.next = 5;
|
|
594
905
|
break;
|
|
595
906
|
}
|
|
596
|
-
return
|
|
907
|
+
return _context11.abrupt("return");
|
|
597
908
|
case 5:
|
|
598
909
|
for (i = 0; i < sessionArr.length; i += 1) {
|
|
599
910
|
if (sessionArr[i].sessionType !== _types2.SessionType.WEBEX_CALLING) {
|
|
@@ -603,12 +914,12 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
603
914
|
_this5.emit(_types2.CALLING_CLIENT_EVENT_KEYS.USER_SESSION_INFO, event);
|
|
604
915
|
case 7:
|
|
605
916
|
case "end":
|
|
606
|
-
return
|
|
917
|
+
return _context11.stop();
|
|
607
918
|
}
|
|
608
|
-
},
|
|
919
|
+
}, _callee1);
|
|
609
920
|
}));
|
|
610
921
|
return function (_x) {
|
|
611
|
-
return
|
|
922
|
+
return _ref6.apply(this, arguments);
|
|
612
923
|
};
|
|
613
924
|
}());
|
|
614
925
|
}
|
|
@@ -620,11 +931,11 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
620
931
|
}, {
|
|
621
932
|
key: "createLine",
|
|
622
933
|
value: (function () {
|
|
623
|
-
var _createLine = (0, _asyncToGenerator2.default)(
|
|
934
|
+
var _createLine = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
|
624
935
|
var _this$sdkConfig7, _this$sdkConfig8;
|
|
625
936
|
var line;
|
|
626
|
-
return _regenerator.default.wrap(function
|
|
627
|
-
while (1) switch (
|
|
937
|
+
return _regenerator.default.wrap(function _callee10$(_context12) {
|
|
938
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
628
939
|
case 0:
|
|
629
940
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
630
941
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
@@ -634,9 +945,9 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
634
945
|
this.lineDict[line.lineId] = line;
|
|
635
946
|
case 3:
|
|
636
947
|
case "end":
|
|
637
|
-
return
|
|
948
|
+
return _context12.stop();
|
|
638
949
|
}
|
|
639
|
-
},
|
|
950
|
+
}, _callee10, this);
|
|
640
951
|
}));
|
|
641
952
|
function createLine() {
|
|
642
953
|
return _createLine.apply(this, arguments);
|
|
@@ -701,27 +1012,27 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
701
1012
|
}, {
|
|
702
1013
|
key: "uploadLogs",
|
|
703
1014
|
value: (function () {
|
|
704
|
-
var _uploadLogs2 = (0, _asyncToGenerator2.default)(
|
|
1015
|
+
var _uploadLogs2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11() {
|
|
705
1016
|
var result;
|
|
706
|
-
return _regenerator.default.wrap(function
|
|
707
|
-
while (1) switch (
|
|
1017
|
+
return _regenerator.default.wrap(function _callee11$(_context13) {
|
|
1018
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
708
1019
|
case 0:
|
|
709
|
-
|
|
1020
|
+
_context13.next = 2;
|
|
710
1021
|
return (0, _Utils.uploadLogs)({}, true);
|
|
711
1022
|
case 2:
|
|
712
|
-
result =
|
|
1023
|
+
result = _context13.sent;
|
|
713
1024
|
if (result) {
|
|
714
|
-
|
|
1025
|
+
_context13.next = 5;
|
|
715
1026
|
break;
|
|
716
1027
|
}
|
|
717
1028
|
throw new Error('Failed to upload logs: No response received.');
|
|
718
1029
|
case 5:
|
|
719
|
-
return
|
|
1030
|
+
return _context13.abrupt("return", result);
|
|
720
1031
|
case 6:
|
|
721
1032
|
case "end":
|
|
722
|
-
return
|
|
1033
|
+
return _context13.stop();
|
|
723
1034
|
}
|
|
724
|
-
},
|
|
1035
|
+
}, _callee11);
|
|
725
1036
|
}));
|
|
726
1037
|
function uploadLogs() {
|
|
727
1038
|
return _uploadLogs2.apply(this, arguments);
|
|
@@ -737,24 +1048,24 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
737
1048
|
* @param config - Config to start the CallingClient with.
|
|
738
1049
|
*/
|
|
739
1050
|
var createClient = exports.createClient = /*#__PURE__*/function () {
|
|
740
|
-
var
|
|
1051
|
+
var _ref7 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(webex, config) {
|
|
741
1052
|
var callingClientInstance;
|
|
742
|
-
return _regenerator.default.wrap(function
|
|
743
|
-
while (1) switch (
|
|
1053
|
+
return _regenerator.default.wrap(function _callee12$(_context14) {
|
|
1054
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
744
1055
|
case 0:
|
|
745
1056
|
callingClientInstance = new CallingClient(webex, config);
|
|
746
|
-
|
|
1057
|
+
_context14.next = 3;
|
|
747
1058
|
return callingClientInstance.init();
|
|
748
1059
|
case 3:
|
|
749
|
-
return
|
|
1060
|
+
return _context14.abrupt("return", callingClientInstance);
|
|
750
1061
|
case 4:
|
|
751
1062
|
case "end":
|
|
752
|
-
return
|
|
1063
|
+
return _context14.stop();
|
|
753
1064
|
}
|
|
754
|
-
},
|
|
1065
|
+
}, _callee12);
|
|
755
1066
|
}));
|
|
756
1067
|
return function createClient(_x2, _x3) {
|
|
757
|
-
return
|
|
1068
|
+
return _ref7.apply(this, arguments);
|
|
758
1069
|
};
|
|
759
1070
|
}();
|
|
760
1071
|
//# sourceMappingURL=CallingClient.js.map
|