From 83c1c07eb0b00fef023704582bc626146732013c Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Tue, 19 Dec 2023 21:42:20 +0700 Subject: [PATCH] fix enqueue waithook on ws hold the session (#572) * fix enqueue waithook on ws hold the session * wip --- lib/session/call-session.js | 3 ++- lib/session/confirm-call-session.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/session/call-session.js b/lib/session/call-session.js index f782c730..77c636e9 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -941,7 +941,8 @@ class CallSession extends Emitter { if (0 === this.tasks.length && this.requestor instanceof WsRequestor && !this.requestor.closedGracefully && - !this.callGone + !this.callGone && + !this.disableWaitCommand ) { try { await this._awaitCommandsOrHangup(); diff --git a/lib/session/confirm-call-session.js b/lib/session/confirm-call-session.js index 462716e3..4b09287e 100644 --- a/lib/session/confirm-call-session.js +++ b/lib/session/confirm-call-session.js @@ -23,6 +23,7 @@ class ConfirmCallSession extends CallSession { }); this.dlg = dlg; this.ep = ep; + this.disableWaitCommand = true; } /**