fix: gather task should clear dtmf event before resolve (#284)

Co-authored-by: Quan HL <quanluuhoang8@gmail.com>
This commit is contained in:
Hoan Luu HuuandQuan HL authored and GitHub committed 2023-03-26 12:32:51 -04:00
1 parent 63ab554908
commit 0dd161913c
1 file changed
+4
+4
View File
@@ -788,6 +788,10 @@ class TaskGather extends Task {
if (this.resolved) return;
this.resolved = true;
// Clear dtmf event
if (this.dtmfBargein) {
this.ep.removeAllListeners('dtmf');
}
clearTimeout(this.interDigitTimer);
this._clearTimer();