fix for PAD_CRYPTO feature

This commit is contained in:
Dave Horton
2023-09-14 10:14:27 -04:00
parent 6cf59732fb
commit 114d34def4

View File

@@ -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;