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