fixed incase srtp, dont need to send reinvite when release media (#176)

* fixed, srtp dont need to send reinvite when release media

* fix review comment
This commit is contained in:
Hoan Luu Huu
2024-11-13 19:42:42 +07:00
committed by GitHub
parent bb9e5e98f5
commit bcfbe9a0fc

View File

@@ -82,11 +82,6 @@ class CallSession extends Emitter {
return this._mediaReleased;
}
get callerIsUsingSrtp() {
const tp = this.rtpEngineOpts?.uas?.mediaOpts['transport-protocol'];
return tp && -1 !== tp.indexOf('SAVP');
}
get isFive9VoiceStream() {
return this.req.has('X-Five9-StreamingPairId');
}
@@ -698,7 +693,9 @@ Duration=${payload.duration} `
/* if this is a re-invite from the FS to change media anchoring, avoid sending the reinvite out */
let sdp;
if (isReleasingMedia && !this.callerIsUsingSrtp) {
//HL 2024-11-13: previously forwarded re-invites to webrtc clients but further testing has shown to be unnecessary
//if (isReleasingMedia && !this.callerIsUsingSrtp) {
if (isReleasingMedia) {
this.logger.info({response}, `got a reinvite from FS to ${reason}`);
sdp = dlg.other.remote.sdp;
if (!answerMedia.flags.includes('asymmetric')) answerMedia.flags.push('asymmetric');