mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2026-01-25 02:07:59 +00:00
fix for PAD_CRYPTO feature
This commit is contained in:
@@ -6,7 +6,11 @@ function makeRtpEngineOpts(req, srcIsUsingSrtp, dstIsUsingSrtp, teams = false) {
|
||||
const from = req.getParsedHeader('from');
|
||||
const rtpCopy = JSON.parse(JSON.stringify(rtpCharacteristics));
|
||||
const srtpCopy = JSON.parse(JSON.stringify(srtpCharacteristics));
|
||||
if (process.env.PAD_CRYPTO) srtpCopy['default'].flags.push('SDES-pad');
|
||||
|
||||
if (process.env.PAD_CRYPTO) {
|
||||
srtpCopy['default'].flags.push('SDES-pad');
|
||||
srtpCopy['teams'].flags.push('SDES-pad');
|
||||
}
|
||||
|
||||
const srtpOpts = teams ? srtpCopy['teams'] : srtpCopy['default'];
|
||||
const dstOpts = dstIsUsingSrtp ? srtpOpts : rtpCopy;
|
||||
|
||||
Reference in New Issue
Block a user