@webex/calling 3.4.0-next.16 → 3.4.0-next.17
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.
- package/dist/CallingClient/calling/call.js +81 -0
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +332 -217
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/module/CallingClient/calling/call.js +50 -0
- package/dist/types/CallingClient/calling/call.d.ts +1 -0
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -336,6 +336,12 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
336
336
|
},
|
|
337
337
|
/* CALL SETUP */
|
|
338
338
|
S_RECV_CALL_SETUP: {
|
|
339
|
+
after: {
|
|
340
|
+
10000: {
|
|
341
|
+
target: 'S_CALL_CLEARED',
|
|
342
|
+
actions: ['triggerTimeout']
|
|
343
|
+
}
|
|
344
|
+
},
|
|
339
345
|
on: {
|
|
340
346
|
E_SEND_CALL_ALERTING: {
|
|
341
347
|
target: 'S_SEND_CALL_PROGRESS',
|
|
@@ -356,6 +362,12 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
356
362
|
}
|
|
357
363
|
},
|
|
358
364
|
S_SEND_CALL_SETUP: {
|
|
365
|
+
after: {
|
|
366
|
+
10000: {
|
|
367
|
+
target: 'S_CALL_CLEARED',
|
|
368
|
+
actions: ['triggerTimeout']
|
|
369
|
+
}
|
|
370
|
+
},
|
|
359
371
|
on: {
|
|
360
372
|
E_RECV_CALL_PROGRESS: {
|
|
361
373
|
target: 'S_RECV_CALL_PROGRESS',
|
|
@@ -381,6 +393,12 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
381
393
|
},
|
|
382
394
|
/* CALL_PROGRESS */
|
|
383
395
|
S_RECV_CALL_PROGRESS: {
|
|
396
|
+
after: {
|
|
397
|
+
60000: {
|
|
398
|
+
target: 'S_CALL_CLEARED',
|
|
399
|
+
actions: ['triggerTimeout']
|
|
400
|
+
}
|
|
401
|
+
},
|
|
384
402
|
on: {
|
|
385
403
|
E_RECV_CALL_CONNECT: {
|
|
386
404
|
target: 'S_RECV_CALL_CONNECT',
|
|
@@ -406,6 +424,12 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
406
424
|
}
|
|
407
425
|
},
|
|
408
426
|
S_SEND_CALL_PROGRESS: {
|
|
427
|
+
after: {
|
|
428
|
+
60000: {
|
|
429
|
+
target: 'S_CALL_CLEARED',
|
|
430
|
+
actions: ['triggerTimeout']
|
|
431
|
+
}
|
|
432
|
+
},
|
|
409
433
|
on: {
|
|
410
434
|
E_SEND_CALL_CONNECT: {
|
|
411
435
|
target: 'S_SEND_CALL_CONNECT',
|
|
@@ -427,6 +451,12 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
427
451
|
},
|
|
428
452
|
/* CALL_CONNECT */
|
|
429
453
|
S_RECV_CALL_CONNECT: {
|
|
454
|
+
after: {
|
|
455
|
+
10000: {
|
|
456
|
+
target: 'S_CALL_CLEARED',
|
|
457
|
+
actions: ['triggerTimeout']
|
|
458
|
+
}
|
|
459
|
+
},
|
|
430
460
|
on: {
|
|
431
461
|
E_CALL_ESTABLISHED: {
|
|
432
462
|
target: 'S_CALL_ESTABLISHED',
|
|
@@ -447,6 +477,12 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
447
477
|
}
|
|
448
478
|
},
|
|
449
479
|
S_SEND_CALL_CONNECT: {
|
|
480
|
+
after: {
|
|
481
|
+
10000: {
|
|
482
|
+
target: 'S_CALL_CLEARED',
|
|
483
|
+
actions: ['triggerTimeout']
|
|
484
|
+
}
|
|
485
|
+
},
|
|
450
486
|
on: {
|
|
451
487
|
E_CALL_ESTABLISHED: {
|
|
452
488
|
target: 'S_CALL_ESTABLISHED',
|
|
@@ -672,6 +708,12 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
672
708
|
*/
|
|
673
709
|
unknownState: function unknownState(context, event) {
|
|
674
710
|
return _this.handleUnknownState(event);
|
|
711
|
+
},
|
|
712
|
+
/**
|
|
713
|
+
*
|
|
714
|
+
*/
|
|
715
|
+
triggerTimeout: function triggerTimeout() {
|
|
716
|
+
return _this.handleTimeout();
|
|
675
717
|
}
|
|
676
718
|
}
|
|
677
719
|
});
|
|
@@ -3095,6 +3137,45 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
3095
3137
|
value: function getCallRtpStats() {
|
|
3096
3138
|
return this.getCallStats();
|
|
3097
3139
|
}
|
|
3140
|
+
|
|
3141
|
+
/**
|
|
3142
|
+
* Handle timeout for the missed events
|
|
3143
|
+
* @param expectedStates - An array of next expected states
|
|
3144
|
+
* @param errorMessage - Error message to be emitted if the call is not in the expected state in expected time
|
|
3145
|
+
*/
|
|
3146
|
+
}, {
|
|
3147
|
+
key: "handleTimeout",
|
|
3148
|
+
value: (function () {
|
|
3149
|
+
var _handleTimeout = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27() {
|
|
3150
|
+
var response;
|
|
3151
|
+
return _regenerator.default.wrap(function _callee27$(_context28) {
|
|
3152
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
3153
|
+
case 0:
|
|
3154
|
+
_Logger.default.warn("Call timed out", {
|
|
3155
|
+
file: _constants.CALL_FILE,
|
|
3156
|
+
method: 'handleTimeout'
|
|
3157
|
+
});
|
|
3158
|
+
this.deleteCb(this.getCorrelationId());
|
|
3159
|
+
this.emit(_types3.CALL_EVENT_KEYS.DISCONNECT, this.getCorrelationId());
|
|
3160
|
+
_context28.next = 5;
|
|
3161
|
+
return this.delete();
|
|
3162
|
+
case 5:
|
|
3163
|
+
response = _context28.sent;
|
|
3164
|
+
_Logger.default.log("handleTimeout: Response code: ".concat(response.statusCode), {
|
|
3165
|
+
file: _constants.CALL_FILE,
|
|
3166
|
+
method: this.handleTimeout.name
|
|
3167
|
+
});
|
|
3168
|
+
case 7:
|
|
3169
|
+
case "end":
|
|
3170
|
+
return _context28.stop();
|
|
3171
|
+
}
|
|
3172
|
+
}, _callee27, this);
|
|
3173
|
+
}));
|
|
3174
|
+
function handleTimeout() {
|
|
3175
|
+
return _handleTimeout.apply(this, arguments);
|
|
3176
|
+
}
|
|
3177
|
+
return handleTimeout;
|
|
3178
|
+
}())
|
|
3098
3179
|
}]);
|
|
3099
3180
|
return Call;
|
|
3100
3181
|
}(_impl.Eventing);
|