diff --git a/lib/utils.js b/lib/utils.js index 0d34338..44df2a8 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -36,15 +36,15 @@ function makeRtpEngineOpts(req, srcIsUsingSrtp, dstIsUsingSrtp, padCrypto, teams common, uas: { tag: from.params.tag, - mediaOpts: { - ...srcOpts, - ...(process.env.JAMBONES_ACCEPT_AND_TRANSCODE && - { codec: { mask: process.env.JAMBONES_ACCEPT_AND_TRANSCODE, transcode: 'pcmu,pcma' } }) - } + mediaOpts: srcOpts }, uac: { tag: null, - mediaOpts: dstOpts + mediaOpts: { + ...dstOpts, + ...(process.env.JAMBONES_CODEC_OFFER_WITH_ORDER && + { codec: { offer: process.env.JAMBONES_CODEC_OFFER_WITH_ORDER.split(','), strip: 'all' } }), + } } }; }