@webex/calling 3.8.1-next.4 → 3.8.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 (34) hide show
  1. package/dist/CallingClient/CallingClient.js +105 -125
  2. package/dist/CallingClient/CallingClient.js.map +1 -1
  3. package/dist/CallingClient/constants.js +2 -3
  4. package/dist/CallingClient/constants.js.map +1 -1
  5. package/dist/CallingClient/registration/register.js +144 -164
  6. package/dist/CallingClient/registration/register.js.map +1 -1
  7. package/dist/CallingClient/registration/register.test.js +9 -29
  8. package/dist/CallingClient/registration/register.test.js.map +1 -1
  9. package/dist/Errors/types.js +0 -2
  10. package/dist/Errors/types.js.map +1 -1
  11. package/dist/Metrics/index.js +2 -9
  12. package/dist/Metrics/index.js.map +1 -1
  13. package/dist/Metrics/index.test.js +4 -10
  14. package/dist/Metrics/index.test.js.map +1 -1
  15. package/dist/Metrics/types.js.map +1 -1
  16. package/dist/common/Utils.js +27 -28
  17. package/dist/common/Utils.js.map +1 -1
  18. package/dist/module/CallingClient/CallingClient.js +2 -2
  19. package/dist/module/CallingClient/constants.js +0 -1
  20. package/dist/module/CallingClient/registration/register.js +11 -14
  21. package/dist/module/Errors/types.js +0 -2
  22. package/dist/module/Metrics/index.js +1 -8
  23. package/dist/module/common/Utils.js +1 -2
  24. package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
  25. package/dist/types/CallingClient/constants.d.ts +0 -1
  26. package/dist/types/CallingClient/constants.d.ts.map +1 -1
  27. package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
  28. package/dist/types/Errors/types.d.ts +0 -2
  29. package/dist/types/Errors/types.d.ts.map +1 -1
  30. package/dist/types/Metrics/index.d.ts.map +1 -1
  31. package/dist/types/Metrics/types.d.ts +1 -2
  32. package/dist/types/Metrics/types.d.ts.map +1 -1
  33. package/dist/types/common/Utils.d.ts.map +1 -1
  34. package/package.json +4 -4
@@ -922,7 +922,7 @@ var Registration = exports.Registration = /*#__PURE__*/function () {
922
922
  break;
923
923
  }
924
924
  _context18.next = 3;
925
- return this.attemptRegistrationWithServers(_constants2.REGISTRATION_UTIL, this.primaryMobiusUris);
925
+ return this.attemptRegistrationWithServers(this.triggerRegistration.name, this.primaryMobiusUris);
926
926
  case 3:
927
927
  abort = _context18.sent;
928
928
  if (!(!this.isDeviceRegistered() && !abort)) {
@@ -960,146 +960,127 @@ var Registration = exports.Registration = /*#__PURE__*/function () {
960
960
  abort,
961
961
  _iterator,
962
962
  _step,
963
- _loop,
964
- _ret,
965
- _args20 = arguments;
966
- return _regenerator.default.wrap(function _callee19$(_context20) {
967
- while (1) switch (_context20.prev = _context20.next) {
963
+ url,
964
+ _this$deviceInfo$devi,
965
+ _this$deviceInfo$devi2,
966
+ resp,
967
+ body,
968
+ _args19 = arguments;
969
+ return _regenerator.default.wrap(function _callee19$(_context19) {
970
+ while (1) switch (_context19.prev = _context19.next) {
968
971
  case 0:
969
- servers = _args20.length > 1 && _args20[1] !== undefined ? _args20[1] : this.primaryMobiusUris;
972
+ servers = _args19.length > 1 && _args19[1] !== undefined ? _args19[1] : this.primaryMobiusUris;
970
973
  abort = false;
971
974
  this.retryAfter = undefined;
972
975
  if (!this.failoverImmediately) {
973
- _context20.next = 5;
976
+ _context19.next = 5;
974
977
  break;
975
978
  }
976
- return _context20.abrupt("return", abort);
979
+ return _context19.abrupt("return", abort);
977
980
  case 5:
978
981
  if (!this.isDeviceRegistered()) {
979
- _context20.next = 8;
982
+ _context19.next = 8;
980
983
  break;
981
984
  }
982
985
  _Logger.default.info("[".concat(caller, "] : Device already registered with : ").concat(this.activeMobiusUrl), {
983
986
  file: _constants2.REGISTRATION_FILE,
984
987
  method: _constants2.REGISTER_UTIL
985
988
  });
986
- return _context20.abrupt("return", abort);
989
+ return _context19.abrupt("return", abort);
987
990
  case 8:
988
991
  _iterator = _createForOfIteratorHelper(servers);
989
- _context20.prev = 9;
990
- _loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
991
- var _this6$backupMobiusUr;
992
- var url, serverType, _this6$deviceInfo$dev, _resp$headers$trackin, _resp$headers, _this6$deviceInfo$dev2, resp, body;
993
- return _regenerator.default.wrap(function _loop$(_context19) {
994
- while (1) switch (_context19.prev = _context19.next) {
995
- case 0:
996
- url = _step.value;
997
- serverType = _this6.primaryMobiusUris.includes(url) && 'PRIMARY' || ((_this6$backupMobiusUr = _this6.backupMobiusUris) === null || _this6$backupMobiusUr === void 0 ? void 0 : _this6$backupMobiusUr.includes(url)) && 'BACKUP' || 'UNKNOWN';
998
- _context19.prev = 2;
999
- abort = false;
1000
- _this6.registrationStatus = _types2.RegistrationStatus.INACTIVE;
1001
- _this6.lineEmitter(_types3.LINE_EVENTS.CONNECTING);
1002
- _Logger.default.info("[".concat(caller, "] : Mobius url to contact: ").concat(url), {
1003
- file: _constants2.REGISTRATION_FILE,
1004
- method: _constants2.REGISTER_UTIL
1005
- });
1006
- // eslint-disable-next-line no-await-in-loop
1007
- _context19.next = 9;
1008
- return _this6.postRegistration(url);
1009
- case 9:
1010
- resp = _context19.sent;
1011
- _this6.deviceInfo = resp.body;
1012
- _this6.registrationStatus = _types2.RegistrationStatus.ACTIVE;
1013
- _this6.lineEmitter(_types3.LINE_EVENTS.REGISTERED, resp.body);
1014
- _Logger.default.log("Registration successful for deviceId: ".concat((_this6$deviceInfo$dev = _this6.deviceInfo.device) === null || _this6$deviceInfo$dev === void 0 ? void 0 : _this6$deviceInfo$dev.deviceId, " userId: ").concat(_this6.userId), {
1015
- file: _constants2.REGISTRATION_FILE,
1016
- method: _constants2.METHODS.REGISTER
1017
- });
1018
- _this6.setActiveMobiusUrl(url);
1019
- _this6.setIntervalValues(_this6.deviceInfo);
1020
- _this6.metricManager.setDeviceInfo(_this6.deviceInfo);
1021
- _this6.metricManager.submitRegistrationMetric(_types.METRIC_EVENT.REGISTRATION, _types.REG_ACTION.REGISTER, _types.METRIC_TYPE.BEHAVIORAL, caller, serverType, (_resp$headers$trackin = (_resp$headers = resp.headers) === null || _resp$headers === void 0 ? void 0 : _resp$headers.trackingid) !== null && _resp$headers$trackin !== void 0 ? _resp$headers$trackin : '', undefined, undefined);
1022
- _this6.startKeepaliveTimer((_this6$deviceInfo$dev2 = _this6.deviceInfo.device) === null || _this6$deviceInfo$dev2 === void 0 ? void 0 : _this6$deviceInfo$dev2.uri, _this6.deviceInfo.keepaliveInterval, serverType);
1023
- _this6.initiateFailback();
1024
- return _context19.abrupt("return", 0);
1025
- case 23:
1026
- _context19.prev = 23;
1027
- _context19.t0 = _context19["catch"](2);
1028
- body = _context19.t0; // eslint-disable-next-line no-await-in-loop, @typescript-eslint/no-unused-vars
1029
- _context19.next = 28;
1030
- return (0, _common.handleRegistrationErrors)(body, function (clientError, finalError) {
1031
- var _body$headers$trackin, _body$headers;
1032
- if (finalError) {
1033
- _this6.lineEmitter(_types3.LINE_EVENTS.ERROR, undefined, clientError);
1034
- } else {
1035
- _this6.lineEmitter(_types3.LINE_EVENTS.UNREGISTERED);
1036
- }
1037
- _this6.metricManager.submitRegistrationMetric(_types.METRIC_EVENT.REGISTRATION_ERROR, _types.REG_ACTION.REGISTER, _types.METRIC_TYPE.BEHAVIORAL, caller, serverType, (_body$headers$trackin = (_body$headers = body.headers) === null || _body$headers === void 0 ? void 0 : _body$headers.trackingid) !== null && _body$headers$trackin !== void 0 ? _body$headers$trackin : '', undefined, clientError);
1038
- }, {
1039
- method: caller,
1040
- file: _constants2.REGISTRATION_FILE
1041
- }, function (retryAfter, retryCaller) {
1042
- return _this6.handle429Retry(retryAfter, retryCaller);
1043
- }, _this6.restoreRegistrationCallBack());
1044
- case 28:
1045
- abort = _context19.sent;
1046
- if (!(_this6.registrationStatus === _types2.RegistrationStatus.ACTIVE)) {
1047
- _context19.next = 32;
1048
- break;
1049
- }
1050
- _Logger.default.info("[".concat(caller, "] : Device is already restored, active mobius url: ").concat(_this6.activeMobiusUrl), {
1051
- file: _constants2.REGISTRATION_FILE,
1052
- method: _this6.attemptRegistrationWithServers.name
1053
- });
1054
- return _context19.abrupt("return", 0);
1055
- case 32:
1056
- if (!abort) {
1057
- _context19.next = 35;
1058
- break;
1059
- }
1060
- _this6.setStatus(_types2.RegistrationStatus.INACTIVE);
1061
- return _context19.abrupt("return", 0);
1062
- case 35:
1063
- case "end":
1064
- return _context19.stop();
1065
- }
1066
- }, _loop, null, [[2, 23]]);
1067
- });
992
+ _context19.prev = 9;
1068
993
  _iterator.s();
1069
- case 12:
994
+ case 11:
1070
995
  if ((_step = _iterator.n()).done) {
1071
- _context20.next = 19;
996
+ _context19.next = 48;
1072
997
  break;
1073
998
  }
1074
- return _context20.delegateYield(_loop(), "t0", 14);
1075
- case 14:
1076
- _ret = _context20.t0;
1077
- if (!(_ret === 0)) {
1078
- _context20.next = 17;
999
+ url = _step.value;
1000
+ _context19.prev = 13;
1001
+ abort = false;
1002
+ this.registrationStatus = _types2.RegistrationStatus.INACTIVE;
1003
+ this.lineEmitter(_types3.LINE_EVENTS.CONNECTING);
1004
+ _Logger.default.info("[".concat(caller, "] : Mobius url to contact: ").concat(url), {
1005
+ file: _constants2.REGISTRATION_FILE,
1006
+ method: _constants2.REGISTER_UTIL
1007
+ });
1008
+ // eslint-disable-next-line no-await-in-loop
1009
+ _context19.next = 20;
1010
+ return this.postRegistration(url);
1011
+ case 20:
1012
+ resp = _context19.sent;
1013
+ this.deviceInfo = resp.body;
1014
+ this.registrationStatus = _types2.RegistrationStatus.ACTIVE;
1015
+ this.lineEmitter(_types3.LINE_EVENTS.REGISTERED, resp.body);
1016
+ _Logger.default.log("Registration successful for deviceId: ".concat((_this$deviceInfo$devi = this.deviceInfo.device) === null || _this$deviceInfo$devi === void 0 ? void 0 : _this$deviceInfo$devi.deviceId, " userId: ").concat(this.userId), {
1017
+ file: _constants2.REGISTRATION_FILE,
1018
+ method: _constants2.METHODS.REGISTER
1019
+ });
1020
+ this.setActiveMobiusUrl(url);
1021
+ this.setIntervalValues(this.deviceInfo);
1022
+ this.metricManager.setDeviceInfo(this.deviceInfo);
1023
+ this.metricManager.submitRegistrationMetric(_types.METRIC_EVENT.REGISTRATION, _types.REG_ACTION.REGISTER, _types.METRIC_TYPE.BEHAVIORAL, undefined);
1024
+ this.startKeepaliveTimer((_this$deviceInfo$devi2 = this.deviceInfo.device) === null || _this$deviceInfo$devi2 === void 0 ? void 0 : _this$deviceInfo$devi2.uri, this.deviceInfo.keepaliveInterval);
1025
+ this.initiateFailback();
1026
+ return _context19.abrupt("break", 48);
1027
+ case 34:
1028
+ _context19.prev = 34;
1029
+ _context19.t0 = _context19["catch"](13);
1030
+ body = _context19.t0; // eslint-disable-next-line no-await-in-loop, @typescript-eslint/no-unused-vars
1031
+ _context19.next = 39;
1032
+ return (0, _common.handleRegistrationErrors)(body, function (clientError, finalError) {
1033
+ if (finalError) {
1034
+ _this6.lineEmitter(_types3.LINE_EVENTS.ERROR, undefined, clientError);
1035
+ } else {
1036
+ _this6.lineEmitter(_types3.LINE_EVENTS.UNREGISTERED);
1037
+ }
1038
+ _this6.metricManager.submitRegistrationMetric(_types.METRIC_EVENT.REGISTRATION_ERROR, _types.REG_ACTION.REGISTER, _types.METRIC_TYPE.BEHAVIORAL, clientError);
1039
+ }, {
1040
+ method: caller,
1041
+ file: _constants2.REGISTRATION_FILE
1042
+ }, function (retryAfter, retryCaller) {
1043
+ return _this6.handle429Retry(retryAfter, retryCaller);
1044
+ }, this.restoreRegistrationCallBack());
1045
+ case 39:
1046
+ abort = _context19.sent;
1047
+ if (!(this.registrationStatus === _types2.RegistrationStatus.ACTIVE)) {
1048
+ _context19.next = 43;
1079
1049
  break;
1080
1050
  }
1081
- return _context20.abrupt("break", 19);
1082
- case 17:
1083
- _context20.next = 12;
1051
+ _Logger.default.info("[".concat(caller, "] : Device is already restored, active mobius url: ").concat(this.activeMobiusUrl), {
1052
+ file: _constants2.REGISTRATION_FILE,
1053
+ method: this.attemptRegistrationWithServers.name
1054
+ });
1055
+ return _context19.abrupt("break", 48);
1056
+ case 43:
1057
+ if (!abort) {
1058
+ _context19.next = 46;
1059
+ break;
1060
+ }
1061
+ this.setStatus(_types2.RegistrationStatus.INACTIVE);
1062
+ return _context19.abrupt("break", 48);
1063
+ case 46:
1064
+ _context19.next = 11;
1084
1065
  break;
1085
- case 19:
1086
- _context20.next = 24;
1066
+ case 48:
1067
+ _context19.next = 53;
1087
1068
  break;
1088
- case 21:
1089
- _context20.prev = 21;
1090
- _context20.t1 = _context20["catch"](9);
1091
- _iterator.e(_context20.t1);
1092
- case 24:
1093
- _context20.prev = 24;
1069
+ case 50:
1070
+ _context19.prev = 50;
1071
+ _context19.t1 = _context19["catch"](9);
1072
+ _iterator.e(_context19.t1);
1073
+ case 53:
1074
+ _context19.prev = 53;
1094
1075
  _iterator.f();
1095
- return _context20.finish(24);
1096
- case 27:
1097
- return _context20.abrupt("return", abort);
1098
- case 28:
1076
+ return _context19.finish(53);
1077
+ case 56:
1078
+ return _context19.abrupt("return", abort);
1079
+ case 57:
1099
1080
  case "end":
1100
- return _context20.stop();
1081
+ return _context19.stop();
1101
1082
  }
1102
- }, _callee19, this, [[9, 21, 24, 27]]);
1083
+ }, _callee19, this, [[9, 50, 53, 56], [13, 34]]);
1103
1084
  }));
1104
1085
  function attemptRegistrationWithServers(_x13) {
1105
1086
  return _attemptRegistrationWithServers.apply(this, arguments);
@@ -1113,63 +1094,62 @@ var Registration = exports.Registration = /*#__PURE__*/function () {
1113
1094
  )
1114
1095
  }, {
1115
1096
  key: "startKeepaliveTimer",
1116
- value: function startKeepaliveTimer(url, interval, serverType) {
1097
+ value: function startKeepaliveTimer(url, interval) {
1117
1098
  var _this7 = this;
1118
1099
  var keepAliveRetryCount = 0;
1119
1100
  this.clearKeepaliveTimer();
1120
1101
  var RETRY_COUNT_THRESHOLD = this.isCCFlow ? 4 : 5;
1121
1102
  this.keepaliveTimer = setInterval( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
1122
1103
  var logContext;
1123
- return _regenerator.default.wrap(function _callee21$(_context22) {
1124
- while (1) switch (_context22.prev = _context22.next) {
1104
+ return _regenerator.default.wrap(function _callee21$(_context21) {
1105
+ while (1) switch (_context21.prev = _context21.next) {
1125
1106
  case 0:
1126
1107
  logContext = {
1127
1108
  file: _constants2.REGISTRATION_FILE,
1128
- method: _constants2.KEEPALIVE_UTIL
1109
+ method: _this7.startKeepaliveTimer.name
1129
1110
  };
1130
- _context22.next = 3;
1111
+ _context21.next = 3;
1131
1112
  return _this7.mutex.runExclusive( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
1132
1113
  var res, error, abort;
1133
- return _regenerator.default.wrap(function _callee20$(_context21) {
1134
- while (1) switch (_context21.prev = _context21.next) {
1114
+ return _regenerator.default.wrap(function _callee20$(_context20) {
1115
+ while (1) switch (_context20.prev = _context20.next) {
1135
1116
  case 0:
1136
1117
  if (!(_this7.isDeviceRegistered() && keepAliveRetryCount < RETRY_COUNT_THRESHOLD)) {
1137
- _context21.next = 30;
1118
+ _context20.next = 30;
1138
1119
  break;
1139
1120
  }
1140
- _context21.prev = 1;
1141
- _context21.next = 4;
1121
+ _context20.prev = 1;
1122
+ _context20.next = 4;
1142
1123
  return _this7.postKeepAlive(url);
1143
1124
  case 4:
1144
- res = _context21.sent;
1125
+ res = _context20.sent;
1145
1126
  _Logger.default.log("Sent Keepalive, status: ".concat(res.statusCode), logContext);
1146
1127
  if (keepAliveRetryCount > 0) {
1147
1128
  _this7.lineEmitter(_types3.LINE_EVENTS.RECONNECTED);
1148
1129
  }
1149
1130
  keepAliveRetryCount = 0;
1150
- _context21.next = 30;
1131
+ _context20.next = 30;
1151
1132
  break;
1152
1133
  case 10:
1153
- _context21.prev = 10;
1154
- _context21.t0 = _context21["catch"](1);
1134
+ _context20.prev = 10;
1135
+ _context20.t0 = _context20["catch"](1);
1155
1136
  keepAliveRetryCount += 1;
1156
- error = _context21.t0;
1137
+ error = _context20.t0;
1157
1138
  _Logger.default.warn("Keep-alive missed ".concat(keepAliveRetryCount, " times. Status -> ").concat(error.statusCode, " "), logContext);
1158
- _context21.next = 17;
1139
+ _context20.next = 17;
1159
1140
  return (0, _common.handleRegistrationErrors)(error, function (clientError, finalError) {
1160
- var _error$headers$tracki, _error$headers;
1161
1141
  if (finalError) {
1162
1142
  _this7.lineEmitter(_types3.LINE_EVENTS.ERROR, undefined, clientError);
1163
1143
  }
1164
- _this7.metricManager.submitRegistrationMetric(_types.METRIC_EVENT.REGISTRATION, _types.REG_ACTION.KEEPALIVE_FAILURE, _types.METRIC_TYPE.BEHAVIORAL, _constants2.KEEPALIVE_UTIL, serverType, (_error$headers$tracki = (_error$headers = error.headers) === null || _error$headers === void 0 ? void 0 : _error$headers.trackingid) !== null && _error$headers$tracki !== void 0 ? _error$headers$tracki : '', keepAliveRetryCount, clientError);
1144
+ _this7.metricManager.submitRegistrationMetric(_types.METRIC_EVENT.REGISTRATION, _types.REG_ACTION.KEEPALIVE_FAILURE, _types.METRIC_TYPE.BEHAVIORAL, clientError);
1165
1145
  }, {
1166
- method: _constants2.KEEPALIVE_UTIL,
1146
+ method: _this7.startKeepaliveTimer.name,
1167
1147
  file: _constants2.REGISTRATION_FILE
1168
1148
  });
1169
1149
  case 17:
1170
- abort = _context21.sent;
1150
+ abort = _context20.sent;
1171
1151
  if (!(abort || keepAliveRetryCount >= RETRY_COUNT_THRESHOLD)) {
1172
- _context21.next = 29;
1152
+ _context20.next = 29;
1173
1153
  break;
1174
1154
  }
1175
1155
  _this7.failoverImmediately = _this7.isCCFlow;
@@ -1178,25 +1158,25 @@ var Registration = exports.Registration = /*#__PURE__*/function () {
1178
1158
  _this7.clearFailbackTimer();
1179
1159
  _this7.lineEmitter(_types3.LINE_EVENTS.UNREGISTERED);
1180
1160
  if (abort) {
1181
- _context21.next = 27;
1161
+ _context20.next = 27;
1182
1162
  break;
1183
1163
  }
1184
- _context21.next = 27;
1185
- return _this7.reconnectOnFailure(_constants2.KEEPALIVE_UTIL);
1164
+ _context20.next = 27;
1165
+ return _this7.reconnectOnFailure(_this7.startKeepaliveTimer.name);
1186
1166
  case 27:
1187
- _context21.next = 30;
1167
+ _context20.next = 30;
1188
1168
  break;
1189
1169
  case 29:
1190
1170
  _this7.lineEmitter(_types3.LINE_EVENTS.RECONNECTING);
1191
1171
  case 30:
1192
1172
  case "end":
1193
- return _context21.stop();
1173
+ return _context20.stop();
1194
1174
  }
1195
1175
  }, _callee20, null, [[1, 10]]);
1196
1176
  })));
1197
1177
  case 3:
1198
1178
  case "end":
1199
- return _context22.stop();
1179
+ return _context21.stop();
1200
1180
  }
1201
1181
  }, _callee21);
1202
1182
  })), interval * 1000);
@@ -1222,24 +1202,24 @@ var Registration = exports.Registration = /*#__PURE__*/function () {
1222
1202
  key: "deregister",
1223
1203
  value: function () {
1224
1204
  var _deregister = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22() {
1225
- var _this$deviceInfo$devi, _this$deviceInfo$devi2;
1226
- return _regenerator.default.wrap(function _callee22$(_context23) {
1227
- while (1) switch (_context23.prev = _context23.next) {
1205
+ var _this$deviceInfo$devi3, _this$deviceInfo$devi4;
1206
+ return _regenerator.default.wrap(function _callee22$(_context22) {
1207
+ while (1) switch (_context22.prev = _context22.next) {
1228
1208
  case 0:
1229
- _context23.prev = 0;
1230
- _context23.next = 3;
1231
- return this.deleteRegistration(this.activeMobiusUrl, (_this$deviceInfo$devi = this.deviceInfo.device) === null || _this$deviceInfo$devi === void 0 ? void 0 : _this$deviceInfo$devi.deviceId, (_this$deviceInfo$devi2 = this.deviceInfo.device) === null || _this$deviceInfo$devi2 === void 0 ? void 0 : _this$deviceInfo$devi2.clientDeviceUri);
1209
+ _context22.prev = 0;
1210
+ _context22.next = 3;
1211
+ return this.deleteRegistration(this.activeMobiusUrl, (_this$deviceInfo$devi3 = this.deviceInfo.device) === null || _this$deviceInfo$devi3 === void 0 ? void 0 : _this$deviceInfo$devi3.deviceId, (_this$deviceInfo$devi4 = this.deviceInfo.device) === null || _this$deviceInfo$devi4 === void 0 ? void 0 : _this$deviceInfo$devi4.clientDeviceUri);
1232
1212
  case 3:
1233
1213
  _Logger.default.log('Registration successfully deregistered', {
1234
1214
  file: _constants2.REGISTRATION_FILE,
1235
1215
  method: _constants2.METHODS.DEREGISTER
1236
1216
  });
1237
- _context23.next = 9;
1217
+ _context22.next = 9;
1238
1218
  break;
1239
1219
  case 6:
1240
- _context23.prev = 6;
1241
- _context23.t0 = _context23["catch"](0);
1242
- _Logger.default.warn("Delete failed with Mobius: ".concat(_context23.t0), {
1220
+ _context22.prev = 6;
1221
+ _context22.t0 = _context22["catch"](0);
1222
+ _Logger.default.warn("Delete failed with Mobius: ".concat(_context22.t0), {
1243
1223
  file: _constants2.REGISTRATION_FILE,
1244
1224
  method: _constants2.METHODS.DEREGISTER
1245
1225
  });
@@ -1248,7 +1228,7 @@ var Registration = exports.Registration = /*#__PURE__*/function () {
1248
1228
  this.setStatus(_types2.RegistrationStatus.INACTIVE);
1249
1229
  case 11:
1250
1230
  case "end":
1251
- return _context23.stop();
1231
+ return _context22.stop();
1252
1232
  }
1253
1233
  }, _callee22, this, [[0, 6]]);
1254
1234
  }));
@@ -1258,8 +1238,8 @@ var Registration = exports.Registration = /*#__PURE__*/function () {
1258
1238
  return deregister;
1259
1239
  }()
1260
1240
  /**
1261
- * Indicates whether the calling client is in a mode
1262
- * to retry registration.
1241
+ * Indicates whether the calling client is in a mode
1242
+ * to retry registration.
1263
1243
  */
1264
1244
  }, {
1265
1245
  key: "isRegRetry",
@@ -1316,8 +1296,8 @@ var Registration = exports.Registration = /*#__PURE__*/function () {
1316
1296
  value: (function () {
1317
1297
  var _reconnectOnFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(caller) {
1318
1298
  var abort;
1319
- return _regenerator.default.wrap(function _callee23$(_context24) {
1320
- while (1) switch (_context24.prev = _context24.next) {
1299
+ return _regenerator.default.wrap(function _callee23$(_context23) {
1300
+ while (1) switch (_context23.prev = _context23.next) {
1321
1301
  case 0:
1322
1302
  _Logger.default.info(_constants.METHOD_START_MESSAGE, {
1323
1303
  method: _constants2.METHODS.RECONNECT_ON_FAILURE,
@@ -1325,25 +1305,25 @@ var Registration = exports.Registration = /*#__PURE__*/function () {
1325
1305
  });
1326
1306
  this.reconnectPending = false;
1327
1307
  if (this.isDeviceRegistered()) {
1328
- _context24.next = 14;
1308
+ _context23.next = 14;
1329
1309
  break;
1330
1310
  }
1331
1311
  if (!((0, _keys.default)(this.callManager.getActiveCalls()).length === 0)) {
1332
- _context24.next = 12;
1312
+ _context23.next = 12;
1333
1313
  break;
1334
1314
  }
1335
- _context24.next = 6;
1315
+ _context23.next = 6;
1336
1316
  return this.restorePreviousRegistration(caller);
1337
1317
  case 6:
1338
- abort = _context24.sent;
1318
+ abort = _context23.sent;
1339
1319
  if (!(!abort && !this.isDeviceRegistered())) {
1340
- _context24.next = 10;
1320
+ _context23.next = 10;
1341
1321
  break;
1342
1322
  }
1343
- _context24.next = 10;
1323
+ _context23.next = 10;
1344
1324
  return this.restartRegistration(caller);
1345
1325
  case 10:
1346
- _context24.next = 14;
1326
+ _context23.next = 14;
1347
1327
  break;
1348
1328
  case 12:
1349
1329
  this.reconnectPending = true;
@@ -1353,7 +1333,7 @@ var Registration = exports.Registration = /*#__PURE__*/function () {
1353
1333
  });
1354
1334
  case 14:
1355
1335
  case "end":
1356
- return _context24.stop();
1336
+ return _context23.stop();
1357
1337
  }
1358
1338
  }, _callee23, this);
1359
1339
  }));