From de8688ced8734ec479954a02c283255b5c71d456 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Tue, 7 Feb 2023 14:48:07 -0500 Subject: [PATCH] #251 - unhandled exception in Session#_notifyCallStatusChange --- lib/session/call-session.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/session/call-session.js b/lib/session/call-session.js index d43f13da..92626f7a 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -1591,7 +1591,7 @@ class CallSession extends Emitter { * @param {number} sipStatus - current sip status * @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; /* race condition: we hang up at the same time as the caller */ @@ -1611,7 +1611,7 @@ class CallSession extends Emitter { try { const b3 = this.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(); } catch (err) { span.end();