mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
Fixed Gather digits does not work without nested say/play (#914)
* Fixed Gather digits does not work without nested say/play * fix review comment * add assert to make sure we don't register dtmf twice in gather verb
This commit is contained in:
@@ -177,8 +177,10 @@ class TaskGather extends SttTask {
|
||||
this._startVad();
|
||||
|
||||
const startDtmfListener = () => {
|
||||
assert(!this._dtmfListenerStarted);
|
||||
if (this.input.includes('digits') || this.dtmfBargein || this.asrDtmfTerminationDigit) {
|
||||
ep.on('dtmf', this._onDtmf.bind(this, cs, ep));
|
||||
this._dtmfListenerStarted = true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -281,7 +283,8 @@ class TaskGather extends SttTask {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.listenDuringPrompt) {
|
||||
// https://github.com/jambonz/jambonz-feature-server/issues/913
|
||||
if (this.listenDuringPrompt || (!this.sayTask && !this.playTask)) {
|
||||
startDtmfListener();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user