mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2026-07-04 19:32:01 +00:00
Update gather.js (#1526)
This commit is contained in:
+20
-1
@@ -1424,7 +1424,26 @@ class TaskGather extends SttTask {
|
|||||||
returnedVerbs = await this.performAction({speech:evt, reason: 'stt-low-confidence', ...latencies});
|
returnedVerbs = await this.performAction({speech:evt, reason: 'stt-low-confidence', ...latencies});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (err) { /*already logged error*/ }
|
} catch (err) {
|
||||||
|
this.logger.info({err}, 'TaskGather:_resolve - error performing action');
|
||||||
|
this.notifyError({msg: 'invalid actionHook response', details: err.message});
|
||||||
|
const {writeAlerts, AlertType} = this.cs.srf.locals;
|
||||||
|
writeAlerts({
|
||||||
|
account_sid: this.cs.accountSid,
|
||||||
|
alert_type: AlertType.INVALID_APP_PAYLOAD,
|
||||||
|
target_sid: this.cs.callSid,
|
||||||
|
message: `actionHook returned invalid verb syntax: ${err.message}`
|
||||||
|
}).catch((err) => this.logger.info({err}, 'TaskGather:_resolve - error generating alert'));
|
||||||
|
try {
|
||||||
|
const obj = Object.assign({}, this.cs.callInfo.toJSON(), {
|
||||||
|
error: 'invalid actionHook response',
|
||||||
|
reason: err.message
|
||||||
|
});
|
||||||
|
await this.cs.notifier.request('call:status', this.cs.call_status_hook, obj);
|
||||||
|
} catch (statusErr) {
|
||||||
|
this.logger.info({statusErr}, 'TaskGather:_resolve - error sending statusHook');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Gather got response from hook, cancel actionHookDelay processing
|
// Gather got response from hook, cancel actionHookDelay processing
|
||||||
if (this.cs.actionHookDelayProcessor) {
|
if (this.cs.actionHookDelayProcessor) {
|
||||||
|
|||||||
Reference in New Issue
Block a user