From d991c97a4ab87d1515f1f5e6a74be32b5ef3545a Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Tue, 6 May 2025 21:01:36 +0700 Subject: [PATCH] sip_decline release callSession if ws requestor is used (#1182) --- lib/tasks/sip_decline.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/tasks/sip_decline.js b/lib/tasks/sip_decline.js index 8da23a45..d293bb79 100644 --- a/lib/tasks/sip_decline.js +++ b/lib/tasks/sip_decline.js @@ -18,6 +18,11 @@ class TaskSipDecline extends Task { super.exec(cs); res.send(this.data.status, this.data.reason, { headers: this.headers + }, (err) => { + if (!err) { + // Call was successfully declined + cs._callReleased(); + } }); cs.emit('callStatusChange', { callStatus: CallStatus.Failed,