mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2025-12-19 04:37:43 +00:00
Set strict source on rtpengine (#210)
* Set strict source on rtpengine RTPBleed * use env var for strict source * lint * Update utils.js * arghhhh * clarification * change
This commit is contained in:
@@ -30,6 +30,12 @@ function makeRtpEngineOpts(req, srcIsUsingSrtp, dstIsUsingSrtp, teams = false) {
|
||||
dstOpts.flags.push('inject DTMF');
|
||||
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');
|
||||
|
||||
const acceptCodecs = process.env.JAMBONES_ACCEPT_AND_TRANSCODE ?
|
||||
process.env.JAMBONES_ACCEPT_AND_TRANSCODE :
|
||||
process.env.JAMBONES_ACCEPT_G729 ? 'g729' : '';
|
||||
|
||||
Reference in New Issue
Block a user