#251 - unhandled exception in Session#_notifyCallStatusChange

This commit is contained in:
Dave Horton
2023-02-07 14:48:07 -05:00
parent 528fefb5a0
commit de8688ced8

View File

@@ -1591,7 +1591,7 @@ class CallSession extends Emitter {
* @param {number} sipStatus - current sip status * @param {number} sipStatus - current sip status
* @param {number} [duration] - duration of a completed call, in seconds * @param {number} [duration] - duration of a completed call, in seconds
*/ */
_notifyCallStatusChange({callStatus, sipStatus, sipReason, duration}) { async _notifyCallStatusChange({callStatus, sipStatus, sipReason, duration}) {
if (this.callMoved) return; if (this.callMoved) return;
/* race condition: we hang up at the same time as the caller */ /* race condition: we hang up at the same time as the caller */
@@ -1611,7 +1611,7 @@ class CallSession extends Emitter {
try { try {
const b3 = this.b3; const b3 = this.b3;
const httpHeaders = b3 && {b3}; const httpHeaders = b3 && {b3};
this.notifier.request('call:status', this.call_status_hook, this.callInfo.toJSON(), httpHeaders); await this.notifier.request('call:status', this.call_status_hook, this.callInfo.toJSON(), httpHeaders);
span.end(); span.end();
} catch (err) { } catch (err) {
span.end(); span.end();