mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2025-12-19 04:37:43 +00:00
revert change (for now) that caused audio issues when reinviting to partial media (#212)
This commit is contained in:
@@ -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 {
|
||||
|
||||
11
lib/utils.js
11
lib/utils.js
@@ -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' : '';
|
||||
|
||||
Reference in New Issue
Block a user