@webex/calling 3.12.0-next.109 → 3.12.0-next.110

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 (56) hide show
  1. package/dist/CallingClient/CallingClient.js +2 -2
  2. package/dist/CallingClient/CallingClient.js.map +1 -1
  3. package/dist/CallingClient/calling/call.js +13 -6
  4. package/dist/CallingClient/calling/call.js.map +1 -1
  5. package/dist/CallingClient/calling/call.test.js +573 -533
  6. package/dist/CallingClient/calling/call.test.js.map +1 -1
  7. package/dist/CallingClient/constants.js +3 -2
  8. package/dist/CallingClient/constants.js.map +1 -1
  9. package/dist/CallingClient/line/index.js +19 -2
  10. package/dist/CallingClient/line/index.js.map +1 -1
  11. package/dist/CallingClient/line/line.test.js +40 -7
  12. package/dist/CallingClient/line/line.test.js.map +1 -1
  13. package/dist/CallingClient/registration/register.js +4 -2
  14. package/dist/CallingClient/registration/register.js.map +1 -1
  15. package/dist/CallingClient/registration/register.test.js +10 -2
  16. package/dist/CallingClient/registration/register.test.js.map +1 -1
  17. package/dist/CallingClient/types.js.map +1 -1
  18. package/dist/common/Utils.js +0 -56
  19. package/dist/common/Utils.js.map +1 -1
  20. package/dist/common/Utils.test.js +0 -48
  21. package/dist/common/Utils.test.js.map +1 -1
  22. package/dist/common/callUtils.js +187 -0
  23. package/dist/common/callUtils.js.map +1 -0
  24. package/dist/common/callUtils.test.js +313 -0
  25. package/dist/common/callUtils.test.js.map +1 -0
  26. package/dist/common/constants.js +18 -1
  27. package/dist/common/constants.js.map +1 -1
  28. package/dist/common/index.js +11 -0
  29. package/dist/common/index.js.map +1 -1
  30. package/dist/module/CallingClient/CallingClient.js +1 -1
  31. package/dist/module/CallingClient/calling/call.js +6 -1
  32. package/dist/module/CallingClient/constants.js +1 -0
  33. package/dist/module/CallingClient/line/index.js +7 -1
  34. package/dist/module/CallingClient/registration/register.js +4 -2
  35. package/dist/module/common/Utils.js +0 -37
  36. package/dist/module/common/callUtils.js +90 -0
  37. package/dist/module/common/constants.js +5 -0
  38. package/dist/module/common/index.js +1 -0
  39. package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
  40. package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
  41. package/dist/types/CallingClient/constants.d.ts +1 -0
  42. package/dist/types/CallingClient/constants.d.ts.map +1 -1
  43. package/dist/types/CallingClient/line/index.d.ts +2 -1
  44. package/dist/types/CallingClient/line/index.d.ts.map +1 -1
  45. package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
  46. package/dist/types/CallingClient/types.d.ts +2 -0
  47. package/dist/types/CallingClient/types.d.ts.map +1 -1
  48. package/dist/types/common/Utils.d.ts +0 -1
  49. package/dist/types/common/Utils.d.ts.map +1 -1
  50. package/dist/types/common/callUtils.d.ts +6 -0
  51. package/dist/types/common/callUtils.d.ts.map +1 -0
  52. package/dist/types/common/constants.d.ts +5 -0
  53. package/dist/types/common/constants.d.ts.map +1 -1
  54. package/dist/types/common/index.d.ts +1 -0
  55. package/dist/types/common/index.d.ts.map +1 -1
  56. package/package.json +1 -1
@@ -300,10 +300,50 @@ describe('Call Tests', function () {
300
300
  }
301
301
  }, _callee3);
302
302
  })));
303
- it('delete sends the server-assigned callId unchanged', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
303
+ describe('Host ips in the call payloads', function () {
304
+ var sdpWithHostCandidate = ['v=0', 'm=audio 9 UDP/TLS/RTP/SAVPF 111', 'a=candidate:1 1 UDP 2130706431 10.0.0.5 54321 typ host generation 0'].join('\r\n');
305
+ beforeEach(function () {
306
+ webex.request.mockReturnValue({
307
+ statusCode: 200,
308
+ body: {
309
+ device: {
310
+ deviceId: '8a67806f-fc4d-446b-a131-31e71ea5b010',
311
+ correlationId: '8a67806f-fc4d-446b-a131-31e71ea5b011'
312
+ },
313
+ callId: '8a67806f-fc4d-446b-a131-31e71ea5b020'
314
+ }
315
+ });
316
+ });
317
+ it.each([['post', 'the host candidates of the offer', {
318
+ sdp: sdpWithHostCandidate
319
+ }, ['10.0.0.5']], ['post', 'nothing when the roap message carries no sdp', {}, []], ['post', 'nothing when the state machine dispatches no roap message', undefined, []], ['postMedia', 'the host candidates of the offer', {
320
+ sdp: sdpWithHostCandidate
321
+ }, ['10.0.0.5']], ['postMedia', 'nothing when the roap message carries no sdp', {}, []], ['postMedia', 'nothing when the state machine dispatches no roap message', undefined, []]])('%s reports %s', /*#__PURE__*/function () {
322
+ var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4(method, _name, roapMessage, expected) {
323
+ var call;
324
+ return _regenerator.default.wrap(function (_context4) {
325
+ while (1) switch (_context4.prev = _context4.next) {
326
+ case 0:
327
+ call = callManager.createCall(_types3.CallDirection.OUTBOUND, deviceId, mockLineId, dest);
328
+ _context4.next = 1;
329
+ return call[method](roapMessage);
330
+ case 1:
331
+ expect(webex.request.mock.calls[0][0].body.hostIps).toEqual(expected);
332
+ case 2:
333
+ case "end":
334
+ return _context4.stop();
335
+ }
336
+ }, _callee4);
337
+ }));
338
+ return function (_x, _x2, _x3, _x4) {
339
+ return _ref4.apply(this, arguments);
340
+ };
341
+ }());
342
+ });
343
+ it('delete sends the server-assigned callId unchanged', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
304
344
  var serverCallId, call;
305
- return _regenerator.default.wrap(function (_context4) {
306
- while (1) switch (_context4.prev = _context4.next) {
345
+ return _regenerator.default.wrap(function (_context5) {
346
+ while (1) switch (_context5.prev = _context5.next) {
307
347
  case 0:
308
348
  serverCallId = '8a67806f-fc4d-446b-a131-31e71ea5b020';
309
349
  webex.request.mockReturnValue({
@@ -319,24 +359,24 @@ describe('Call Tests', function () {
319
359
  call = callManager.createCall(_types3.CallDirection.OUTBOUND, deviceId, mockLineId, dest);
320
360
  call.setCallId(serverCallId);
321
361
  call.end();
322
- _context4.next = 1;
362
+ _context5.next = 1;
323
363
  return (0, _Utils.waitForMsecs)(50);
324
364
  case 1:
325
365
  expect(webex.request.mock.calls[0][0].body.callId).toBe(serverCallId);
326
366
  case 2:
327
367
  case "end":
328
- return _context4.stop();
368
+ return _context5.stop();
329
369
  }
330
- }, _callee4);
370
+ }, _callee5);
331
371
  })));
332
- it('check whether callerId midcall event is serviced or not', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
372
+ it('check whether callerId midcall event is serviced or not', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
333
373
  var call;
334
- return _regenerator.default.wrap(function (_context5) {
335
- while (1) switch (_context5.prev = _context5.next) {
374
+ return _regenerator.default.wrap(function (_context6) {
375
+ while (1) switch (_context6.prev = _context6.next) {
336
376
  case 0:
337
377
  call = callManager.createCall(_types3.CallDirection.OUTBOUND, deviceId, mockLineId, dest);
338
378
  call.handleMidCallEvent(dummyMidCallEvent);
339
- _context5.next = 1;
379
+ _context6.next = 1;
340
380
  return (0, _Utils.waitForMsecs)(50);
341
381
  case 1:
342
382
  expect(call.getCallerInfo().name).toStrictEqual('Bob Marley');
@@ -344,20 +384,20 @@ describe('Call Tests', function () {
344
384
  expect(call.getCallerInfo().avatarSrc).toBeFalsy();
345
385
  case 2:
346
386
  case "end":
347
- return _context5.stop();
387
+ return _context6.stop();
348
388
  }
349
- }, _callee5);
389
+ }, _callee6);
350
390
  })));
351
- it('check whether call midcall event is serviced or not', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
391
+ it('check whether call midcall event is serviced or not', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
352
392
  var call, logSpy, corelationId;
353
- return _regenerator.default.wrap(function (_context6) {
354
- while (1) switch (_context6.prev = _context6.next) {
393
+ return _regenerator.default.wrap(function (_context7) {
394
+ while (1) switch (_context7.prev = _context7.next) {
355
395
  case 0:
356
396
  call = callManager.createCall(_types3.CallDirection.OUTBOUND, deviceId, mockLineId, dest);
357
397
  dummyMidCallEvent.eventType = 'callState';
358
398
  logSpy = jest.spyOn(_Logger.default, 'log');
359
399
  call.handleMidCallEvent(dummyMidCallEvent);
360
- _context6.next = 1;
400
+ _context7.next = 1;
361
401
  return (0, _Utils.waitForMsecs)(50);
362
402
  case 1:
363
403
  corelationId = call.getCorrelationId();
@@ -367,39 +407,39 @@ describe('Call Tests', function () {
367
407
  });
368
408
  case 2:
369
409
  case "end":
370
- return _context6.stop();
410
+ return _context7.stop();
371
411
  }
372
- }, _callee6);
412
+ }, _callee7);
373
413
  })));
374
- it('check call stats for active call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
414
+ it('check call stats for active call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
375
415
  var call, callRtpStats, _t;
376
- return _regenerator.default.wrap(function (_context7) {
377
- while (1) switch (_context7.prev = _context7.next) {
416
+ return _regenerator.default.wrap(function (_context8) {
417
+ while (1) switch (_context8.prev = _context8.next) {
378
418
  case 0:
379
419
  call = callManager.createCall(_types3.CallDirection.OUTBOUND, deviceId, mockLineId, dest);
380
- _context7.prev = 1;
381
- _context7.next = 2;
420
+ _context8.prev = 1;
421
+ _context8.next = 2;
382
422
  return call.getCallRtpStats();
383
423
  case 2:
384
- callRtpStats = _context7.sent;
385
- _context7.next = 4;
424
+ callRtpStats = _context8.sent;
425
+ _context8.next = 4;
386
426
  break;
387
427
  case 3:
388
- _context7.prev = 3;
389
- _t = _context7["catch"](1);
428
+ _context8.prev = 3;
429
+ _t = _context8["catch"](1);
390
430
  console.error(_t);
391
431
  case 4:
392
432
  expect(callRtpStats).toStrictEqual(disconnectStats);
393
433
  case 5:
394
434
  case "end":
395
- return _context7.stop();
435
+ return _context8.stop();
396
436
  }
397
- }, _callee7, null, [[1, 3]]);
437
+ }, _callee8, null, [[1, 3]]);
398
438
  })));
399
- it('dial functionality tests for coverage', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
439
+ it('dial functionality tests for coverage', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
400
440
  var mockStream, localAudioStream, warnSpy, call, bnrMetricSpy, logSpy;
401
- return _regenerator.default.wrap(function (_context8) {
402
- while (1) switch (_context8.prev = _context8.next) {
441
+ return _regenerator.default.wrap(function (_context9) {
442
+ while (1) switch (_context9.prev = _context9.next) {
403
443
  case 0:
404
444
  mockStream = {
405
445
  outputStream: {
@@ -432,14 +472,14 @@ describe('Call Tests', function () {
432
472
  });
433
473
  case 1:
434
474
  case "end":
435
- return _context8.stop();
475
+ return _context9.stop();
436
476
  }
437
- }, _callee8);
477
+ }, _callee9);
438
478
  })));
439
- it('answer functionality tests for coverage', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
479
+ it('answer functionality tests for coverage', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
440
480
  var mockStream, localAudioStream, warnSpy, call, bnrMetricSpy, infoSpy;
441
- return _regenerator.default.wrap(function (_context9) {
442
- while (1) switch (_context9.prev = _context9.next) {
481
+ return _regenerator.default.wrap(function (_context0) {
482
+ while (1) switch (_context0.prev = _context0.next) {
443
483
  case 0:
444
484
  mockStream = {
445
485
  outputStream: {
@@ -473,9 +513,9 @@ describe('Call Tests', function () {
473
513
  expect(bnrMetricSpy).toBeCalledOnceWith(_types4.METRIC_EVENT.BNR_ENABLED, _types4.METRIC_TYPE.BEHAVIORAL, call.getCallId(), call.getCorrelationId());
474
514
  case 1:
475
515
  case "end":
476
- return _context9.stop();
516
+ return _context0.stop();
477
517
  }
478
- }, _callee9);
518
+ }, _callee0);
479
519
  })));
480
520
  it('registers and unregisters media connection listeners with stable handlers', function () {
481
521
  var mockStream = {
@@ -521,9 +561,9 @@ describe('Call Tests', function () {
521
561
  var warnSpy = jest.spyOn(_Logger.default, 'warn');
522
562
  var getHandlerForEvent = function getHandlerForEvent(eventName) {
523
563
  var _mock$calls$find;
524
- return (_mock$calls$find = call['mediaConnection'].on.mock.calls.find(function (_ref0) {
525
- var _ref1 = (0, _slicedToArray2.default)(_ref0, 1),
526
- name = _ref1[0];
564
+ return (_mock$calls$find = call['mediaConnection'].on.mock.calls.find(function (_ref1) {
565
+ var _ref10 = (0, _slicedToArray2.default)(_ref1, 1),
566
+ name = _ref10[0];
527
567
  return name === eventName;
528
568
  })) === null || _mock$calls$find === void 0 ? void 0 : _mock$calls$find[1];
529
569
  };
@@ -570,18 +610,18 @@ describe('Call Tests', function () {
570
610
  call.dial(localAudioStream);
571
611
  var metricSpy = jest.spyOn(call['metricManager'], 'submitMediaMetric');
572
612
  var warnSpy = jest.spyOn(_Logger.default, 'warn');
573
- var roapFailureHandler = (_mock$calls$find2 = call['mediaConnection'].on.mock.calls.find(function (_ref10) {
574
- var _ref11 = (0, _slicedToArray2.default)(_ref10, 1),
575
- name = _ref11[0];
613
+ var roapFailureHandler = (_mock$calls$find2 = call['mediaConnection'].on.mock.calls.find(function (_ref11) {
614
+ var _ref12 = (0, _slicedToArray2.default)(_ref11, 1),
615
+ name = _ref12[0];
576
616
  return name === InternalMediaCoreModule.MediaConnectionEventNames.ROAP_FAILURE;
577
617
  })) === null || _mock$calls$find2 === void 0 ? void 0 : _mock$calls$find2[1];
578
618
  var roapFailure = new Error('Failed to process remote SDP');
579
619
  roapFailureHandler(roapFailure);
580
620
  expect(metricSpy).toHaveBeenCalledWith(_types4.METRIC_EVENT.MEDIA_ERROR, _types4.MEDIA_CONNECTION_ACTION.ROAP_FAILURE, _types4.METRIC_TYPE.BEHAVIORAL, call.getCallId(), call.getCorrelationId(), undefined, undefined, undefined, expect.any(_Errors.CallError));
581
- var roapFailureMetricCall = metricSpy.mock.calls.find(function (_ref12) {
582
- var _ref13 = (0, _slicedToArray2.default)(_ref12, 2),
583
- name = _ref13[0],
584
- metricAction = _ref13[1];
621
+ var roapFailureMetricCall = metricSpy.mock.calls.find(function (_ref13) {
622
+ var _ref14 = (0, _slicedToArray2.default)(_ref13, 2),
623
+ name = _ref14[0],
624
+ metricAction = _ref14[1];
585
625
  return name === _types4.METRIC_EVENT.MEDIA_ERROR && metricAction === _types4.MEDIA_CONNECTION_ACTION.ROAP_FAILURE;
586
626
  });
587
627
  expect(roapFailureMetricCall).toBeDefined();
@@ -591,11 +631,11 @@ describe('Call Tests', function () {
591
631
  method: 'mediaRoapEventsListener'
592
632
  });
593
633
  });
594
- it('sends connect before ROAP answer when inbound offer is delayed', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
634
+ it('sends connect before ROAP answer when inbound offer is delayed', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
595
635
  var _mock$calls$find3;
596
636
  var mockStream, localAudioStream, call, handleOutgoingCallConnectSpy, delayedOffer, sendCallStateMachineEvtSpy, sendMediaStateMachineEvtSpy, roapListener;
597
- return _regenerator.default.wrap(function (_context0) {
598
- while (1) switch (_context0.prev = _context0.next) {
637
+ return _regenerator.default.wrap(function (_context1) {
638
+ while (1) switch (_context1.prev = _context1.next) {
599
639
  case 0:
600
640
  mockStream = {
601
641
  outputStream: {
@@ -622,7 +662,7 @@ describe('Call Tests', function () {
622
662
  }
623
663
  });
624
664
  expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_PROGRESS');
625
- _context0.next = 1;
665
+ _context1.next = 1;
626
666
  return call.answer(localAudioStream);
627
667
  case 1:
628
668
  expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_CONNECT');
@@ -641,19 +681,19 @@ describe('Call Tests', function () {
641
681
  type: 'E_RECV_ROAP_OFFER',
642
682
  data: delayedOffer
643
683
  });
644
- _context0.next = 2;
684
+ _context1.next = 2;
645
685
  return (0, _testUtil.flushPromises)(2);
646
686
  case 2:
647
687
  expect(call['mediaConnection'].roapMessageReceived).toHaveBeenCalledWith(delayedOffer);
648
688
  sendCallStateMachineEvtSpy = jest.spyOn(call, 'sendCallStateMachineEvt');
649
689
  sendMediaStateMachineEvtSpy = jest.spyOn(call, 'sendMediaStateMachineEvt');
650
- roapListener = (_mock$calls$find3 = call['mediaConnection'].on.mock.calls.find(function (_ref15) {
651
- var _ref16 = (0, _slicedToArray2.default)(_ref15, 1),
652
- eventName = _ref16[0];
690
+ roapListener = (_mock$calls$find3 = call['mediaConnection'].on.mock.calls.find(function (_ref16) {
691
+ var _ref17 = (0, _slicedToArray2.default)(_ref16, 1),
692
+ eventName = _ref17[0];
653
693
  return eventName === InternalMediaCoreModule.MediaConnectionEventNames.ROAP_MESSAGE_TO_SEND;
654
694
  })) === null || _mock$calls$find3 === void 0 ? void 0 : _mock$calls$find3[1];
655
695
  expect(roapListener).toBeDefined();
656
- _context0.next = 3;
696
+ _context1.next = 3;
657
697
  return roapListener({
658
698
  roapMessage: {
659
699
  messageType: 'ANSWER',
@@ -663,7 +703,7 @@ describe('Call Tests', function () {
663
703
  }
664
704
  });
665
705
  case 3:
666
- _context0.next = 4;
706
+ _context1.next = 4;
667
707
  return (0, _testUtil.flushPromises)(2);
668
708
  case 4:
669
709
  // On ANSWER from media layer, connect is retried first, then ROAP answer is posted.
@@ -681,9 +721,9 @@ describe('Call Tests', function () {
681
721
  expect(call['connectPending']).toBe(false);
682
722
  case 5:
683
723
  case "end":
684
- return _context0.stop();
724
+ return _context1.stop();
685
725
  }
686
- }, _callee0);
726
+ }, _callee1);
687
727
  })));
688
728
  var iceLiteOfferSdp = 'v=0\r\no=- 0 0 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n' + 'a=ice-lite\r\nm=audio 19564 UDP/TLS/RTP/SAVPF 0\r\na=sendrecv\r\n';
689
729
  var fullIceOfferSdp = 'v=0\r\no=- 0 0 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n' + 'm=audio 19564 UDP/TLS/RTP/SAVPF 0\r\na=sendrecv\r\na=ice-ufrag:mLbW\r\n';
@@ -721,15 +761,15 @@ describe('Call Tests', function () {
721
761
  reduceTimeoutForIceLite: true
722
762
  },
723
763
  expectedTimeout: _constants.ICE_CANDIDATES_TIMEOUT
724
- }])('ICE candidates timeout selection', function (_ref17) {
725
- var name = _ref17.name,
726
- sdp = _ref17.sdp,
727
- iceGatheringConfig = _ref17.iceGatheringConfig,
728
- expectedTimeout = _ref17.expectedTimeout;
729
- it("uses ".concat(name), /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
764
+ }])('ICE candidates timeout selection', function (_ref18) {
765
+ var name = _ref18.name,
766
+ sdp = _ref18.sdp,
767
+ iceGatheringConfig = _ref18.iceGatheringConfig,
768
+ expectedTimeout = _ref18.expectedTimeout;
769
+ it("uses ".concat(name), /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
730
770
  var mockStream, localAudioStream, call;
731
- return _regenerator.default.wrap(function (_context1) {
732
- while (1) switch (_context1.prev = _context1.next) {
771
+ return _regenerator.default.wrap(function (_context10) {
772
+ while (1) switch (_context10.prev = _context10.next) {
733
773
  case 0:
734
774
  mockStream = {
735
775
  outputStream: {
@@ -759,7 +799,7 @@ describe('Call Tests', function () {
759
799
  sdp: sdp
760
800
  }
761
801
  });
762
- _context1.next = 1;
802
+ _context10.next = 1;
763
803
  return call.answer(localAudioStream);
764
804
  case 1:
765
805
  expect(mockInternalMediaCoreModule.RoapMediaConnection).toBeCalledOnceWith(_objectSpread(_objectSpread({}, roapMediaConnectionConfig), {}, {
@@ -767,15 +807,15 @@ describe('Call Tests', function () {
767
807
  }), roapMediaConnectionOptions, expect.any(String), expect.any(Function), expect.any(Function), expect.any(Function));
768
808
  case 2:
769
809
  case "end":
770
- return _context1.stop();
810
+ return _context10.stop();
771
811
  }
772
- }, _callee1);
812
+ }, _callee10);
773
813
  })));
774
814
  });
775
- it('testing enabling/disabling the BNR on an active call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
815
+ it('testing enabling/disabling the BNR on an active call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11() {
776
816
  var mockStream, localAudioStream, onStreamSpy, onEffectSpy, offStreamSpy, offEffectSpy, call, updateLocalTracksSpy, bnrMetricSpy;
777
- return _regenerator.default.wrap(function (_context10) {
778
- while (1) switch (_context10.prev = _context10.next) {
817
+ return _regenerator.default.wrap(function (_context11) {
818
+ while (1) switch (_context11.prev = _context11.next) {
779
819
  case 0:
780
820
  mockStream = {
781
821
  outputStream: {
@@ -831,7 +871,7 @@ describe('Call Tests', function () {
831
871
  });
832
872
  expect(bnrMetricSpy).toBeCalledOnceWith(_types4.METRIC_EVENT.BNR_DISABLED, _types4.METRIC_TYPE.BEHAVIORAL, call.getCallId(), call.getCorrelationId());
833
873
  call.end();
834
- _context10.next = 1;
874
+ _context11.next = 1;
835
875
  return (0, _Utils.waitForMsecs)(50);
836
876
  case 1:
837
877
  /* Checks for switching off the listeners on call disconnect */
@@ -842,9 +882,9 @@ describe('Call Tests', function () {
842
882
  expect(offEffectSpy).toBeCalledWith(_mediaHelpers.EffectEvent.Disabled, expect.any(Function));
843
883
  case 2:
844
884
  case "end":
845
- return _context10.stop();
885
+ return _context11.stop();
846
886
  }
847
- }, _callee10);
887
+ }, _callee11);
848
888
  })));
849
889
  it('does not register effect listeners when the added effect cannot be resolved', function () {
850
890
  var mockStream = {
@@ -864,10 +904,10 @@ describe('Call Tests', function () {
864
904
  }).not.toThrow();
865
905
  expect(onEffectSpy).not.toHaveBeenCalled();
866
906
  });
867
- it('answer fails if localAudioTrack is empty', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11() {
907
+ it('answer fails if localAudioTrack is empty', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12() {
868
908
  var mockStream, localAudioStream, warnSpy, call;
869
- return _regenerator.default.wrap(function (_context11) {
870
- while (1) switch (_context11.prev = _context11.next) {
909
+ return _regenerator.default.wrap(function (_context12) {
910
+ while (1) switch (_context12.prev = _context12.next) {
871
911
  case 0:
872
912
  mockStream = {
873
913
  outputStream: {
@@ -891,7 +931,7 @@ describe('Call Tests', function () {
891
931
  warnSpy = jest.spyOn(_Logger.default, 'warn');
892
932
  call = (0, _call.createCall)(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, deleteCallFromCollection, defaultServiceIndicator, dest);
893
933
  call.answer(localAudioStream);
894
- _context11.next = 1;
934
+ _context12.next = 1;
895
935
  return (0, _Utils.waitForMsecs)(50);
896
936
  case 1:
897
937
  expect(warnSpy).toBeCalledTimes(2);
@@ -906,14 +946,14 @@ describe('Call Tests', function () {
906
946
  expect(webex.request.mock.calls[0][0].body.metrics).toStrictEqual(disconnectStats);
907
947
  case 2:
908
948
  case "end":
909
- return _context11.stop();
949
+ return _context12.stop();
910
950
  }
911
- }, _callee11);
951
+ }, _callee12);
912
952
  })));
913
- it('dial fails if localAudioTrack is empty', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12() {
953
+ it('dial fails if localAudioTrack is empty', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13() {
914
954
  var mockStream, localAudioStream, warnSpy, call;
915
- return _regenerator.default.wrap(function (_context12) {
916
- while (1) switch (_context12.prev = _context12.next) {
955
+ return _regenerator.default.wrap(function (_context13) {
956
+ while (1) switch (_context13.prev = _context13.next) {
917
957
  case 0:
918
958
  mockStream = {
919
959
  outputStream: {
@@ -925,7 +965,7 @@ describe('Call Tests', function () {
925
965
  warnSpy = jest.spyOn(_Logger.default, 'warn');
926
966
  call = (0, _call.createCall)(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, deleteCallFromCollection, defaultServiceIndicator, dest);
927
967
  call.dial(localAudioStream);
928
- _context12.next = 1;
968
+ _context13.next = 1;
929
969
  return (0, _Utils.waitForMsecs)(50);
930
970
  case 1:
931
971
  expect(warnSpy).toBeCalledTimes(1);
@@ -938,9 +978,9 @@ describe('Call Tests', function () {
938
978
  expect(webex.request).not.toBeCalledOnceWith();
939
979
  case 2:
940
980
  case "end":
941
- return _context12.stop();
981
+ return _context13.stop();
942
982
  }
943
- }, _callee12);
983
+ }, _callee13);
944
984
  })));
945
985
  it('update media after call creation with valid stream', function () {
946
986
  var callManager = (0, _callManager.getCallManager)(webex, defaultServiceIndicator);
@@ -1014,10 +1054,10 @@ describe('Call Tests', function () {
1014
1054
  method: 'dial'
1015
1055
  });
1016
1056
  });
1017
- it('test system mute and user mute different scnearios', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13() {
1057
+ it('test system mute and user mute different scnearios', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14() {
1018
1058
  var logSpy, callManager, mockStream, localAudioStream, call;
1019
- return _regenerator.default.wrap(function (_context13) {
1020
- while (1) switch (_context13.prev = _context13.next) {
1059
+ return _regenerator.default.wrap(function (_context14) {
1060
+ while (1) switch (_context14.prev = _context14.next) {
1021
1061
  case 0:
1022
1062
  logSpy = jest.spyOn(_Logger.default, 'info');
1023
1063
  webex.request.mockReturnValue({
@@ -1093,9 +1133,9 @@ describe('Call Tests', function () {
1093
1133
  expect(mockStream.setUserMuted).toBeCalledOnceWith(false);
1094
1134
  case 1:
1095
1135
  case "end":
1096
- return _context13.stop();
1136
+ return _context14.stop();
1097
1137
  }
1098
- }, _callee13);
1138
+ }, _callee14);
1099
1139
  })));
1100
1140
  describe('Guest Calling Flow Tests', function () {
1101
1141
  var dummyEvent = {
@@ -1103,10 +1143,10 @@ describe('Call Tests', function () {
1103
1143
  data: undefined
1104
1144
  };
1105
1145
  var call;
1106
- it('outgoing call without guest calling must have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14() {
1146
+ it('outgoing call without guest calling must have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15() {
1107
1147
  var requestSpy, requestArgs;
1108
- return _regenerator.default.wrap(function (_context14) {
1109
- while (1) switch (_context14.prev = _context14.next) {
1148
+ return _regenerator.default.wrap(function (_context15) {
1149
+ while (1) switch (_context15.prev = _context15.next) {
1110
1150
  case 0:
1111
1151
  call = new _call.Call(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, function () {
1112
1152
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -1119,14 +1159,14 @@ describe('Call Tests', function () {
1119
1159
  expect('callee' in requestArgs.body).toBe(true);
1120
1160
  case 1:
1121
1161
  case "end":
1122
- return _context14.stop();
1162
+ return _context15.stop();
1123
1163
  }
1124
- }, _callee14);
1164
+ }, _callee15);
1125
1165
  })));
1126
- it('outgoing call for guest calling must not have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15() {
1166
+ it('outgoing call for guest calling must not have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16() {
1127
1167
  var requestSpy, requestArgs;
1128
- return _regenerator.default.wrap(function (_context15) {
1129
- while (1) switch (_context15.prev = _context15.next) {
1168
+ return _regenerator.default.wrap(function (_context16) {
1169
+ while (1) switch (_context16.prev = _context16.next) {
1130
1170
  case 0:
1131
1171
  call = new _call.Call(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, function () {
1132
1172
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -1139,9 +1179,9 @@ describe('Call Tests', function () {
1139
1179
  expect('callee' in requestArgs.body).toBe(false);
1140
1180
  case 1:
1141
1181
  case "end":
1142
- return _context15.stop();
1182
+ return _context16.stop();
1143
1183
  }
1144
- }, _callee15);
1184
+ }, _callee16);
1145
1185
  })));
1146
1186
  });
1147
1187
  });
@@ -1179,10 +1219,10 @@ describe('State Machine handler tests', function () {
1179
1219
 
1180
1220
  // afterEach(() => call.removeAllListeners());
1181
1221
 
1182
- it('successful session refresh', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16() {
1222
+ it('successful session refresh', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17() {
1183
1223
  var statusPayload, dummyEvent, funcSpy, logSpy;
1184
- return _regenerator.default.wrap(function (_context16) {
1185
- while (1) switch (_context16.prev = _context16.next) {
1224
+ return _regenerator.default.wrap(function (_context17) {
1225
+ while (1) switch (_context17.prev = _context17.next) {
1186
1226
  case 0:
1187
1227
  statusPayload = {
1188
1228
  statusCode: 200,
@@ -1202,7 +1242,7 @@ describe('State Machine handler tests', function () {
1202
1242
  /* This is to flush all the promises from the Promise queue so that
1203
1243
  * Jest.fakeTimers can advance time and also clear the promise Queue
1204
1244
  */
1205
- _context16.next = 1;
1245
+ _context17.next = 1;
1206
1246
  return (0, _testUtil.flushPromises)(3);
1207
1247
  case 1:
1208
1248
  expect(setInterval).toHaveBeenCalledTimes(1);
@@ -1218,14 +1258,14 @@ describe('State Machine handler tests', function () {
1218
1258
  });
1219
1259
  case 2:
1220
1260
  case "end":
1221
- return _context16.stop();
1261
+ return _context17.stop();
1222
1262
  }
1223
- }, _callee16);
1263
+ }, _callee17);
1224
1264
  })));
1225
- it('session refresh 401 emits token error and ends the call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17() {
1265
+ it('session refresh 401 emits token error and ends the call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
1226
1266
  var statusPayload, emitSpy, funcSpy;
1227
- return _regenerator.default.wrap(function (_context17) {
1228
- while (1) switch (_context17.prev = _context17.next) {
1267
+ return _regenerator.default.wrap(function (_context18) {
1268
+ while (1) switch (_context18.prev = _context18.next) {
1229
1269
  case 0:
1230
1270
  expect.assertions(4);
1231
1271
  statusPayload = {
@@ -1240,10 +1280,10 @@ describe('State Machine handler tests', function () {
1240
1280
  funcSpy = jest.spyOn(call, 'postStatus').mockRejectedValue(statusPayload);
1241
1281
  call['handleCallEstablished']({});
1242
1282
  jest.advanceTimersByTime(_constants.DEFAULT_SESSION_TIMER);
1243
- _context17.next = 1;
1283
+ _context18.next = 1;
1244
1284
  return _promise.default.resolve();
1245
1285
  case 1:
1246
- _context17.next = 2;
1286
+ _context18.next = 2;
1247
1287
  return _promise.default.resolve();
1248
1288
  case 2:
1249
1289
  // clearInterval is called twice: once in scheduleCallKeepaliveInterval (at start)
@@ -1253,14 +1293,14 @@ describe('State Machine handler tests', function () {
1253
1293
  expect(emitSpy).toHaveBeenCalledWith(_types2.CALL_EVENT_KEYS.DISCONNECT, call.getCorrelationId());
1254
1294
  case 3:
1255
1295
  case "end":
1256
- return _context17.stop();
1296
+ return _context18.stop();
1257
1297
  }
1258
- }, _callee17);
1298
+ }, _callee18);
1259
1299
  })));
1260
- it('session refresh failure', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
1300
+ it('session refresh failure', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19() {
1261
1301
  var statusPayload, funcSpy;
1262
- return _regenerator.default.wrap(function (_context18) {
1263
- while (1) switch (_context18.prev = _context18.next) {
1302
+ return _regenerator.default.wrap(function (_context19) {
1303
+ while (1) switch (_context19.prev = _context19.next) {
1264
1304
  case 0:
1265
1305
  expect.assertions(4);
1266
1306
  statusPayload = {
@@ -1279,7 +1319,7 @@ describe('State Machine handler tests', function () {
1279
1319
  /* This is to flush all the promises from the Promise queue so that
1280
1320
  * Jest.fakeTimers can advance time and also clear the promise Queue
1281
1321
  */
1282
- _context18.next = 1;
1322
+ _context19.next = 1;
1283
1323
  return (0, _testUtil.flushPromises)(2);
1284
1324
  case 1:
1285
1325
  // clearInterval is called twice: once in scheduleCallKeepaliveInterval (at start)
@@ -1288,14 +1328,14 @@ describe('State Machine handler tests', function () {
1288
1328
  expect(funcSpy).toBeCalledTimes(1);
1289
1329
  case 2:
1290
1330
  case "end":
1291
- return _context18.stop();
1331
+ return _context19.stop();
1292
1332
  }
1293
- }, _callee18);
1333
+ }, _callee19);
1294
1334
  })));
1295
- it('session refresh 500 schedules retry via retry-after or default interval', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19() {
1335
+ it('session refresh 500 schedules retry via retry-after or default interval', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
1296
1336
  var errorPayload, okPayload, scheduleKeepaliveSpy, postStatusSpy;
1297
- return _regenerator.default.wrap(function (_context19) {
1298
- while (1) switch (_context19.prev = _context19.next) {
1337
+ return _regenerator.default.wrap(function (_context20) {
1338
+ while (1) switch (_context20.prev = _context20.next) {
1299
1339
  case 0:
1300
1340
  errorPayload = {
1301
1341
  statusCode: 500,
@@ -1313,28 +1353,28 @@ describe('State Machine handler tests', function () {
1313
1353
  call['handleCallEstablished']({});
1314
1354
  }
1315
1355
  jest.advanceTimersByTime(_constants.DEFAULT_SESSION_TIMER);
1316
- _context19.next = 1;
1356
+ _context20.next = 1;
1317
1357
  return (0, _testUtil.flushPromises)(2);
1318
1358
  case 1:
1319
1359
  expect(postStatusSpy).toHaveBeenCalledTimes(1);
1320
1360
 
1321
1361
  // Now advance by 1 second for the retry-after interval
1322
1362
  jest.advanceTimersByTime(1000);
1323
- _context19.next = 2;
1363
+ _context20.next = 2;
1324
1364
  return (0, _testUtil.flushPromises)(2);
1325
1365
  case 2:
1326
1366
  expect(postStatusSpy).toHaveBeenCalledTimes(2);
1327
1367
  expect(scheduleKeepaliveSpy).toHaveBeenCalledTimes(2);
1328
1368
  case 3:
1329
1369
  case "end":
1330
- return _context19.stop();
1370
+ return _context20.stop();
1331
1371
  }
1332
- }, _callee19);
1372
+ }, _callee20);
1333
1373
  })));
1334
- it('scheduleCallKeepaliveInterval clears existing interval before creating new one', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
1374
+ it('scheduleCallKeepaliveInterval clears existing interval before creating new one', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
1335
1375
  var firstTimer, secondTimer;
1336
- return _regenerator.default.wrap(function (_context20) {
1337
- while (1) switch (_context20.prev = _context20.next) {
1376
+ return _regenerator.default.wrap(function (_context21) {
1377
+ while (1) switch (_context21.prev = _context21.next) {
1338
1378
  case 0:
1339
1379
  jest.spyOn(global, 'setInterval');
1340
1380
  jest.spyOn(global, 'clearInterval');
@@ -1362,14 +1402,14 @@ describe('State Machine handler tests', function () {
1362
1402
  expect(secondTimer).toBeDefined();
1363
1403
  case 1:
1364
1404
  case "end":
1365
- return _context20.stop();
1405
+ return _context21.stop();
1366
1406
  }
1367
- }, _callee20);
1407
+ }, _callee21);
1368
1408
  })));
1369
- it('keepalive ends after reaching max retry count', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
1409
+ it('keepalive ends after reaching max retry count', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
1370
1410
  var errorPayload, warnSpy, postStatusSpy;
1371
- return _regenerator.default.wrap(function (_context21) {
1372
- while (1) switch (_context21.prev = _context21.next) {
1411
+ return _regenerator.default.wrap(function (_context22) {
1412
+ while (1) switch (_context22.prev = _context22.next) {
1373
1413
  case 0:
1374
1414
  errorPayload = {
1375
1415
  statusCode: 500,
@@ -1388,25 +1428,25 @@ describe('State Machine handler tests', function () {
1388
1428
 
1389
1429
  // Advance timer to trigger the first failure (uses DEFAULT_SESSION_TIMER)
1390
1430
  jest.advanceTimersByTime(_constants.DEFAULT_SESSION_TIMER);
1391
- _context21.next = 1;
1431
+ _context22.next = 1;
1392
1432
  return (0, _testUtil.flushPromises)(2);
1393
1433
  case 1:
1394
1434
  // Now advance by 1 second for each of the 4 retry attempts (retry-after: 1 second each)
1395
1435
  // Need to do this separately to allow state machine to process and create new intervals
1396
1436
  jest.advanceTimersByTime(1000);
1397
- _context21.next = 2;
1437
+ _context22.next = 2;
1398
1438
  return (0, _testUtil.flushPromises)(2);
1399
1439
  case 2:
1400
1440
  jest.advanceTimersByTime(1000);
1401
- _context21.next = 3;
1441
+ _context22.next = 3;
1402
1442
  return (0, _testUtil.flushPromises)(2);
1403
1443
  case 3:
1404
1444
  jest.advanceTimersByTime(1000);
1405
- _context21.next = 4;
1445
+ _context22.next = 4;
1406
1446
  return (0, _testUtil.flushPromises)(2);
1407
1447
  case 4:
1408
1448
  jest.advanceTimersByTime(1000);
1409
- _context21.next = 5;
1449
+ _context22.next = 5;
1410
1450
  return (0, _testUtil.flushPromises)(2);
1411
1451
  case 5:
1412
1452
  // The error handler should detect we're at max retry count and stop
@@ -1418,14 +1458,14 @@ describe('State Machine handler tests', function () {
1418
1458
  expect(call['callKeepaliveRetryCount']).toBe(4);
1419
1459
  case 6:
1420
1460
  case "end":
1421
- return _context21.stop();
1461
+ return _context22.stop();
1422
1462
  }
1423
- }, _callee21);
1463
+ }, _callee22);
1424
1464
  })));
1425
- it('state changes during successful incoming call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
1465
+ it('state changes during successful incoming call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23() {
1426
1466
  var statusPayload, dummyEvent, postMediaSpy, deleteSpy, dummyOkEvent;
1427
- return _regenerator.default.wrap(function (_context22) {
1428
- while (1) switch (_context22.prev = _context22.next) {
1467
+ return _regenerator.default.wrap(function (_context23) {
1468
+ while (1) switch (_context23.prev = _context23.next) {
1429
1469
  case 0:
1430
1470
  statusPayload = {
1431
1471
  statusCode: 200,
@@ -1481,14 +1521,14 @@ describe('State Machine handler tests', function () {
1481
1521
  expect(call['callStateMachine'].state.value).toBe('S_RECV_CALL_DISCONNECT');
1482
1522
  case 1:
1483
1523
  case "end":
1484
- return _context22.stop();
1524
+ return _context23.stop();
1485
1525
  }
1486
- }, _callee22);
1526
+ }, _callee23);
1487
1527
  })));
1488
- it('state changes during unsuccessful incoming call due to no offer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23() {
1528
+ it('state changes during unsuccessful incoming call due to no offer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24() {
1489
1529
  var statusPayload, dummyEvent;
1490
- return _regenerator.default.wrap(function (_context23) {
1491
- while (1) switch (_context23.prev = _context23.next) {
1530
+ return _regenerator.default.wrap(function (_context24) {
1531
+ while (1) switch (_context24.prev = _context24.next) {
1492
1532
  case 0:
1493
1533
  call['direction'] = _types3.CallDirection.INBOUND;
1494
1534
  statusPayload = {
@@ -1506,7 +1546,7 @@ describe('State Machine handler tests', function () {
1506
1546
  webex.request.mockReturnValue(statusPayload);
1507
1547
  call.sendCallStateMachineEvt(dummyEvent);
1508
1548
  expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_PROGRESS');
1509
- _context23.next = 1;
1549
+ _context24.next = 1;
1510
1550
  return call['handleOutgoingCallConnect']({
1511
1551
  type: 'E_SEND_CALL_CONNECT'
1512
1552
  });
@@ -1520,14 +1560,14 @@ describe('State Machine handler tests', function () {
1520
1560
  expect(call['callStateMachine'].state.value).toBe('S_RECV_CALL_DISCONNECT');
1521
1561
  case 2:
1522
1562
  case "end":
1523
- return _context23.stop();
1563
+ return _context24.stop();
1524
1564
  }
1525
- }, _callee23);
1565
+ }, _callee24);
1526
1566
  })));
1527
- it('processes callerId on received progress event in established state without emitting PROGRESS', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24() {
1567
+ it('processes callerId on received progress event in established state without emitting PROGRESS', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25() {
1528
1568
  var callManager, statusPayload, call, dummyEvent, dummyOkEvent, emitSpy, startCallerIdSpy, mobiusProgressEvent;
1529
- return _regenerator.default.wrap(function (_context24) {
1530
- while (1) switch (_context24.prev = _context24.next) {
1569
+ return _regenerator.default.wrap(function (_context25) {
1570
+ while (1) switch (_context25.prev = _context25.next) {
1531
1571
  case 0:
1532
1572
  callManager = (0, _callManager.getCallManager)(webex, defaultServiceIndicator);
1533
1573
  statusPayload = {
@@ -1621,14 +1661,14 @@ describe('State Machine handler tests', function () {
1621
1661
  expect(call.earlyMedia).not.toBe(true);
1622
1662
  case 1:
1623
1663
  case "end":
1624
- return _context24.stop();
1664
+ return _context25.stop();
1625
1665
  }
1626
- }, _callee24);
1666
+ }, _callee25);
1627
1667
  })));
1628
- it('state changes during unsuccessful incoming call due error in call connect', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25() {
1668
+ it('state changes during unsuccessful incoming call due error in call connect', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26() {
1629
1669
  var warnSpy, errorSpy, stateMachineSpy, statusPayload, roapMessage;
1630
- return _regenerator.default.wrap(function (_context25) {
1631
- while (1) switch (_context25.prev = _context25.next) {
1670
+ return _regenerator.default.wrap(function (_context26) {
1671
+ while (1) switch (_context26.prev = _context26.next) {
1632
1672
  case 0:
1633
1673
  warnSpy = jest.spyOn(_Logger.default, 'warn');
1634
1674
  errorSpy = jest.spyOn(_Logger.default, 'error');
@@ -1655,7 +1695,7 @@ describe('State Machine handler tests', function () {
1655
1695
  webex.request.mockRejectedValueOnce({
1656
1696
  statusCode: 403
1657
1697
  }).mockResolvedValue(statusPayload);
1658
- _context25.next = 1;
1698
+ _context26.next = 1;
1659
1699
  return call['handleOutgoingCallConnect']({
1660
1700
  type: 'E_SEND_CALL_CONNECT'
1661
1701
  });
@@ -1666,14 +1706,14 @@ describe('State Machine handler tests', function () {
1666
1706
  expect(errorSpy).toBeCalledTimes(1);
1667
1707
  case 2:
1668
1708
  case "end":
1669
- return _context25.stop();
1709
+ return _context26.stop();
1670
1710
  }
1671
- }, _callee25);
1711
+ }, _callee26);
1672
1712
  })));
1673
- it('state changes during successful outgoing call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26() {
1713
+ it('state changes during successful outgoing call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27() {
1674
1714
  var statusPayload, dummyEvent, postMediaSpy, logSpy, dummyOkEvent;
1675
- return _regenerator.default.wrap(function (_context26) {
1676
- while (1) switch (_context26.prev = _context26.next) {
1715
+ return _regenerator.default.wrap(function (_context27) {
1716
+ while (1) switch (_context27.prev = _context27.next) {
1677
1717
  case 0:
1678
1718
  statusPayload = {
1679
1719
  statusCode: 200,
@@ -1749,14 +1789,14 @@ describe('State Machine handler tests', function () {
1749
1789
  expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_DISCONNECT');
1750
1790
  case 1:
1751
1791
  case "end":
1752
- return _context26.stop();
1792
+ return _context27.stop();
1753
1793
  }
1754
- }, _callee26);
1794
+ }, _callee27);
1755
1795
  })));
1756
- it('outgoing call where we receive connect directly after setup. Media established before connect. test call and media state changes', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27() {
1796
+ it('outgoing call where we receive connect directly after setup. Media established before connect. test call and media state changes', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28() {
1757
1797
  var statusPayload, dummySetupEvent, dummyConnectEvent, dummyOfferEvent, dummyAnswerEvent, dummyOkEvent, postMediaSpy;
1758
- return _regenerator.default.wrap(function (_context27) {
1759
- while (1) switch (_context27.prev = _context27.next) {
1798
+ return _regenerator.default.wrap(function (_context28) {
1799
+ while (1) switch (_context28.prev = _context28.next) {
1760
1800
  case 0:
1761
1801
  statusPayload = {
1762
1802
  statusCode: 200,
@@ -1824,14 +1864,14 @@ describe('State Machine handler tests', function () {
1824
1864
  expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_DISCONNECT');
1825
1865
  case 1:
1826
1866
  case "end":
1827
- return _context27.stop();
1867
+ return _context28.stop();
1828
1868
  }
1829
- }, _callee27);
1869
+ }, _callee28);
1830
1870
  })));
1831
- it('state changes during successful outgoing call with early media', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28() {
1871
+ it('state changes during successful outgoing call with early media', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29() {
1832
1872
  var statusPayload, dummyEvent;
1833
- return _regenerator.default.wrap(function (_context28) {
1834
- while (1) switch (_context28.prev = _context28.next) {
1873
+ return _regenerator.default.wrap(function (_context29) {
1874
+ while (1) switch (_context29.prev = _context29.next) {
1835
1875
  case 0:
1836
1876
  statusPayload = {
1837
1877
  statusCode: 200,
@@ -1870,14 +1910,14 @@ describe('State Machine handler tests', function () {
1870
1910
  expect(call['callStateMachine'].state.value).toBe('S_RECV_CALL_DISCONNECT');
1871
1911
  case 1:
1872
1912
  case "end":
1873
- return _context28.stop();
1913
+ return _context29.stop();
1874
1914
  }
1875
- }, _callee28);
1915
+ }, _callee29);
1876
1916
  })));
1877
- it('state changes during unsuccessful outgoing call due to error in call setup', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29() {
1917
+ it('state changes during unsuccessful outgoing call due to error in call setup', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30() {
1878
1918
  var statusPayload, dummyEvent, errorSpy;
1879
- return _regenerator.default.wrap(function (_context29) {
1880
- while (1) switch (_context29.prev = _context29.next) {
1919
+ return _regenerator.default.wrap(function (_context30) {
1920
+ while (1) switch (_context30.prev = _context30.next) {
1881
1921
  case 0:
1882
1922
  statusPayload = {
1883
1923
  statusCode: 403,
@@ -1894,13 +1934,13 @@ describe('State Machine handler tests', function () {
1894
1934
  webex.request.mockRejectedValueOnce(statusPayload);
1895
1935
  errorSpy = jest.spyOn(_Logger.default, 'error');
1896
1936
  call.sendCallStateMachineEvt(dummyEvent);
1897
- _context29.next = 1;
1937
+ _context30.next = 1;
1898
1938
  return (0, _testUtil.flushPromises)(3);
1899
1939
  case 1:
1900
- _context29.next = 2;
1940
+ _context30.next = 2;
1901
1941
  return _promise.default.resolve();
1902
1942
  case 2:
1903
- _context29.next = 3;
1943
+ _context30.next = 3;
1904
1944
  return _promise.default.resolve();
1905
1945
  case 3:
1906
1946
  expect(call['callStateMachine'].state.value).toBe('S_UNKNOWN');
@@ -1911,14 +1951,14 @@ describe('State Machine handler tests', function () {
1911
1951
  });
1912
1952
  case 4:
1913
1953
  case "end":
1914
- return _context29.stop();
1954
+ return _context30.stop();
1915
1955
  }
1916
- }, _callee29);
1956
+ }, _callee30);
1917
1957
  })));
1918
- it('state changes during unsuccessful outgoing call due to error in media ok', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30() {
1958
+ it('state changes during unsuccessful outgoing call due to error in media ok', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31() {
1919
1959
  var statusPayload, dummyEvent, warnSpy;
1920
- return _regenerator.default.wrap(function (_context30) {
1921
- while (1) switch (_context30.prev = _context30.next) {
1960
+ return _regenerator.default.wrap(function (_context31) {
1961
+ while (1) switch (_context31.prev = _context31.next) {
1922
1962
  case 0:
1923
1963
  statusPayload = {
1924
1964
  statusCode: 403,
@@ -1937,16 +1977,16 @@ describe('State Machine handler tests', function () {
1937
1977
  webex.request.mockRejectedValue(statusPayload);
1938
1978
  warnSpy = jest.spyOn(_Logger.default, 'warn');
1939
1979
  jest.spyOn(Utils, 'uploadLogs').mockResolvedValue(undefined);
1940
- _context30.next = 1;
1980
+ _context31.next = 1;
1941
1981
  return call['handleRoapEstablished']({}, dummyEvent);
1942
1982
  case 1:
1943
- _context30.next = 2;
1983
+ _context31.next = 2;
1944
1984
  return (0, _testUtil.flushPromises)(2);
1945
1985
  case 2:
1946
- _context30.next = 3;
1986
+ _context31.next = 3;
1947
1987
  return _promise.default.resolve();
1948
1988
  case 3:
1949
- _context30.next = 4;
1989
+ _context31.next = 4;
1950
1990
  return _promise.default.resolve();
1951
1991
  case 4:
1952
1992
  expect(call.isConnected()).toBe(false);
@@ -1962,14 +2002,14 @@ describe('State Machine handler tests', function () {
1962
2002
  });
1963
2003
  case 5:
1964
2004
  case "end":
1965
- return _context30.stop();
2005
+ return _context31.stop();
1966
2006
  }
1967
- }, _callee30);
2007
+ }, _callee31);
1968
2008
  })));
1969
- it('state changes during unsuccessful outgoing call since no sdp in offer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31() {
2009
+ it('state changes during unsuccessful outgoing call since no sdp in offer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32() {
1970
2010
  var statusPayload, dummyEvent;
1971
- return _regenerator.default.wrap(function (_context31) {
1972
- while (1) switch (_context31.prev = _context31.next) {
2011
+ return _regenerator.default.wrap(function (_context32) {
2012
+ while (1) switch (_context32.prev = _context32.next) {
1973
2013
  case 0:
1974
2014
  statusPayload = {
1975
2015
  statusCode: 403,
@@ -1992,14 +2032,14 @@ describe('State Machine handler tests', function () {
1992
2032
  expect(_testUtil.mediaConnection.initiateOffer).toBeCalledOnceWith();
1993
2033
  case 1:
1994
2034
  case "end":
1995
- return _context31.stop();
2035
+ return _context32.stop();
1996
2036
  }
1997
- }, _callee31);
2037
+ }, _callee32);
1998
2038
  })));
1999
- it('Outgoing Roap offer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32() {
2039
+ it('Outgoing Roap offer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
2000
2040
  var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
2001
- return _regenerator.default.wrap(function (_context32) {
2002
- while (1) switch (_context32.prev = _context32.next) {
2041
+ return _regenerator.default.wrap(function (_context33) {
2042
+ while (1) switch (_context33.prev = _context33.next) {
2003
2043
  case 0:
2004
2044
  statusPayload = {
2005
2045
  statusCode: 503,
@@ -2021,7 +2061,7 @@ describe('State Machine handler tests', function () {
2021
2061
  }
2022
2062
  };
2023
2063
  call['connected'] = true;
2024
- _context32.next = 1;
2064
+ _context33.next = 1;
2025
2065
  return call['handleOutgoingRoapOffer']({}, dummyEvent);
2026
2066
  case 1:
2027
2067
  jest.advanceTimersByTime(1005);
@@ -2033,14 +2073,14 @@ describe('State Machine handler tests', function () {
2033
2073
  expect(stateMachineSpy).toBeCalledOnceWith(dummyEvent);
2034
2074
  case 2:
2035
2075
  case "end":
2036
- return _context32.stop();
2076
+ return _context33.stop();
2037
2077
  }
2038
- }, _callee32);
2078
+ }, _callee33);
2039
2079
  })));
2040
- it('Outgoing Roap offer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
2080
+ it('Outgoing Roap offer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
2041
2081
  var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
2042
- return _regenerator.default.wrap(function (_context33) {
2043
- while (1) switch (_context33.prev = _context33.next) {
2082
+ return _regenerator.default.wrap(function (_context34) {
2083
+ while (1) switch (_context34.prev = _context34.next) {
2044
2084
  case 0:
2045
2085
  statusPayload = {
2046
2086
  statusCode: 503,
@@ -2062,7 +2102,7 @@ describe('State Machine handler tests', function () {
2062
2102
  }
2063
2103
  };
2064
2104
  call['connected'] = false;
2065
- _context33.next = 1;
2105
+ _context34.next = 1;
2066
2106
  return call['handleOutgoingRoapOffer']({}, dummyEvent);
2067
2107
  case 1:
2068
2108
  jest.advanceTimersByTime(1005);
@@ -2073,14 +2113,14 @@ describe('State Machine handler tests', function () {
2073
2113
  expect(stateMachineSpy).not.toBeCalled();
2074
2114
  case 2:
2075
2115
  case "end":
2076
- return _context33.stop();
2116
+ return _context34.stop();
2077
2117
  }
2078
- }, _callee33);
2118
+ }, _callee34);
2079
2119
  })));
2080
- it('Outgoing Roap Answer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
2120
+ it('Outgoing Roap Answer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35() {
2081
2121
  var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
2082
- return _regenerator.default.wrap(function (_context34) {
2083
- while (1) switch (_context34.prev = _context34.next) {
2122
+ return _regenerator.default.wrap(function (_context35) {
2123
+ while (1) switch (_context35.prev = _context35.next) {
2084
2124
  case 0:
2085
2125
  statusPayload = {
2086
2126
  statusCode: 503,
@@ -2102,7 +2142,7 @@ describe('State Machine handler tests', function () {
2102
2142
  };
2103
2143
  call['connected'] = true;
2104
2144
  call['mediaStateMachine'].state.value = 'S_RECV_ROAP_OFFER';
2105
- _context34.next = 1;
2145
+ _context35.next = 1;
2106
2146
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
2107
2147
  case 1:
2108
2148
  jest.advanceTimersByTime(1005);
@@ -2114,14 +2154,14 @@ describe('State Machine handler tests', function () {
2114
2154
  expect(stateMachineSpy).toBeCalledOnceWith(dummyEvent);
2115
2155
  case 2:
2116
2156
  case "end":
2117
- return _context34.stop();
2157
+ return _context35.stop();
2118
2158
  }
2119
- }, _callee34);
2159
+ }, _callee35);
2120
2160
  })));
2121
- it('Outgoing Roap answer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35() {
2161
+ it('Outgoing Roap answer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36() {
2122
2162
  var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
2123
- return _regenerator.default.wrap(function (_context35) {
2124
- while (1) switch (_context35.prev = _context35.next) {
2163
+ return _regenerator.default.wrap(function (_context36) {
2164
+ while (1) switch (_context36.prev = _context36.next) {
2125
2165
  case 0:
2126
2166
  statusPayload = {
2127
2167
  statusCode: 503,
@@ -2142,7 +2182,7 @@ describe('State Machine handler tests', function () {
2142
2182
  }
2143
2183
  };
2144
2184
  call['connected'] = false;
2145
- _context35.next = 1;
2185
+ _context36.next = 1;
2146
2186
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
2147
2187
  case 1:
2148
2188
  jest.advanceTimersByTime(1005);
@@ -2154,14 +2194,14 @@ describe('State Machine handler tests', function () {
2154
2194
  expect(stateMachineSpy).not.toBeCalled();
2155
2195
  case 2:
2156
2196
  case "end":
2157
- return _context35.stop();
2197
+ return _context36.stop();
2158
2198
  }
2159
- }, _callee35);
2199
+ }, _callee36);
2160
2200
  })));
2161
- it('ROAP error during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36() {
2201
+ it('ROAP error during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37() {
2162
2202
  var statusPayload, warnSpy, stateMachineSpy, funcSpy, errorEvent;
2163
- return _regenerator.default.wrap(function (_context36) {
2164
- while (1) switch (_context36.prev = _context36.next) {
2203
+ return _regenerator.default.wrap(function (_context37) {
2204
+ while (1) switch (_context37.prev = _context37.next) {
2165
2205
  case 0:
2166
2206
  statusPayload = {
2167
2207
  statusCode: 200,
@@ -2186,14 +2226,14 @@ describe('State Machine handler tests', function () {
2186
2226
  expect(stateMachineSpy).not.toHaveBeenCalled();
2187
2227
  case 1:
2188
2228
  case "end":
2189
- return _context36.stop();
2229
+ return _context37.stop();
2190
2230
  }
2191
- }, _callee36);
2231
+ }, _callee37);
2192
2232
  })));
2193
- it('ROAP ok retry-after during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37() {
2233
+ it('ROAP ok retry-after during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38() {
2194
2234
  var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
2195
- return _regenerator.default.wrap(function (_context37) {
2196
- while (1) switch (_context37.prev = _context37.next) {
2235
+ return _regenerator.default.wrap(function (_context38) {
2236
+ while (1) switch (_context38.prev = _context38.next) {
2197
2237
  case 0:
2198
2238
  statusPayload = {
2199
2239
  statusCode: 503,
@@ -2215,7 +2255,7 @@ describe('State Machine handler tests', function () {
2215
2255
  };
2216
2256
  call['connected'] = true;
2217
2257
  call['mediaStateMachine'].state.value = 'S_RECV_ROAP_ANSWER';
2218
- _context37.next = 1;
2258
+ _context38.next = 1;
2219
2259
  return call['handleRoapEstablished']({}, dummyEvent);
2220
2260
  case 1:
2221
2261
  jest.advanceTimersByTime(1005);
@@ -2227,14 +2267,14 @@ describe('State Machine handler tests', function () {
2227
2267
  expect(stateMachineSpy).toBeCalledOnceWith(dummyEvent);
2228
2268
  case 2:
2229
2269
  case "end":
2230
- return _context37.stop();
2270
+ return _context38.stop();
2231
2271
  }
2232
- }, _callee37);
2272
+ }, _callee38);
2233
2273
  })));
2234
- it('Unable to communicate roap error with mobius', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38() {
2274
+ it('Unable to communicate roap error with mobius', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39() {
2235
2275
  var statusPayload, stateMachineSpy, funcSpy, errorEvent;
2236
- return _regenerator.default.wrap(function (_context38) {
2237
- while (1) switch (_context38.prev = _context38.next) {
2276
+ return _regenerator.default.wrap(function (_context39) {
2277
+ while (1) switch (_context39.prev = _context39.next) {
2238
2278
  case 0:
2239
2279
  statusPayload = {
2240
2280
  statusCode: 403,
@@ -2257,14 +2297,14 @@ describe('State Machine handler tests', function () {
2257
2297
  expect(stateMachineSpy).not.toHaveBeenCalled();
2258
2298
  case 1:
2259
2299
  case "end":
2260
- return _context38.stop();
2300
+ return _context39.stop();
2261
2301
  }
2262
- }, _callee38);
2302
+ }, _callee39);
2263
2303
  })));
2264
- it('ROAP error during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39() {
2304
+ it('ROAP error during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40() {
2265
2305
  var statusPayload, warnSpy, stateMachineSpy, funcSpy, errorEvent;
2266
- return _regenerator.default.wrap(function (_context39) {
2267
- while (1) switch (_context39.prev = _context39.next) {
2306
+ return _regenerator.default.wrap(function (_context40) {
2307
+ while (1) switch (_context40.prev = _context40.next) {
2268
2308
  case 0:
2269
2309
  statusPayload = {
2270
2310
  statusCode: 200,
@@ -2282,7 +2322,7 @@ describe('State Machine handler tests', function () {
2282
2322
  }
2283
2323
  };
2284
2324
  call['connected'] = false;
2285
- _context39.next = 1;
2325
+ _context40.next = 1;
2286
2326
  return call['handleRoapError']({}, errorEvent);
2287
2327
  case 1:
2288
2328
  expect(funcSpy).toBeCalledOnceWith(errorEvent.data);
@@ -2298,14 +2338,14 @@ describe('State Machine handler tests', function () {
2298
2338
  });
2299
2339
  case 2:
2300
2340
  case "end":
2301
- return _context39.stop();
2341
+ return _context40.stop();
2302
2342
  }
2303
- }, _callee39);
2343
+ }, _callee40);
2304
2344
  })));
2305
- it('incoming call: failing ROAP_ANSWER posts error path and tears down', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40() {
2345
+ it('incoming call: failing ROAP_ANSWER posts error path and tears down', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41() {
2306
2346
  var statusPayload, warnSpy, postMediaSpy, setupEvent, connectEvent, offerEvent, answerEvent;
2307
- return _regenerator.default.wrap(function (_context40) {
2308
- while (1) switch (_context40.prev = _context40.next) {
2347
+ return _regenerator.default.wrap(function (_context41) {
2348
+ while (1) switch (_context41.prev = _context41.next) {
2309
2349
  case 0:
2310
2350
  statusPayload = {
2311
2351
  statusCode: 403,
@@ -2343,16 +2383,16 @@ describe('State Machine handler tests', function () {
2343
2383
  messageType: 'ANSWER'
2344
2384
  }
2345
2385
  };
2346
- _context40.next = 1;
2386
+ _context41.next = 1;
2347
2387
  return call.sendMediaStateMachineEvt(answerEvent);
2348
2388
  case 1:
2349
- _context40.next = 2;
2389
+ _context41.next = 2;
2350
2390
  return (0, _testUtil.flushPromises)(2);
2351
2391
  case 2:
2352
- _context40.next = 3;
2392
+ _context41.next = 3;
2353
2393
  return _promise.default.resolve();
2354
2394
  case 3:
2355
- _context40.next = 4;
2395
+ _context41.next = 4;
2356
2396
  return _promise.default.resolve();
2357
2397
  case 4:
2358
2398
  expect(postMediaSpy).toBeCalledOnceWith(answerEvent.data);
@@ -2370,14 +2410,14 @@ describe('State Machine handler tests', function () {
2370
2410
  expect(call['callStateMachine'].state.value).toBe('S_CALL_CLEARED');
2371
2411
  case 5:
2372
2412
  case "end":
2373
- return _context40.stop();
2413
+ return _context41.stop();
2374
2414
  }
2375
- }, _callee40);
2415
+ }, _callee41);
2376
2416
  })));
2377
- it('state changes during successful incoming call with out of order events', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41() {
2417
+ it('state changes during successful incoming call with out of order events', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42() {
2378
2418
  var statusPayload, dummyEvent, postMediaSpy, dummyOkEvent, dummyOfferEvent;
2379
- return _regenerator.default.wrap(function (_context41) {
2380
- while (1) switch (_context41.prev = _context41.next) {
2419
+ return _regenerator.default.wrap(function (_context42) {
2420
+ while (1) switch (_context42.prev = _context42.next) {
2381
2421
  case 0:
2382
2422
  statusPayload = {
2383
2423
  statusCode: 200,
@@ -2410,7 +2450,7 @@ describe('State Machine handler tests', function () {
2410
2450
  seq: 1,
2411
2451
  messageType: 'ANSWER'
2412
2452
  };
2413
- _context41.next = 1;
2453
+ _context42.next = 1;
2414
2454
  return call.sendMediaStateMachineEvt(dummyEvent);
2415
2455
  case 1:
2416
2456
  expect(postMediaSpy).toBeCalledOnceWith(dummyEvent.data);
@@ -2432,7 +2472,7 @@ describe('State Machine handler tests', function () {
2432
2472
  seq: 2,
2433
2473
  messageType: 'OFFER_REQUEST'
2434
2474
  };
2435
- _context41.next = 2;
2475
+ _context42.next = 2;
2436
2476
  return call.sendMediaStateMachineEvt(dummyEvent);
2437
2477
  case 2:
2438
2478
  expect(call['receivedRoapOKSeq']).toBe(0);
@@ -2482,7 +2522,7 @@ describe('State Machine handler tests', function () {
2482
2522
  };
2483
2523
  call.sendCallStateMachineEvt(dummyEvent);
2484
2524
  dummyEvent.type = 'E_RECV_ROAP_OFFER';
2485
- _context41.next = 3;
2525
+ _context42.next = 3;
2486
2526
  return call.sendMediaStateMachineEvt(dummyEvent);
2487
2527
  case 3:
2488
2528
  expect(_testUtil.mediaConnection.roapMessageReceived).toHaveBeenLastCalledWith(dummyEvent.data);
@@ -2491,7 +2531,7 @@ describe('State Machine handler tests', function () {
2491
2531
  seq: 3,
2492
2532
  messageType: 'ANSWER'
2493
2533
  };
2494
- _context41.next = 4;
2534
+ _context42.next = 4;
2495
2535
  return call.sendMediaStateMachineEvt(dummyEvent);
2496
2536
  case 4:
2497
2537
  expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
@@ -2510,7 +2550,7 @@ describe('State Machine handler tests', function () {
2510
2550
  messageType: 'OK'
2511
2551
  }
2512
2552
  };
2513
- _context41.next = 5;
2553
+ _context42.next = 5;
2514
2554
  return call.sendMediaStateMachineEvt(dummyOkEvent);
2515
2555
  case 5:
2516
2556
  expect(_testUtil.mediaConnection.roapMessageReceived).toHaveBeenNthCalledWith(6, dummyOkEvent.data.message);
@@ -2525,14 +2565,14 @@ describe('State Machine handler tests', function () {
2525
2565
  expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
2526
2566
  case 6:
2527
2567
  case "end":
2528
- return _context41.stop();
2568
+ return _context42.stop();
2529
2569
  }
2530
- }, _callee41);
2570
+ }, _callee42);
2531
2571
  })));
2532
- it('successfully handles out of order events when ROAP OK is received while executing outgoingRoapAnswer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42() {
2572
+ it('successfully handles out of order events when ROAP OK is received while executing outgoingRoapAnswer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43() {
2533
2573
  var mockStatusBody, statusPayload, dummyEvent, postMediaSpy, dummyOkEvent, dummyOfferEvent;
2534
- return _regenerator.default.wrap(function (_context42) {
2535
- while (1) switch (_context42.prev = _context42.next) {
2574
+ return _regenerator.default.wrap(function (_context43) {
2575
+ while (1) switch (_context43.prev = _context43.next) {
2536
2576
  case 0:
2537
2577
  mockStatusBody = {
2538
2578
  device: {
@@ -2572,7 +2612,7 @@ describe('State Machine handler tests', function () {
2572
2612
  seq: 1,
2573
2613
  messageType: 'ANSWER'
2574
2614
  };
2575
- _context42.next = 1;
2615
+ _context43.next = 1;
2576
2616
  return call.sendMediaStateMachineEvt(dummyEvent);
2577
2617
  case 1:
2578
2618
  expect(postMediaSpy).toBeCalledOnceWith(dummyEvent.data);
@@ -2594,7 +2634,7 @@ describe('State Machine handler tests', function () {
2594
2634
  seq: 2,
2595
2635
  messageType: 'OFFER_REQUEST'
2596
2636
  };
2597
- _context42.next = 2;
2637
+ _context43.next = 2;
2598
2638
  return call.sendMediaStateMachineEvt(dummyEvent);
2599
2639
  case 2:
2600
2640
  expect(call['receivedRoapOKSeq']).toBe(0);
@@ -2644,7 +2684,7 @@ describe('State Machine handler tests', function () {
2644
2684
  };
2645
2685
  call.sendCallStateMachineEvt(dummyEvent);
2646
2686
  dummyEvent.type = 'E_RECV_ROAP_OFFER';
2647
- _context42.next = 3;
2687
+ _context43.next = 3;
2648
2688
  return call.sendMediaStateMachineEvt(dummyEvent);
2649
2689
  case 3:
2650
2690
  expect(_testUtil.mediaConnection.roapMessageReceived).toHaveBeenLastCalledWith(dummyEvent.data);
@@ -2653,7 +2693,7 @@ describe('State Machine handler tests', function () {
2653
2693
  seq: 3,
2654
2694
  messageType: 'ANSWER'
2655
2695
  };
2656
- _context42.next = 4;
2696
+ _context43.next = 4;
2657
2697
  return call.sendMediaStateMachineEvt(dummyEvent);
2658
2698
  case 4:
2659
2699
  expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
@@ -2670,7 +2710,7 @@ describe('State Machine handler tests', function () {
2670
2710
  }
2671
2711
  };
2672
2712
  call.sendMediaStateMachineEvt(dummyEvent);
2673
- _context42.next = 5;
2713
+ _context43.next = 5;
2674
2714
  return call.sendMediaStateMachineEvt(dummyOkEvent);
2675
2715
  case 5:
2676
2716
  expect(call['receivedRoapOKSeq']).toBe(3);
@@ -2686,14 +2726,14 @@ describe('State Machine handler tests', function () {
2686
2726
  expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
2687
2727
  case 6:
2688
2728
  case "end":
2689
- return _context42.stop();
2729
+ return _context43.stop();
2690
2730
  }
2691
- }, _callee42);
2731
+ }, _callee43);
2692
2732
  })));
2693
- it('handle hold event successfully when media received after progress but before connect', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43() {
2733
+ it('handle hold event successfully when media received after progress but before connect', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44() {
2694
2734
  var statusPayload, dummyEvent, postMediaSpy, infoSpy, dummyOkEvent;
2695
- return _regenerator.default.wrap(function (_context43) {
2696
- while (1) switch (_context43.prev = _context43.next) {
2735
+ return _regenerator.default.wrap(function (_context44) {
2736
+ while (1) switch (_context44.prev = _context44.next) {
2697
2737
  case 0:
2698
2738
  statusPayload = {
2699
2739
  statusCode: 200,
@@ -2760,14 +2800,14 @@ describe('State Machine handler tests', function () {
2760
2800
  });
2761
2801
  case 1:
2762
2802
  case "end":
2763
- return _context43.stop();
2803
+ return _context44.stop();
2764
2804
  }
2765
- }, _callee43);
2805
+ }, _callee44);
2766
2806
  })));
2767
- it('emits DISCONNECT before mobius delete request is invoked', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44() {
2807
+ it('emits DISCONNECT before mobius delete request is invoked', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45() {
2768
2808
  var emitSpy, deleteSpy;
2769
- return _regenerator.default.wrap(function (_context44) {
2770
- while (1) switch (_context44.prev = _context44.next) {
2809
+ return _regenerator.default.wrap(function (_context45) {
2810
+ while (1) switch (_context45.prev = _context45.next) {
2771
2811
  case 0:
2772
2812
  emitSpy = jest.spyOn(call, 'emit');
2773
2813
  deleteSpy = jest.spyOn(call, 'delete').mockResolvedValue({
@@ -2776,7 +2816,7 @@ describe('State Machine handler tests', function () {
2776
2816
  call.sendCallStateMachineEvt({
2777
2817
  type: 'E_RECV_CALL_DISCONNECT'
2778
2818
  });
2779
- _context44.next = 1;
2819
+ _context45.next = 1;
2780
2820
  return (0, _testUtil.flushPromises)(1);
2781
2821
  case 1:
2782
2822
  expect(emitSpy).toHaveBeenCalledWith(_types2.CALL_EVENT_KEYS.DISCONNECT, call.getCorrelationId());
@@ -2784,9 +2824,9 @@ describe('State Machine handler tests', function () {
2784
2824
  expect(emitSpy.mock.invocationCallOrder[0]).toBeLessThan(deleteSpy.mock.invocationCallOrder[0]);
2785
2825
  case 2:
2786
2826
  case "end":
2787
- return _context44.stop();
2827
+ return _context45.stop();
2788
2828
  }
2789
- }, _callee44);
2829
+ }, _callee45);
2790
2830
  })));
2791
2831
  describe('Call event timers tests', function () {
2792
2832
  var callManager;
@@ -2797,10 +2837,10 @@ describe('State Machine handler tests', function () {
2797
2837
  afterEach(function () {
2798
2838
  jest.clearAllTimers();
2799
2839
  });
2800
- it('times out if the next event is not received - 60 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45() {
2840
+ it('times out if the next event is not received - 60 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee46() {
2801
2841
  var statusPayload, dummyEvent, logSpy, emitSpy, deleteSpy, dummyOkEvent;
2802
- return _regenerator.default.wrap(function (_context45) {
2803
- while (1) switch (_context45.prev = _context45.next) {
2842
+ return _regenerator.default.wrap(function (_context46) {
2843
+ while (1) switch (_context46.prev = _context46.next) {
2804
2844
  case 0:
2805
2845
  statusPayload = {
2806
2846
  statusCode: 200,
@@ -2817,7 +2857,7 @@ describe('State Machine handler tests', function () {
2817
2857
  webex.request.mockReturnValue(statusPayload);
2818
2858
 
2819
2859
  // handleOutgoingCallSetup is asynchronous
2820
- _context45.next = 1;
2860
+ _context46.next = 1;
2821
2861
  return call.sendCallStateMachineEvt(dummyEvent);
2822
2862
  case 1:
2823
2863
  expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_SETUP');
@@ -2860,14 +2900,14 @@ describe('State Machine handler tests', function () {
2860
2900
  expect(callManager.callCollection).toStrictEqual({});
2861
2901
  case 2:
2862
2902
  case "end":
2863
- return _context45.stop();
2903
+ return _context46.stop();
2864
2904
  }
2865
- }, _callee45);
2905
+ }, _callee46);
2866
2906
  })));
2867
- it('times out if the next event is not received - 10 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee46() {
2907
+ it('times out if the next event is not received - 10 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee47() {
2868
2908
  var statusPayload, dummyEvent, call, emitSpy, deleteSpy, logSpy;
2869
- return _regenerator.default.wrap(function (_context46) {
2870
- while (1) switch (_context46.prev = _context46.next) {
2909
+ return _regenerator.default.wrap(function (_context47) {
2910
+ while (1) switch (_context47.prev = _context47.next) {
2871
2911
  case 0:
2872
2912
  statusPayload = {
2873
2913
  statusCode: 200,
@@ -2886,7 +2926,7 @@ describe('State Machine handler tests', function () {
2886
2926
  expect((0, _keys.default)(callManager.callCollection)[0]).toBe(call.getCorrelationId());
2887
2927
 
2888
2928
  // handleOutgoingCallSetup is asynchronous
2889
- _context46.next = 1;
2929
+ _context47.next = 1;
2890
2930
  return call.sendCallStateMachineEvt(dummyEvent);
2891
2931
  case 1:
2892
2932
  expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_SETUP');
@@ -2898,9 +2938,9 @@ describe('State Machine handler tests', function () {
2898
2938
  expect(callManager.callCollection).toStrictEqual({});
2899
2939
  case 2:
2900
2940
  case "end":
2901
- return _context46.stop();
2941
+ return _context47.stop();
2902
2942
  }
2903
- }, _callee46);
2943
+ }, _callee47);
2904
2944
  })));
2905
2945
  });
2906
2946
  });
@@ -2965,10 +3005,10 @@ describe('Supplementary Services tests', function () {
2965
3005
  beforeEach(function () {
2966
3006
  call.removeAllListeners();
2967
3007
  });
2968
- it('Handle successful Call hold case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee48() {
3008
+ it('Handle successful Call hold case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee49() {
2969
3009
  var responsePayload, warnSpy, roapEvent;
2970
- return _regenerator.default.wrap(function (_context48) {
2971
- while (1) switch (_context48.prev = _context48.next) {
3010
+ return _regenerator.default.wrap(function (_context49) {
3011
+ while (1) switch (_context49.prev = _context49.next) {
2972
3012
  case 0:
2973
3013
  expect.assertions(7);
2974
3014
  responsePayload = {
@@ -2981,25 +3021,25 @@ describe('Supplementary Services tests', function () {
2981
3021
  warnSpy = jest.spyOn(_Logger.default, 'warn');
2982
3022
  call['held'] = false;
2983
3023
  call.on(_types2.CALL_EVENT_KEYS.HELD, /*#__PURE__*/function () {
2984
- var _ref57 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee47(correlationId) {
2985
- return _regenerator.default.wrap(function (_context47) {
2986
- while (1) switch (_context47.prev = _context47.next) {
3024
+ var _ref58 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee48(correlationId) {
3025
+ return _regenerator.default.wrap(function (_context48) {
3026
+ while (1) switch (_context48.prev = _context48.next) {
2987
3027
  case 0:
2988
3028
  expect(correlationId).toStrictEqual(call.getCorrelationId());
2989
3029
  case 1:
2990
3030
  case "end":
2991
- return _context47.stop();
3031
+ return _context48.stop();
2992
3032
  }
2993
- }, _callee47);
3033
+ }, _callee48);
2994
3034
  }));
2995
- return function (_x) {
2996
- return _ref57.apply(this, arguments);
3035
+ return function (_x5) {
3036
+ return _ref58.apply(this, arguments);
2997
3037
  };
2998
3038
  }());
2999
- _context48.next = 1;
3039
+ _context49.next = 1;
3000
3040
  return call.doHoldResume();
3001
3041
  case 1:
3002
- _context48.next = 2;
3042
+ _context49.next = 2;
3003
3043
  return (0, _testUtil.flushPromises)(2);
3004
3044
  case 2:
3005
3045
  expect(setTimeout).toHaveBeenCalledTimes(1);
@@ -3015,11 +3055,11 @@ describe('Supplementary Services tests', function () {
3015
3055
  call['handleIncomingRoapOffer']({}, dummyEvent);
3016
3056
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
3017
3057
  roapEvent.data.type = 'ANSWER';
3018
- _context48.next = 3;
3058
+ _context49.next = 3;
3019
3059
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
3020
3060
  case 3:
3021
3061
  roapEvent.data.type = 'OK';
3022
- _context48.next = 4;
3062
+ _context49.next = 4;
3023
3063
  return call['handleRoapEstablished']({}, dummyEvent);
3024
3064
  case 4:
3025
3065
  expect(clearTimeout).toHaveBeenCalledTimes(1);
@@ -3034,14 +3074,14 @@ describe('Supplementary Services tests', function () {
3034
3074
  });
3035
3075
  case 5:
3036
3076
  case "end":
3037
- return _context48.stop();
3077
+ return _context49.stop();
3038
3078
  }
3039
- }, _callee48);
3079
+ }, _callee49);
3040
3080
  })));
3041
- it('Handle successful Call hold case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee50() {
3081
+ it('Handle successful Call hold case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee51() {
3042
3082
  var responsePayload, warnSpy, roapEvent;
3043
- return _regenerator.default.wrap(function (_context50) {
3044
- while (1) switch (_context50.prev = _context50.next) {
3083
+ return _regenerator.default.wrap(function (_context51) {
3084
+ while (1) switch (_context51.prev = _context51.next) {
3045
3085
  case 0:
3046
3086
  expect.assertions(8);
3047
3087
  responsePayload = {
@@ -3054,26 +3094,26 @@ describe('Supplementary Services tests', function () {
3054
3094
  warnSpy = jest.spyOn(_Logger.default, 'warn');
3055
3095
  call['held'] = false;
3056
3096
  call.on(_types2.CALL_EVENT_KEYS.HELD, /*#__PURE__*/function () {
3057
- var _ref59 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee49(correlationId) {
3058
- return _regenerator.default.wrap(function (_context49) {
3059
- while (1) switch (_context49.prev = _context49.next) {
3097
+ var _ref60 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee50(correlationId) {
3098
+ return _regenerator.default.wrap(function (_context50) {
3099
+ while (1) switch (_context50.prev = _context50.next) {
3060
3100
  case 0:
3061
3101
  expect(correlationId).toStrictEqual(call.getCorrelationId());
3062
3102
  case 1:
3063
3103
  case "end":
3064
- return _context49.stop();
3104
+ return _context50.stop();
3065
3105
  }
3066
- }, _callee49);
3106
+ }, _callee50);
3067
3107
  }));
3068
- return function (_x2) {
3069
- return _ref59.apply(this, arguments);
3108
+ return function (_x6) {
3109
+ return _ref60.apply(this, arguments);
3070
3110
  };
3071
3111
  }());
3072
3112
  call.doHoldResume();
3073
- _context50.next = 1;
3113
+ _context51.next = 1;
3074
3114
  return _promise.default.resolve();
3075
3115
  case 1:
3076
- _context50.next = 2;
3116
+ _context51.next = 2;
3077
3117
  return _promise.default.resolve();
3078
3118
  case 2:
3079
3119
  expect(setTimeout).not.toHaveBeenCalled();
@@ -3089,11 +3129,11 @@ describe('Supplementary Services tests', function () {
3089
3129
  call['handleIncomingRoapOffer']({}, dummyEvent);
3090
3130
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
3091
3131
  roapEvent.data.type = 'ANSWER';
3092
- _context50.next = 3;
3132
+ _context51.next = 3;
3093
3133
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
3094
3134
  case 3:
3095
3135
  roapEvent.data.type = 'OK';
3096
- _context50.next = 4;
3136
+ _context51.next = 4;
3097
3137
  return call['handleRoapEstablished']({}, dummyEvent);
3098
3138
  case 4:
3099
3139
  expect(clearTimeout).not.toHaveBeenCalled();
@@ -3108,14 +3148,14 @@ describe('Supplementary Services tests', function () {
3108
3148
  });
3109
3149
  case 5:
3110
3150
  case "end":
3111
- return _context50.stop();
3151
+ return _context51.stop();
3112
3152
  }
3113
- }, _callee50);
3153
+ }, _callee51);
3114
3154
  })));
3115
- it('Handle failure Call Hold case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee52() {
3155
+ it('Handle failure Call Hold case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee53() {
3116
3156
  var responsePayload;
3117
- return _regenerator.default.wrap(function (_context52) {
3118
- while (1) switch (_context52.prev = _context52.next) {
3157
+ return _regenerator.default.wrap(function (_context53) {
3158
+ while (1) switch (_context53.prev = _context53.next) {
3119
3159
  case 0:
3120
3160
  expect.assertions(4);
3121
3161
  responsePayload = {
@@ -3125,26 +3165,26 @@ describe('Supplementary Services tests', function () {
3125
3165
  jest.spyOn(webex, 'request').mockRejectedValue(responsePayload);
3126
3166
  call['held'] = false;
3127
3167
  call.on(_types2.CALL_EVENT_KEYS.HOLD_ERROR, /*#__PURE__*/function () {
3128
- var _ref61 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee51(errObj) {
3129
- return _regenerator.default.wrap(function (_context51) {
3130
- while (1) switch (_context51.prev = _context51.next) {
3168
+ var _ref62 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee52(errObj) {
3169
+ return _regenerator.default.wrap(function (_context52) {
3170
+ while (1) switch (_context52.prev = _context52.next) {
3131
3171
  case 0:
3132
3172
  expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
3133
3173
  expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
3134
3174
  case 1:
3135
3175
  case "end":
3136
- return _context51.stop();
3176
+ return _context52.stop();
3137
3177
  }
3138
- }, _callee51);
3178
+ }, _callee52);
3139
3179
  }));
3140
- return function (_x3) {
3141
- return _ref61.apply(this, arguments);
3180
+ return function (_x7) {
3181
+ return _ref62.apply(this, arguments);
3142
3182
  };
3143
3183
  }());
3144
- _context52.next = 1;
3184
+ _context53.next = 1;
3145
3185
  return call.doHoldResume();
3146
3186
  case 1:
3147
- _context52.next = 2;
3187
+ _context53.next = 2;
3148
3188
  return (0, _testUtil.flushPromises)(2);
3149
3189
  case 2:
3150
3190
  expect(call.isHeld()).toStrictEqual(false);
@@ -3154,14 +3194,14 @@ describe('Supplementary Services tests', function () {
3154
3194
  expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
3155
3195
  case 3:
3156
3196
  case "end":
3157
- return _context52.stop();
3197
+ return _context53.stop();
3158
3198
  }
3159
- }, _callee52);
3199
+ }, _callee53);
3160
3200
  })));
3161
- it('Handle failure Call Hold case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee54() {
3201
+ it('Handle failure Call Hold case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee55() {
3162
3202
  var responsePayload, rejectPayload, roapEvent;
3163
- return _regenerator.default.wrap(function (_context54) {
3164
- while (1) switch (_context54.prev = _context54.next) {
3203
+ return _regenerator.default.wrap(function (_context55) {
3204
+ while (1) switch (_context55.prev = _context55.next) {
3165
3205
  case 0:
3166
3206
  expect.assertions(5);
3167
3207
  responsePayload = {
@@ -3175,24 +3215,24 @@ describe('Supplementary Services tests', function () {
3175
3215
  jest.spyOn(webex, 'request').mockResolvedValueOnce(responsePayload).mockRejectedValueOnce(rejectPayload);
3176
3216
  call['held'] = false;
3177
3217
  call.on(_types2.CALL_EVENT_KEYS.HOLD_ERROR, /*#__PURE__*/function () {
3178
- var _ref63 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee53(errObj) {
3179
- return _regenerator.default.wrap(function (_context53) {
3180
- while (1) switch (_context53.prev = _context53.next) {
3218
+ var _ref64 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee54(errObj) {
3219
+ return _regenerator.default.wrap(function (_context54) {
3220
+ while (1) switch (_context54.prev = _context54.next) {
3181
3221
  case 0:
3182
3222
  expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
3183
3223
  expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
3184
3224
  case 1:
3185
3225
  case "end":
3186
- return _context53.stop();
3226
+ return _context54.stop();
3187
3227
  }
3188
- }, _callee53);
3228
+ }, _callee54);
3189
3229
  }));
3190
- return function (_x4) {
3191
- return _ref63.apply(this, arguments);
3230
+ return function (_x8) {
3231
+ return _ref64.apply(this, arguments);
3192
3232
  };
3193
3233
  }());
3194
3234
  call.doHoldResume();
3195
- _context54.next = 1;
3235
+ _context55.next = 1;
3196
3236
  return (0, _testUtil.flushPromises)(2);
3197
3237
  case 1:
3198
3238
  /* the Call State should transition to S_CALL_ESTABLISHED
@@ -3202,7 +3242,7 @@ describe('Supplementary Services tests', function () {
3202
3242
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
3203
3243
  /* We are intentionally failing the ROAP ANSWER */
3204
3244
  roapEvent.data.type = 'ANSWER';
3205
- _context54.next = 2;
3245
+ _context55.next = 2;
3206
3246
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
3207
3247
  case 2:
3208
3248
  expect(call.isHeld()).toStrictEqual(false);
@@ -3210,14 +3250,14 @@ describe('Supplementary Services tests', function () {
3210
3250
  expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
3211
3251
  case 3:
3212
3252
  case "end":
3213
- return _context54.stop();
3253
+ return _context55.stop();
3214
3254
  }
3215
- }, _callee54);
3255
+ }, _callee55);
3216
3256
  })));
3217
- it('Handle failure Call Hold case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee55() {
3257
+ it('Handle failure Call Hold case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee56() {
3218
3258
  var responsePayload, warnSpy, roapEvent;
3219
- return _regenerator.default.wrap(function (_context55) {
3220
- while (1) switch (_context55.prev = _context55.next) {
3259
+ return _regenerator.default.wrap(function (_context56) {
3260
+ while (1) switch (_context56.prev = _context56.next) {
3221
3261
  case 0:
3222
3262
  responsePayload = {
3223
3263
  statusCode: 200,
@@ -3228,10 +3268,10 @@ describe('Supplementary Services tests', function () {
3228
3268
  jest.spyOn(global, 'clearTimeout');
3229
3269
  warnSpy = jest.spyOn(_Logger.default, 'warn');
3230
3270
  call['held'] = false;
3231
- _context55.next = 1;
3271
+ _context56.next = 1;
3232
3272
  return call.doHoldResume();
3233
3273
  case 1:
3234
- _context55.next = 2;
3274
+ _context56.next = 2;
3235
3275
  return (0, _testUtil.flushPromises)(2);
3236
3276
  case 2:
3237
3277
  expect(setTimeout).toHaveBeenCalledTimes(1);
@@ -3246,19 +3286,19 @@ describe('Supplementary Services tests', function () {
3246
3286
  call['handleIncomingRoapOffer']({}, dummyEvent);
3247
3287
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
3248
3288
  roapEvent.data.type = 'ANSWER';
3249
- _context55.next = 3;
3289
+ _context56.next = 3;
3250
3290
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
3251
3291
  case 3:
3252
3292
  jest.spyOn(webex, 'request').mockRejectedValue({
3253
3293
  statusCode: 403
3254
3294
  });
3255
3295
  roapEvent.data.type = 'OK';
3256
- _context55.next = 4;
3296
+ _context56.next = 4;
3257
3297
  return call['handleRoapEstablished']({}, dummyEvent);
3258
3298
  case 4:
3259
3299
  /* this is for coverage */
3260
3300
  call['callStateMachine'].state.value = 'S_CALL_HOLD';
3261
- _context55.next = 5;
3301
+ _context56.next = 5;
3262
3302
  return call['handleRoapEstablished']({}, dummyEvent);
3263
3303
  case 5:
3264
3304
  expect(call.isHeld()).toStrictEqual(false);
@@ -3270,14 +3310,14 @@ describe('Supplementary Services tests', function () {
3270
3310
  });
3271
3311
  case 6:
3272
3312
  case "end":
3273
- return _context55.stop();
3313
+ return _context56.stop();
3274
3314
  }
3275
- }, _callee55);
3315
+ }, _callee56);
3276
3316
  })));
3277
- it('Handle failure Call resume case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee56() {
3317
+ it('Handle failure Call resume case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee57() {
3278
3318
  var responsePayload, warnSpy, roapEvent;
3279
- return _regenerator.default.wrap(function (_context56) {
3280
- while (1) switch (_context56.prev = _context56.next) {
3319
+ return _regenerator.default.wrap(function (_context57) {
3320
+ while (1) switch (_context57.prev = _context57.next) {
3281
3321
  case 0:
3282
3322
  responsePayload = {
3283
3323
  statusCode: 200,
@@ -3288,10 +3328,10 @@ describe('Supplementary Services tests', function () {
3288
3328
  jest.spyOn(global, 'clearTimeout');
3289
3329
  warnSpy = jest.spyOn(_Logger.default, 'warn');
3290
3330
  call['held'] = true;
3291
- _context56.next = 1;
3331
+ _context57.next = 1;
3292
3332
  return call.doHoldResume();
3293
3333
  case 1:
3294
- _context56.next = 2;
3334
+ _context57.next = 2;
3295
3335
  return (0, _testUtil.flushPromises)(2);
3296
3336
  case 2:
3297
3337
  expect(setTimeout).toHaveBeenCalledTimes(1);
@@ -3306,14 +3346,14 @@ describe('Supplementary Services tests', function () {
3306
3346
  call['handleIncomingRoapOffer']({}, dummyEvent);
3307
3347
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
3308
3348
  roapEvent.data.type = 'ANSWER';
3309
- _context56.next = 3;
3349
+ _context57.next = 3;
3310
3350
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
3311
3351
  case 3:
3312
3352
  jest.spyOn(webex, 'request').mockRejectedValue({
3313
3353
  statusCode: 403
3314
3354
  });
3315
3355
  roapEvent.data.type = 'OK';
3316
- _context56.next = 4;
3356
+ _context57.next = 4;
3317
3357
  return call['handleRoapEstablished']({}, dummyEvent);
3318
3358
  case 4:
3319
3359
  expect(call.isHeld()).toStrictEqual(true);
@@ -3325,14 +3365,14 @@ describe('Supplementary Services tests', function () {
3325
3365
  });
3326
3366
  case 5:
3327
3367
  case "end":
3328
- return _context56.stop();
3368
+ return _context57.stop();
3329
3369
  }
3330
- }, _callee56);
3370
+ }, _callee57);
3331
3371
  })));
3332
- it('Handle Call hold case where successful Held response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee58() {
3372
+ it('Handle Call hold case where successful Held response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee59() {
3333
3373
  var responsePayload, roapEvent;
3334
- return _regenerator.default.wrap(function (_context58) {
3335
- while (1) switch (_context58.prev = _context58.next) {
3374
+ return _regenerator.default.wrap(function (_context59) {
3375
+ while (1) switch (_context59.prev = _context59.next) {
3336
3376
  case 0:
3337
3377
  expect.assertions(5);
3338
3378
  responsePayload = {
@@ -3342,25 +3382,25 @@ describe('Supplementary Services tests', function () {
3342
3382
  jest.spyOn(webex, 'request').mockResolvedValue(responsePayload);
3343
3383
  call['held'] = false;
3344
3384
  call.on(_types2.CALL_EVENT_KEYS.HOLD_ERROR, /*#__PURE__*/function () {
3345
- var _ref67 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee57(errObj) {
3346
- return _regenerator.default.wrap(function (_context57) {
3347
- while (1) switch (_context57.prev = _context57.next) {
3385
+ var _ref68 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee58(errObj) {
3386
+ return _regenerator.default.wrap(function (_context58) {
3387
+ while (1) switch (_context58.prev = _context58.next) {
3348
3388
  case 0:
3349
3389
  expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.TIMEOUT);
3350
3390
  expect(errObj.message).toStrictEqual('An error occurred while placing the call on hold. Wait a moment and try again.');
3351
3391
  case 1:
3352
3392
  case "end":
3353
- return _context57.stop();
3393
+ return _context58.stop();
3354
3394
  }
3355
- }, _callee57);
3395
+ }, _callee58);
3356
3396
  }));
3357
- return function (_x5) {
3358
- return _ref67.apply(this, arguments);
3397
+ return function (_x9) {
3398
+ return _ref68.apply(this, arguments);
3359
3399
  };
3360
3400
  }());
3361
3401
  jest.runAllTimers();
3362
3402
  call.doHoldResume();
3363
- _context58.next = 1;
3403
+ _context59.next = 1;
3364
3404
  return (0, _testUtil.flushPromises)(2);
3365
3405
  case 1:
3366
3406
  /* At this point, the Call State should be S_CALL_HOLD
@@ -3373,11 +3413,11 @@ describe('Supplementary Services tests', function () {
3373
3413
  call['handleIncomingRoapOffer']({}, dummyEvent);
3374
3414
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
3375
3415
  roapEvent.data.type = 'ANSWER';
3376
- _context58.next = 2;
3416
+ _context59.next = 2;
3377
3417
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
3378
3418
  case 2:
3379
3419
  roapEvent.data.type = 'OK';
3380
- _context58.next = 3;
3420
+ _context59.next = 3;
3381
3421
  return call['handleRoapEstablished']({}, dummyEvent);
3382
3422
  case 3:
3383
3423
  /* Advancing timer by 12 seconds so that it gets timed out */
@@ -3389,14 +3429,14 @@ describe('Supplementary Services tests', function () {
3389
3429
  expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
3390
3430
  case 4:
3391
3431
  case "end":
3392
- return _context58.stop();
3432
+ return _context59.stop();
3393
3433
  }
3394
- }, _callee58);
3434
+ }, _callee59);
3395
3435
  })));
3396
- it('Handle successful Call Resume case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee60() {
3436
+ it('Handle successful Call Resume case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee61() {
3397
3437
  var responsePayload, warnSpy, roapEvent;
3398
- return _regenerator.default.wrap(function (_context60) {
3399
- while (1) switch (_context60.prev = _context60.next) {
3438
+ return _regenerator.default.wrap(function (_context61) {
3439
+ while (1) switch (_context61.prev = _context61.next) {
3400
3440
  case 0:
3401
3441
  expect.assertions(7);
3402
3442
  responsePayload = {
@@ -3409,25 +3449,25 @@ describe('Supplementary Services tests', function () {
3409
3449
  warnSpy = jest.spyOn(_Logger.default, 'warn');
3410
3450
  call['held'] = true;
3411
3451
  call.on(_types2.CALL_EVENT_KEYS.RESUMED, /*#__PURE__*/function () {
3412
- var _ref69 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee59(correlationId) {
3413
- return _regenerator.default.wrap(function (_context59) {
3414
- while (1) switch (_context59.prev = _context59.next) {
3452
+ var _ref70 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee60(correlationId) {
3453
+ return _regenerator.default.wrap(function (_context60) {
3454
+ while (1) switch (_context60.prev = _context60.next) {
3415
3455
  case 0:
3416
3456
  expect(correlationId).toStrictEqual(call.getCorrelationId());
3417
3457
  case 1:
3418
3458
  case "end":
3419
- return _context59.stop();
3459
+ return _context60.stop();
3420
3460
  }
3421
- }, _callee59);
3461
+ }, _callee60);
3422
3462
  }));
3423
- return function (_x6) {
3424
- return _ref69.apply(this, arguments);
3463
+ return function (_x0) {
3464
+ return _ref70.apply(this, arguments);
3425
3465
  };
3426
3466
  }());
3427
- _context60.next = 1;
3467
+ _context61.next = 1;
3428
3468
  return call.doHoldResume();
3429
3469
  case 1:
3430
- _context60.next = 2;
3470
+ _context61.next = 2;
3431
3471
  return (0, _testUtil.flushPromises)(2);
3432
3472
  case 2:
3433
3473
  expect(setTimeout).toHaveBeenCalledTimes(1);
@@ -3443,11 +3483,11 @@ describe('Supplementary Services tests', function () {
3443
3483
  call['handleIncomingRoapOffer']({}, dummyEvent);
3444
3484
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
3445
3485
  roapEvent.data.type = 'ANSWER';
3446
- _context60.next = 3;
3486
+ _context61.next = 3;
3447
3487
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
3448
3488
  case 3:
3449
3489
  roapEvent.data.type = 'OK';
3450
- _context60.next = 4;
3490
+ _context61.next = 4;
3451
3491
  return call['handleRoapEstablished']({}, dummyEvent);
3452
3492
  case 4:
3453
3493
  expect(clearTimeout).toHaveBeenCalledTimes(1);
@@ -3462,14 +3502,14 @@ describe('Supplementary Services tests', function () {
3462
3502
  });
3463
3503
  case 5:
3464
3504
  case "end":
3465
- return _context60.stop();
3505
+ return _context61.stop();
3466
3506
  }
3467
- }, _callee60);
3507
+ }, _callee61);
3468
3508
  })));
3469
- it('Handle successful Call Resume case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee62() {
3509
+ it('Handle successful Call Resume case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee63() {
3470
3510
  var responsePayload, warnSpy, roapEvent;
3471
- return _regenerator.default.wrap(function (_context62) {
3472
- while (1) switch (_context62.prev = _context62.next) {
3511
+ return _regenerator.default.wrap(function (_context63) {
3512
+ while (1) switch (_context63.prev = _context63.next) {
3473
3513
  case 0:
3474
3514
  expect.assertions(7);
3475
3515
  responsePayload = {
@@ -3482,26 +3522,26 @@ describe('Supplementary Services tests', function () {
3482
3522
  warnSpy = jest.spyOn(_Logger.default, 'warn');
3483
3523
  call['held'] = true;
3484
3524
  call.on(_types2.CALL_EVENT_KEYS.RESUMED, /*#__PURE__*/function () {
3485
- var _ref71 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee61(correlationId) {
3486
- return _regenerator.default.wrap(function (_context61) {
3487
- while (1) switch (_context61.prev = _context61.next) {
3525
+ var _ref72 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee62(correlationId) {
3526
+ return _regenerator.default.wrap(function (_context62) {
3527
+ while (1) switch (_context62.prev = _context62.next) {
3488
3528
  case 0:
3489
3529
  expect(correlationId).toStrictEqual(call.getCorrelationId());
3490
3530
  case 1:
3491
3531
  case "end":
3492
- return _context61.stop();
3532
+ return _context62.stop();
3493
3533
  }
3494
- }, _callee61);
3534
+ }, _callee62);
3495
3535
  }));
3496
- return function (_x7) {
3497
- return _ref71.apply(this, arguments);
3536
+ return function (_x1) {
3537
+ return _ref72.apply(this, arguments);
3498
3538
  };
3499
3539
  }());
3500
3540
  call.doHoldResume();
3501
- _context62.next = 1;
3541
+ _context63.next = 1;
3502
3542
  return _promise.default.resolve();
3503
3543
  case 1:
3504
- _context62.next = 2;
3544
+ _context63.next = 2;
3505
3545
  return _promise.default.resolve();
3506
3546
  case 2:
3507
3547
  expect(setTimeout).not.toHaveBeenCalled();
@@ -3517,11 +3557,11 @@ describe('Supplementary Services tests', function () {
3517
3557
  call['handleIncomingRoapOffer']({}, dummyEvent);
3518
3558
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
3519
3559
  roapEvent.data.type = 'ANSWER';
3520
- _context62.next = 3;
3560
+ _context63.next = 3;
3521
3561
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
3522
3562
  case 3:
3523
3563
  roapEvent.data.type = 'OK';
3524
- _context62.next = 4;
3564
+ _context63.next = 4;
3525
3565
  return call['handleRoapEstablished']({}, dummyEvent);
3526
3566
  case 4:
3527
3567
  expect(clearTimeout).not.toHaveBeenCalled();
@@ -3536,14 +3576,14 @@ describe('Supplementary Services tests', function () {
3536
3576
  });
3537
3577
  case 5:
3538
3578
  case "end":
3539
- return _context62.stop();
3579
+ return _context63.stop();
3540
3580
  }
3541
- }, _callee62);
3581
+ }, _callee63);
3542
3582
  })));
3543
- it('Handle failure Call Resume case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee64() {
3583
+ it('Handle failure Call Resume case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee65() {
3544
3584
  var responsePayload;
3545
- return _regenerator.default.wrap(function (_context64) {
3546
- while (1) switch (_context64.prev = _context64.next) {
3585
+ return _regenerator.default.wrap(function (_context65) {
3586
+ while (1) switch (_context65.prev = _context65.next) {
3547
3587
  case 0:
3548
3588
  expect.assertions(4);
3549
3589
  responsePayload = {
@@ -3553,26 +3593,26 @@ describe('Supplementary Services tests', function () {
3553
3593
  jest.spyOn(webex, 'request').mockRejectedValue(responsePayload);
3554
3594
  call['held'] = true;
3555
3595
  call.on(_types2.CALL_EVENT_KEYS.RESUME_ERROR, /*#__PURE__*/function () {
3556
- var _ref73 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee63(errObj) {
3557
- return _regenerator.default.wrap(function (_context63) {
3558
- while (1) switch (_context63.prev = _context63.next) {
3596
+ var _ref74 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee64(errObj) {
3597
+ return _regenerator.default.wrap(function (_context64) {
3598
+ while (1) switch (_context64.prev = _context64.next) {
3559
3599
  case 0:
3560
3600
  expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
3561
3601
  expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
3562
3602
  case 1:
3563
3603
  case "end":
3564
- return _context63.stop();
3604
+ return _context64.stop();
3565
3605
  }
3566
- }, _callee63);
3606
+ }, _callee64);
3567
3607
  }));
3568
- return function (_x8) {
3569
- return _ref73.apply(this, arguments);
3608
+ return function (_x10) {
3609
+ return _ref74.apply(this, arguments);
3570
3610
  };
3571
3611
  }());
3572
- _context64.next = 1;
3612
+ _context65.next = 1;
3573
3613
  return call.doHoldResume();
3574
3614
  case 1:
3575
- _context64.next = 2;
3615
+ _context65.next = 2;
3576
3616
  return (0, _testUtil.flushPromises)(2);
3577
3617
  case 2:
3578
3618
  expect(call.isHeld()).toStrictEqual(true);
@@ -3583,14 +3623,14 @@ describe('Supplementary Services tests', function () {
3583
3623
  expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
3584
3624
  case 3:
3585
3625
  case "end":
3586
- return _context64.stop();
3626
+ return _context65.stop();
3587
3627
  }
3588
- }, _callee64);
3628
+ }, _callee65);
3589
3629
  })));
3590
- it('Handle failure Call Resume case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee66() {
3630
+ it('Handle failure Call Resume case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee67() {
3591
3631
  var responsePayload, rejectPayload, roapEvent;
3592
- return _regenerator.default.wrap(function (_context66) {
3593
- while (1) switch (_context66.prev = _context66.next) {
3632
+ return _regenerator.default.wrap(function (_context67) {
3633
+ while (1) switch (_context67.prev = _context67.next) {
3594
3634
  case 0:
3595
3635
  expect.assertions(5);
3596
3636
  responsePayload = {
@@ -3604,24 +3644,24 @@ describe('Supplementary Services tests', function () {
3604
3644
  jest.spyOn(webex, 'request').mockResolvedValueOnce(responsePayload).mockRejectedValueOnce(rejectPayload);
3605
3645
  call['held'] = true;
3606
3646
  call.on(_types2.CALL_EVENT_KEYS.RESUME_ERROR, /*#__PURE__*/function () {
3607
- var _ref75 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee65(errObj) {
3608
- return _regenerator.default.wrap(function (_context65) {
3609
- while (1) switch (_context65.prev = _context65.next) {
3647
+ var _ref76 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee66(errObj) {
3648
+ return _regenerator.default.wrap(function (_context66) {
3649
+ while (1) switch (_context66.prev = _context66.next) {
3610
3650
  case 0:
3611
3651
  expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
3612
3652
  expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
3613
3653
  case 1:
3614
3654
  case "end":
3615
- return _context65.stop();
3655
+ return _context66.stop();
3616
3656
  }
3617
- }, _callee65);
3657
+ }, _callee66);
3618
3658
  }));
3619
- return function (_x9) {
3620
- return _ref75.apply(this, arguments);
3659
+ return function (_x11) {
3660
+ return _ref76.apply(this, arguments);
3621
3661
  };
3622
3662
  }());
3623
3663
  call.doHoldResume();
3624
- _context66.next = 1;
3664
+ _context67.next = 1;
3625
3665
  return (0, _testUtil.flushPromises)(2);
3626
3666
  case 1:
3627
3667
  /* At this point , the Call State should transition to S_CALL_ESTABLISHED
@@ -3632,7 +3672,7 @@ describe('Supplementary Services tests', function () {
3632
3672
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
3633
3673
  /* We are intentionally failing the ROAP ANSWER */
3634
3674
  roapEvent.data.type = 'ANSWER';
3635
- _context66.next = 2;
3675
+ _context67.next = 2;
3636
3676
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
3637
3677
  case 2:
3638
3678
  expect(call.isHeld()).toStrictEqual(true);
@@ -3640,14 +3680,14 @@ describe('Supplementary Services tests', function () {
3640
3680
  expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
3641
3681
  case 3:
3642
3682
  case "end":
3643
- return _context66.stop();
3683
+ return _context67.stop();
3644
3684
  }
3645
- }, _callee66);
3685
+ }, _callee67);
3646
3686
  })));
3647
- it('Handle Call resume case where successful response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee68() {
3687
+ it('Handle Call resume case where successful response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee69() {
3648
3688
  var responsePayload, roapEvent;
3649
- return _regenerator.default.wrap(function (_context68) {
3650
- while (1) switch (_context68.prev = _context68.next) {
3689
+ return _regenerator.default.wrap(function (_context69) {
3690
+ while (1) switch (_context69.prev = _context69.next) {
3651
3691
  case 0:
3652
3692
  expect.assertions(5);
3653
3693
  responsePayload = {
@@ -3657,24 +3697,24 @@ describe('Supplementary Services tests', function () {
3657
3697
  jest.spyOn(webex, 'request').mockResolvedValue(responsePayload);
3658
3698
  call['held'] = true;
3659
3699
  call.on(_types2.CALL_EVENT_KEYS.RESUME_ERROR, /*#__PURE__*/function () {
3660
- var _ref77 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee67(errObj) {
3661
- return _regenerator.default.wrap(function (_context67) {
3662
- while (1) switch (_context67.prev = _context67.next) {
3700
+ var _ref78 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee68(errObj) {
3701
+ return _regenerator.default.wrap(function (_context68) {
3702
+ while (1) switch (_context68.prev = _context68.next) {
3663
3703
  case 0:
3664
3704
  expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.TIMEOUT);
3665
3705
  expect(errObj.message).toStrictEqual('An error occurred while resuming the call. Wait a moment and try again.');
3666
3706
  case 1:
3667
3707
  case "end":
3668
- return _context67.stop();
3708
+ return _context68.stop();
3669
3709
  }
3670
- }, _callee67);
3710
+ }, _callee68);
3671
3711
  }));
3672
- return function (_x0) {
3673
- return _ref77.apply(this, arguments);
3712
+ return function (_x12) {
3713
+ return _ref78.apply(this, arguments);
3674
3714
  };
3675
3715
  }());
3676
3716
  call.doHoldResume();
3677
- _context68.next = 1;
3717
+ _context69.next = 1;
3678
3718
  return (0, _testUtil.flushPromises)(2);
3679
3719
  case 1:
3680
3720
  /* At this point ,the Call State should be S_CALL_RESUME
@@ -3687,11 +3727,11 @@ describe('Supplementary Services tests', function () {
3687
3727
  call['handleIncomingRoapOffer']({}, dummyEvent);
3688
3728
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
3689
3729
  roapEvent.data.type = 'ANSWER';
3690
- _context68.next = 2;
3730
+ _context69.next = 2;
3691
3731
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
3692
3732
  case 2:
3693
3733
  roapEvent.data.type = 'OK';
3694
- _context68.next = 3;
3734
+ _context69.next = 3;
3695
3735
  return call['handleRoapEstablished']({}, dummyEvent);
3696
3736
  case 3:
3697
3737
  /* Advancing timer by 12 seconds so that it gets timed out */
@@ -3701,9 +3741,9 @@ describe('Supplementary Services tests', function () {
3701
3741
  expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
3702
3742
  case 4:
3703
3743
  case "end":
3704
- return _context68.stop();
3744
+ return _context69.stop();
3705
3745
  }
3706
- }, _callee68);
3746
+ }, _callee69);
3707
3747
  })));
3708
3748
  });
3709
3749
  describe('Call transfer tests', function () {
@@ -3736,10 +3776,10 @@ describe('Supplementary Services tests', function () {
3736
3776
  secondCall.removeAllListeners(_types2.CALL_EVENT_KEYS.CALL_ERROR);
3737
3777
  secondCall['held'] = false;
3738
3778
  });
3739
- it('Handle successful consult transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee71() {
3779
+ it('Handle successful consult transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee72() {
3740
3780
  var responsePayload, requestSpy, warnSpy, infoSpy, metricSpy;
3741
- return _regenerator.default.wrap(function (_context71) {
3742
- while (1) switch (_context71.prev = _context71.next) {
3781
+ return _regenerator.default.wrap(function (_context72) {
3782
+ while (1) switch (_context72.prev = _context72.next) {
3743
3783
  case 0:
3744
3784
  expect.assertions(12); // Updated to match actual assertion count
3745
3785
  responsePayload = {
@@ -3751,41 +3791,41 @@ describe('Supplementary Services tests', function () {
3751
3791
  infoSpy = jest.spyOn(_Logger.default, 'info');
3752
3792
  metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
3753
3793
  call.on(_types2.CALL_EVENT_KEYS.DISCONNECT, /*#__PURE__*/function () {
3754
- var _ref79 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee69(correlationId) {
3755
- return _regenerator.default.wrap(function (_context69) {
3756
- while (1) switch (_context69.prev = _context69.next) {
3794
+ var _ref80 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee70(correlationId) {
3795
+ return _regenerator.default.wrap(function (_context70) {
3796
+ while (1) switch (_context70.prev = _context70.next) {
3757
3797
  case 0:
3758
3798
  expect(correlationId).toStrictEqual(call.getCorrelationId());
3759
3799
  case 1:
3760
3800
  case "end":
3761
- return _context69.stop();
3801
+ return _context70.stop();
3762
3802
  }
3763
- }, _callee69);
3803
+ }, _callee70);
3764
3804
  }));
3765
- return function (_x1) {
3766
- return _ref79.apply(this, arguments);
3805
+ return function (_x13) {
3806
+ return _ref80.apply(this, arguments);
3767
3807
  };
3768
3808
  }());
3769
3809
  secondCall.on(_types2.CALL_EVENT_KEYS.DISCONNECT, /*#__PURE__*/function () {
3770
- var _ref80 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee70(correlationId) {
3771
- return _regenerator.default.wrap(function (_context70) {
3772
- while (1) switch (_context70.prev = _context70.next) {
3810
+ var _ref81 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee71(correlationId) {
3811
+ return _regenerator.default.wrap(function (_context71) {
3812
+ while (1) switch (_context71.prev = _context71.next) {
3773
3813
  case 0:
3774
3814
  expect(correlationId).toStrictEqual(secondCall.getCorrelationId());
3775
3815
  case 1:
3776
3816
  case "end":
3777
- return _context70.stop();
3817
+ return _context71.stop();
3778
3818
  }
3779
- }, _callee70);
3819
+ }, _callee71);
3780
3820
  }));
3781
- return function (_x10) {
3782
- return _ref80.apply(this, arguments);
3821
+ return function (_x14) {
3822
+ return _ref81.apply(this, arguments);
3783
3823
  };
3784
3824
  }());
3785
- _context71.next = 1;
3825
+ _context72.next = 1;
3786
3826
  return call.completeTransfer(_types5.TransferType.CONSULT, secondCall.getCallId(), undefined);
3787
3827
  case 1:
3788
- _context71.next = 2;
3828
+ _context72.next = 2;
3789
3829
  return (0, _testUtil.flushPromises)(2);
3790
3830
  case 2:
3791
3831
  expect(requestSpy).toBeCalled();
@@ -3808,14 +3848,14 @@ describe('Supplementary Services tests', function () {
3808
3848
  expect(warnSpy).not.toHaveBeenCalledWith("Consult Transfer failed for correlationId ".concat(call.getCorrelationId()), transferLoggingContext);
3809
3849
  case 3:
3810
3850
  case "end":
3811
- return _context71.stop();
3851
+ return _context72.stop();
3812
3852
  }
3813
- }, _callee71);
3853
+ }, _callee72);
3814
3854
  })));
3815
- it('Handle successful blind transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee73() {
3855
+ it('Handle successful blind transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee74() {
3816
3856
  var responsePayload, requestSpy, warnSpy, infoSpy, metricSpy;
3817
- return _regenerator.default.wrap(function (_context73) {
3818
- while (1) switch (_context73.prev = _context73.next) {
3857
+ return _regenerator.default.wrap(function (_context74) {
3858
+ while (1) switch (_context74.prev = _context74.next) {
3819
3859
  case 0:
3820
3860
  expect.assertions(10); // Updated to match actual assertion count
3821
3861
  responsePayload = {
@@ -3827,25 +3867,25 @@ describe('Supplementary Services tests', function () {
3827
3867
  infoSpy = jest.spyOn(_Logger.default, 'info');
3828
3868
  metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
3829
3869
  call.on(_types2.CALL_EVENT_KEYS.DISCONNECT, /*#__PURE__*/function () {
3830
- var _ref82 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee72(correlationId) {
3831
- return _regenerator.default.wrap(function (_context72) {
3832
- while (1) switch (_context72.prev = _context72.next) {
3870
+ var _ref83 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee73(correlationId) {
3871
+ return _regenerator.default.wrap(function (_context73) {
3872
+ while (1) switch (_context73.prev = _context73.next) {
3833
3873
  case 0:
3834
3874
  expect(correlationId).toStrictEqual(call.getCorrelationId());
3835
3875
  case 1:
3836
3876
  case "end":
3837
- return _context72.stop();
3877
+ return _context73.stop();
3838
3878
  }
3839
- }, _callee72);
3879
+ }, _callee73);
3840
3880
  }));
3841
- return function (_x11) {
3842
- return _ref82.apply(this, arguments);
3881
+ return function (_x15) {
3882
+ return _ref83.apply(this, arguments);
3843
3883
  };
3844
3884
  }());
3845
- _context73.next = 1;
3885
+ _context74.next = 1;
3846
3886
  return call.completeTransfer(_types5.TransferType.BLIND, undefined, transfereeNumber);
3847
3887
  case 1:
3848
- _context73.next = 2;
3888
+ _context74.next = 2;
3849
3889
  return (0, _testUtil.flushPromises)(2);
3850
3890
  case 2:
3851
3891
  expect(requestSpy).toBeCalled();
@@ -3864,14 +3904,14 @@ describe('Supplementary Services tests', function () {
3864
3904
  expect(warnSpy).not.toHaveBeenCalledWith("Blind Transfer failed for correlationId ".concat(call.getCorrelationId()), transferLoggingContext);
3865
3905
  case 3:
3866
3906
  case "end":
3867
- return _context73.stop();
3907
+ return _context74.stop();
3868
3908
  }
3869
- }, _callee73);
3909
+ }, _callee74);
3870
3910
  })));
3871
- it('Handle unsuccessful blind transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee74() {
3911
+ it('Handle unsuccessful blind transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee75() {
3872
3912
  var responsePayload, emitSpy, requestSpy, warnSpy, metricSpy;
3873
- return _regenerator.default.wrap(function (_context74) {
3874
- while (1) switch (_context74.prev = _context74.next) {
3913
+ return _regenerator.default.wrap(function (_context75) {
3914
+ while (1) switch (_context75.prev = _context75.next) {
3875
3915
  case 0:
3876
3916
  responsePayload = {
3877
3917
  statusCode: 403,
@@ -3882,10 +3922,10 @@ describe('Supplementary Services tests', function () {
3882
3922
  warnSpy = jest.spyOn(_Logger.default, 'warn');
3883
3923
  metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
3884
3924
  call['broadworksCorrelationInfo'] = 'dummy-broadworks-correlation-info';
3885
- _context74.next = 1;
3925
+ _context75.next = 1;
3886
3926
  return call.completeTransfer(_types5.TransferType.BLIND, undefined, transfereeNumber);
3887
3927
  case 1:
3888
- _context74.next = 2;
3928
+ _context75.next = 2;
3889
3929
  return (0, _testUtil.flushPromises)(1);
3890
3930
  case 2:
3891
3931
  expect(requestSpy).toBeCalled();
@@ -3906,14 +3946,14 @@ describe('Supplementary Services tests', function () {
3906
3946
  expect(metricSpy).toHaveBeenCalledWith(_types4.METRIC_EVENT.CALL_ERROR, _types4.TRANSFER_ACTION.BLIND, _types4.METRIC_TYPE.BEHAVIORAL, call.getCallId(), call.getCorrelationId(), expect.any(_Errors.CallError));
3907
3947
  case 3:
3908
3948
  case "end":
3909
- return _context74.stop();
3949
+ return _context75.stop();
3910
3950
  }
3911
- }, _callee74);
3951
+ }, _callee75);
3912
3952
  })));
3913
- it('Handle unsuccessful consult transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee75() {
3953
+ it('Handle unsuccessful consult transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee76() {
3914
3954
  var responsePayload, emitSpy, requestSpy, warnSpy, metricSpy;
3915
- return _regenerator.default.wrap(function (_context75) {
3916
- while (1) switch (_context75.prev = _context75.next) {
3955
+ return _regenerator.default.wrap(function (_context76) {
3956
+ while (1) switch (_context76.prev = _context76.next) {
3917
3957
  case 0:
3918
3958
  responsePayload = {
3919
3959
  statusCode: 403,
@@ -3923,10 +3963,10 @@ describe('Supplementary Services tests', function () {
3923
3963
  requestSpy = jest.spyOn(webex, 'request').mockRejectedValue(responsePayload);
3924
3964
  warnSpy = jest.spyOn(_Logger.default, 'warn');
3925
3965
  metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
3926
- _context75.next = 1;
3966
+ _context76.next = 1;
3927
3967
  return call.completeTransfer(_types5.TransferType.CONSULT, secondCall.getCallId(), undefined);
3928
3968
  case 1:
3929
- _context75.next = 2;
3969
+ _context76.next = 2;
3930
3970
  return (0, _testUtil.flushPromises)(2);
3931
3971
  case 2:
3932
3972
  expect(requestSpy).toBeCalled();
@@ -3947,18 +3987,18 @@ describe('Supplementary Services tests', function () {
3947
3987
  expect(metricSpy).toHaveBeenCalledWith(_types4.METRIC_EVENT.CALL_ERROR, _types4.TRANSFER_ACTION.CONSULT, _types4.METRIC_TYPE.BEHAVIORAL, call.getCallId(), call.getCorrelationId(), expect.any(_Errors.CallError));
3948
3988
  case 3:
3949
3989
  case "end":
3950
- return _context75.stop();
3990
+ return _context76.stop();
3951
3991
  }
3952
- }, _callee75);
3992
+ }, _callee76);
3953
3993
  })));
3954
- it('Handle blind transfer with undefined transferTarget', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee76() {
3994
+ it('Handle blind transfer with undefined transferTarget', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee77() {
3955
3995
  var requestSpy, warnSpy;
3956
- return _regenerator.default.wrap(function (_context76) {
3957
- while (1) switch (_context76.prev = _context76.next) {
3996
+ return _regenerator.default.wrap(function (_context77) {
3997
+ while (1) switch (_context77.prev = _context77.next) {
3958
3998
  case 0:
3959
3999
  requestSpy = jest.spyOn(webex, 'request');
3960
4000
  warnSpy = jest.spyOn(_Logger.default, 'warn');
3961
- _context76.next = 1;
4001
+ _context77.next = 1;
3962
4002
  return call.completeTransfer(_types5.TransferType.BLIND, undefined, undefined);
3963
4003
  case 1:
3964
4004
  /* We should be in CALL_ESTABLISHED state */
@@ -3970,18 +4010,18 @@ describe('Supplementary Services tests', function () {
3970
4010
  expect(warnSpy).toBeCalledOnceWith("Invalid information received, transfer failed for correlationId: ".concat(call.getCorrelationId()), transferLoggingContext);
3971
4011
  case 2:
3972
4012
  case "end":
3973
- return _context76.stop();
4013
+ return _context77.stop();
3974
4014
  }
3975
- }, _callee76);
4015
+ }, _callee77);
3976
4016
  })));
3977
- it('Handle consult transfer with undefined transferCallId', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee77() {
4017
+ it('Handle consult transfer with undefined transferCallId', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee78() {
3978
4018
  var requestSpy, warnSpy;
3979
- return _regenerator.default.wrap(function (_context77) {
3980
- while (1) switch (_context77.prev = _context77.next) {
4019
+ return _regenerator.default.wrap(function (_context78) {
4020
+ while (1) switch (_context78.prev = _context78.next) {
3981
4021
  case 0:
3982
4022
  requestSpy = jest.spyOn(webex, 'request');
3983
4023
  warnSpy = jest.spyOn(_Logger.default, 'warn');
3984
- _context77.next = 1;
4024
+ _context78.next = 1;
3985
4025
  return call.completeTransfer(_types5.TransferType.CONSULT, undefined, undefined);
3986
4026
  case 1:
3987
4027
  /* We should be in CALL_ESTABLISHED state */
@@ -3993,9 +4033,9 @@ describe('Supplementary Services tests', function () {
3993
4033
  expect(warnSpy).toBeCalledOnceWith("Invalid information received, transfer failed for correlationId: ".concat(call.getCorrelationId()), transferLoggingContext);
3994
4034
  case 2:
3995
4035
  case "end":
3996
- return _context77.stop();
4036
+ return _context78.stop();
3997
4037
  }
3998
- }, _callee77);
4038
+ }, _callee78);
3999
4039
  })));
4000
4040
  });
4001
4041
  });