mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
@@ -591,7 +591,6 @@ class TaskGather extends SttTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_killActionHookDelayAction() {
|
_killActionHookDelayAction() {
|
||||||
this.logger.debug('_killActionHookDelayAction');
|
|
||||||
if (this._actionHookDelaySayTask && !this._actionHookDelaySayTask.killed) {
|
if (this._actionHookDelaySayTask && !this._actionHookDelaySayTask.killed) {
|
||||||
this._actionHookDelaySayTask.removeAllListeners('playDone');
|
this._actionHookDelaySayTask.removeAllListeners('playDone');
|
||||||
this._actionHookDelaySayTask.kill(this.cs);
|
this._actionHookDelaySayTask.kill(this.cs);
|
||||||
@@ -1037,6 +1036,16 @@ class TaskGather extends SttTask {
|
|||||||
|
|
||||||
async _resolve(reason, evt) {
|
async _resolve(reason, evt) {
|
||||||
this.logger.debug(`TaskGather:resolve with reason ${reason}`);
|
this.logger.debug(`TaskGather:resolve with reason ${reason}`);
|
||||||
|
if (this.needsStt && this.ep && this.ep.connected) {
|
||||||
|
this.ep.stopTranscription({
|
||||||
|
vendor: this.vendor,
|
||||||
|
bugname: this.bugname
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
if (this.resolved) return;
|
||||||
|
this.logger.error({err}, 'Error stopping transcription');
|
||||||
|
});
|
||||||
|
}
|
||||||
if (this.resolved) return;
|
if (this.resolved) return;
|
||||||
|
|
||||||
this.resolved = true;
|
this.resolved = true;
|
||||||
@@ -1054,13 +1063,6 @@ class TaskGather extends SttTask {
|
|||||||
'stt.resolve': reason,
|
'stt.resolve': reason,
|
||||||
'stt.result': JSON.stringify(evt)
|
'stt.result': JSON.stringify(evt)
|
||||||
});
|
});
|
||||||
if (this.needsStt && this.ep && this.ep.connected) {
|
|
||||||
this.ep.stopTranscription({
|
|
||||||
vendor: this.vendor,
|
|
||||||
bugname: this.bugname
|
|
||||||
})
|
|
||||||
.catch((err) => this.logger.error({err}, 'Error stopping transcription'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.callSession && this.callSession.callGone) {
|
if (this.callSession && this.callSession.callGone) {
|
||||||
this.logger.debug('TaskGather:_resolve - call is gone, not invoking web callback');
|
this.logger.debug('TaskGather:_resolve - call is gone, not invoking web callback');
|
||||||
|
|||||||
Reference in New Issue
Block a user