Skip to content

Commit

Permalink
dont resend reinvite when release media for srtp
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed Nov 7, 2024
1 parent d8bc6a3 commit d045d06
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/call-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@ class CallSession extends Emitter {
return this._mediaReleased;
}

get calleeIsUsingSrtp() {
const tp = this.rtpEngineOpts?.uac?.mediaOpts['transport-protocol'];
return tp && -1 !== tp.indexOf('SAVP');
}

subscribeForDTMF(dlg) {
if (!this._subscribedForDTMF) {
this._subscribedForDTMF = true;
Expand Down Expand Up @@ -835,7 +830,7 @@ 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.calleeIsUsingSrtp) {
if (isReleasingMedia) {
this.logger.info(`got a reinvite from FS to ${reason}`);
sdp = dlg.other.remote.sdp;
if (!answerMedia.flags.includes('port latching')) answerMedia.flags.push('port latching');
Expand Down

0 comments on commit d045d06

Please sign in to comment.