@webex/calling 3.8.1 → 3.9.0-webinar5k.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/CallSettings/WxCallBackendConnector.js +2 -2
- package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.test.js +94 -27
- package/dist/CallSettings/WxCallBackendConnector.test.js.map +1 -1
- package/dist/CallSettings/types.js.map +1 -1
- package/dist/CallingClient/CallingClient.js +160 -105
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +168 -102
- package/dist/CallingClient/CallingClient.test.js.map +1 -1
- package/dist/CallingClient/constants.js +3 -3
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/CallingClient/line/line.test.js +4 -10
- package/dist/CallingClient/line/line.test.js.map +1 -1
- package/dist/CallingClient/registration/register.js +486 -380
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +441 -309
- package/dist/CallingClient/registration/register.test.js.map +1 -1
- package/dist/CallingClient/registration/types.js.map +1 -1
- package/dist/CallingClient/registration/webWorker.js +115 -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/Errors/types.js +2 -0
- package/dist/Errors/types.js.map +1 -1
- package/dist/Metrics/index.js +9 -2
- package/dist/Metrics/index.js.map +1 -1
- package/dist/Metrics/index.test.js +10 -4
- package/dist/Metrics/index.test.js.map +1 -1
- package/dist/Metrics/types.js.map +1 -1
- package/dist/common/Utils.js +41 -34
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +265 -119
- package/dist/common/Utils.test.js.map +1 -1
- package/dist/common/types.js +8 -1
- package/dist/common/types.js.map +1 -1
- package/dist/module/CallSettings/WxCallBackendConnector.js +1 -1
- package/dist/module/CallingClient/CallingClient.js +25 -10
- package/dist/module/CallingClient/constants.js +2 -2
- package/dist/module/CallingClient/registration/register.js +101 -65
- package/dist/module/CallingClient/registration/webWorker.js +59 -0
- package/dist/module/CallingClient/registration/webWorkerStr.js +93 -0
- package/dist/module/Errors/types.js +2 -0
- package/dist/module/Metrics/index.js +8 -1
- package/dist/module/common/Utils.js +10 -2
- package/dist/module/common/types.js +7 -0
- 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.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +2 -2
- package/dist/types/CallingClient/constants.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 +2 -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/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 +2 -1
- package/dist/types/Metrics/types.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/dist/types/common/types.d.ts +12 -0
- package/dist/types/common/types.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -203,7 +203,19 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
203
203
|
method: _this.constructor.name
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
-
|
|
206
|
+
|
|
207
|
+
// TODO: This is a temp fix - https://jira-eng-sjc12.cisco.com/jira/browse/CAI-6809
|
|
208
|
+
if (_this.webex.internal.services._hostCatalog) {
|
|
209
|
+
_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];
|
|
210
|
+
} else {
|
|
211
|
+
// @ts-ignore
|
|
212
|
+
var mobiusObject = _this.webex.internal.services._services.find(
|
|
213
|
+
// @ts-ignore
|
|
214
|
+
function (item) {
|
|
215
|
+
return item.serviceName === 'mobius';
|
|
216
|
+
});
|
|
217
|
+
_this.mobiusClusters = [mobiusObject.serviceUrls[0].baseUrl];
|
|
218
|
+
}
|
|
207
219
|
_this.mobiusHost = '';
|
|
208
220
|
_this.registerSessionsListener();
|
|
209
221
|
_this.registerCallsClearedListener();
|
|
@@ -323,9 +335,9 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
323
335
|
value: (function () {
|
|
324
336
|
var _getClientRegionInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
325
337
|
var _this3 = this;
|
|
326
|
-
var regionInfo, _iterator, _step,
|
|
327
|
-
return _regenerator.default.wrap(function _callee6$(
|
|
328
|
-
while (1) switch (
|
|
338
|
+
var abort, regionInfo, _iterator, _step, _loop, _ret;
|
|
339
|
+
return _regenerator.default.wrap(function _callee6$(_context7) {
|
|
340
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
329
341
|
case 0:
|
|
330
342
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
331
343
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
@@ -333,77 +345,119 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
333
345
|
});
|
|
334
346
|
regionInfo = {};
|
|
335
347
|
_iterator = _createForOfIteratorHelper(this.mobiusClusters);
|
|
336
|
-
|
|
348
|
+
_context7.prev = 3;
|
|
349
|
+
_loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
|
|
350
|
+
var mobius, temp, myIP, response, clientRegionInfo, extendedError;
|
|
351
|
+
return _regenerator.default.wrap(function _loop$(_context6) {
|
|
352
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
353
|
+
case 0:
|
|
354
|
+
mobius = _step.value;
|
|
355
|
+
if (mobius.host) {
|
|
356
|
+
_this3.mobiusHost = "https://".concat(mobius.host).concat(_constants2.API_V1);
|
|
357
|
+
} else {
|
|
358
|
+
_this3.mobiusHost = mobius;
|
|
359
|
+
}
|
|
360
|
+
_context6.prev = 2;
|
|
361
|
+
_context6.next = 5;
|
|
362
|
+
return _this3.webex.request({
|
|
363
|
+
uri: "".concat(_this3.mobiusHost).concat(_constants2.URL_ENDPOINT).concat(_constants2.IP_ENDPOINT),
|
|
364
|
+
method: _types3.HTTP_METHODS.GET,
|
|
365
|
+
headers: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants2.CISCO_DEVICE_URL, _this3.webex.internal.device.url), _constants2.SPARK_USER_AGENT, _constants2.CALLING_USER_AGENT),
|
|
366
|
+
service: _types3.ALLOWED_SERVICES.MOBIUS
|
|
367
|
+
});
|
|
368
|
+
case 5:
|
|
369
|
+
temp = _context6.sent;
|
|
370
|
+
myIP = temp.body.ipv4; // eslint-disable-next-line no-await-in-loop
|
|
371
|
+
_context6.next = 9;
|
|
372
|
+
return _this3.webex.request({
|
|
373
|
+
uri: "".concat(_constants2.DISCOVERY_URL, "/").concat(myIP),
|
|
374
|
+
method: _types3.HTTP_METHODS.GET,
|
|
375
|
+
addAuthHeader: false,
|
|
376
|
+
headers: (0, _defineProperty2.default)({}, _constants2.SPARK_USER_AGENT, null)
|
|
377
|
+
});
|
|
378
|
+
case 9:
|
|
379
|
+
response = _context6.sent;
|
|
380
|
+
clientRegionInfo = response.body;
|
|
381
|
+
regionInfo.clientRegion = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.clientRegion ? clientRegionInfo.clientRegion : '';
|
|
382
|
+
regionInfo.countryCode = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.countryCode ? clientRegionInfo.countryCode : '';
|
|
383
|
+
return _context6.abrupt("return", 0);
|
|
384
|
+
case 16:
|
|
385
|
+
_context6.prev = 16;
|
|
386
|
+
_context6.t0 = _context6["catch"](2);
|
|
387
|
+
extendedError = new Error("Failed to get client region info: ".concat(_context6.t0));
|
|
388
|
+
_Logger.default.error(extendedError, {
|
|
389
|
+
method: _constants2.METHODS.GET_CLIENT_REGION_INFO,
|
|
390
|
+
file: _constants2.CALLING_CLIENT_FILE
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
// eslint-disable-next-line no-await-in-loop
|
|
394
|
+
_context6.next = 22;
|
|
395
|
+
return (0, _Utils.handleCallingClientErrors)(_context6.t0, function (clientError) {
|
|
396
|
+
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 = _context6.t0.headers) === null || _headers3 === void 0 ? void 0 : _headers3.trackingId) !== null && _headers$trackingId !== void 0 ? _headers$trackingId : '', undefined, clientError);
|
|
398
|
+
_this3.emit(_types2.CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
|
|
399
|
+
}, {
|
|
400
|
+
method: _constants2.GET_MOBIUS_SERVERS_UTIL,
|
|
401
|
+
file: _constants2.CALLING_CLIENT_FILE
|
|
402
|
+
});
|
|
403
|
+
case 22:
|
|
404
|
+
abort = _context6.sent;
|
|
405
|
+
regionInfo.clientRegion = '';
|
|
406
|
+
regionInfo.countryCode = '';
|
|
407
|
+
if (!abort) {
|
|
408
|
+
_context6.next = 27;
|
|
409
|
+
break;
|
|
410
|
+
}
|
|
411
|
+
return _context6.abrupt("return", {
|
|
412
|
+
v: regionInfo
|
|
413
|
+
});
|
|
414
|
+
case 27:
|
|
415
|
+
case "end":
|
|
416
|
+
return _context6.stop();
|
|
417
|
+
}
|
|
418
|
+
}, _loop, null, [[2, 16]]);
|
|
419
|
+
});
|
|
337
420
|
_iterator.s();
|
|
338
|
-
case
|
|
421
|
+
case 6:
|
|
339
422
|
if ((_step = _iterator.n()).done) {
|
|
340
|
-
|
|
423
|
+
_context7.next = 15;
|
|
341
424
|
break;
|
|
342
425
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
service: _types3.ALLOWED_SERVICES.MOBIUS
|
|
352
|
-
});
|
|
426
|
+
return _context7.delegateYield(_loop(), "t0", 8);
|
|
427
|
+
case 8:
|
|
428
|
+
_ret = _context7.t0;
|
|
429
|
+
if (!(_ret === 0)) {
|
|
430
|
+
_context7.next = 11;
|
|
431
|
+
break;
|
|
432
|
+
}
|
|
433
|
+
return _context7.abrupt("break", 15);
|
|
353
434
|
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;
|
|
435
|
+
if (!_ret) {
|
|
436
|
+
_context7.next = 13;
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
return _context7.abrupt("return", _ret.v);
|
|
440
|
+
case 13:
|
|
441
|
+
_context7.next = 6;
|
|
388
442
|
break;
|
|
389
|
-
case
|
|
390
|
-
|
|
443
|
+
case 15:
|
|
444
|
+
_context7.next = 20;
|
|
391
445
|
break;
|
|
392
|
-
case
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
_iterator.e(
|
|
396
|
-
case
|
|
397
|
-
|
|
446
|
+
case 17:
|
|
447
|
+
_context7.prev = 17;
|
|
448
|
+
_context7.t1 = _context7["catch"](3);
|
|
449
|
+
_iterator.e(_context7.t1);
|
|
450
|
+
case 20:
|
|
451
|
+
_context7.prev = 20;
|
|
398
452
|
_iterator.f();
|
|
399
|
-
return
|
|
400
|
-
case
|
|
401
|
-
return
|
|
402
|
-
case
|
|
453
|
+
return _context7.finish(20);
|
|
454
|
+
case 23:
|
|
455
|
+
return _context7.abrupt("return", regionInfo);
|
|
456
|
+
case 24:
|
|
403
457
|
case "end":
|
|
404
|
-
return
|
|
458
|
+
return _context7.stop();
|
|
405
459
|
}
|
|
406
|
-
}, _callee6, this, [[3,
|
|
460
|
+
}, _callee6, this, [[3, 17, 20, 23]]);
|
|
407
461
|
}));
|
|
408
462
|
function getClientRegionInfo() {
|
|
409
463
|
return _getClientRegionInfo.apply(this, arguments);
|
|
@@ -424,8 +478,8 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
424
478
|
_this$sdkConfig4$disc,
|
|
425
479
|
_this4 = this;
|
|
426
480
|
var useDefault, clientRegion, countryCode, _this$sdkConfig5, _this$sdkConfig5$disc, _this$sdkConfig6, _this$sdkConfig6$disc, regionInfo, temp, mobiusServers, mobiusUris, extendedError;
|
|
427
|
-
return _regenerator.default.wrap(function _callee7$(
|
|
428
|
-
while (1) switch (
|
|
481
|
+
return _regenerator.default.wrap(function _callee7$(_context8) {
|
|
482
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
429
483
|
case 0:
|
|
430
484
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
431
485
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
@@ -440,7 +494,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
440
494
|
*/
|
|
441
495
|
useDefault = false;
|
|
442
496
|
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
|
-
|
|
497
|
+
_context8.next = 9;
|
|
444
498
|
break;
|
|
445
499
|
}
|
|
446
500
|
_Logger.default.log('Updating region and country from the SDK config', {
|
|
@@ -450,27 +504,27 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
450
504
|
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
505
|
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
506
|
this.mobiusHost = this.webex.internal.services._serviceUrls.mobius;
|
|
453
|
-
|
|
507
|
+
_context8.next = 15;
|
|
454
508
|
break;
|
|
455
509
|
case 9:
|
|
456
510
|
_Logger.default.log('Updating region and country through Region discovery', {
|
|
457
511
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
458
512
|
method: _constants2.GET_MOBIUS_SERVERS_UTIL
|
|
459
513
|
});
|
|
460
|
-
|
|
514
|
+
_context8.next = 12;
|
|
461
515
|
return this.getClientRegionInfo();
|
|
462
516
|
case 12:
|
|
463
|
-
regionInfo =
|
|
517
|
+
regionInfo = _context8.sent;
|
|
464
518
|
clientRegion = regionInfo.clientRegion;
|
|
465
519
|
countryCode = regionInfo.countryCode;
|
|
466
520
|
case 15:
|
|
467
521
|
if (!(clientRegion && countryCode)) {
|
|
468
|
-
|
|
522
|
+
_context8.next = 37;
|
|
469
523
|
break;
|
|
470
524
|
}
|
|
471
525
|
_Logger.default.log("Found Region: ".concat(clientRegion, " and country: ").concat(countryCode, ", going to fetch Mobius server"), '');
|
|
472
|
-
|
|
473
|
-
|
|
526
|
+
_context8.prev = 17;
|
|
527
|
+
_context8.next = 20;
|
|
474
528
|
return this.webex.request({
|
|
475
529
|
uri: "".concat(this.mobiusHost).concat(_constants2.URL_ENDPOINT, "?regionCode=").concat(clientRegion, "&countryCode=").concat(countryCode),
|
|
476
530
|
method: _types3.HTTP_METHODS.GET,
|
|
@@ -478,7 +532,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
478
532
|
service: _types3.ALLOWED_SERVICES.MOBIUS
|
|
479
533
|
});
|
|
480
534
|
case 20:
|
|
481
|
-
temp =
|
|
535
|
+
temp = _context8.sent;
|
|
482
536
|
_Logger.default.log('Mobius Server found for the region', '');
|
|
483
537
|
mobiusServers = temp.body;
|
|
484
538
|
/* update arrays of Mobius Uris. */
|
|
@@ -486,18 +540,19 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
486
540
|
this.primaryMobiusUris = mobiusUris.primary;
|
|
487
541
|
this.backupMobiusUris = mobiusUris.backup;
|
|
488
542
|
_Logger.default.info("Final list of Mobius Servers, primary: ".concat(mobiusUris.primary, " and backup: ").concat(mobiusUris.backup), '');
|
|
489
|
-
|
|
543
|
+
_context8.next = 35;
|
|
490
544
|
break;
|
|
491
545
|
case 29:
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
extendedError = new Error("Failed to get Mobius servers: ".concat(
|
|
546
|
+
_context8.prev = 29;
|
|
547
|
+
_context8.t0 = _context8["catch"](17);
|
|
548
|
+
extendedError = new Error("Failed to get Mobius servers: ".concat(_context8.t0));
|
|
495
549
|
_Logger.default.error(extendedError, {
|
|
496
550
|
method: _constants2.METHODS.GET_MOBIUS_SERVERS,
|
|
497
551
|
file: _constants2.CALLING_CLIENT_FILE
|
|
498
552
|
});
|
|
499
|
-
(0, _Utils.handleCallingClientErrors)(
|
|
500
|
-
|
|
553
|
+
(0, _Utils.handleCallingClientErrors)(_context8.t0, function (clientError) {
|
|
554
|
+
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 = _context8.t0.headers) === null || _headers5 === void 0 ? void 0 : _headers5.trackingId) !== null && _headers$trackingId2 !== void 0 ? _headers$trackingId2 : '', undefined, clientError);
|
|
501
556
|
_this4.emit(_types2.CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
|
|
502
557
|
}, {
|
|
503
558
|
method: _constants2.GET_MOBIUS_SERVERS_UTIL,
|
|
@@ -505,7 +560,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
505
560
|
});
|
|
506
561
|
useDefault = true;
|
|
507
562
|
case 35:
|
|
508
|
-
|
|
563
|
+
_context8.next = 38;
|
|
509
564
|
break;
|
|
510
565
|
case 37:
|
|
511
566
|
/* Setting this to true because region info is possibly undefined */
|
|
@@ -522,7 +577,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
522
577
|
}
|
|
523
578
|
case 39:
|
|
524
579
|
case "end":
|
|
525
|
-
return
|
|
580
|
+
return _context8.stop();
|
|
526
581
|
}
|
|
527
582
|
}, _callee7, this, [[17, 29]]);
|
|
528
583
|
}));
|
|
@@ -577,23 +632,23 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
577
632
|
this.sdkConnector.registerListener(_types2.MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE, /*#__PURE__*/function () {
|
|
578
633
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(event) {
|
|
579
634
|
var sessionArr, i;
|
|
580
|
-
return _regenerator.default.wrap(function _callee8$(
|
|
581
|
-
while (1) switch (
|
|
635
|
+
return _regenerator.default.wrap(function _callee8$(_context9) {
|
|
636
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
582
637
|
case 0:
|
|
583
638
|
if (!(event && event.data.userSessions.userSessions)) {
|
|
584
|
-
|
|
639
|
+
_context9.next = 7;
|
|
585
640
|
break;
|
|
586
641
|
}
|
|
587
642
|
sessionArr = event === null || event === void 0 ? void 0 : event.data.userSessions.userSessions;
|
|
588
643
|
if (!(sessionArr.length === 1)) {
|
|
589
|
-
|
|
644
|
+
_context9.next = 5;
|
|
590
645
|
break;
|
|
591
646
|
}
|
|
592
647
|
if (!(sessionArr[0].sessionType !== _types2.SessionType.WEBEX_CALLING)) {
|
|
593
|
-
|
|
648
|
+
_context9.next = 5;
|
|
594
649
|
break;
|
|
595
650
|
}
|
|
596
|
-
return
|
|
651
|
+
return _context9.abrupt("return");
|
|
597
652
|
case 5:
|
|
598
653
|
for (i = 0; i < sessionArr.length; i += 1) {
|
|
599
654
|
if (sessionArr[i].sessionType !== _types2.SessionType.WEBEX_CALLING) {
|
|
@@ -603,7 +658,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
603
658
|
_this5.emit(_types2.CALLING_CLIENT_EVENT_KEYS.USER_SESSION_INFO, event);
|
|
604
659
|
case 7:
|
|
605
660
|
case "end":
|
|
606
|
-
return
|
|
661
|
+
return _context9.stop();
|
|
607
662
|
}
|
|
608
663
|
}, _callee8);
|
|
609
664
|
}));
|
|
@@ -623,8 +678,8 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
623
678
|
var _createLine = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
624
679
|
var _this$sdkConfig7, _this$sdkConfig8;
|
|
625
680
|
var line;
|
|
626
|
-
return _regenerator.default.wrap(function _callee9$(
|
|
627
|
-
while (1) switch (
|
|
681
|
+
return _regenerator.default.wrap(function _callee9$(_context10) {
|
|
682
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
628
683
|
case 0:
|
|
629
684
|
_Logger.default.info(_constants.METHOD_START_MESSAGE, {
|
|
630
685
|
file: _constants2.CALLING_CLIENT_FILE,
|
|
@@ -634,7 +689,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
634
689
|
this.lineDict[line.lineId] = line;
|
|
635
690
|
case 3:
|
|
636
691
|
case "end":
|
|
637
|
-
return
|
|
692
|
+
return _context10.stop();
|
|
638
693
|
}
|
|
639
694
|
}, _callee9, this);
|
|
640
695
|
}));
|
|
@@ -703,23 +758,23 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
703
758
|
value: (function () {
|
|
704
759
|
var _uploadLogs2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
|
705
760
|
var result;
|
|
706
|
-
return _regenerator.default.wrap(function _callee10$(
|
|
707
|
-
while (1) switch (
|
|
761
|
+
return _regenerator.default.wrap(function _callee10$(_context11) {
|
|
762
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
708
763
|
case 0:
|
|
709
|
-
|
|
764
|
+
_context11.next = 2;
|
|
710
765
|
return (0, _Utils.uploadLogs)({}, true);
|
|
711
766
|
case 2:
|
|
712
|
-
result =
|
|
767
|
+
result = _context11.sent;
|
|
713
768
|
if (result) {
|
|
714
|
-
|
|
769
|
+
_context11.next = 5;
|
|
715
770
|
break;
|
|
716
771
|
}
|
|
717
772
|
throw new Error('Failed to upload logs: No response received.');
|
|
718
773
|
case 5:
|
|
719
|
-
return
|
|
774
|
+
return _context11.abrupt("return", result);
|
|
720
775
|
case 6:
|
|
721
776
|
case "end":
|
|
722
|
-
return
|
|
777
|
+
return _context11.stop();
|
|
723
778
|
}
|
|
724
779
|
}, _callee10);
|
|
725
780
|
}));
|
|
@@ -739,17 +794,17 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
|
|
|
739
794
|
var createClient = exports.createClient = /*#__PURE__*/function () {
|
|
740
795
|
var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(webex, config) {
|
|
741
796
|
var callingClientInstance;
|
|
742
|
-
return _regenerator.default.wrap(function _callee11$(
|
|
743
|
-
while (1) switch (
|
|
797
|
+
return _regenerator.default.wrap(function _callee11$(_context12) {
|
|
798
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
744
799
|
case 0:
|
|
745
800
|
callingClientInstance = new CallingClient(webex, config);
|
|
746
|
-
|
|
801
|
+
_context12.next = 3;
|
|
747
802
|
return callingClientInstance.init();
|
|
748
803
|
case 3:
|
|
749
|
-
return
|
|
804
|
+
return _context12.abrupt("return", callingClientInstance);
|
|
750
805
|
case 4:
|
|
751
806
|
case "end":
|
|
752
|
-
return
|
|
807
|
+
return _context12.stop();
|
|
753
808
|
}
|
|
754
809
|
}, _callee11);
|
|
755
810
|
}));
|