diff --git a/.gitignore b/.gitignore index bbb805f..066892d 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ node_modules .DS_Store examples/* +CLAUDE.md \ No newline at end of file diff --git a/lib/utils.js b/lib/utils.js index fe1f3bf..e7ca31e 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -25,8 +25,8 @@ function makeRtpEngineOpts(req, srcIsUsingSrtp, dstIsUsingSrtp, teams = false) { const dstOpts = dstIsUsingSrtp ? srtpOpts : rtpCopy; const srcOpts = srcIsUsingSrtp ? srtpOpts : rtpCopy; - /* Allow Feature server to inject DTMF to both leg except call from Teams */ - if (!teams) { + /* Allow rtpengine to inject DTMF for WebRTC clients only (this disables kernel forwarding) */ + if (!teams && (isWSS(req) || process.env.JAMBONES_RTPENGINE_INJECT_DTMF_ALWAYS)) { dstOpts.flags.push('inject DTMF'); srcOpts.flags.push('inject DTMF'); }