mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
Feature/minimal media anchoring (#36)
* initial WIP to remove freeswitch from media path when not recording or transcribing dial calls * implement release-media and anchor-media operations * mute/unmute now handled by rtpengine * Dial: dtmf detection now based on SIP INFO events from sbcs and rtpengine * add reason to gather action, bugfixes for transcribe and say
This commit is contained in:
@@ -235,14 +235,15 @@ class TaskGather extends Task {
|
||||
|
||||
this._clearTimer();
|
||||
if (reason.startsWith('dtmf')) {
|
||||
await this.performAction({digits: this.digitBuffer});
|
||||
await this.performAction({digits: this.digitBuffer, reason: 'dtmfDetected'});
|
||||
}
|
||||
else if (reason.startsWith('speech')) {
|
||||
if (this.parentTask) this.parentTask.emit('transcription', evt);
|
||||
else await this.performAction({speech: evt});
|
||||
else await this.performAction({speech: evt, reason: 'speechDetected'});
|
||||
}
|
||||
else if (reason.startsWith('timeout') && this.parentTask) {
|
||||
this.parentTask.emit('timeout', evt);
|
||||
else if (reason.startsWith('timeout')) {
|
||||
if (this.parentTask) this.parentTask.emit('timeout', evt);
|
||||
else await this.performAction({reason: 'timeout'});
|
||||
}
|
||||
this.notifyTaskDone();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user