@webex/calling 3.8.1-web-workers-keepalive.2 → 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.
Files changed (183) hide show
  1. package/dist/CallHistory/CallHistory.js +51 -46
  2. package/dist/CallHistory/CallHistory.js.map +1 -1
  3. package/dist/CallHistory/CallHistory.test.js +146 -147
  4. package/dist/CallHistory/CallHistory.test.js.map +1 -1
  5. package/dist/CallHistory/callHistoryFixtures.js.map +1 -1
  6. package/dist/CallHistory/constants.js.map +1 -1
  7. package/dist/CallHistory/types.js.map +1 -1
  8. package/dist/CallSettings/CallSettings.js +8 -8
  9. package/dist/CallSettings/CallSettings.js.map +1 -1
  10. package/dist/CallSettings/CallSettings.test.js +1 -1
  11. package/dist/CallSettings/CallSettings.test.js.map +1 -1
  12. package/dist/CallSettings/UcmBackendConnector.js +12 -11
  13. package/dist/CallSettings/UcmBackendConnector.js.map +1 -1
  14. package/dist/CallSettings/UcmBackendConnector.test.js +9 -10
  15. package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -1
  16. package/dist/CallSettings/WxCallBackendConnector.js +68 -61
  17. package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
  18. package/dist/CallSettings/WxCallBackendConnector.test.js +168 -102
  19. package/dist/CallSettings/WxCallBackendConnector.test.js.map +1 -1
  20. package/dist/CallSettings/constants.js.map +1 -1
  21. package/dist/CallSettings/testFixtures.js.map +1 -1
  22. package/dist/CallSettings/types.js.map +1 -1
  23. package/dist/CallingClient/CallingClient.js +491 -200
  24. package/dist/CallingClient/CallingClient.js.map +1 -1
  25. package/dist/CallingClient/CallingClient.test.js +501 -294
  26. package/dist/CallingClient/CallingClient.test.js.map +1 -1
  27. package/dist/CallingClient/callRecordFixtures.js.map +1 -1
  28. package/dist/CallingClient/calling/CallerId/index.js +2 -2
  29. package/dist/CallingClient/calling/CallerId/index.js.map +1 -1
  30. package/dist/CallingClient/calling/CallerId/index.test.js +8 -7
  31. package/dist/CallingClient/calling/CallerId/index.test.js.map +1 -1
  32. package/dist/CallingClient/calling/CallerId/types.js.map +1 -1
  33. package/dist/CallingClient/calling/call.js +369 -333
  34. package/dist/CallingClient/calling/call.js.map +1 -1
  35. package/dist/CallingClient/calling/call.test.js +411 -410
  36. package/dist/CallingClient/calling/call.test.js.map +1 -1
  37. package/dist/CallingClient/calling/callManager.js +3 -4
  38. package/dist/CallingClient/calling/callManager.js.map +1 -1
  39. package/dist/CallingClient/calling/callManager.test.js +67 -68
  40. package/dist/CallingClient/calling/callManager.test.js.map +1 -1
  41. package/dist/CallingClient/calling/index.js.map +1 -1
  42. package/dist/CallingClient/calling/types.js.map +1 -1
  43. package/dist/CallingClient/callingClientFixtures.js.map +1 -1
  44. package/dist/CallingClient/constants.js +10 -8
  45. package/dist/CallingClient/constants.js.map +1 -1
  46. package/dist/CallingClient/line/index.js +10 -11
  47. package/dist/CallingClient/line/index.js.map +1 -1
  48. package/dist/CallingClient/line/line.test.js +10 -9
  49. package/dist/CallingClient/line/line.test.js.map +1 -1
  50. package/dist/CallingClient/line/types.js.map +1 -1
  51. package/dist/CallingClient/registration/index.js.map +1 -1
  52. package/dist/CallingClient/registration/register.js +321 -232
  53. package/dist/CallingClient/registration/register.js.map +1 -1
  54. package/dist/CallingClient/registration/register.test.js +242 -160
  55. package/dist/CallingClient/registration/register.test.js.map +1 -1
  56. package/dist/CallingClient/registration/registerFixtures.js.map +1 -1
  57. package/dist/CallingClient/registration/types.js.map +1 -1
  58. package/dist/CallingClient/registration/webWorker.js +5 -4
  59. package/dist/CallingClient/registration/webWorker.js.map +1 -1
  60. package/dist/CallingClient/registration/webWorker.test.js +14 -14
  61. package/dist/CallingClient/registration/webWorker.test.js.map +1 -1
  62. package/dist/CallingClient/registration/webWorkerStr.js.map +1 -1
  63. package/dist/CallingClient/types.js.map +1 -1
  64. package/dist/CallingClient/windowsChromiumIceWarmupUtils.js +142 -0
  65. package/dist/CallingClient/windowsChromiumIceWarmupUtils.js.map +1 -0
  66. package/dist/Contacts/ContactsClient.js +244 -238
  67. package/dist/Contacts/ContactsClient.js.map +1 -1
  68. package/dist/Contacts/ContactsClient.test.js +89 -90
  69. package/dist/Contacts/ContactsClient.test.js.map +1 -1
  70. package/dist/Contacts/constants.js +2 -2
  71. package/dist/Contacts/constants.js.map +1 -1
  72. package/dist/Contacts/contactFixtures.js.map +1 -1
  73. package/dist/Contacts/types.js.map +1 -1
  74. package/dist/Errors/catalog/CallError.js +2 -2
  75. package/dist/Errors/catalog/CallError.js.map +1 -1
  76. package/dist/Errors/catalog/CallingDeviceError.js +2 -2
  77. package/dist/Errors/catalog/CallingDeviceError.js.map +1 -1
  78. package/dist/Errors/catalog/ExtendedError.js +3 -3
  79. package/dist/Errors/catalog/ExtendedError.js.map +1 -1
  80. package/dist/Errors/catalog/LineError.js +2 -2
  81. package/dist/Errors/catalog/LineError.js.map +1 -1
  82. package/dist/Errors/index.js.map +1 -1
  83. package/dist/Errors/types.js.map +1 -1
  84. package/dist/Events/impl/index.js +2 -2
  85. package/dist/Events/impl/index.js.map +1 -1
  86. package/dist/Events/types.js.map +1 -1
  87. package/dist/Logger/index.js.map +1 -1
  88. package/dist/Logger/index.test.js.map +1 -1
  89. package/dist/Logger/types.js.map +1 -1
  90. package/dist/Metrics/index.js +166 -84
  91. package/dist/Metrics/index.js.map +1 -1
  92. package/dist/Metrics/index.test.js +60 -0
  93. package/dist/Metrics/index.test.js.map +1 -1
  94. package/dist/Metrics/types.js +15 -1
  95. package/dist/Metrics/types.js.map +1 -1
  96. package/dist/SDKConnector/index.js +0 -1
  97. package/dist/SDKConnector/index.js.map +1 -1
  98. package/dist/SDKConnector/index.test.js.map +1 -1
  99. package/dist/SDKConnector/types.js.map +1 -1
  100. package/dist/SDKConnector/utils.js.map +1 -1
  101. package/dist/SDKConnector/utils.test.js.map +1 -1
  102. package/dist/Voicemail/BroadworksBackendConnector.js +42 -39
  103. package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -1
  104. package/dist/Voicemail/BroadworksBackendConnector.test.js +119 -120
  105. package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -1
  106. package/dist/Voicemail/UcmBackendConnector.js +54 -47
  107. package/dist/Voicemail/UcmBackendConnector.js.map +1 -1
  108. package/dist/Voicemail/UcmBackendConnector.test.js +73 -74
  109. package/dist/Voicemail/UcmBackendConnector.test.js.map +1 -1
  110. package/dist/Voicemail/Voicemail.js +12 -11
  111. package/dist/Voicemail/Voicemail.js.map +1 -1
  112. package/dist/Voicemail/Voicemail.test.js +2 -2
  113. package/dist/Voicemail/Voicemail.test.js.map +1 -1
  114. package/dist/Voicemail/WxCallBackendConnector.js +78 -70
  115. package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
  116. package/dist/Voicemail/WxCallBackendConnector.test.js +184 -185
  117. package/dist/Voicemail/WxCallBackendConnector.test.js.map +1 -1
  118. package/dist/Voicemail/constants.js.map +1 -1
  119. package/dist/Voicemail/types.js.map +1 -1
  120. package/dist/Voicemail/voicemailFixture.js.map +1 -1
  121. package/dist/api.js.map +1 -1
  122. package/dist/common/Utils.js +97 -72
  123. package/dist/common/Utils.js.map +1 -1
  124. package/dist/common/Utils.test.js +283 -143
  125. package/dist/common/Utils.test.js.map +1 -1
  126. package/dist/common/constants.js.map +1 -1
  127. package/dist/common/index.js.map +1 -1
  128. package/dist/common/testUtil.js +1 -1
  129. package/dist/common/testUtil.js.map +1 -1
  130. package/dist/common/types.js.map +1 -1
  131. package/dist/index.js +5 -5
  132. package/dist/index.js.map +1 -1
  133. package/dist/module/CallHistory/CallHistory.js +4 -0
  134. package/dist/module/CallSettings/UcmBackendConnector.js +1 -0
  135. package/dist/module/CallSettings/WxCallBackendConnector.js +8 -1
  136. package/dist/module/CallingClient/CallingClient.js +197 -40
  137. package/dist/module/CallingClient/calling/call.js +79 -43
  138. package/dist/module/CallingClient/constants.js +9 -6
  139. package/dist/module/CallingClient/line/index.js +3 -3
  140. package/dist/module/CallingClient/registration/register.js +50 -14
  141. package/dist/module/CallingClient/registration/webWorker.js +2 -1
  142. package/dist/module/CallingClient/windowsChromiumIceWarmupUtils.js +59 -0
  143. package/dist/module/Contacts/ContactsClient.js +23 -17
  144. package/dist/module/Contacts/constants.js +1 -1
  145. package/dist/module/Metrics/index.js +86 -32
  146. package/dist/module/Metrics/types.js +14 -0
  147. package/dist/module/Voicemail/BroadworksBackendConnector.js +3 -0
  148. package/dist/module/Voicemail/UcmBackendConnector.js +6 -0
  149. package/dist/module/Voicemail/WxCallBackendConnector.js +8 -0
  150. package/dist/module/common/Utils.js +35 -11
  151. package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
  152. package/dist/types/CallSettings/UcmBackendConnector.d.ts.map +1 -1
  153. package/dist/types/CallSettings/WxCallBackendConnector.d.ts.map +1 -1
  154. package/dist/types/CallSettings/types.d.ts +1 -1
  155. package/dist/types/CallSettings/types.d.ts.map +1 -1
  156. package/dist/types/CallingClient/CallingClient.d.ts +12 -1
  157. package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
  158. package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
  159. package/dist/types/CallingClient/calling/types.d.ts +2 -1
  160. package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
  161. package/dist/types/CallingClient/constants.d.ts +9 -6
  162. package/dist/types/CallingClient/constants.d.ts.map +1 -1
  163. package/dist/types/CallingClient/line/index.d.ts.map +1 -1
  164. package/dist/types/CallingClient/registration/register.d.ts +1 -0
  165. package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
  166. package/dist/types/CallingClient/registration/types.d.ts.map +1 -1
  167. package/dist/types/CallingClient/registration/webWorker.d.ts +2 -1
  168. package/dist/types/CallingClient/registration/webWorker.d.ts.map +1 -1
  169. package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts +5 -0
  170. package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts.map +1 -0
  171. package/dist/types/Contacts/ContactsClient.d.ts.map +1 -1
  172. package/dist/types/Contacts/constants.d.ts +1 -1
  173. package/dist/types/Contacts/constants.d.ts.map +1 -1
  174. package/dist/types/Metrics/index.d.ts.map +1 -1
  175. package/dist/types/Metrics/types.d.ts +18 -3
  176. package/dist/types/Metrics/types.d.ts.map +1 -1
  177. package/dist/types/Voicemail/BroadworksBackendConnector.d.ts.map +1 -1
  178. package/dist/types/Voicemail/UcmBackendConnector.d.ts.map +1 -1
  179. package/dist/types/Voicemail/WxCallBackendConnector.d.ts.map +1 -1
  180. package/dist/types/common/Utils.d.ts.map +1 -1
  181. package/dist/types/common/types.d.ts +1 -0
  182. package/dist/types/common/types.d.ts.map +1 -1
  183. package/package.json +10 -9
@@ -40,13 +40,13 @@ var _constants2 = require("./constants");
40
40
  var _line = _interopRequireDefault(require("./line"));
41
41
  var _types4 = require("../Metrics/types");
42
42
  var _Metrics = require("../Metrics");
43
- function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
44
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
45
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && o[_Symbol$iterator] || o["@@iterator"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
46
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
47
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
48
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
49
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable no-underscore-dangle */ /* eslint-disable valid-jsdoc */ /* eslint-disable @typescript-eslint/no-shadow */
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)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
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 _callee2$(_context2) {
93
- while (1) switch (_context2.prev = _context2.next) {
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
- _context2.next = 5;
216
+ _context5.next = 5;
104
217
  break;
105
218
  }
106
- _context2.next = 5;
107
- return _this.mutex.runExclusive( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
108
- return _regenerator.default.wrap(function _callee$(_context) {
109
- while (1) switch (_context.prev = _context.next) {
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
- _context.next = 4;
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
- _context.next = 4;
232
+ _context4.next = 4;
120
233
  return registration.reconnectOnFailure(_constants2.CALLS_CLEARED_HANDLER_UTIL);
121
234
  case 4:
122
235
  case "end":
123
- return _context.stop();
236
+ return _context4.stop();
124
237
  }
125
- }, _callee);
238
+ }, _callee4);
126
239
  })));
127
240
  case 5:
128
241
  case "end":
129
- return _context2.stop();
242
+ return _context5.stop();
130
243
  }
131
- }, _callee2);
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
- _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];
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)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
231
- return _regenerator.default.wrap(function _callee3$(_context3) {
232
- while (1) switch (_context3.prev = _context3.next) {
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
- _context3.next = 2;
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 2:
237
- _context3.next = 4;
394
+ case 15:
395
+ _context6.next = 17;
238
396
  return this.createLine();
239
- case 4:
240
- /* Better to run the timer once rather than after every registration */
241
- this.detectNetworkChange();
242
- case 5:
397
+ case 17:
398
+ this.setupNetworkEventListeners();
399
+ case 18:
243
400
  case "end":
244
- return _context3.stop();
401
+ return _context6.stop();
245
402
  }
246
- }, _callee3, this);
403
+ }, _callee6, this, [[4, 10]]);
247
404
  }));
248
405
  function init() {
249
406
  return _init.apply(this, arguments);
@@ -251,98 +408,171 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
251
408
  return init;
252
409
  }()
253
410
  /**
254
- * Register callbacks for network changes.
411
+ * Ping a reliable external endpoint with a short timeout to infer connectivity.
255
412
  */
413
+ )
256
414
  }, {
257
- key: "detectNetworkChange",
415
+ key: "checkNetworkReachability",
258
416
  value: (function () {
259
- var _detectNetworkChange = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
260
- var _this2 = this;
261
- var retry, line;
262
- return _regenerator.default.wrap(function _callee5$(_context5) {
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
- _Logger.default.info(_constants.METHOD_START_MESSAGE, {
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: _constants2.METHODS.DETECT_NETWORK_CHANGE
443
+ method: 'pingExternal'
268
444
  });
269
- retry = false; // this is a temporary logic to get registration obj
270
- // it will change once we have proper lineId and multiple lines as well
271
- line = (0, _values.default)(this.lineDict)[0];
272
- setInterval( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
273
- return _regenerator.default.wrap(function _callee4$(_context4) {
274
- while (1) switch (_context4.prev = _context4.next) {
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
- if (!_this2.webex.internal.mercury.connected && !retry && !(0, _keys.default)(_this2.callManager.getActiveCalls()).length) {
277
- _Logger.default.warn("Network has flapped, waiting for mercury connection to be up", {
278
- file: _constants2.CALLING_CLIENT_FILE,
279
- method: _constants2.METHODS.DETECT_NETWORK_CHANGE
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
- line.registration.clearKeepaliveTimer();
282
- retry = true;
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 _context4.stop();
492
+ return _context8.stop();
303
493
  }
304
- }, _callee4);
305
- })), _constants2.NETWORK_FLAP_TIMEOUT);
306
- case 4:
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 _context5.stop();
519
+ return _context9.stop();
309
520
  }
310
- }, _callee5, this);
521
+ }, _callee8, this, [[3, 12, 15, 18]]);
311
522
  }));
312
- function detectNetworkChange() {
313
- return _detectNetworkChange.apply(this, arguments);
523
+ function checkCallStatus() {
524
+ return _checkCallStatus.apply(this, arguments);
314
525
  }
315
- return detectNetworkChange;
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)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
550
+ var _getClientRegionInfo = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
325
551
  var _this3 = this;
326
- var regionInfo, _iterator, _step, _loop;
327
- return _regenerator.default.wrap(function _callee6$(_context7) {
328
- while (1) switch (_context7.prev = _context7.next) {
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
- _iterator = _createForOfIteratorHelper(this.mobiusClusters);
336
- _context7.prev = 3;
337
- _loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
338
- var mobius, temp, myIP, response, clientRegionInfo, extendedError;
339
- return _regenerator.default.wrap(function _loop$(_context6) {
340
- while (1) switch (_context6.prev = _context6.next) {
561
+ _iterator2 = _createForOfIteratorHelper(this.mobiusClusters);
562
+ _context1.prev = 3;
563
+ _loop2 = /*#__PURE__*/_regenerator.default.mark(function _loop2() {
564
+ var mobius, _temp$headers, _response$headers, _response$headers2, _response$headers$tra, _response$headers3, temp, myIP, response, clientRegionInfo, extendedError;
565
+ return _regenerator.default.wrap(function _loop2$(_context0) {
566
+ while (1) switch (_context0.prev = _context0.next) {
341
567
  case 0:
342
- mobius = _step.value;
343
- _this3.mobiusHost = "https://".concat(mobius.host).concat(_constants2.API_V1);
344
- _context6.prev = 2;
345
- _context6.next = 5;
568
+ mobius = _step2.value;
569
+ if (mobius.host) {
570
+ _this3.mobiusHost = "https://".concat(mobius.host).concat(_constants2.API_V1);
571
+ } else {
572
+ _this3.mobiusHost = mobius;
573
+ }
574
+ _context0.prev = 2;
575
+ _context0.next = 5;
346
576
  return _this3.webex.request({
347
577
  uri: "".concat(_this3.mobiusHost).concat(_constants2.URL_ENDPOINT).concat(_constants2.IP_ENDPOINT),
348
578
  method: _types3.HTTP_METHODS.GET,
@@ -350,79 +580,116 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
350
580
  service: _types3.ALLOWED_SERVICES.MOBIUS
351
581
  });
352
582
  case 5:
353
- temp = _context6.sent;
583
+ temp = _context0.sent;
584
+ _Logger.default.log("Response trackingId: ".concat(temp === null || temp === void 0 ? void 0 : (_temp$headers = temp.headers) === null || _temp$headers === void 0 ? void 0 : _temp$headers.trackingid), {
585
+ file: _constants2.CALLING_CLIENT_FILE,
586
+ method: _constants2.METHODS.GET_CLIENT_REGION_INFO
587
+ });
354
588
  myIP = temp.body.ipv4; // eslint-disable-next-line no-await-in-loop
355
- _context6.next = 9;
589
+ _context0.next = 10;
356
590
  return _this3.webex.request({
357
591
  uri: "".concat(_constants2.DISCOVERY_URL, "/").concat(myIP),
358
592
  method: _types3.HTTP_METHODS.GET,
359
593
  addAuthHeader: false,
360
594
  headers: (0, _defineProperty2.default)({}, _constants2.SPARK_USER_AGENT, null)
361
595
  });
362
- case 9:
363
- response = _context6.sent;
596
+ case 10:
597
+ response = _context0.sent;
598
+ _Logger.default.log("Response trackingId: ".concat(response === null || response === void 0 ? void 0 : (_response$headers = response.headers) === null || _response$headers === void 0 ? void 0 : _response$headers.trackingid), {
599
+ file: _constants2.CALLING_CLIENT_FILE,
600
+ method: _constants2.METHODS.GET_CLIENT_REGION_INFO
601
+ });
364
602
  clientRegionInfo = response.body;
365
603
  regionInfo.clientRegion = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.clientRegion ? clientRegionInfo.clientRegion : '';
366
604
  regionInfo.countryCode = clientRegionInfo !== null && clientRegionInfo !== void 0 && clientRegionInfo.countryCode ? clientRegionInfo.countryCode : '';
367
- return _context6.abrupt("return", 1);
368
- case 16:
369
- _context6.prev = 16;
370
- _context6.t0 = _context6["catch"](2);
371
- extendedError = new Error("Failed to get client region info: ".concat(_context6.t0));
605
+ _Logger.default.log("Successfully fetched Client region info: ".concat(regionInfo.clientRegion, ", countryCode: ").concat(regionInfo.countryCode, ", and response trackingid: ").concat(response === null || response === void 0 ? void 0 : (_response$headers2 = response.headers) === null || _response$headers2 === void 0 ? void 0 : _response$headers2.trackingid), {
606
+ file: _constants2.CALLING_CLIENT_FILE,
607
+ method: _constants2.METHODS.GET_CLIENT_REGION_INFO
608
+ });
609
+
610
+ // Metrics for region info - trying clusters in loop
611
+ _this3.metricManager.submitRegionInfoMetric(_types4.METRIC_EVENT.MOBIUS_DISCOVERY, _types4.MOBIUS_SERVER_ACTION.REGION_INFO, _types4.METRIC_TYPE.BEHAVIORAL, _this3.mobiusHost, clientRegionInfo.clientRegion, clientRegionInfo.countryCode, (_response$headers$tra = response === null || response === void 0 ? void 0 : (_response$headers3 = response.headers) === null || _response$headers3 === void 0 ? void 0 : _response$headers3.trackingid) !== null && _response$headers$tra !== void 0 ? _response$headers$tra : '');
612
+ return _context0.abrupt("return", 0);
613
+ case 20:
614
+ _context0.prev = 20;
615
+ _context0.t0 = _context0["catch"](2);
616
+ extendedError = new Error("Failed to get client region info: ".concat(_context0.t0));
372
617
  _Logger.default.error(extendedError, {
373
618
  method: _constants2.METHODS.GET_CLIENT_REGION_INFO,
374
619
  file: _constants2.CALLING_CLIENT_FILE
375
620
  });
376
- (0, _Utils.handleCallingClientErrors)(_context6.t0, function (clientError) {
621
+
622
+ // eslint-disable-next-line no-await-in-loop
623
+ _context0.next = 26;
624
+ return (0, _Utils.handleCallingClientErrors)(_context0.t0, function (clientError) {
377
625
  var _headers$trackingId, _headers3;
378
- _this3.metricManager.submitRegistrationMetric(_types4.METRIC_EVENT.REGISTRATION_ERROR, _types4.REG_ACTION.REGISTER, _types4.METRIC_TYPE.BEHAVIORAL, _constants2.GET_MOBIUS_SERVERS_UTIL, 'UNKNOWN', (_headers$trackingId = (_headers3 = _context6.t0.headers) === null || _headers3 === void 0 ? void 0 : _headers3.trackingId) !== null && _headers$trackingId !== void 0 ? _headers$trackingId : '', undefined, clientError);
626
+ _this3.metricManager.submitRegistrationMetric(_types4.METRIC_EVENT.REGISTRATION_ERROR, _types4.REG_ACTION.REGISTER, _types4.METRIC_TYPE.BEHAVIORAL, _constants2.GET_MOBIUS_SERVERS_UTIL, 'UNKNOWN', (_headers$trackingId = (_headers3 = _context0.t0.headers) === null || _headers3 === void 0 ? void 0 : _headers3.trackingId) !== null && _headers$trackingId !== void 0 ? _headers$trackingId : '', undefined, clientError);
379
627
  _this3.emit(_types2.CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
380
628
  }, {
381
629
  method: _constants2.GET_MOBIUS_SERVERS_UTIL,
382
630
  file: _constants2.CALLING_CLIENT_FILE
383
631
  });
632
+ case 26:
633
+ abort = _context0.sent;
384
634
  regionInfo.clientRegion = '';
385
635
  regionInfo.countryCode = '';
386
- case 23:
636
+ if (!abort) {
637
+ _context0.next = 33;
638
+ break;
639
+ }
640
+ _context0.next = 32;
641
+ return (0, _Utils.uploadLogs)();
642
+ case 32:
643
+ return _context0.abrupt("return", {
644
+ v: regionInfo
645
+ });
646
+ case 33:
387
647
  case "end":
388
- return _context6.stop();
648
+ return _context0.stop();
389
649
  }
390
- }, _loop, null, [[2, 16]]);
650
+ }, _loop2, null, [[2, 20]]);
391
651
  });
392
- _iterator.s();
652
+ _iterator2.s();
393
653
  case 6:
394
- if ((_step = _iterator.n()).done) {
395
- _context7.next = 12;
654
+ if ((_step2 = _iterator2.n()).done) {
655
+ _context1.next = 15;
396
656
  break;
397
657
  }
398
- return _context7.delegateYield(_loop(), "t0", 8);
658
+ return _context1.delegateYield(_loop2(), "t0", 8);
399
659
  case 8:
400
- if (!_context7.t0) {
401
- _context7.next = 10;
660
+ _ret = _context1.t0;
661
+ if (!(_ret === 0)) {
662
+ _context1.next = 11;
402
663
  break;
403
664
  }
404
- return _context7.abrupt("break", 12);
405
- case 10:
406
- _context7.next = 6;
665
+ return _context1.abrupt("break", 15);
666
+ case 11:
667
+ if (!_ret) {
668
+ _context1.next = 13;
669
+ break;
670
+ }
671
+ return _context1.abrupt("return", _ret.v);
672
+ case 13:
673
+ _context1.next = 6;
407
674
  break;
408
- case 12:
409
- _context7.next = 17;
675
+ case 15:
676
+ _context1.next = 20;
410
677
  break;
411
- case 14:
412
- _context7.prev = 14;
413
- _context7.t1 = _context7["catch"](3);
414
- _iterator.e(_context7.t1);
415
678
  case 17:
416
- _context7.prev = 17;
417
- _iterator.f();
418
- return _context7.finish(17);
679
+ _context1.prev = 17;
680
+ _context1.t1 = _context1["catch"](3);
681
+ _iterator2.e(_context1.t1);
419
682
  case 20:
420
- return _context7.abrupt("return", regionInfo);
421
- case 21:
683
+ _context1.prev = 20;
684
+ _iterator2.f();
685
+ return _context1.finish(20);
686
+ case 23:
687
+ return _context1.abrupt("return", regionInfo);
688
+ case 24:
422
689
  case "end":
423
- return _context7.stop();
690
+ return _context1.stop();
424
691
  }
425
- }, _callee6, this, [[3, 14, 17, 20]]);
692
+ }, _callee9, this, [[3, 17, 20, 23]]);
426
693
  }));
427
694
  function getClientRegionInfo() {
428
695
  return _getClientRegionInfo.apply(this, arguments);
@@ -436,15 +703,15 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
436
703
  }, {
437
704
  key: "getMobiusServers",
438
705
  value: (function () {
439
- var _getMobiusServers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
706
+ var _getMobiusServers = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
440
707
  var _this$sdkConfig3,
441
708
  _this$sdkConfig3$disc,
442
709
  _this$sdkConfig4,
443
710
  _this$sdkConfig4$disc,
444
711
  _this4 = this;
445
- var useDefault, clientRegion, countryCode, _this$sdkConfig5, _this$sdkConfig5$disc, _this$sdkConfig6, _this$sdkConfig6$disc, regionInfo, temp, mobiusServers, mobiusUris, extendedError;
446
- return _regenerator.default.wrap(function _callee7$(_context8) {
447
- while (1) switch (_context8.prev = _context8.next) {
712
+ var useDefault, clientRegion, countryCode, _this$sdkConfig5, _this$sdkConfig5$disc, _this$sdkConfig6, _this$sdkConfig6$disc, regionInfo, _response$headers4, _response$headers$tra2, _response$headers5, response, mobiusServers, mobiusUris, extendedError, abort;
713
+ return _regenerator.default.wrap(function _callee0$(_context10) {
714
+ while (1) switch (_context10.prev = _context10.next) {
448
715
  case 0:
449
716
  _Logger.default.info(_constants.METHOD_START_MESSAGE, {
450
717
  file: _constants2.CALLING_CLIENT_FILE,
@@ -459,7 +726,7 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
459
726
  */
460
727
  useDefault = false;
461
728
  if (!((_this$sdkConfig3 = this.sdkConfig) !== null && _this$sdkConfig3 !== void 0 && (_this$sdkConfig3$disc = _this$sdkConfig3.discovery) !== null && _this$sdkConfig3$disc !== void 0 && _this$sdkConfig3$disc.country && (_this$sdkConfig4 = this.sdkConfig) !== null && _this$sdkConfig4 !== void 0 && (_this$sdkConfig4$disc = _this$sdkConfig4.discovery) !== null && _this$sdkConfig4$disc !== void 0 && _this$sdkConfig4$disc.region)) {
462
- _context8.next = 9;
729
+ _context10.next = 9;
463
730
  break;
464
731
  }
465
732
  _Logger.default.log('Updating region and country from the SDK config', {
@@ -469,27 +736,30 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
469
736
  clientRegion = (_this$sdkConfig5 = this.sdkConfig) === null || _this$sdkConfig5 === void 0 ? void 0 : (_this$sdkConfig5$disc = _this$sdkConfig5.discovery) === null || _this$sdkConfig5$disc === void 0 ? void 0 : _this$sdkConfig5$disc.region;
470
737
  countryCode = (_this$sdkConfig6 = this.sdkConfig) === null || _this$sdkConfig6 === void 0 ? void 0 : (_this$sdkConfig6$disc = _this$sdkConfig6.discovery) === null || _this$sdkConfig6$disc === void 0 ? void 0 : _this$sdkConfig6$disc.country;
471
738
  this.mobiusHost = this.webex.internal.services._serviceUrls.mobius;
472
- _context8.next = 15;
739
+ _context10.next = 15;
473
740
  break;
474
741
  case 9:
475
742
  _Logger.default.log('Updating region and country through Region discovery', {
476
743
  file: _constants2.CALLING_CLIENT_FILE,
477
744
  method: _constants2.GET_MOBIUS_SERVERS_UTIL
478
745
  });
479
- _context8.next = 12;
746
+ _context10.next = 12;
480
747
  return this.getClientRegionInfo();
481
748
  case 12:
482
- regionInfo = _context8.sent;
749
+ regionInfo = _context10.sent;
483
750
  clientRegion = regionInfo.clientRegion;
484
751
  countryCode = regionInfo.countryCode;
485
752
  case 15:
486
753
  if (!(clientRegion && countryCode)) {
487
- _context8.next = 37;
754
+ _context10.next = 43;
488
755
  break;
489
756
  }
490
- _Logger.default.log("Found Region: ".concat(clientRegion, " and country: ").concat(countryCode, ", going to fetch Mobius server"), '');
491
- _context8.prev = 17;
492
- _context8.next = 20;
757
+ _Logger.default.log("Found Region: ".concat(clientRegion, " and country: ").concat(countryCode, ", going to fetch Mobius server"), {
758
+ file: _constants2.CALLING_CLIENT_FILE,
759
+ method: _constants2.GET_MOBIUS_SERVERS_UTIL
760
+ });
761
+ _context10.prev = 17;
762
+ _context10.next = 20;
493
763
  return this.webex.request({
494
764
  uri: "".concat(this.mobiusHost).concat(_constants2.URL_ENDPOINT, "?regionCode=").concat(clientRegion, "&countryCode=").concat(countryCode),
495
765
  method: _types3.HTTP_METHODS.GET,
@@ -497,54 +767,75 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
497
767
  service: _types3.ALLOWED_SERVICES.MOBIUS
498
768
  });
499
769
  case 20:
500
- temp = _context8.sent;
501
- _Logger.default.log('Mobius Server found for the region', '');
502
- mobiusServers = temp.body;
770
+ response = _context10.sent;
771
+ _Logger.default.log("Mobius Server found for the region. Response trackingId: ".concat(response === null || response === void 0 ? void 0 : (_response$headers4 = response.headers) === null || _response$headers4 === void 0 ? void 0 : _response$headers4.trackingid), {
772
+ file: _constants2.CALLING_CLIENT_FILE,
773
+ method: _constants2.GET_MOBIUS_SERVERS_UTIL
774
+ });
775
+ mobiusServers = response.body; // Metrics for mobius servers
776
+ this.metricManager.submitMobiusServersMetric(_types4.METRIC_EVENT.MOBIUS_DISCOVERY, _types4.MOBIUS_SERVER_ACTION.MOBIUS_SERVERS, _types4.METRIC_TYPE.BEHAVIORAL, mobiusServers, (_response$headers$tra2 = response === null || response === void 0 ? void 0 : (_response$headers5 = response.headers) === null || _response$headers5 === void 0 ? void 0 : _response$headers5.trackingid) !== null && _response$headers$tra2 !== void 0 ? _response$headers$tra2 : '');
777
+
503
778
  /* update arrays of Mobius Uris. */
504
779
  mobiusUris = (0, _Utils.filterMobiusUris)(mobiusServers, this.mobiusHost);
505
780
  this.primaryMobiusUris = mobiusUris.primary;
506
781
  this.backupMobiusUris = mobiusUris.backup;
507
- _Logger.default.info("Final list of Mobius Servers, primary: ".concat(mobiusUris.primary, " and backup: ").concat(mobiusUris.backup), '');
508
- _context8.next = 35;
782
+ _Logger.default.log("Final list of Mobius Servers, primary: ".concat(mobiusUris.primary, " and backup: ").concat(mobiusUris.backup), {
783
+ file: _constants2.CALLING_CLIENT_FILE,
784
+ method: _constants2.GET_MOBIUS_SERVERS_UTIL
785
+ });
786
+ _context10.next = 41;
509
787
  break;
510
- case 29:
511
- _context8.prev = 29;
512
- _context8.t0 = _context8["catch"](17);
513
- extendedError = new Error("Failed to get Mobius servers: ".concat(_context8.t0));
788
+ case 30:
789
+ _context10.prev = 30;
790
+ _context10.t0 = _context10["catch"](17);
791
+ extendedError = new Error("Failed to get Mobius servers: ".concat(_context10.t0));
514
792
  _Logger.default.error(extendedError, {
515
793
  method: _constants2.METHODS.GET_MOBIUS_SERVERS,
516
794
  file: _constants2.CALLING_CLIENT_FILE
517
795
  });
518
- (0, _Utils.handleCallingClientErrors)(_context8.t0, function (clientError) {
796
+ _context10.next = 36;
797
+ return (0, _Utils.handleCallingClientErrors)(_context10.t0, function (clientError) {
519
798
  var _headers$trackingId2, _headers5;
520
- _this4.metricManager.submitRegistrationMetric(_types4.METRIC_EVENT.REGISTRATION_ERROR, _types4.REG_ACTION.REGISTER, _types4.METRIC_TYPE.BEHAVIORAL, _constants2.GET_MOBIUS_SERVERS_UTIL, 'UNKNOWN', (_headers$trackingId2 = (_headers5 = _context8.t0.headers) === null || _headers5 === void 0 ? void 0 : _headers5.trackingId) !== null && _headers$trackingId2 !== void 0 ? _headers$trackingId2 : '', undefined, clientError);
799
+ _this4.metricManager.submitRegistrationMetric(_types4.METRIC_EVENT.REGISTRATION_ERROR, _types4.REG_ACTION.REGISTER, _types4.METRIC_TYPE.BEHAVIORAL, _constants2.GET_MOBIUS_SERVERS_UTIL, 'UNKNOWN', (_headers$trackingId2 = (_headers5 = _context10.t0.headers) === null || _headers5 === void 0 ? void 0 : _headers5.trackingId) !== null && _headers$trackingId2 !== void 0 ? _headers$trackingId2 : '', undefined, clientError);
521
800
  _this4.emit(_types2.CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
522
801
  }, {
523
802
  method: _constants2.GET_MOBIUS_SERVERS_UTIL,
524
803
  file: _constants2.CALLING_CLIENT_FILE
525
804
  });
805
+ case 36:
806
+ abort = _context10.sent;
807
+ if (!abort) {
808
+ _context10.next = 40;
809
+ break;
810
+ }
811
+ _context10.next = 40;
812
+ return (0, _Utils.uploadLogs)();
813
+ case 40:
526
814
  useDefault = true;
527
- case 35:
528
- _context8.next = 38;
815
+ case 41:
816
+ _context10.next = 44;
529
817
  break;
530
- case 37:
818
+ case 43:
531
819
  /* Setting this to true because region info is possibly undefined */
532
820
  useDefault = true;
533
- case 38:
821
+ case 44:
534
822
  /* Use a default URL if Mobius discovery fails either because of region info failure
535
823
  * or because the discovered Mobius couldn't be reached
536
824
  */
537
825
 
538
826
  if (useDefault) {
539
- _Logger.default.warn("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", '');
827
+ _Logger.default.warn("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", {
828
+ file: _constants2.CALLING_CLIENT_FILE,
829
+ method: _constants2.GET_MOBIUS_SERVERS_UTIL
830
+ });
540
831
  this.mobiusHost = "https://".concat(this.mobiusClusters[0].host).concat(_constants2.API_V1);
541
832
  this.primaryMobiusUris = ["".concat(this.mobiusHost).concat(_constants2.URL_ENDPOINT)];
542
833
  }
543
- case 39:
834
+ case 45:
544
835
  case "end":
545
- return _context8.stop();
836
+ return _context10.stop();
546
837
  }
547
- }, _callee7, this, [[17, 29]]);
838
+ }, _callee0, this, [[17, 30]]);
548
839
  }));
549
840
  function getMobiusServers() {
550
841
  return _getMobiusServers.apply(this, arguments);
@@ -595,25 +886,25 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
595
886
  method: _constants2.METHODS.REGISTER_SESSIONS_LISTENER
596
887
  });
597
888
  this.sdkConnector.registerListener(_types2.MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE, /*#__PURE__*/function () {
598
- var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(event) {
889
+ var _ref6 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1(event) {
599
890
  var sessionArr, i;
600
- return _regenerator.default.wrap(function _callee8$(_context9) {
601
- while (1) switch (_context9.prev = _context9.next) {
891
+ return _regenerator.default.wrap(function _callee1$(_context11) {
892
+ while (1) switch (_context11.prev = _context11.next) {
602
893
  case 0:
603
894
  if (!(event && event.data.userSessions.userSessions)) {
604
- _context9.next = 7;
895
+ _context11.next = 7;
605
896
  break;
606
897
  }
607
898
  sessionArr = event === null || event === void 0 ? void 0 : event.data.userSessions.userSessions;
608
899
  if (!(sessionArr.length === 1)) {
609
- _context9.next = 5;
900
+ _context11.next = 5;
610
901
  break;
611
902
  }
612
903
  if (!(sessionArr[0].sessionType !== _types2.SessionType.WEBEX_CALLING)) {
613
- _context9.next = 5;
904
+ _context11.next = 5;
614
905
  break;
615
906
  }
616
- return _context9.abrupt("return");
907
+ return _context11.abrupt("return");
617
908
  case 5:
618
909
  for (i = 0; i < sessionArr.length; i += 1) {
619
910
  if (sessionArr[i].sessionType !== _types2.SessionType.WEBEX_CALLING) {
@@ -623,12 +914,12 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
623
914
  _this5.emit(_types2.CALLING_CLIENT_EVENT_KEYS.USER_SESSION_INFO, event);
624
915
  case 7:
625
916
  case "end":
626
- return _context9.stop();
917
+ return _context11.stop();
627
918
  }
628
- }, _callee8);
919
+ }, _callee1);
629
920
  }));
630
921
  return function (_x) {
631
- return _ref4.apply(this, arguments);
922
+ return _ref6.apply(this, arguments);
632
923
  };
633
924
  }());
634
925
  }
@@ -640,11 +931,11 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
640
931
  }, {
641
932
  key: "createLine",
642
933
  value: (function () {
643
- var _createLine = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
934
+ var _createLine = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
644
935
  var _this$sdkConfig7, _this$sdkConfig8;
645
936
  var line;
646
- return _regenerator.default.wrap(function _callee9$(_context10) {
647
- while (1) switch (_context10.prev = _context10.next) {
937
+ return _regenerator.default.wrap(function _callee10$(_context12) {
938
+ while (1) switch (_context12.prev = _context12.next) {
648
939
  case 0:
649
940
  _Logger.default.info(_constants.METHOD_START_MESSAGE, {
650
941
  file: _constants2.CALLING_CLIENT_FILE,
@@ -654,9 +945,9 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
654
945
  this.lineDict[line.lineId] = line;
655
946
  case 3:
656
947
  case "end":
657
- return _context10.stop();
948
+ return _context12.stop();
658
949
  }
659
- }, _callee9, this);
950
+ }, _callee10, this);
660
951
  }));
661
952
  function createLine() {
662
953
  return _createLine.apply(this, arguments);
@@ -721,27 +1012,27 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
721
1012
  }, {
722
1013
  key: "uploadLogs",
723
1014
  value: (function () {
724
- var _uploadLogs2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
1015
+ var _uploadLogs2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11() {
725
1016
  var result;
726
- return _regenerator.default.wrap(function _callee10$(_context11) {
727
- while (1) switch (_context11.prev = _context11.next) {
1017
+ return _regenerator.default.wrap(function _callee11$(_context13) {
1018
+ while (1) switch (_context13.prev = _context13.next) {
728
1019
  case 0:
729
- _context11.next = 2;
1020
+ _context13.next = 2;
730
1021
  return (0, _Utils.uploadLogs)({}, true);
731
1022
  case 2:
732
- result = _context11.sent;
1023
+ result = _context13.sent;
733
1024
  if (result) {
734
- _context11.next = 5;
1025
+ _context13.next = 5;
735
1026
  break;
736
1027
  }
737
1028
  throw new Error('Failed to upload logs: No response received.');
738
1029
  case 5:
739
- return _context11.abrupt("return", result);
1030
+ return _context13.abrupt("return", result);
740
1031
  case 6:
741
1032
  case "end":
742
- return _context11.stop();
1033
+ return _context13.stop();
743
1034
  }
744
- }, _callee10);
1035
+ }, _callee11);
745
1036
  }));
746
1037
  function uploadLogs() {
747
1038
  return _uploadLogs2.apply(this, arguments);
@@ -757,24 +1048,24 @@ var CallingClient = exports.CallingClient = /*#__PURE__*/function (_Eventing) {
757
1048
  * @param config - Config to start the CallingClient with.
758
1049
  */
759
1050
  var createClient = exports.createClient = /*#__PURE__*/function () {
760
- var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(webex, config) {
1051
+ var _ref7 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(webex, config) {
761
1052
  var callingClientInstance;
762
- return _regenerator.default.wrap(function _callee11$(_context12) {
763
- while (1) switch (_context12.prev = _context12.next) {
1053
+ return _regenerator.default.wrap(function _callee12$(_context14) {
1054
+ while (1) switch (_context14.prev = _context14.next) {
764
1055
  case 0:
765
1056
  callingClientInstance = new CallingClient(webex, config);
766
- _context12.next = 3;
1057
+ _context14.next = 3;
767
1058
  return callingClientInstance.init();
768
1059
  case 3:
769
- return _context12.abrupt("return", callingClientInstance);
1060
+ return _context14.abrupt("return", callingClientInstance);
770
1061
  case 4:
771
1062
  case "end":
772
- return _context12.stop();
1063
+ return _context14.stop();
773
1064
  }
774
- }, _callee11);
1065
+ }, _callee12);
775
1066
  }));
776
1067
  return function createClient(_x2, _x3) {
777
- return _ref5.apply(this, arguments);
1068
+ return _ref7.apply(this, arguments);
778
1069
  };
779
1070
  }();
780
1071
  //# sourceMappingURL=CallingClient.js.map