@webex/calling 3.5.0-next.2 → 3.5.0-next.20

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 (60) hide show
  1. package/dist/CallingClient/CallingClient.js +2 -2
  2. package/dist/CallingClient/CallingClient.js.map +1 -1
  3. package/dist/CallingClient/CallingClient.test.js +1 -1
  4. package/dist/CallingClient/CallingClient.test.js.map +1 -1
  5. package/dist/CallingClient/calling/call.js +408 -344
  6. package/dist/CallingClient/calling/call.js.map +1 -1
  7. package/dist/CallingClient/calling/call.test.js +433 -386
  8. package/dist/CallingClient/calling/call.test.js.map +1 -1
  9. package/dist/CallingClient/calling/callManager.js +6 -6
  10. package/dist/CallingClient/calling/callManager.js.map +1 -1
  11. package/dist/CallingClient/calling/callManager.test.js +3 -3
  12. package/dist/CallingClient/calling/callManager.test.js.map +1 -1
  13. package/dist/CallingClient/calling/types.js.map +1 -1
  14. package/dist/CallingClient/line/index.js +13 -6
  15. package/dist/CallingClient/line/index.js.map +1 -1
  16. package/dist/CallingClient/line/line.test.js +84 -22
  17. package/dist/CallingClient/line/line.test.js.map +1 -1
  18. package/dist/CallingClient/line/types.js.map +1 -1
  19. package/dist/CallingClient/registration/register.js +79 -59
  20. package/dist/CallingClient/registration/register.js.map +1 -1
  21. package/dist/CallingClient/registration/register.test.js +1 -1
  22. package/dist/CallingClient/registration/register.test.js.map +1 -1
  23. package/dist/CallingClient/types.js.map +1 -1
  24. package/dist/common/Utils.js +18 -13
  25. package/dist/common/Utils.js.map +1 -1
  26. package/dist/common/Utils.test.js +97 -0
  27. package/dist/common/Utils.test.js.map +1 -1
  28. package/dist/common/constants.js +2 -1
  29. package/dist/common/constants.js.map +1 -1
  30. package/dist/common/types.js +1 -0
  31. package/dist/common/types.js.map +1 -1
  32. package/dist/module/CallingClient/CallingClient.js +1 -1
  33. package/dist/module/CallingClient/calling/call.js +44 -18
  34. package/dist/module/CallingClient/calling/callManager.js +5 -5
  35. package/dist/module/CallingClient/line/index.js +12 -6
  36. package/dist/module/CallingClient/registration/register.js +12 -4
  37. package/dist/module/common/Utils.js +12 -5
  38. package/dist/module/common/constants.js +1 -0
  39. package/dist/module/common/types.js +1 -0
  40. package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
  41. package/dist/types/CallingClient/calling/call.d.ts +5 -3
  42. package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
  43. package/dist/types/CallingClient/calling/callManager.d.ts +1 -1
  44. package/dist/types/CallingClient/calling/callManager.d.ts.map +1 -1
  45. package/dist/types/CallingClient/calling/types.d.ts +1 -1
  46. package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
  47. package/dist/types/CallingClient/line/index.d.ts +3 -2
  48. package/dist/types/CallingClient/line/index.d.ts.map +1 -1
  49. package/dist/types/CallingClient/line/types.d.ts +1 -1
  50. package/dist/types/CallingClient/line/types.d.ts.map +1 -1
  51. package/dist/types/CallingClient/registration/register.d.ts +4 -2
  52. package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
  53. package/dist/types/CallingClient/types.d.ts +1 -0
  54. package/dist/types/CallingClient/types.d.ts.map +1 -1
  55. package/dist/types/common/Utils.d.ts.map +1 -1
  56. package/dist/types/common/constants.d.ts +1 -0
  57. package/dist/types/common/constants.d.ts.map +1 -1
  58. package/dist/types/common/types.d.ts +2 -1
  59. package/dist/types/common/types.d.ts.map +1 -1
  60. package/package.json +3 -3
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
4
+ var _Object$keys = require("@babel/runtime-corejs2/core-js/object/keys");
5
+ var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
6
+ var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
7
+ var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
8
+ var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
4
9
  var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
5
10
  var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
6
11
  _Object$defineProperty(exports, "__esModule", {
@@ -22,6 +27,7 @@ var _internalMediaCore = require("@webex/internal-media-core");
22
27
  var _xstate = require("xstate");
23
28
  var _uuid = require("uuid");
24
29
  var _webMediaEffects = require("@webex/web-media-effects");
30
+ var _internalPluginMetrics = require("@webex/internal-plugin-metrics");
25
31
  var _types = require("../../Errors/types");
26
32
  var _Utils = require("../../common/Utils");
27
33
  var _types2 = require("../../common/types");
@@ -36,6 +42,8 @@ var _CallerId = require("./CallerId");
36
42
  var _types5 = require("../../Metrics/types");
37
43
  var _Metrics = require("../../Metrics");
38
44
  var _constants2 = require("../../common/constants");
45
+ function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
46
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
39
47
  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); }; }
40
48
  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 tsdoc/syntax */ /* eslint-disable no-param-reassign */
41
49
  /**
@@ -47,7 +55,7 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
47
55
  /**
48
56
  * @ignore
49
57
  */
50
- function Call(activeUrl, webex, destination, direction, deviceId, lineId, deleteCb, indicator) {
58
+ function Call(activeUrl, webex, direction, deviceId, lineId, deleteCb, indicator, destination) {
51
59
  var _this;
52
60
  (0, _classCallCheck2.default)(this, Call);
53
61
  _this = _super.call(this);
@@ -89,6 +97,49 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
89
97
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaNegotiationCompleted", void 0);
90
98
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "receivedRoapOKSeq", void 0);
91
99
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "localAudioStream", void 0);
100
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "rtcMetrics", void 0);
101
+ /**
102
+ * Media failed, so collect a stats report from webrtc
103
+ * send a webrtc telemetry dump to the configured server using the internal media core check metrics configured callback
104
+ * @param {String} callFrom - the function calling this function, optional.
105
+ * @returns {Promise<void>}
106
+ */
107
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "forceSendStatsReport", /*#__PURE__*/function () {
108
+ var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) {
109
+ var callFrom, loggerContext, errorInfo, errorStatus, errorLog;
110
+ return _regenerator.default.wrap(function _callee$(_context) {
111
+ while (1) switch (_context.prev = _context.next) {
112
+ case 0:
113
+ callFrom = _ref.callFrom;
114
+ loggerContext = {
115
+ file: _constants.CALL_FILE,
116
+ method: _this.forceSendStatsReport.name
117
+ };
118
+ _context.prev = 2;
119
+ _context.next = 5;
120
+ return _this.mediaConnection.forceRtcMetricsSend();
121
+ case 5:
122
+ _Logger.default.info("Successfully uploaded available webrtc telemetry statistics", loggerContext);
123
+ _Logger.default.info("callFrom: ".concat(callFrom), loggerContext);
124
+ _context.next = 15;
125
+ break;
126
+ case 9:
127
+ _context.prev = 9;
128
+ _context.t0 = _context["catch"](2);
129
+ errorInfo = _context.t0;
130
+ errorStatus = (0, _Utils.serviceErrorCodeHandler)(errorInfo, loggerContext);
131
+ errorLog = new Error("Failed to upload webrtc telemetry statistics. ".concat(errorStatus));
132
+ _Logger.default.error(errorLog, loggerContext);
133
+ case 15:
134
+ case "end":
135
+ return _context.stop();
136
+ }
137
+ }, _callee, null, [[2, 9]]);
138
+ }));
139
+ return function (_x) {
140
+ return _ref2.apply(this, arguments);
141
+ };
142
+ }());
92
143
  /**
93
144
  *
94
145
  */
@@ -112,6 +163,7 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
112
163
  */
113
164
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setCallId", function (callId) {
114
165
  _this.callId = callId;
166
+ _this.rtcMetrics.updateCallId(callId);
115
167
  _Logger.default.info("Setting callId : ".concat(_this.callId, " for correlationId: ").concat(_this.correlationId), {
116
168
  file: _constants.CALL_FILE,
117
169
  method: _this.setCallId.name
@@ -131,38 +183,41 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
131
183
  * @param roapMessage
132
184
  */
133
185
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "post", /*#__PURE__*/function () {
134
- var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(roapMessage) {
135
- return _regenerator.default.wrap(function _callee$(_context) {
136
- while (1) switch (_context.prev = _context.next) {
186
+ var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(roapMessage) {
187
+ var basePayload;
188
+ return _regenerator.default.wrap(function _callee2$(_context2) {
189
+ while (1) switch (_context2.prev = _context2.next) {
137
190
  case 0:
138
- return _context.abrupt("return", _this.webex.request({
191
+ basePayload = {
192
+ device: {
193
+ deviceId: _this.deviceId,
194
+ correlationId: _this.correlationId
195
+ },
196
+ localMedia: {
197
+ roap: roapMessage,
198
+ mediaId: (0, _uuid.v4)()
199
+ }
200
+ };
201
+ return _context2.abrupt("return", _this.webex.request({
139
202
  uri: "".concat(_this.mobiusUrl).concat(_constants.DEVICES_ENDPOINT_RESOURCE, "/").concat(_this.deviceId, "/").concat(_constants.CALL_ENDPOINT_RESOURCE),
140
203
  method: _types2.HTTP_METHODS.POST,
141
204
  service: _types2.ALLOWED_SERVICES.MOBIUS,
142
205
  headers: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants.CISCO_DEVICE_URL, _this.webex.internal.device.url), _constants.SPARK_USER_AGENT, _constants.CALLING_USER_AGENT),
143
- body: {
144
- device: {
145
- deviceId: _this.deviceId,
146
- correlationId: _this.correlationId
147
- },
206
+ body: _this.destination ? _objectSpread(_objectSpread({}, basePayload), {}, {
148
207
  callee: {
149
208
  type: _this.destination.type,
150
209
  address: _this.destination.address
151
- },
152
- localMedia: {
153
- roap: roapMessage,
154
- mediaId: (0, _uuid.v4)()
155
210
  }
156
- }
211
+ }) : basePayload
157
212
  }));
158
- case 1:
213
+ case 2:
159
214
  case "end":
160
- return _context.stop();
215
+ return _context2.stop();
161
216
  }
162
- }, _callee);
217
+ }, _callee2);
163
218
  }));
164
- return function (_x) {
165
- return _ref.apply(this, arguments);
219
+ return function (_x2) {
220
+ return _ref3.apply(this, arguments);
166
221
  };
167
222
  }());
168
223
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onEffectEnabled", function () {
@@ -300,6 +355,9 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
300
355
  code: _types4.DisconnectCode.NORMAL,
301
356
  cause: _types4.DisconnectCause.NORMAL
302
357
  };
358
+ _this.rtcMetrics = new _internalPluginMetrics.RtcMetrics(_this.webex, {
359
+ callId: _this.callId
360
+ }, _this.correlationId);
303
361
  var callMachine = (0, _xstate.createMachine)({
304
362
  schema: {
305
363
  context: {},
@@ -1031,37 +1089,37 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1031
1089
  }, {
1032
1090
  key: "handleOutgoingCallSetup",
1033
1091
  value: (function () {
1034
- var _handleOutgoingCallSetup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(event) {
1092
+ var _handleOutgoingCallSetup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(event) {
1035
1093
  var _this2 = this;
1036
1094
  var message, response, errData;
1037
- return _regenerator.default.wrap(function _callee2$(_context2) {
1038
- while (1) switch (_context2.prev = _context2.next) {
1095
+ return _regenerator.default.wrap(function _callee3$(_context3) {
1096
+ while (1) switch (_context3.prev = _context3.next) {
1039
1097
  case 0:
1040
1098
  _Logger.default.info("handleOutgoingCallSetup: ".concat(this.getCorrelationId(), " "), {
1041
1099
  file: _constants.CALL_FILE,
1042
1100
  method: this.handleOutgoingCallSetup.name
1043
1101
  });
1044
1102
  message = event.data;
1045
- _context2.prev = 2;
1046
- _context2.next = 5;
1103
+ _context3.prev = 2;
1104
+ _context3.next = 5;
1047
1105
  return this.post(message);
1048
1106
  case 5:
1049
- response = _context2.sent;
1107
+ response = _context3.sent;
1050
1108
  _Logger.default.log("handleOutgoingCallSetup: Response code: ".concat(response.statusCode), {
1051
1109
  file: _constants.CALL_FILE,
1052
1110
  method: this.handleOutgoingCallSetup.name
1053
1111
  });
1054
1112
  this.setCallId(response.body.callId);
1055
- _context2.next = 15;
1113
+ _context3.next = 15;
1056
1114
  break;
1057
1115
  case 10:
1058
- _context2.prev = 10;
1059
- _context2.t0 = _context2["catch"](2);
1116
+ _context3.prev = 10;
1117
+ _context3.t0 = _context3["catch"](2);
1060
1118
  _Logger.default.warn('Failed to setup the call', {
1061
1119
  file: _constants.CALL_FILE,
1062
1120
  method: this.handleOutgoingCallSetup.name
1063
1121
  });
1064
- errData = _context2.t0;
1122
+ errData = _context3.t0;
1065
1123
  (0, _Utils.handleCallErrors)(function (error) {
1066
1124
  _this2.emit(_types3.CALL_EVENT_KEYS.CALL_ERROR, error);
1067
1125
  _this2.submitCallErrorMetric(error);
@@ -1077,11 +1135,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1077
1135
  }, this.getCorrelationId(), errData, this.handleOutgoingCallSetup.name, _constants.CALL_FILE);
1078
1136
  case 15:
1079
1137
  case "end":
1080
- return _context2.stop();
1138
+ return _context3.stop();
1081
1139
  }
1082
- }, _callee2, this, [[2, 10]]);
1140
+ }, _callee3, this, [[2, 10]]);
1083
1141
  }));
1084
- function handleOutgoingCallSetup(_x2) {
1142
+ function handleOutgoingCallSetup(_x3) {
1085
1143
  return _handleOutgoingCallSetup.apply(this, arguments);
1086
1144
  }
1087
1145
  return handleOutgoingCallSetup;
@@ -1096,21 +1154,21 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1096
1154
  }, {
1097
1155
  key: "handleCallHold",
1098
1156
  value: (function () {
1099
- var _handleCallHold = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(event) {
1157
+ var _handleCallHold = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(event) {
1100
1158
  var _this3 = this;
1101
1159
  var response, errData;
1102
- return _regenerator.default.wrap(function _callee4$(_context4) {
1103
- while (1) switch (_context4.prev = _context4.next) {
1160
+ return _regenerator.default.wrap(function _callee5$(_context5) {
1161
+ while (1) switch (_context5.prev = _context5.next) {
1104
1162
  case 0:
1105
1163
  _Logger.default.info("handleCallHold: ".concat(this.getCorrelationId(), " "), {
1106
1164
  file: _constants.CALL_FILE,
1107
1165
  method: this.handleCallHold.name
1108
1166
  });
1109
- _context4.prev = 1;
1110
- _context4.next = 4;
1167
+ _context5.prev = 1;
1168
+ _context5.next = 4;
1111
1169
  return this.postSSRequest(undefined, _types3.SUPPLEMENTARY_SERVICES.HOLD);
1112
1170
  case 4:
1113
- response = _context4.sent;
1171
+ response = _context5.sent;
1114
1172
  _Logger.default.log("Response code: ".concat(response.statusCode), {
1115
1173
  file: _constants.CALL_FILE,
1116
1174
  method: this.handleCallHold.name
@@ -1121,10 +1179,10 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1121
1179
  * received from Mobius and forwarded towards calling client
1122
1180
  */
1123
1181
  if (this.isHeld() === false) {
1124
- this.supplementaryServicesTimer = setTimeout( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
1182
+ this.supplementaryServicesTimer = setTimeout( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
1125
1183
  var errorContext, callError;
1126
- return _regenerator.default.wrap(function _callee3$(_context3) {
1127
- while (1) switch (_context3.prev = _context3.next) {
1184
+ return _regenerator.default.wrap(function _callee4$(_context4) {
1185
+ while (1) switch (_context4.prev = _context4.next) {
1128
1186
  case 0:
1129
1187
  errorContext = {
1130
1188
  file: _constants.CALL_FILE,
@@ -1139,21 +1197,21 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1139
1197
  _this3.submitCallErrorMetric(callError);
1140
1198
  case 5:
1141
1199
  case "end":
1142
- return _context3.stop();
1200
+ return _context4.stop();
1143
1201
  }
1144
- }, _callee3);
1202
+ }, _callee4);
1145
1203
  })), _constants.SUPPLEMENTARY_SERVICES_TIMEOUT);
1146
1204
  }
1147
- _context4.next = 14;
1205
+ _context5.next = 14;
1148
1206
  break;
1149
1207
  case 9:
1150
- _context4.prev = 9;
1151
- _context4.t0 = _context4["catch"](1);
1208
+ _context5.prev = 9;
1209
+ _context5.t0 = _context5["catch"](1);
1152
1210
  _Logger.default.warn('Failed to put the call on hold', {
1153
1211
  file: _constants.CALL_FILE,
1154
1212
  method: this.handleCallHold.name
1155
1213
  });
1156
- errData = _context4.t0;
1214
+ errData = _context5.t0;
1157
1215
  (0, _Utils.handleCallErrors)(function (error) {
1158
1216
  _this3.emit(_types3.CALL_EVENT_KEYS.HOLD_ERROR, error);
1159
1217
  _this3.submitCallErrorMetric(error);
@@ -1169,11 +1227,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1169
1227
  }, this.getCorrelationId(), errData, this.handleOutgoingCallSetup.name, _constants.CALL_FILE);
1170
1228
  case 14:
1171
1229
  case "end":
1172
- return _context4.stop();
1230
+ return _context5.stop();
1173
1231
  }
1174
- }, _callee4, this, [[1, 9]]);
1232
+ }, _callee5, this, [[1, 9]]);
1175
1233
  }));
1176
- function handleCallHold(_x3) {
1234
+ function handleCallHold(_x4) {
1177
1235
  return _handleCallHold.apply(this, arguments);
1178
1236
  }
1179
1237
  return handleCallHold;
@@ -1188,21 +1246,21 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1188
1246
  }, {
1189
1247
  key: "handleCallResume",
1190
1248
  value: (function () {
1191
- var _handleCallResume = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(event) {
1249
+ var _handleCallResume = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(event) {
1192
1250
  var _this4 = this;
1193
1251
  var response, errData;
1194
- return _regenerator.default.wrap(function _callee6$(_context6) {
1195
- while (1) switch (_context6.prev = _context6.next) {
1252
+ return _regenerator.default.wrap(function _callee7$(_context7) {
1253
+ while (1) switch (_context7.prev = _context7.next) {
1196
1254
  case 0:
1197
1255
  _Logger.default.info("handleCallResume: ".concat(this.getCorrelationId(), " "), {
1198
1256
  file: _constants.CALL_FILE,
1199
1257
  method: this.handleCallResume.name
1200
1258
  });
1201
- _context6.prev = 1;
1202
- _context6.next = 4;
1259
+ _context7.prev = 1;
1260
+ _context7.next = 4;
1203
1261
  return this.postSSRequest(undefined, _types3.SUPPLEMENTARY_SERVICES.RESUME);
1204
1262
  case 4:
1205
- response = _context6.sent;
1263
+ response = _context7.sent;
1206
1264
  _Logger.default.log("Response code: ".concat(response.statusCode), {
1207
1265
  file: _constants.CALL_FILE,
1208
1266
  method: this.handleCallResume.name
@@ -1213,10 +1271,10 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1213
1271
  * received from Mobius on resuming the call and forwarded towards calling client
1214
1272
  */
1215
1273
  if (this.isHeld() === true) {
1216
- this.supplementaryServicesTimer = setTimeout( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
1274
+ this.supplementaryServicesTimer = setTimeout( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
1217
1275
  var errorContext, callError;
1218
- return _regenerator.default.wrap(function _callee5$(_context5) {
1219
- while (1) switch (_context5.prev = _context5.next) {
1276
+ return _regenerator.default.wrap(function _callee6$(_context6) {
1277
+ while (1) switch (_context6.prev = _context6.next) {
1220
1278
  case 0:
1221
1279
  errorContext = {
1222
1280
  file: _constants.CALL_FILE,
@@ -1231,21 +1289,21 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1231
1289
  _this4.submitCallErrorMetric(callError);
1232
1290
  case 5:
1233
1291
  case "end":
1234
- return _context5.stop();
1292
+ return _context6.stop();
1235
1293
  }
1236
- }, _callee5);
1294
+ }, _callee6);
1237
1295
  })), _constants.SUPPLEMENTARY_SERVICES_TIMEOUT);
1238
1296
  }
1239
- _context6.next = 14;
1297
+ _context7.next = 14;
1240
1298
  break;
1241
1299
  case 9:
1242
- _context6.prev = 9;
1243
- _context6.t0 = _context6["catch"](1);
1300
+ _context7.prev = 9;
1301
+ _context7.t0 = _context7["catch"](1);
1244
1302
  _Logger.default.warn('Failed to resume the call', {
1245
1303
  file: _constants.CALL_FILE,
1246
1304
  method: this.handleCallResume.name
1247
1305
  });
1248
- errData = _context6.t0;
1306
+ errData = _context7.t0;
1249
1307
  (0, _Utils.handleCallErrors)(function (error) {
1250
1308
  _this4.emit(_types3.CALL_EVENT_KEYS.RESUME_ERROR, error);
1251
1309
  _this4.submitCallErrorMetric(error);
@@ -1261,11 +1319,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1261
1319
  }, this.getCorrelationId(), errData, this.handleOutgoingCallSetup.name, _constants.CALL_FILE);
1262
1320
  case 14:
1263
1321
  case "end":
1264
- return _context6.stop();
1322
+ return _context7.stop();
1265
1323
  }
1266
- }, _callee6, this, [[1, 9]]);
1324
+ }, _callee7, this, [[1, 9]]);
1267
1325
  }));
1268
- function handleCallResume(_x4) {
1326
+ function handleCallResume(_x5) {
1269
1327
  return _handleCallResume.apply(this, arguments);
1270
1328
  }
1271
1329
  return handleCallResume;
@@ -1354,35 +1412,35 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1354
1412
  }, {
1355
1413
  key: "handleOutgoingCallAlerting",
1356
1414
  value: (function () {
1357
- var _handleOutgoingCallAlerting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(event) {
1415
+ var _handleOutgoingCallAlerting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(event) {
1358
1416
  var _this5 = this;
1359
1417
  var res, errData;
1360
- return _regenerator.default.wrap(function _callee7$(_context7) {
1361
- while (1) switch (_context7.prev = _context7.next) {
1418
+ return _regenerator.default.wrap(function _callee8$(_context8) {
1419
+ while (1) switch (_context8.prev = _context8.next) {
1362
1420
  case 0:
1363
1421
  _Logger.default.info("handleOutgoingCallAlerting: ".concat(this.getCorrelationId(), " "), {
1364
1422
  file: _constants.CALL_FILE,
1365
1423
  method: this.handleOutgoingCallAlerting.name
1366
1424
  });
1367
- _context7.prev = 1;
1368
- _context7.next = 4;
1425
+ _context8.prev = 1;
1426
+ _context8.next = 4;
1369
1427
  return this.patch(_types4.MobiusCallState.ALERTING);
1370
1428
  case 4:
1371
- res = _context7.sent;
1429
+ res = _context8.sent;
1372
1430
  _Logger.default.log("PATCH response: ".concat(res.statusCode), {
1373
1431
  file: _constants.CALL_FILE,
1374
1432
  method: this.handleOutgoingCallAlerting.name
1375
1433
  });
1376
- _context7.next = 13;
1434
+ _context8.next = 13;
1377
1435
  break;
1378
1436
  case 8:
1379
- _context7.prev = 8;
1380
- _context7.t0 = _context7["catch"](1);
1437
+ _context8.prev = 8;
1438
+ _context8.t0 = _context8["catch"](1);
1381
1439
  _Logger.default.warn('Failed to signal call progression', {
1382
1440
  file: _constants.CALL_FILE,
1383
1441
  method: this.handleOutgoingCallAlerting.name
1384
1442
  });
1385
- errData = _context7.t0;
1443
+ errData = _context8.t0;
1386
1444
  (0, _Utils.handleCallErrors)(function (error) {
1387
1445
  _this5.emit(_types3.CALL_EVENT_KEYS.CALL_ERROR, error);
1388
1446
  _this5.submitCallErrorMetric(error);
@@ -1398,11 +1456,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1398
1456
  }, this.getCorrelationId(), errData, this.handleOutgoingCallAlerting.name, _constants.CALL_FILE);
1399
1457
  case 13:
1400
1458
  case "end":
1401
- return _context7.stop();
1459
+ return _context8.stop();
1402
1460
  }
1403
- }, _callee7, this, [[1, 8]]);
1461
+ }, _callee8, this, [[1, 8]]);
1404
1462
  }));
1405
- function handleOutgoingCallAlerting(_x5) {
1463
+ function handleOutgoingCallAlerting(_x6) {
1406
1464
  return _handleOutgoingCallAlerting.apply(this, arguments);
1407
1465
  }
1408
1466
  return handleOutgoingCallAlerting;
@@ -1443,11 +1501,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1443
1501
  }, {
1444
1502
  key: "handleOutgoingCallConnect",
1445
1503
  value: (function () {
1446
- var _handleOutgoingCallConnect = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(event) {
1504
+ var _handleOutgoingCallConnect = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(event) {
1447
1505
  var _this6 = this;
1448
1506
  var res, errData;
1449
- return _regenerator.default.wrap(function _callee8$(_context8) {
1450
- while (1) switch (_context8.prev = _context8.next) {
1507
+ return _regenerator.default.wrap(function _callee9$(_context9) {
1508
+ while (1) switch (_context9.prev = _context9.next) {
1451
1509
  case 0:
1452
1510
  _Logger.default.info("handleOutgoingCallConnect: ".concat(this.getCorrelationId(), " "), {
1453
1511
  file: _constants.CALL_FILE,
@@ -1456,38 +1514,38 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1456
1514
 
1457
1515
  /* We should have received an Offer by now */
1458
1516
  if (this.remoteRoapMessage) {
1459
- _context8.next = 4;
1517
+ _context9.next = 4;
1460
1518
  break;
1461
1519
  }
1462
1520
  _Logger.default.warn('Offer not yet received from remote end... Exiting', {
1463
1521
  file: _constants.CALL_FILE,
1464
1522
  method: this.handleOutgoingCallConnect.name
1465
1523
  });
1466
- return _context8.abrupt("return");
1524
+ return _context9.abrupt("return");
1467
1525
  case 4:
1468
- _context8.prev = 4;
1526
+ _context9.prev = 4;
1469
1527
  /* Start Offer/Answer as we might have buffered the offer by now */
1470
1528
  this.mediaConnection.roapMessageReceived(this.remoteRoapMessage);
1471
1529
 
1472
1530
  /* send call_connect PATCH */
1473
- _context8.next = 8;
1531
+ _context9.next = 8;
1474
1532
  return this.patch(_types4.MobiusCallState.CONNECTED);
1475
1533
  case 8:
1476
- res = _context8.sent;
1534
+ res = _context9.sent;
1477
1535
  _Logger.default.log("PATCH response: ".concat(res.statusCode), {
1478
1536
  file: _constants.CALL_FILE,
1479
1537
  method: this.handleOutgoingCallConnect.name
1480
1538
  });
1481
- _context8.next = 17;
1539
+ _context9.next = 17;
1482
1540
  break;
1483
1541
  case 12:
1484
- _context8.prev = 12;
1485
- _context8.t0 = _context8["catch"](4);
1542
+ _context9.prev = 12;
1543
+ _context9.t0 = _context9["catch"](4);
1486
1544
  _Logger.default.warn('Failed to connect the call', {
1487
1545
  file: _constants.CALL_FILE,
1488
1546
  method: this.handleOutgoingCallConnect.name
1489
1547
  });
1490
- errData = _context8.t0;
1548
+ errData = _context9.t0;
1491
1549
  (0, _Utils.handleCallErrors)(function (error) {
1492
1550
  _this6.emit(_types3.CALL_EVENT_KEYS.CALL_ERROR, error);
1493
1551
  _this6.submitCallErrorMetric(error);
@@ -1503,11 +1561,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1503
1561
  }, this.getCorrelationId(), errData, this.handleOutgoingCallConnect.name, _constants.CALL_FILE);
1504
1562
  case 17:
1505
1563
  case "end":
1506
- return _context8.stop();
1564
+ return _context9.stop();
1507
1565
  }
1508
- }, _callee8, this, [[4, 12]]);
1566
+ }, _callee9, this, [[4, 12]]);
1509
1567
  }));
1510
- function handleOutgoingCallConnect(_x6) {
1568
+ function handleOutgoingCallConnect(_x7) {
1511
1569
  return _handleOutgoingCallConnect.apply(this, arguments);
1512
1570
  }
1513
1571
  return handleOutgoingCallConnect;
@@ -1522,30 +1580,30 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1522
1580
  }, {
1523
1581
  key: "handleIncomingCallDisconnect",
1524
1582
  value: (function () {
1525
- var _handleIncomingCallDisconnect = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(event) {
1583
+ var _handleIncomingCallDisconnect = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(event) {
1526
1584
  var response;
1527
- return _regenerator.default.wrap(function _callee9$(_context9) {
1528
- while (1) switch (_context9.prev = _context9.next) {
1585
+ return _regenerator.default.wrap(function _callee10$(_context10) {
1586
+ while (1) switch (_context10.prev = _context10.next) {
1529
1587
  case 0:
1530
1588
  _Logger.default.info("handleIncomingCallDisconnect: ".concat(this.getCorrelationId(), " "), {
1531
1589
  file: _constants.CALL_FILE,
1532
1590
  method: this.handleIncomingCallDisconnect.name
1533
1591
  });
1534
1592
  this.setDisconnectReason();
1535
- _context9.prev = 2;
1536
- _context9.next = 5;
1593
+ _context10.prev = 2;
1594
+ _context10.next = 5;
1537
1595
  return this.delete();
1538
1596
  case 5:
1539
- response = _context9.sent;
1597
+ response = _context10.sent;
1540
1598
  _Logger.default.log("handleOutgoingCallDisconnect: Response code: ".concat(response.statusCode), {
1541
1599
  file: _constants.CALL_FILE,
1542
1600
  method: this.handleIncomingCallDisconnect.name
1543
1601
  });
1544
- _context9.next = 12;
1602
+ _context10.next = 12;
1545
1603
  break;
1546
1604
  case 9:
1547
- _context9.prev = 9;
1548
- _context9.t0 = _context9["catch"](2);
1605
+ _context10.prev = 9;
1606
+ _context10.t0 = _context10["catch"](2);
1549
1607
  _Logger.default.warn('Failed to delete the call', {
1550
1608
  file: _constants.CALL_FILE,
1551
1609
  method: this.handleIncomingCallDisconnect.name
@@ -1578,11 +1636,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1578
1636
  this.emit(_types3.CALL_EVENT_KEYS.DISCONNECT, this.correlationId);
1579
1637
  case 19:
1580
1638
  case "end":
1581
- return _context9.stop();
1639
+ return _context10.stop();
1582
1640
  }
1583
- }, _callee9, this, [[2, 9]]);
1641
+ }, _callee10, this, [[2, 9]]);
1584
1642
  }));
1585
- function handleIncomingCallDisconnect(_x7) {
1643
+ function handleIncomingCallDisconnect(_x8) {
1586
1644
  return _handleIncomingCallDisconnect.apply(this, arguments);
1587
1645
  }
1588
1646
  return handleIncomingCallDisconnect;
@@ -1597,26 +1655,26 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1597
1655
  }, {
1598
1656
  key: "handleOutgoingCallDisconnect",
1599
1657
  value: (function () {
1600
- var _handleOutgoingCallDisconnect = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(event) {
1658
+ var _handleOutgoingCallDisconnect = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(event) {
1601
1659
  var response;
1602
- return _regenerator.default.wrap(function _callee10$(_context10) {
1603
- while (1) switch (_context10.prev = _context10.next) {
1660
+ return _regenerator.default.wrap(function _callee11$(_context11) {
1661
+ while (1) switch (_context11.prev = _context11.next) {
1604
1662
  case 0:
1605
1663
  this.setDisconnectReason();
1606
- _context10.prev = 1;
1607
- _context10.next = 4;
1664
+ _context11.prev = 1;
1665
+ _context11.next = 4;
1608
1666
  return this.delete();
1609
1667
  case 4:
1610
- response = _context10.sent;
1668
+ response = _context11.sent;
1611
1669
  _Logger.default.log("handleOutgoingCallDisconnect: Response code: ".concat(response.statusCode), {
1612
1670
  file: _constants.CALL_FILE,
1613
1671
  method: this.handleOutgoingCallDisconnect.name
1614
1672
  });
1615
- _context10.next = 11;
1673
+ _context11.next = 11;
1616
1674
  break;
1617
1675
  case 8:
1618
- _context10.prev = 8;
1619
- _context10.t0 = _context10["catch"](1);
1676
+ _context11.prev = 8;
1677
+ _context11.t0 = _context11["catch"](1);
1620
1678
  _Logger.default.warn('Failed to delete the call', {
1621
1679
  file: _constants.CALL_FILE,
1622
1680
  method: this.handleOutgoingCallDisconnect.name
@@ -1648,11 +1706,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1648
1706
  });
1649
1707
  case 17:
1650
1708
  case "end":
1651
- return _context10.stop();
1709
+ return _context11.stop();
1652
1710
  }
1653
- }, _callee10, this, [[1, 8]]);
1711
+ }, _callee11, this, [[1, 8]]);
1654
1712
  }));
1655
- function handleOutgoingCallDisconnect(_x8) {
1713
+ function handleOutgoingCallDisconnect(_x9) {
1656
1714
  return _handleOutgoingCallDisconnect.apply(this, arguments);
1657
1715
  }
1658
1716
  return handleOutgoingCallDisconnect;
@@ -1686,26 +1744,26 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1686
1744
  });
1687
1745
  clearInterval(this.sessionTimer);
1688
1746
  }
1689
- this.sessionTimer = setInterval( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
1747
+ this.sessionTimer = setInterval( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
1690
1748
  var res, error;
1691
- return _regenerator.default.wrap(function _callee11$(_context11) {
1692
- while (1) switch (_context11.prev = _context11.next) {
1749
+ return _regenerator.default.wrap(function _callee12$(_context12) {
1750
+ while (1) switch (_context12.prev = _context12.next) {
1693
1751
  case 0:
1694
- _context11.prev = 0;
1695
- _context11.next = 3;
1752
+ _context12.prev = 0;
1753
+ _context12.next = 3;
1696
1754
  return _this7.postStatus();
1697
1755
  case 3:
1698
- res = _context11.sent;
1756
+ res = _context12.sent;
1699
1757
  _Logger.default.info("Session refresh successful", {
1700
1758
  file: _constants.CALL_FILE,
1701
1759
  method: 'handleCallEstablished'
1702
1760
  });
1703
- _context11.next = 12;
1761
+ _context12.next = 12;
1704
1762
  break;
1705
1763
  case 7:
1706
- _context11.prev = 7;
1707
- _context11.t0 = _context11["catch"](0);
1708
- error = _context11.t0;
1764
+ _context12.prev = 7;
1765
+ _context12.t0 = _context12["catch"](0);
1766
+ error = _context12.t0;
1709
1767
  /* We are clearing the timer here as all are error scenarios. Only scenario where
1710
1768
  * timer reset won't be required is 503 with retry after. But that case will
1711
1769
  * be handled automatically as Mobius will also reset timer when we post status
@@ -1731,9 +1789,9 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1731
1789
  }, _this7.getCorrelationId(), error, _this7.handleCallEstablished.name, _constants.CALL_FILE);
1732
1790
  case 12:
1733
1791
  case "end":
1734
- return _context11.stop();
1792
+ return _context12.stop();
1735
1793
  }
1736
- }, _callee11, null, [[0, 7]]);
1794
+ }, _callee12, null, [[0, 7]]);
1737
1795
  })), _constants.DEFAULT_SESSION_TIMER);
1738
1796
  }
1739
1797
 
@@ -1745,10 +1803,10 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1745
1803
  }, {
1746
1804
  key: "handleUnknownState",
1747
1805
  value: (function () {
1748
- var _handleUnknownState = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(event) {
1806
+ var _handleUnknownState = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(event) {
1749
1807
  var eventData, response;
1750
- return _regenerator.default.wrap(function _callee12$(_context12) {
1751
- while (1) switch (_context12.prev = _context12.next) {
1808
+ return _regenerator.default.wrap(function _callee13$(_context13) {
1809
+ while (1) switch (_context13.prev = _context13.next) {
1752
1810
  case 0:
1753
1811
  _Logger.default.info("handleUnknownState: ".concat(this.getCorrelationId(), " "), {
1754
1812
  file: _constants.CALL_FILE,
@@ -1769,21 +1827,21 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1769
1827
  /* We need to clear the call at Mobius too. For delete failure
1770
1828
  * error handling is not required
1771
1829
  */
1772
- _context12.prev = 3;
1830
+ _context13.prev = 3;
1773
1831
  this.setDisconnectReason();
1774
- _context12.next = 7;
1832
+ _context13.next = 7;
1775
1833
  return this.delete();
1776
1834
  case 7:
1777
- response = _context12.sent;
1835
+ response = _context13.sent;
1778
1836
  _Logger.default.log("handleOutgoingCallDisconnect: Response code: ".concat(response.statusCode), {
1779
1837
  file: _constants.CALL_FILE,
1780
1838
  method: this.handleUnknownState.name
1781
1839
  });
1782
- _context12.next = 14;
1840
+ _context13.next = 14;
1783
1841
  break;
1784
1842
  case 11:
1785
- _context12.prev = 11;
1786
- _context12.t0 = _context12["catch"](3);
1843
+ _context13.prev = 11;
1844
+ _context13.t0 = _context13["catch"](3);
1787
1845
  _Logger.default.warn('Failed to delete the call', {
1788
1846
  file: _constants.CALL_FILE,
1789
1847
  method: this.handleUnknownState.name
@@ -1808,11 +1866,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1808
1866
  });
1809
1867
  case 19:
1810
1868
  case "end":
1811
- return _context12.stop();
1869
+ return _context13.stop();
1812
1870
  }
1813
- }, _callee12, this, [[3, 11]]);
1871
+ }, _callee13, this, [[3, 11]]);
1814
1872
  }));
1815
- function handleUnknownState(_x9) {
1873
+ function handleUnknownState(_x10) {
1816
1874
  return _handleUnknownState.apply(this, arguments);
1817
1875
  }
1818
1876
  return handleUnknownState;
@@ -1881,27 +1939,27 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1881
1939
  }, {
1882
1940
  key: "handleRoapEstablished",
1883
1941
  value: (function () {
1884
- var _handleRoapEstablished = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(context, event) {
1942
+ var _handleRoapEstablished = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(context, event) {
1885
1943
  var _this9 = this;
1886
- var _ref5, received, message, res, errData;
1887
- return _regenerator.default.wrap(function _callee13$(_context13) {
1888
- while (1) switch (_context13.prev = _context13.next) {
1944
+ var _ref7, received, message, res, errData;
1945
+ return _regenerator.default.wrap(function _callee14$(_context14) {
1946
+ while (1) switch (_context14.prev = _context14.next) {
1889
1947
  case 0:
1890
1948
  _Logger.default.info("handleRoapEstablished: ".concat(this.getCorrelationId(), " "), {
1891
1949
  file: _constants.CALL_FILE,
1892
1950
  method: 'handleRoapEstablished'
1893
1951
  });
1894
- _ref5 = event.data, received = _ref5.received, message = _ref5.message;
1952
+ _ref7 = event.data, received = _ref7.received, message = _ref7.message;
1895
1953
  this.receivedRoapOKSeq = message.seq;
1896
1954
  if (received) {
1897
- _context13.next = 22;
1955
+ _context14.next = 22;
1898
1956
  break;
1899
1957
  }
1900
1958
  _Logger.default.info('Sending Media Ok to the remote End', {
1901
1959
  file: _constants.CALL_FILE,
1902
1960
  method: 'handleRoapEstablished'
1903
1961
  });
1904
- _context13.prev = 5;
1962
+ _context14.prev = 5;
1905
1963
  if (this.callStateMachine.state.value === 'S_RECV_CALL_PROGRESS' || this.callStateMachine.state.value === 'S_SEND_CALL_SETUP') {
1906
1964
  _Logger.default.info('Media negotiation completed before call connect. Setting media negotiation completed flag.', {
1907
1965
  file: _constants.CALL_FILE,
@@ -1910,10 +1968,10 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1910
1968
  this.mediaNegotiationCompleted = true;
1911
1969
  }
1912
1970
  message.seq = this.seq;
1913
- _context13.next = 10;
1971
+ _context14.next = 10;
1914
1972
  return this.postMedia(message);
1915
1973
  case 10:
1916
- res = _context13.sent;
1974
+ res = _context14.sent;
1917
1975
  _Logger.default.log("handleRoapEstablished: Response code: ".concat(res.statusCode), {
1918
1976
  file: _constants.CALL_FILE,
1919
1977
  method: 'handleRoapEstablished'
@@ -1924,16 +1982,16 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1924
1982
  type: 'E_CALL_ESTABLISHED'
1925
1983
  });
1926
1984
  }
1927
- _context13.next = 20;
1985
+ _context14.next = 20;
1928
1986
  break;
1929
1987
  case 15:
1930
- _context13.prev = 15;
1931
- _context13.t0 = _context13["catch"](5);
1988
+ _context14.prev = 15;
1989
+ _context14.t0 = _context14["catch"](5);
1932
1990
  _Logger.default.warn('Failed to process MediaOk request', {
1933
1991
  file: _constants.CALL_FILE,
1934
1992
  method: 'handleRoapEstablished'
1935
1993
  });
1936
- errData = _context13.t0;
1994
+ errData = _context14.t0;
1937
1995
  (0, _Utils.handleCallErrors)(this.getEmitterCallback(errData), _types.ERROR_LAYER.MEDIA, function (interval) {
1938
1996
  /* Start retry if only it is a midcall case */
1939
1997
  /* istanbul ignore else */
@@ -1947,7 +2005,7 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1947
2005
  }
1948
2006
  }, this.getCorrelationId(), errData, this.handleRoapEstablished.name, _constants.CALL_FILE);
1949
2007
  case 20:
1950
- _context13.next = 27;
2008
+ _context14.next = 27;
1951
2009
  break;
1952
2010
  case 22:
1953
2011
  _Logger.default.info('Notifying internal-media-core about ROAP OK message', {
@@ -1981,11 +2039,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
1981
2039
  }
1982
2040
  case 27:
1983
2041
  case "end":
1984
- return _context13.stop();
2042
+ return _context14.stop();
1985
2043
  }
1986
- }, _callee13, this, [[5, 15]]);
2044
+ }, _callee14, this, [[5, 15]]);
1987
2045
  }));
1988
- function handleRoapEstablished(_x10, _x11) {
2046
+ function handleRoapEstablished(_x11, _x12) {
1989
2047
  return _handleRoapEstablished.apply(this, arguments);
1990
2048
  }
1991
2049
  return handleRoapEstablished;
@@ -2000,11 +2058,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2000
2058
  }, {
2001
2059
  key: "handleRoapError",
2002
2060
  value: (function () {
2003
- var _handleRoapError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(context, event) {
2061
+ var _handleRoapError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(context, event) {
2004
2062
  var _this10 = this;
2005
2063
  var message, res, errData;
2006
- return _regenerator.default.wrap(function _callee14$(_context14) {
2007
- while (1) switch (_context14.prev = _context14.next) {
2064
+ return _regenerator.default.wrap(function _callee15$(_context15) {
2065
+ while (1) switch (_context15.prev = _context15.next) {
2008
2066
  case 0:
2009
2067
  _Logger.default.info("handleRoapError: ".concat(this.getCorrelationId()), {
2010
2068
  file: _constants.CALL_FILE,
@@ -2015,28 +2073,28 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2015
2073
  message = event.data;
2016
2074
  /* istanbul ignore else */
2017
2075
  if (!message) {
2018
- _context14.next = 15;
2076
+ _context15.next = 15;
2019
2077
  break;
2020
2078
  }
2021
- _context14.prev = 3;
2022
- _context14.next = 6;
2079
+ _context15.prev = 3;
2080
+ _context15.next = 6;
2023
2081
  return this.postMedia(message);
2024
2082
  case 6:
2025
- res = _context14.sent;
2083
+ res = _context15.sent;
2026
2084
  _Logger.default.info("Response code: ".concat(res.statusCode), {
2027
2085
  file: _constants.CALL_FILE,
2028
2086
  method: this.handleRoapError.name
2029
2087
  });
2030
- _context14.next = 15;
2088
+ _context15.next = 15;
2031
2089
  break;
2032
2090
  case 10:
2033
- _context14.prev = 10;
2034
- _context14.t0 = _context14["catch"](3);
2091
+ _context15.prev = 10;
2092
+ _context15.t0 = _context15["catch"](3);
2035
2093
  _Logger.default.warn('Failed to communicate ROAP error to Webex Calling', {
2036
2094
  file: _constants.CALL_FILE,
2037
2095
  method: this.handleRoapError.name
2038
2096
  });
2039
- errData = _context14.t0;
2097
+ errData = _context15.t0;
2040
2098
  (0, _Utils.handleCallErrors)(function (error) {
2041
2099
  _this10.emit(_types3.CALL_EVENT_KEYS.CALL_ERROR, error);
2042
2100
  _this10.submitCallErrorMetric(error);
@@ -2063,11 +2121,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2063
2121
  }
2064
2122
  case 16:
2065
2123
  case "end":
2066
- return _context14.stop();
2124
+ return _context15.stop();
2067
2125
  }
2068
- }, _callee14, this, [[3, 10]]);
2126
+ }, _callee15, this, [[3, 10]]);
2069
2127
  }));
2070
- function handleRoapError(_x12, _x13) {
2128
+ function handleRoapError(_x13, _x14) {
2071
2129
  return _handleRoapError.apply(this, arguments);
2072
2130
  }
2073
2131
  return handleRoapError;
@@ -2082,11 +2140,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2082
2140
  }, {
2083
2141
  key: "handleOutgoingRoapOffer",
2084
2142
  value: (function () {
2085
- var _handleOutgoingRoapOffer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(context, event) {
2143
+ var _handleOutgoingRoapOffer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(context, event) {
2086
2144
  var _this11 = this;
2087
2145
  var message, res, errData;
2088
- return _regenerator.default.wrap(function _callee15$(_context15) {
2089
- while (1) switch (_context15.prev = _context15.next) {
2146
+ return _regenerator.default.wrap(function _callee16$(_context16) {
2147
+ while (1) switch (_context16.prev = _context16.next) {
2090
2148
  case 0:
2091
2149
  _Logger.default.info("handleOutgoingRoapOffer: ".concat(this.getCorrelationId()), {
2092
2150
  file: _constants.CALL_FILE,
@@ -2094,7 +2152,7 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2094
2152
  });
2095
2153
  message = event.data;
2096
2154
  if (message !== null && message !== void 0 && message.sdp) {
2097
- _context15.next = 6;
2155
+ _context16.next = 6;
2098
2156
  break;
2099
2157
  }
2100
2158
  _Logger.default.info('Initializing Offer...', {
@@ -2102,27 +2160,27 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2102
2160
  method: this.handleOutgoingRoapOffer.name
2103
2161
  });
2104
2162
  this.mediaConnection.initiateOffer();
2105
- return _context15.abrupt("return");
2163
+ return _context16.abrupt("return");
2106
2164
  case 6:
2107
- _context15.prev = 6;
2108
- _context15.next = 9;
2165
+ _context16.prev = 6;
2166
+ _context16.next = 9;
2109
2167
  return this.postMedia(message);
2110
2168
  case 9:
2111
- res = _context15.sent;
2169
+ res = _context16.sent;
2112
2170
  _Logger.default.log("handleOutgoingRoapOffer: Response code: ".concat(res.statusCode), {
2113
2171
  file: _constants.CALL_FILE,
2114
2172
  method: this.handleOutgoingRoapOffer.name
2115
2173
  });
2116
- _context15.next = 18;
2174
+ _context16.next = 18;
2117
2175
  break;
2118
2176
  case 13:
2119
- _context15.prev = 13;
2120
- _context15.t0 = _context15["catch"](6);
2177
+ _context16.prev = 13;
2178
+ _context16.t0 = _context16["catch"](6);
2121
2179
  _Logger.default.warn('Failed to process MediaOk request', {
2122
2180
  file: _constants.CALL_FILE,
2123
2181
  method: this.handleOutgoingRoapOffer.name
2124
2182
  });
2125
- errData = _context15.t0;
2183
+ errData = _context16.t0;
2126
2184
  (0, _Utils.handleCallErrors)(this.getEmitterCallback(errData), _types.ERROR_LAYER.MEDIA, function (interval) {
2127
2185
  /* Start retry if only it is a midcall case */
2128
2186
  if (_this11.connected) {
@@ -2136,11 +2194,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2136
2194
  }, this.getCorrelationId(), errData, this.handleOutgoingRoapOffer.name, _constants.CALL_FILE);
2137
2195
  case 18:
2138
2196
  case "end":
2139
- return _context15.stop();
2197
+ return _context16.stop();
2140
2198
  }
2141
- }, _callee15, this, [[6, 13]]);
2199
+ }, _callee16, this, [[6, 13]]);
2142
2200
  }));
2143
- function handleOutgoingRoapOffer(_x14, _x15) {
2201
+ function handleOutgoingRoapOffer(_x15, _x16) {
2144
2202
  return _handleOutgoingRoapOffer.apply(this, arguments);
2145
2203
  }
2146
2204
  return handleOutgoingRoapOffer;
@@ -2155,37 +2213,37 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2155
2213
  }, {
2156
2214
  key: "handleOutgoingRoapAnswer",
2157
2215
  value: (function () {
2158
- var _handleOutgoingRoapAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(context, event) {
2216
+ var _handleOutgoingRoapAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(context, event) {
2159
2217
  var _this12 = this;
2160
2218
  var message, res, errData;
2161
- return _regenerator.default.wrap(function _callee16$(_context16) {
2162
- while (1) switch (_context16.prev = _context16.next) {
2219
+ return _regenerator.default.wrap(function _callee17$(_context17) {
2220
+ while (1) switch (_context17.prev = _context17.next) {
2163
2221
  case 0:
2164
2222
  _Logger.default.info("handleOutgoingRoapAnswer: ".concat(this.getCorrelationId()), {
2165
2223
  file: _constants.CALL_FILE,
2166
2224
  method: this.handleOutgoingRoapAnswer.name
2167
2225
  });
2168
2226
  message = event.data;
2169
- _context16.prev = 2;
2227
+ _context17.prev = 2;
2170
2228
  message.seq = this.seq;
2171
- _context16.next = 6;
2229
+ _context17.next = 6;
2172
2230
  return this.postMedia(message);
2173
2231
  case 6:
2174
- res = _context16.sent;
2232
+ res = _context17.sent;
2175
2233
  _Logger.default.log("handleOutgoingRoapAnswer: Response code: ".concat(res.statusCode), {
2176
2234
  file: _constants.CALL_FILE,
2177
2235
  method: this.handleOutgoingRoapAnswer.name
2178
2236
  });
2179
- _context16.next = 15;
2237
+ _context17.next = 15;
2180
2238
  break;
2181
2239
  case 10:
2182
- _context16.prev = 10;
2183
- _context16.t0 = _context16["catch"](2);
2240
+ _context17.prev = 10;
2241
+ _context17.t0 = _context17["catch"](2);
2184
2242
  _Logger.default.warn('Failed to send MediaAnswer request', {
2185
2243
  file: _constants.CALL_FILE,
2186
2244
  method: this.handleOutgoingRoapAnswer.name
2187
2245
  });
2188
- errData = _context16.t0;
2246
+ errData = _context17.t0;
2189
2247
  (0, _Utils.handleCallErrors)(this.getEmitterCallback(errData), _types.ERROR_LAYER.MEDIA, function (interval) {
2190
2248
  /* Start retry if only it is a midcall case */
2191
2249
  if (_this12.connected) {
@@ -2199,11 +2257,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2199
2257
  }, this.getCorrelationId(), errData, this.handleOutgoingRoapAnswer.name, _constants.CALL_FILE);
2200
2258
  case 15:
2201
2259
  case "end":
2202
- return _context16.stop();
2260
+ return _context17.stop();
2203
2261
  }
2204
- }, _callee16, this, [[2, 10]]);
2262
+ }, _callee17, this, [[2, 10]]);
2205
2263
  }));
2206
- function handleOutgoingRoapAnswer(_x16, _x17) {
2264
+ function handleOutgoingRoapAnswer(_x17, _x18) {
2207
2265
  return _handleOutgoingRoapAnswer.apply(this, arguments);
2208
2266
  }
2209
2267
  return handleOutgoingRoapAnswer;
@@ -2274,8 +2332,9 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2274
2332
  this.mediaConnection.roapMessageReceived(message);
2275
2333
  }
2276
2334
  }
2277
-
2278
- /* istanbul ignore next */
2335
+ }, {
2336
+ key: "initMediaConnection",
2337
+ value: /* istanbul ignore next */
2279
2338
  /**
2280
2339
  * Initialize Media Connection.
2281
2340
  *
@@ -2283,9 +2342,8 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2283
2342
  * @param settings.localAudioTrack - MediaStreamTrack.
2284
2343
  * @param settings.debugId - String.
2285
2344
  */
2286
- }, {
2287
- key: "initMediaConnection",
2288
- value: function initMediaConnection(localAudioTrack, debugId) {
2345
+ function initMediaConnection(localAudioTrack, debugId) {
2346
+ var _this13 = this;
2289
2347
  var mediaConnection = new _internalMediaCore.RoapMediaConnection({
2290
2348
  skipInactiveTransceivers: true,
2291
2349
  iceServers: [],
@@ -2304,7 +2362,13 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2304
2362
  video: 'inactive',
2305
2363
  screenShareVideo: 'inactive'
2306
2364
  }
2307
- }, debugId || "WebexCallSDK-".concat(this.correlationId));
2365
+ }, debugId || "WebexCallSDK-".concat(this.correlationId), function (data) {
2366
+ return _this13.rtcMetrics.addMetrics(data);
2367
+ }, function () {
2368
+ return _this13.rtcMetrics.closeMetrics();
2369
+ }, function () {
2370
+ return _this13.rtcMetrics.sendMetricsInQueue();
2371
+ });
2308
2372
  this.mediaConnection = mediaConnection;
2309
2373
  }
2310
2374
  }, {
@@ -2357,15 +2421,15 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2357
2421
  * @param localAudioStream - The local audio stream for the call.
2358
2422
  */
2359
2423
  function () {
2360
- var _answer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(localAudioStream) {
2424
+ var _answer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(localAudioStream) {
2361
2425
  var localAudioTrack;
2362
- return _regenerator.default.wrap(function _callee17$(_context17) {
2363
- while (1) switch (_context17.prev = _context17.next) {
2426
+ return _regenerator.default.wrap(function _callee18$(_context18) {
2427
+ while (1) switch (_context18.prev = _context18.next) {
2364
2428
  case 0:
2365
2429
  this.localAudioStream = localAudioStream;
2366
2430
  localAudioTrack = localAudioStream.outputStream.getAudioTracks()[0];
2367
2431
  if (localAudioTrack) {
2368
- _context17.next = 7;
2432
+ _context18.next = 7;
2369
2433
  break;
2370
2434
  }
2371
2435
  _Logger.default.warn("Did not find a local track while answering the call ".concat(this.getCorrelationId()), {
@@ -2376,7 +2440,7 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2376
2440
  this.sendCallStateMachineEvt({
2377
2441
  type: 'E_SEND_CALL_DISCONNECT'
2378
2442
  });
2379
- return _context17.abrupt("return");
2443
+ return _context18.abrupt("return");
2380
2444
  case 7:
2381
2445
  localAudioTrack.enabled = true;
2382
2446
  if (!this.mediaConnection) {
@@ -2397,11 +2461,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2397
2461
  }
2398
2462
  case 10:
2399
2463
  case "end":
2400
- return _context17.stop();
2464
+ return _context18.stop();
2401
2465
  }
2402
- }, _callee17, this);
2466
+ }, _callee18, this);
2403
2467
  }));
2404
- function answer(_x18) {
2468
+ function answer(_x19) {
2405
2469
  return _answer.apply(this, arguments);
2406
2470
  }
2407
2471
  return answer;
@@ -2414,15 +2478,15 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2414
2478
  }, {
2415
2479
  key: "dial",
2416
2480
  value: (function () {
2417
- var _dial = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(localAudioStream) {
2481
+ var _dial = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(localAudioStream) {
2418
2482
  var localAudioTrack;
2419
- return _regenerator.default.wrap(function _callee18$(_context18) {
2420
- while (1) switch (_context18.prev = _context18.next) {
2483
+ return _regenerator.default.wrap(function _callee19$(_context19) {
2484
+ while (1) switch (_context19.prev = _context19.next) {
2421
2485
  case 0:
2422
2486
  this.localAudioStream = localAudioStream;
2423
2487
  localAudioTrack = localAudioStream.outputStream.getAudioTracks()[0];
2424
2488
  if (localAudioTrack) {
2425
- _context18.next = 7;
2489
+ _context19.next = 7;
2426
2490
  break;
2427
2491
  }
2428
2492
  _Logger.default.warn("Did not find a local track while dialing the call ".concat(this.getCorrelationId()), {
@@ -2431,7 +2495,7 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2431
2495
  });
2432
2496
  this.deleteCb(this.getCorrelationId());
2433
2497
  this.emit(_types3.CALL_EVENT_KEYS.DISCONNECT, this.getCorrelationId());
2434
- return _context18.abrupt("return");
2498
+ return _context19.abrupt("return");
2435
2499
  case 7:
2436
2500
  localAudioTrack.enabled = true;
2437
2501
  if (!this.mediaConnection) {
@@ -2452,11 +2516,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2452
2516
  }
2453
2517
  case 10:
2454
2518
  case "end":
2455
- return _context18.stop();
2519
+ return _context19.stop();
2456
2520
  }
2457
- }, _callee18, this);
2521
+ }, _callee19, this);
2458
2522
  }));
2459
- function dial(_x19) {
2523
+ function dial(_x20) {
2460
2524
  return _dial.apply(this, arguments);
2461
2525
  }
2462
2526
  return dial;
@@ -2470,15 +2534,15 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2470
2534
  * @param state -.
2471
2535
  */
2472
2536
  function () {
2473
- var _patch = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(state) {
2474
- return _regenerator.default.wrap(function _callee19$(_context19) {
2475
- while (1) switch (_context19.prev = _context19.next) {
2537
+ var _patch = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(state) {
2538
+ return _regenerator.default.wrap(function _callee20$(_context20) {
2539
+ while (1) switch (_context20.prev = _context20.next) {
2476
2540
  case 0:
2477
2541
  _Logger.default.info("Send a PATCH for ".concat(state, " to Webex Calling"), {
2478
2542
  file: _constants.CALL_FILE,
2479
2543
  method: this.patch.name
2480
2544
  });
2481
- return _context19.abrupt("return", this.webex.request({
2545
+ return _context20.abrupt("return", this.webex.request({
2482
2546
  // Sample uri: http://localhost/api/v1/calling/web/devices/{deviceid}/calls/{callid}
2483
2547
 
2484
2548
  uri: "".concat(this.mobiusUrl).concat(_constants.DEVICES_ENDPOINT_RESOURCE, "/").concat(this.deviceId, "/").concat(_constants.CALLS_ENDPOINT_RESOURCE, "/").concat(this.callId),
@@ -2497,11 +2561,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2497
2561
  }));
2498
2562
  case 2:
2499
2563
  case "end":
2500
- return _context19.stop();
2564
+ return _context20.stop();
2501
2565
  }
2502
- }, _callee19, this);
2566
+ }, _callee20, this);
2503
2567
  }));
2504
- function patch(_x20) {
2568
+ function patch(_x21) {
2505
2569
  return _patch.apply(this, arguments);
2506
2570
  }
2507
2571
  return patch;
@@ -2516,10 +2580,10 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2516
2580
  }, {
2517
2581
  key: "postSSRequest",
2518
2582
  value: (function () {
2519
- var _postSSRequest = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(context, type) {
2583
+ var _postSSRequest = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(context, type) {
2520
2584
  var request, transferContext;
2521
- return _regenerator.default.wrap(function _callee20$(_context20) {
2522
- while (1) switch (_context20.prev = _context20.next) {
2585
+ return _regenerator.default.wrap(function _callee21$(_context21) {
2586
+ while (1) switch (_context21.prev = _context21.next) {
2523
2587
  case 0:
2524
2588
  request = {
2525
2589
  uri: "".concat(this.mobiusUrl).concat(_constants2.SERVICES_ENDPOINT),
@@ -2534,15 +2598,15 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2534
2598
  callId: this.callId
2535
2599
  }
2536
2600
  };
2537
- _context20.t0 = type;
2538
- _context20.next = _context20.t0 === _types3.SUPPLEMENTARY_SERVICES.HOLD ? 4 : _context20.t0 === _types3.SUPPLEMENTARY_SERVICES.RESUME ? 6 : _context20.t0 === _types3.SUPPLEMENTARY_SERVICES.TRANSFER ? 8 : 12;
2601
+ _context21.t0 = type;
2602
+ _context21.next = _context21.t0 === _types3.SUPPLEMENTARY_SERVICES.HOLD ? 4 : _context21.t0 === _types3.SUPPLEMENTARY_SERVICES.RESUME ? 6 : _context21.t0 === _types3.SUPPLEMENTARY_SERVICES.TRANSFER ? 8 : 12;
2539
2603
  break;
2540
2604
  case 4:
2541
2605
  request.uri = "".concat(request.uri, "/").concat(_constants.CALL_HOLD_SERVICE, "/").concat(_constants.HOLD_ENDPOINT);
2542
- return _context20.abrupt("break", 13);
2606
+ return _context21.abrupt("break", 13);
2543
2607
  case 6:
2544
2608
  request.uri = "".concat(request.uri, "/").concat(_constants.CALL_HOLD_SERVICE, "/").concat(_constants.RESUME_ENDPOINT);
2545
- return _context20.abrupt("break", 13);
2609
+ return _context21.abrupt("break", 13);
2546
2610
  case 8:
2547
2611
  request.uri = "".concat(request.uri, "/").concat(_constants.CALL_TRANSFER_SERVICE, "/").concat(_constants.TRANSFER_ENDPOINT);
2548
2612
  transferContext = context;
@@ -2561,21 +2625,21 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2561
2625
  transferType: _types4.TransferType.CONSULT
2562
2626
  });
2563
2627
  }
2564
- return _context20.abrupt("break", 13);
2628
+ return _context21.abrupt("break", 13);
2565
2629
  case 12:
2566
2630
  _Logger.default.warn("Unknown type for PUT request: ".concat(type), {
2567
2631
  file: _constants.CALL_FILE,
2568
2632
  method: this.postSSRequest.name
2569
2633
  });
2570
2634
  case 13:
2571
- return _context20.abrupt("return", this.webex.request(request));
2635
+ return _context21.abrupt("return", this.webex.request(request));
2572
2636
  case 14:
2573
2637
  case "end":
2574
- return _context20.stop();
2638
+ return _context21.stop();
2575
2639
  }
2576
- }, _callee20, this);
2640
+ }, _callee21, this);
2577
2641
  }));
2578
- function postSSRequest(_x21, _x22) {
2642
+ function postSSRequest(_x22, _x23) {
2579
2643
  return _postSSRequest.apply(this, arguments);
2580
2644
  }
2581
2645
  return postSSRequest;
@@ -2587,11 +2651,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2587
2651
  }, {
2588
2652
  key: "postStatus",
2589
2653
  value: (function () {
2590
- var _postStatus = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
2591
- return _regenerator.default.wrap(function _callee21$(_context21) {
2592
- while (1) switch (_context21.prev = _context21.next) {
2654
+ var _postStatus = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22() {
2655
+ return _regenerator.default.wrap(function _callee22$(_context22) {
2656
+ while (1) switch (_context22.prev = _context22.next) {
2593
2657
  case 0:
2594
- return _context21.abrupt("return", this.webex.request({
2658
+ return _context22.abrupt("return", this.webex.request({
2595
2659
  uri: "".concat(this.mobiusUrl).concat(_constants.DEVICES_ENDPOINT_RESOURCE, "/").concat(this.deviceId, "/").concat(_constants.CALLS_ENDPOINT_RESOURCE, "/").concat(this.callId, "/").concat(_constants.CALL_STATUS_RESOURCE),
2596
2660
  method: _types2.HTTP_METHODS.POST,
2597
2661
  service: _types2.ALLOWED_SERVICES.MOBIUS,
@@ -2606,9 +2670,9 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2606
2670
  }));
2607
2671
  case 1:
2608
2672
  case "end":
2609
- return _context21.stop();
2673
+ return _context22.stop();
2610
2674
  }
2611
- }, _callee21, this);
2675
+ }, _callee22, this);
2612
2676
  }));
2613
2677
  function postStatus() {
2614
2678
  return _postStatus.apply(this, arguments);
@@ -2627,14 +2691,14 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2627
2691
  }, {
2628
2692
  key: "completeTransfer",
2629
2693
  value: (function () {
2630
- var _completeTransfer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(transferType, transferCallId, transferTarget) {
2631
- var _this13 = this;
2632
- var context, errData, _context22, _errData;
2633
- return _regenerator.default.wrap(function _callee22$(_context23) {
2634
- while (1) switch (_context23.prev = _context23.next) {
2694
+ var _completeTransfer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(transferType, transferCallId, transferTarget) {
2695
+ var _this14 = this;
2696
+ var context, errData, _context23, _errData;
2697
+ return _regenerator.default.wrap(function _callee23$(_context24) {
2698
+ while (1) switch (_context24.prev = _context24.next) {
2635
2699
  case 0:
2636
2700
  if (!(transferType === _types4.TransferType.BLIND && transferTarget)) {
2637
- _context23.next = 16;
2701
+ _context24.next = 16;
2638
2702
  break;
2639
2703
  }
2640
2704
  /* blind transfer */
@@ -2647,24 +2711,24 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2647
2711
  transferorCallId: this.getCallId(),
2648
2712
  destination: transferTarget
2649
2713
  };
2650
- _context23.prev = 3;
2651
- _context23.next = 6;
2714
+ _context24.prev = 3;
2715
+ _context24.next = 6;
2652
2716
  return this.postSSRequest(context, _types3.SUPPLEMENTARY_SERVICES.TRANSFER);
2653
2717
  case 6:
2654
2718
  this.metricManager.submitCallMetric(_types5.METRIC_EVENT.CALL, _types5.TRANSFER_ACTION.BLIND, _types5.METRIC_TYPE.BEHAVIORAL, this.getCallId(), this.getCorrelationId(), undefined);
2655
- _context23.next = 14;
2719
+ _context24.next = 14;
2656
2720
  break;
2657
2721
  case 9:
2658
- _context23.prev = 9;
2659
- _context23.t0 = _context23["catch"](3);
2722
+ _context24.prev = 9;
2723
+ _context24.t0 = _context24["catch"](3);
2660
2724
  _Logger.default.warn("Blind Transfer failed for correlationId ".concat(this.getCorrelationId()), {
2661
2725
  file: _constants.CALL_FILE,
2662
2726
  method: this.completeTransfer.name
2663
2727
  });
2664
- errData = _context23.t0;
2728
+ errData = _context24.t0;
2665
2729
  (0, _Utils.handleCallErrors)(function (error) {
2666
- _this13.emit(_types3.CALL_EVENT_KEYS.TRANSFER_ERROR, error);
2667
- _this13.submitCallErrorMetric(error, _types5.TRANSFER_ACTION.BLIND);
2730
+ _this14.emit(_types3.CALL_EVENT_KEYS.TRANSFER_ERROR, error);
2731
+ _this14.submitCallErrorMetric(error, _types5.TRANSFER_ACTION.BLIND);
2668
2732
  }, _types.ERROR_LAYER.CALL_CONTROL,
2669
2733
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2670
2734
  /* istanbul ignore next */
@@ -2672,11 +2736,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2672
2736
  return undefined;
2673
2737
  }, this.getCorrelationId(), errData, this.completeTransfer.name, _constants.CALL_FILE);
2674
2738
  case 14:
2675
- _context23.next = 33;
2739
+ _context24.next = 33;
2676
2740
  break;
2677
2741
  case 16:
2678
2742
  if (!(transferType === _types4.TransferType.CONSULT && transferCallId)) {
2679
- _context23.next = 32;
2743
+ _context24.next = 32;
2680
2744
  break;
2681
2745
  }
2682
2746
  /* Consult transfer */
@@ -2685,28 +2749,28 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2685
2749
  file: _constants.CALL_FILE,
2686
2750
  method: this.completeTransfer.name
2687
2751
  });
2688
- _context22 = {
2752
+ _context23 = {
2689
2753
  transferorCallId: this.getCallId(),
2690
2754
  transferToCallId: transferCallId
2691
2755
  };
2692
- _context23.prev = 19;
2693
- _context23.next = 22;
2694
- return this.postSSRequest(_context22, _types3.SUPPLEMENTARY_SERVICES.TRANSFER);
2756
+ _context24.prev = 19;
2757
+ _context24.next = 22;
2758
+ return this.postSSRequest(_context23, _types3.SUPPLEMENTARY_SERVICES.TRANSFER);
2695
2759
  case 22:
2696
2760
  this.metricManager.submitCallMetric(_types5.METRIC_EVENT.CALL, _types5.TRANSFER_ACTION.CONSULT, _types5.METRIC_TYPE.BEHAVIORAL, this.getCallId(), this.getCorrelationId(), undefined);
2697
- _context23.next = 30;
2761
+ _context24.next = 30;
2698
2762
  break;
2699
2763
  case 25:
2700
- _context23.prev = 25;
2701
- _context23.t1 = _context23["catch"](19);
2764
+ _context24.prev = 25;
2765
+ _context24.t1 = _context24["catch"](19);
2702
2766
  _Logger.default.warn("Consult Transfer failed for correlationId ".concat(this.getCorrelationId()), {
2703
2767
  file: _constants.CALL_FILE,
2704
2768
  method: this.completeTransfer.name
2705
2769
  });
2706
- _errData = _context23.t1;
2770
+ _errData = _context24.t1;
2707
2771
  (0, _Utils.handleCallErrors)(function (error) {
2708
- _this13.emit(_types3.CALL_EVENT_KEYS.TRANSFER_ERROR, error);
2709
- _this13.submitCallErrorMetric(error, _types5.TRANSFER_ACTION.CONSULT);
2772
+ _this14.emit(_types3.CALL_EVENT_KEYS.TRANSFER_ERROR, error);
2773
+ _this14.submitCallErrorMetric(error, _types5.TRANSFER_ACTION.CONSULT);
2710
2774
  }, _types.ERROR_LAYER.CALL_CONTROL,
2711
2775
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2712
2776
  /* istanbul ignore next */
@@ -2714,7 +2778,7 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2714
2778
  return undefined;
2715
2779
  }, this.getCorrelationId(), _errData, this.completeTransfer.name, _constants.CALL_FILE);
2716
2780
  case 30:
2717
- _context23.next = 33;
2781
+ _context24.next = 33;
2718
2782
  break;
2719
2783
  case 32:
2720
2784
  _Logger.default.warn("Invalid information received, transfer failed for correlationId: ".concat(this.getCorrelationId()), {
@@ -2723,11 +2787,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2723
2787
  });
2724
2788
  case 33:
2725
2789
  case "end":
2726
- return _context23.stop();
2790
+ return _context24.stop();
2727
2791
  }
2728
- }, _callee22, this, [[3, 9], [19, 25]]);
2792
+ }, _callee23, this, [[3, 9], [19, 25]]);
2729
2793
  }));
2730
- function completeTransfer(_x23, _x24, _x25) {
2794
+ function completeTransfer(_x24, _x25, _x26) {
2731
2795
  return _completeTransfer.apply(this, arguments);
2732
2796
  }
2733
2797
  return completeTransfer;
@@ -2739,32 +2803,32 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2739
2803
  }, {
2740
2804
  key: "getCallStats",
2741
2805
  value: (function () {
2742
- var _getCallStats = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
2806
+ var _getCallStats = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
2743
2807
  var stats;
2744
- return _regenerator.default.wrap(function _callee23$(_context24) {
2745
- while (1) switch (_context24.prev = _context24.next) {
2808
+ return _regenerator.default.wrap(function _callee24$(_context25) {
2809
+ while (1) switch (_context25.prev = _context25.next) {
2746
2810
  case 0:
2747
- _context24.prev = 0;
2748
- _context24.next = 3;
2811
+ _context25.prev = 0;
2812
+ _context25.next = 3;
2749
2813
  return this.mediaConnection.getStats();
2750
2814
  case 3:
2751
- stats = _context24.sent;
2752
- _context24.next = 9;
2815
+ stats = _context25.sent;
2816
+ _context25.next = 9;
2753
2817
  break;
2754
2818
  case 6:
2755
- _context24.prev = 6;
2756
- _context24.t0 = _context24["catch"](0);
2819
+ _context25.prev = 6;
2820
+ _context25.t0 = _context25["catch"](0);
2757
2821
  _Logger.default.warn('Stats collection failed, using dummy stats', {
2758
2822
  file: _constants.CALL_FILE,
2759
2823
  method: this.getCallStats.name
2760
2824
  });
2761
2825
  case 9:
2762
- return _context24.abrupt("return", (0, _Utils.parseMediaQualityStatistics)(stats));
2826
+ return _context25.abrupt("return", (0, _Utils.parseMediaQualityStatistics)(stats));
2763
2827
  case 10:
2764
2828
  case "end":
2765
- return _context24.stop();
2829
+ return _context25.stop();
2766
2830
  }
2767
- }, _callee23, this, [[0, 6]]);
2831
+ }, _callee24, this, [[0, 6]]);
2768
2832
  }));
2769
2833
  function getCallStats() {
2770
2834
  return _getCallStats.apply(this, arguments);
@@ -2780,15 +2844,15 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2780
2844
  }, {
2781
2845
  key: "postMedia",
2782
2846
  value: (function () {
2783
- var _postMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(roapMessage) {
2784
- return _regenerator.default.wrap(function _callee24$(_context25) {
2785
- while (1) switch (_context25.prev = _context25.next) {
2847
+ var _postMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(roapMessage) {
2848
+ return _regenerator.default.wrap(function _callee25$(_context26) {
2849
+ while (1) switch (_context26.prev = _context26.next) {
2786
2850
  case 0:
2787
2851
  _Logger.default.log('Posting message to Webex Calling', {
2788
2852
  file: _constants.CALL_FILE,
2789
2853
  method: this.postMedia.name
2790
2854
  });
2791
- return _context25.abrupt("return", this.webex.request({
2855
+ return _context26.abrupt("return", this.webex.request({
2792
2856
  uri: "".concat(this.mobiusUrl).concat(_constants.DEVICES_ENDPOINT_RESOURCE, "/").concat(this.deviceId, "/").concat(_constants.CALLS_ENDPOINT_RESOURCE, "/").concat(this.callId, "/").concat(_constants.MEDIA_ENDPOINT_RESOURCE),
2793
2857
  method: _types2.HTTP_METHODS.POST,
2794
2858
  service: _types2.ALLOWED_SERVICES.MOBIUS,
@@ -2807,11 +2871,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2807
2871
  }));
2808
2872
  case 2:
2809
2873
  case "end":
2810
- return _context25.stop();
2874
+ return _context26.stop();
2811
2875
  }
2812
- }, _callee24, this);
2876
+ }, _callee25, this);
2813
2877
  }));
2814
- function postMedia(_x26) {
2878
+ function postMedia(_x27) {
2815
2879
  return _postMedia.apply(this, arguments);
2816
2880
  }
2817
2881
  return postMedia;
@@ -2824,73 +2888,73 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2824
2888
  }, {
2825
2889
  key: "mediaRoapEventsListener",
2826
2890
  value: function mediaRoapEventsListener() {
2827
- var _this14 = this;
2891
+ var _this15 = this;
2828
2892
  this.mediaConnection.on(_internalMediaCore.MediaConnectionEventNames.ROAP_MESSAGE_TO_SEND,
2829
2893
  /*#__PURE__*/
2830
2894
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2831
2895
  function () {
2832
- var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(event) {
2896
+ var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26(event) {
2833
2897
  var _event$roapMessage, _event$roapMessage2;
2834
2898
  var mediaOk, sdpVideoPortZero;
2835
- return _regenerator.default.wrap(function _callee25$(_context26) {
2836
- while (1) switch (_context26.prev = _context26.next) {
2899
+ return _regenerator.default.wrap(function _callee26$(_context27) {
2900
+ while (1) switch (_context27.prev = _context27.next) {
2837
2901
  case 0:
2838
2902
  _Logger.default.info("ROAP message to send (rcv from MEDIA-SDK) :\n \n type: ".concat((_event$roapMessage = event.roapMessage) === null || _event$roapMessage === void 0 ? void 0 : _event$roapMessage.messageType, ", seq: ").concat(event.roapMessage.seq, " , version: ").concat(event.roapMessage.version), {});
2839
2903
  _Logger.default.info("SDP message to send : \n ".concat((_event$roapMessage2 = event.roapMessage) === null || _event$roapMessage2 === void 0 ? void 0 : _event$roapMessage2.sdp), {
2840
2904
  file: _constants.CALL_FILE,
2841
- method: _this14.mediaRoapEventsListener.name
2905
+ method: _this15.mediaRoapEventsListener.name
2842
2906
  });
2843
- _context26.t0 = event.roapMessage.messageType;
2844
- _context26.next = _context26.t0 === _types4.RoapScenario.OK ? 5 : _context26.t0 === _types4.RoapScenario.OFFER ? 8 : _context26.t0 === _types4.RoapScenario.ANSWER ? 13 : _context26.t0 === _types4.RoapScenario.ERROR ? 16 : _context26.t0 === _types4.RoapScenario.OFFER_RESPONSE ? 18 : 21;
2907
+ _context27.t0 = event.roapMessage.messageType;
2908
+ _context27.next = _context27.t0 === _types4.RoapScenario.OK ? 5 : _context27.t0 === _types4.RoapScenario.OFFER ? 8 : _context27.t0 === _types4.RoapScenario.ANSWER ? 13 : _context27.t0 === _types4.RoapScenario.ERROR ? 16 : _context27.t0 === _types4.RoapScenario.OFFER_RESPONSE ? 18 : 21;
2845
2909
  break;
2846
2910
  case 5:
2847
2911
  mediaOk = {
2848
2912
  received: false,
2849
2913
  message: event.roapMessage
2850
2914
  };
2851
- _this14.sendMediaStateMachineEvt({
2915
+ _this15.sendMediaStateMachineEvt({
2852
2916
  type: 'E_ROAP_OK',
2853
2917
  data: mediaOk
2854
2918
  });
2855
- return _context26.abrupt("break", 21);
2919
+ return _context27.abrupt("break", 21);
2856
2920
  case 8:
2857
2921
  // TODO: Remove these after the Media-Core adds the fix
2858
2922
  sdpVideoPortZero = event.roapMessage.sdp.replace(/^m=(video) (?:\d+) /gim, 'm=$1 0 ');
2859
2923
  event.roapMessage.sdp = sdpVideoPortZero;
2860
- _this14.localRoapMessage = event.roapMessage;
2861
- _this14.sendCallStateMachineEvt({
2924
+ _this15.localRoapMessage = event.roapMessage;
2925
+ _this15.sendCallStateMachineEvt({
2862
2926
  type: 'E_SEND_CALL_SETUP',
2863
2927
  data: event.roapMessage
2864
2928
  });
2865
- return _context26.abrupt("break", 21);
2929
+ return _context27.abrupt("break", 21);
2866
2930
  case 13:
2867
- _this14.localRoapMessage = event.roapMessage;
2868
- _this14.sendMediaStateMachineEvt({
2931
+ _this15.localRoapMessage = event.roapMessage;
2932
+ _this15.sendMediaStateMachineEvt({
2869
2933
  type: 'E_SEND_ROAP_ANSWER',
2870
2934
  data: event.roapMessage
2871
2935
  });
2872
- return _context26.abrupt("break", 21);
2936
+ return _context27.abrupt("break", 21);
2873
2937
  case 16:
2874
- _this14.sendMediaStateMachineEvt({
2938
+ _this15.sendMediaStateMachineEvt({
2875
2939
  type: 'E_ROAP_ERROR',
2876
2940
  data: event.roapMessage
2877
2941
  });
2878
- return _context26.abrupt("break", 21);
2942
+ return _context27.abrupt("break", 21);
2879
2943
  case 18:
2880
- _this14.localRoapMessage = event.roapMessage;
2881
- _this14.sendMediaStateMachineEvt({
2944
+ _this15.localRoapMessage = event.roapMessage;
2945
+ _this15.sendMediaStateMachineEvt({
2882
2946
  type: 'E_SEND_ROAP_OFFER',
2883
2947
  data: event.roapMessage
2884
2948
  });
2885
- return _context26.abrupt("break", 21);
2949
+ return _context27.abrupt("break", 21);
2886
2950
  case 21:
2887
2951
  case "end":
2888
- return _context26.stop();
2952
+ return _context27.stop();
2889
2953
  }
2890
- }, _callee25);
2954
+ }, _callee26);
2891
2955
  }));
2892
- return function (_x27) {
2893
- return _ref6.apply(this, arguments);
2956
+ return function (_x28) {
2957
+ return _ref8.apply(this, arguments);
2894
2958
  };
2895
2959
  }());
2896
2960
  }
@@ -2902,11 +2966,11 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2902
2966
  }, {
2903
2967
  key: "mediaTrackListener",
2904
2968
  value: function mediaTrackListener() {
2905
- var _this15 = this;
2969
+ var _this16 = this;
2906
2970
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2907
2971
  this.mediaConnection.on(_internalMediaCore.MediaConnectionEventNames.REMOTE_TRACK_ADDED, function (e) {
2908
2972
  if (e.type === _types3.MEDIA_CONNECTION_EVENT_KEYS.MEDIA_TYPE_AUDIO) {
2909
- _this15.emit(_types3.CALL_EVENT_KEYS.REMOTE_MEDIA, e.track);
2973
+ _this16.emit(_types3.CALL_EVENT_KEYS.REMOTE_MEDIA, e.track);
2910
2974
  }
2911
2975
  });
2912
2976
  }
@@ -2940,16 +3004,16 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2940
3004
  }, {
2941
3005
  key: "delete",
2942
3006
  value: function () {
2943
- var _delete2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
3007
+ var _delete2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27() {
2944
3008
  var disconnectMetrics;
2945
- return _regenerator.default.wrap(function _callee26$(_context27) {
2946
- while (1) switch (_context27.prev = _context27.next) {
3009
+ return _regenerator.default.wrap(function _callee27$(_context28) {
3010
+ while (1) switch (_context28.prev = _context28.next) {
2947
3011
  case 0:
2948
- _context27.next = 2;
3012
+ _context28.next = 2;
2949
3013
  return this.getCallStats();
2950
3014
  case 2:
2951
- disconnectMetrics = _context27.sent;
2952
- return _context27.abrupt("return", this.webex.request({
3015
+ disconnectMetrics = _context28.sent;
3016
+ return _context28.abrupt("return", this.webex.request({
2953
3017
  uri: "".concat(this.mobiusUrl).concat(_constants.DEVICES_ENDPOINT_RESOURCE, "/").concat(this.deviceId, "/").concat(_constants.CALLS_ENDPOINT_RESOURCE, "/").concat(this.callId),
2954
3018
  method: _types2.HTTP_METHODS.DELETE,
2955
3019
  service: _types2.ALLOWED_SERVICES.MOBIUS,
@@ -2967,9 +3031,9 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2967
3031
  }));
2968
3032
  case 4:
2969
3033
  case "end":
2970
- return _context27.stop();
3034
+ return _context28.stop();
2971
3035
  }
2972
- }, _callee26, this);
3036
+ }, _callee27, this);
2973
3037
  }));
2974
3038
  function _delete() {
2975
3039
  return _delete2.apply(this, arguments);
@@ -3146,10 +3210,10 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
3146
3210
  }, {
3147
3211
  key: "handleTimeout",
3148
3212
  value: (function () {
3149
- var _handleTimeout = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27() {
3213
+ var _handleTimeout = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28() {
3150
3214
  var response;
3151
- return _regenerator.default.wrap(function _callee27$(_context28) {
3152
- while (1) switch (_context28.prev = _context28.next) {
3215
+ return _regenerator.default.wrap(function _callee28$(_context29) {
3216
+ while (1) switch (_context29.prev = _context29.next) {
3153
3217
  case 0:
3154
3218
  _Logger.default.warn("Call timed out", {
3155
3219
  file: _constants.CALL_FILE,
@@ -3157,19 +3221,19 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
3157
3221
  });
3158
3222
  this.deleteCb(this.getCorrelationId());
3159
3223
  this.emit(_types3.CALL_EVENT_KEYS.DISCONNECT, this.getCorrelationId());
3160
- _context28.next = 5;
3224
+ _context29.next = 5;
3161
3225
  return this.delete();
3162
3226
  case 5:
3163
- response = _context28.sent;
3227
+ response = _context29.sent;
3164
3228
  _Logger.default.log("handleTimeout: Response code: ".concat(response.statusCode), {
3165
3229
  file: _constants.CALL_FILE,
3166
3230
  method: this.handleTimeout.name
3167
3231
  });
3168
3232
  case 7:
3169
3233
  case "end":
3170
- return _context28.stop();
3234
+ return _context29.stop();
3171
3235
  }
3172
- }, _callee27, this);
3236
+ }, _callee28, this);
3173
3237
  }));
3174
3238
  function handleTimeout() {
3175
3239
  return _handleTimeout.apply(this, arguments);
@@ -3182,15 +3246,15 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
3182
3246
  /**
3183
3247
  * @param activeUrl
3184
3248
  * @param webex -.
3185
- * @param dest -.
3186
3249
  * @param dir -.
3187
3250
  * @param deviceId -.
3188
3251
  * @param lineId -.
3189
3252
  * @param serverCb
3190
3253
  * @param deleteCb
3191
3254
  * @param indicator - Service Indicator.
3255
+ * @param dest -.
3192
3256
  */
3193
- var createCall = exports.createCall = function createCall(activeUrl, webex, dest, dir, deviceId, lineId, deleteCb, indicator) {
3194
- return new Call(activeUrl, webex, dest, dir, deviceId, lineId, deleteCb, indicator);
3257
+ var createCall = exports.createCall = function createCall(activeUrl, webex, dir, deviceId, lineId, deleteCb, indicator, dest) {
3258
+ return new Call(activeUrl, webex, dir, deviceId, lineId, deleteCb, indicator, dest);
3195
3259
  };
3196
3260
  //# sourceMappingURL=call.js.map