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 Huu
2023-03-26 23:32:51 +07:00
committed by GitHub
parent 63ab554908
commit 0dd161913c

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();