diff --git a/lib/call-session.js b/lib/call-session.js index 36a79b8..ce8a4a7 100644 --- a/lib/call-session.js +++ b/lib/call-session.js @@ -825,7 +825,9 @@ Duration=${payload.duration} ` try { const reason = req.get('X-Reason'); const isReleasingMedia = reason && dlg.type === 'uas' && ['release-media', 'anchor-media'].includes(reason); - const isFullMediaRelease = isReleasingMedia && process.env.JAMBONES_ENABLE_FULL_MEDIA_RELEASE; + const isFullMediaRelease = isReleasingMedia && + reason === 'release-media-entirely'; + const fromTag = dlg.type === 'uas' ? this.rtpEngineOpts.uas.tag : this.rtpEngineOpts.uac.tag; const toTag = dlg.type === 'uas' ? this.rtpEngineOpts.uac.tag : this.rtpEngineOpts.uas.tag; const offerMedia = dlg.type === 'uas' ? this.rtpEngineOpts.uac.mediaOpts : this.rtpEngineOpts.uas.mediaOpts;