diff --git a/lib/call-session.js b/lib/call-session.js index b9bf5f1..62c572e 100644 --- a/lib/call-session.js +++ b/lib/call-session.js @@ -559,7 +559,7 @@ class CallSession extends Emitter { ...this.rtpEngineOpts.uas.mediaOpts, 'from-tag': this.rtpEngineOpts.uas.tag, 'to-tag': this.rtpEngineOpts.uac.tag, - flags: ['single codec', 'inject DTMF'], + flags: ['single codec'], sdp }; const response = await this.answer(opts); diff --git a/lib/utils.js b/lib/utils.js index 37887ea..5d8c623 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -19,8 +19,8 @@ function makeRtpEngineOpts(req, srcIsUsingSrtp, dstIsUsingSrtp, padCrypto, teams const dstOpts = dstIsUsingSrtp ? srtpOpts : rtpCopy; const srcOpts = srcIsUsingSrtp ? srtpOpts : rtpCopy; - /** Allow feature server to send DTMF to the call excepts call from/to teams */ - if (!teams) { + /** Allow rtpengine to inject DTMF on calls from webrtc only (this disables kernel forwarding) */ + if (!teams && (dstIsUsingSrtp || process.env.JAMBONES_RTPENGINE_INJECT_DTMF_ALWAYS)) { if (!dstOpts.flags.includes('inject DTMF')) { dstOpts.flags.push('inject DTMF'); }