mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2026-01-25 02:07:59 +00:00
use inject dtmf only for webrtc clients (https://github.com/jambonz/sbc-inbound/issues/222)
This commit is contained in:
@@ -559,7 +559,7 @@ class CallSession extends Emitter {
|
|||||||
...this.rtpEngineOpts.uas.mediaOpts,
|
...this.rtpEngineOpts.uas.mediaOpts,
|
||||||
'from-tag': this.rtpEngineOpts.uas.tag,
|
'from-tag': this.rtpEngineOpts.uas.tag,
|
||||||
'to-tag': this.rtpEngineOpts.uac.tag,
|
'to-tag': this.rtpEngineOpts.uac.tag,
|
||||||
flags: ['single codec', 'inject DTMF'],
|
flags: ['single codec'],
|
||||||
sdp
|
sdp
|
||||||
};
|
};
|
||||||
const response = await this.answer(opts);
|
const response = await this.answer(opts);
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ function makeRtpEngineOpts(req, srcIsUsingSrtp, dstIsUsingSrtp, padCrypto, teams
|
|||||||
const dstOpts = dstIsUsingSrtp ? srtpOpts : rtpCopy;
|
const dstOpts = dstIsUsingSrtp ? srtpOpts : rtpCopy;
|
||||||
const srcOpts = srcIsUsingSrtp ? srtpOpts : rtpCopy;
|
const srcOpts = srcIsUsingSrtp ? srtpOpts : rtpCopy;
|
||||||
|
|
||||||
/** Allow feature server to send DTMF to the call excepts call from/to teams */
|
/** Allow rtpengine to inject DTMF on calls from webrtc only (this disables kernel forwarding) */
|
||||||
if (!teams) {
|
if (!teams && (dstIsUsingSrtp || process.env.JAMBONES_RTPENGINE_INJECT_DTMF_ALWAYS)) {
|
||||||
if (!dstOpts.flags.includes('inject DTMF')) {
|
if (!dstOpts.flags.includes('inject DTMF')) {
|
||||||
dstOpts.flags.push('inject DTMF');
|
dstOpts.flags.push('inject DTMF');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user