revert change (for now) that caused audio issues when reinviting to partial media (#187)

This commit is contained in:
Dave Horton
2025-08-18 12:45:48 -04:00
committed by GitHub
parent 9357920f76
commit 55fef10f0e

View File

@@ -28,11 +28,13 @@ function makeRtpEngineOpts(req, srcIsUsingSrtp, dstIsUsingSrtp, padCrypto, teams
srcOpts.flags.push('inject DTMF');
}
}
/** By default use strict source to secure aganst RTPInject vuln,
* set env var to true to disable it and use media handover instead */
const disableStrictSource = !!process.env.RTPENGINE_DISABLE_STRICT_SOURCE;
dstOpts.flags.push(disableStrictSource ? 'media handover' : 'strict source');
srcOpts.flags.push(disableStrictSource ? 'media handover' : 'strict source');
/** By default, and for backwards compatibility, use media handover
* set env var to true to use strict source instead (needed for rtpbleed vulnerability)
*/
const enableStrictSource = !!process.env.RTPENGINE_ENABLE_STRICT_SOURCE;
dstOpts.flags.push(enableStrictSource ? 'strict source' : 'media handover');
srcOpts.flags.push(enableStrictSource ? 'strict source' : 'media handover');
const common = {
'call-id': req.get('Call-ID'),