mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
fixed transcription is not received when call is terminated (#1259)
* fixed transcription is not received when call is terminated * wip * fixed failing testcases * wip * wip * wip * wip * should not do gracefulshutdown on stopAmd
This commit is contained in:
@@ -844,6 +844,10 @@ class TaskGather extends SttTask {
|
||||
}
|
||||
|
||||
_onTranscription(cs, ep, evt, fsEvent) {
|
||||
// check if we are in graceful shutdown mode
|
||||
if (ep.gracefulShutdownResolver) {
|
||||
ep.gracefulShutdownResolver();
|
||||
}
|
||||
// make sure this is not a transcript from answering machine detection
|
||||
const bugname = fsEvent.getHeader('media-bugname');
|
||||
const finished = fsEvent.getHeader('transcription-session-finished');
|
||||
@@ -1092,7 +1096,8 @@ class TaskGather extends SttTask {
|
||||
if (this.canFallback) {
|
||||
ep.stopTranscription({
|
||||
vendor: this.vendor,
|
||||
bugname: this.bugname
|
||||
bugname: this.bugname,
|
||||
gracefulShutdown: false
|
||||
})
|
||||
.catch((err) => this.logger.error({err}, `Error stopping transcription for primary vendor ${this.vendor}`));
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user