start timeout on bargein digits (#1312)

This commit is contained in:
Sam Machin
2025-08-19 14:34:33 +02:00
committed by GitHub
parent ea27b20ac5
commit 654ccd9d9d

View File

@@ -368,6 +368,9 @@ class TaskGather extends SttTask {
_onDtmf(cs, ep, evt) {
this.logger.debug(evt, 'TaskGather:_onDtmf');
if (!this._timeoutTimer && this.timeout > 0) {
this._startTimer();
}
clearTimeout(this.interDigitTimer);
let resolved = false;
if (this.dtmfBargein) {
@@ -696,6 +699,7 @@ class TaskGather extends SttTask {
_startTimer() {
if (0 === this.timeout) return;
this.logger.debug(`Starting timoutTimer of ${this.timeout}ms`);
this._clearTimer();
this._timeoutTimer = setTimeout(() => {
if (this.isContinuousAsr) this._startAsrTimer();