mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2026-01-25 02:07:56 +00:00
start timeout on bargein digits (#1312)
This commit is contained in:
@@ -368,6 +368,9 @@ class TaskGather extends SttTask {
|
|||||||
|
|
||||||
_onDtmf(cs, ep, evt) {
|
_onDtmf(cs, ep, evt) {
|
||||||
this.logger.debug(evt, 'TaskGather:_onDtmf');
|
this.logger.debug(evt, 'TaskGather:_onDtmf');
|
||||||
|
if (!this._timeoutTimer && this.timeout > 0) {
|
||||||
|
this._startTimer();
|
||||||
|
}
|
||||||
clearTimeout(this.interDigitTimer);
|
clearTimeout(this.interDigitTimer);
|
||||||
let resolved = false;
|
let resolved = false;
|
||||||
if (this.dtmfBargein) {
|
if (this.dtmfBargein) {
|
||||||
@@ -696,6 +699,7 @@ class TaskGather extends SttTask {
|
|||||||
|
|
||||||
_startTimer() {
|
_startTimer() {
|
||||||
if (0 === this.timeout) return;
|
if (0 === this.timeout) return;
|
||||||
|
this.logger.debug(`Starting timoutTimer of ${this.timeout}ms`);
|
||||||
this._clearTimer();
|
this._clearTimer();
|
||||||
this._timeoutTimer = setTimeout(() => {
|
this._timeoutTimer = setTimeout(() => {
|
||||||
if (this.isContinuousAsr) this._startAsrTimer();
|
if (this.isContinuousAsr) this._startAsrTimer();
|
||||||
|
|||||||
Reference in New Issue
Block a user