feature: release media from freeswitch

This commit is contained in:
Dave Horton
2021-10-10 13:00:24 -04:00
parent 2ea516be8a
commit ae968fcb50
5 changed files with 258 additions and 322 deletions
+1
View File
@@ -3,5 +3,6 @@
"DTLS": "off",
"SDES": "off",
"ICE": "remove",
"flags": ["media handover", "port latching"],
"rtcp-mux": ["demux"]
}
+1 -1
View File
@@ -3,7 +3,7 @@
"transport-protocol": "UDP/TLS/RTP/SAVPF",
"ICE": "force",
"SDES": "off",
"flags": ["generate mid", "SDES-no", "media handover"],
"flags": ["generate mid", "SDES-no", "media handover", "port latching"],
"rtcp-mux": ["require"]
},
"teams": {
+11 -1
View File
@@ -391,7 +391,17 @@ class CallSession extends Emitter {
res.send(488);
throw new Error(`_onReinvite: rtpengine failed: offer: ${JSON.stringify(response)}`);
}
const sdp = await dlg.other.modify(response.sdp);
/* if this is a re-invite from the FS to change media anchoring, avoid sending the reinvite out */
let sdp;
const reason = req.get('X-Reason');
if (reason && dlg.type === 'uas' && ['release-media', 'anchor-media'].includes(reason)) {
this.logger.info(`got a reinvite from FS to ${reason}`);
sdp = dlg.other.remote.sdp;
}
else {
sdp = await dlg.other.modify(response.sdp);
}
opts = {
...this.rtpEngineOpts.common,
...answerMedia,
+244 -319
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -35,7 +35,7 @@
"@jambonz/time-series": "^0.1.5",
"debug": "^4.3.1",
"drachtio-fn-b2b-sugar": "^0.0.12",
"drachtio-srf": "^4.4.49",
"drachtio-srf": "^4.4.55",
"pino": "^6.11.2"
},
"devDependencies": {