support sending DTMF to caller (#125)

* support sending DTMF to caller

* wip
This commit is contained in:
Hoan Luu Huu
2023-12-13 21:14:27 +07:00
committed by GitHub
parent 0e1627ba82
commit b8a67019a1
2 changed files with 23 additions and 2 deletions
+2 -2
View File
@@ -22,8 +22,8 @@ function makeRtpEngineOpts(req, srcIsUsingSrtp, dstIsUsingSrtp, teams = false) {
const dstOpts = dstIsUsingSrtp ? srtpOpts : rtpCopy;
const srcOpts = srcIsUsingSrtp ? srtpOpts : rtpCopy;
/* webrtc clients (e.g. sipjs) send DMTF via SIP INFO */
if ((srcIsUsingSrtp || dstIsUsingSrtp) && !teams) {
/* Allow Feature server to inject DTMF to both leg except call from Teams*/
if (!teams) {
dstOpts.flags.push('inject DTMF');
srcOpts.flags.push('inject DTMF');
}