From 48a81072e87770ec2d7c9173ad28ec1931f9a9da Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Tue, 6 Feb 2024 19:42:44 +0700 Subject: [PATCH] fix gather should not play audio if gather already resolved (#638) --- lib/tasks/gather.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index 7ab58ec7..80f4d9b1 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -845,6 +845,9 @@ class TaskGather extends SttTask { if (this.resolved) return; this.resolved = true; + // If bargin is false and ws application return ack to verb:hook + // the gather should not play any audio + this._killAudio(this.cs); // Clear dtmf event if (this.dtmfBargein) { this.ep.removeAllListeners('dtmf');