mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
bugfix: sending partial transcripts from gather was causing error
This commit is contained in:
@@ -84,7 +84,6 @@ router.post('/', async(req, res) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* create endpoint for outdial */
|
/* create endpoint for outdial */
|
||||||
const ms = getFreeswitch();
|
const ms = getFreeswitch();
|
||||||
if (!ms) throw new Error('no available Freeswitch for outbound call creation');
|
if (!ms) throw new Error('no available Freeswitch for outbound call creation');
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class TaskGather extends Task {
|
|||||||
|
|
||||||
/* timeout of zero means no timeout */
|
/* timeout of zero means no timeout */
|
||||||
this.timeout = this.timeout === 0 ? 0 : (this.timeout || 15) * 1000;
|
this.timeout = this.timeout === 0 ? 0 : (this.timeout || 15) * 1000;
|
||||||
this.interim = this.partialResultHook || this.bargein;
|
this.interim = !!this.partialResultHook || this.bargein;
|
||||||
this.listenDuringPrompt = this.data.listenDuringPrompt === false ? false : true;
|
this.listenDuringPrompt = this.data.listenDuringPrompt === false ? false : true;
|
||||||
this.minBargeinWordCount = this.data.minBargeinWordCount || 0;
|
this.minBargeinWordCount = this.data.minBargeinWordCount || 0;
|
||||||
if (this.data.recognizer) {
|
if (this.data.recognizer) {
|
||||||
@@ -517,7 +517,7 @@ class TaskGather extends Task {
|
|||||||
if (this.partialResultHook) {
|
if (this.partialResultHook) {
|
||||||
const b3 = this.getTracingPropagation();
|
const b3 = this.getTracingPropagation();
|
||||||
const httpHeaders = b3 && {b3};
|
const httpHeaders = b3 && {b3};
|
||||||
this.cs.requestor.request(this.partialResultHook, Object.assign({speech: evt},
|
this.cs.requestor.request('verb:hook', this.partialResultHook, Object.assign({speech: evt},
|
||||||
this.cs.callInfo, httpHeaders));
|
this.cs.callInfo, httpHeaders));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user