This commit is contained in:
Quan HL
2024-10-02 14:33:29 +07:00
parent 54a60e26ce
commit d473031bdc

View File

@@ -1338,9 +1338,9 @@ class CallSession extends Emitter {
listenTask.updateListen(opts.listen_status);
}
// Jambonz only update transcribe task when receive RE-INVITE:
// 1. Pause transcribe task if it's running and hold RE-INVITE is received
// 2. Resume transcribe task if it was paused by jambonz due to hold and unhold RE-INVITE is received
// Jambonz only update transcribe task when it's received RE-INVITE:
// 1. Pause transcribe task if the task is running and hold RE-INVITE is received
// 2. Resume transcribe task if the task was paused by jambonz due to hold and unhold RE-INVITE is received
async pauseOrResumeTranscribeTaskByReInvite(req) {
const task = this.currentTask;
const transcribeTasks = [];
@@ -2278,12 +2278,7 @@ Duration=${duration} `
res.send(488);
}
// if there
const opts = {
transcribe_status: isOnhold(req.body) ? TranscribeStatus.Pause : TranscribeStatus.Resume
};
this.logger.info('Transcribe is');
this._lccTranscribeStatus(opts);
await this.pauseOrResumeTranscribeTaskByReInvite(req);
} catch (err) {
this.logger.error(err, 'Error handling reinvite');
}