use inject dtmf only for webrtc clients (https://github.com/jambonz/sbc-inbound/issues/222)

This commit is contained in:
Dave Horton
2025-11-13 10:15:36 -05:00
parent 178105acd7
commit 4b8ede80e6
2 changed files with 3 additions and 3 deletions

View File

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

View File

@@ -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');
}