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

This commit is contained in:
Dave Horton
2025-08-18 12:46:13 -04:00
committed by GitHub
parent 7bc2a1a6f4
commit 8ce531ec81
2 changed files with 8 additions and 7 deletions

View File

@@ -258,7 +258,7 @@ module.exports = (srf, logger) => {
`SELECT * FROM phone_numbers WHERE number = '${did}'
AND voip_carrier_sid IN (${vc_sids})
AND account_sid = '${a[0].account_sid}'`;
logger.debug({voip_carriers, sql, did}, 'looking up DID');
//logger.debug({voip_carriers, sql, did}, 'looking up DID');
const [r] = await pp.query(sql);
if (r.length === 0) {
@@ -334,7 +334,7 @@ module.exports = (srf, logger) => {
`SELECT application_sid FROM phone_numbers WHERE number = '${did}'
AND voip_carrier_sid = '${matches[0].voip_carrier_sid}'
AND account_sid = '${matches[0].account_sid}'`;
logger.debug({matches: matches[0], sql, did}, 'looking up DID');
//logger.debug({matches: matches[0], sql, did}, 'looking up DID');
const [r] = await pp.query(sql);
return {

View File

@@ -30,12 +30,13 @@ 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');
/** 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 acceptCodecs = process.env.JAMBONES_ACCEPT_AND_TRANSCODE ?
process.env.JAMBONES_ACCEPT_AND_TRANSCODE :
process.env.JAMBONES_ACCEPT_G729 ? 'g729' : '';