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