mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
add reason property to gather action
This commit is contained in:
@@ -201,10 +201,13 @@ class TaskGather extends Task {
|
||||
|
||||
this._clearTimer();
|
||||
if (reason.startsWith('dtmf')) {
|
||||
await this.performAction({digits: this.digitBuffer});
|
||||
await this.performAction({reason: 'dtmfDetected', digits: this.digitBuffer});
|
||||
}
|
||||
else if (reason.startsWith('speech')) {
|
||||
await this.performAction({speech: evt});
|
||||
await this.performAction({reason: 'speechDetected', speech: evt});
|
||||
}
|
||||
else if (reason.startsWith('timeout')) {
|
||||
await this.performAction({reason: 'inputTimeout'});
|
||||
}
|
||||
this.notifyTaskDone();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user