From 55b02c924f696751a6fb2ee81568a1cace8d445b Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Tue, 3 Aug 2021 10:41:19 -0400 Subject: [PATCH] if we get re-invite with no SDP (looking at you, BT) just respond with current offer --- lib/call-session.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/call-session.js b/lib/call-session.js index 4f08e3a..c54fc8d 100644 --- a/lib/call-session.js +++ b/lib/call-session.js @@ -265,6 +265,12 @@ class CallSession extends Emitter { async _onReinvite(dlg, req, res) { try { + /* check for re-invite with no SDP -- seen that from BT when they provide UUI info */ + if (!req.body) { + this.logger.info('got a reINVITE with no SDP; just respond with our current offer'); + res.send(200, {body: dlg.local.sdp}); + return; + } const fromTag = dlg.type === 'uas' ? this.rtpEngineOpts.uas.tag : this.rtpEngineOpts.uac.tag; const toTag = dlg.type === 'uas' ? this.rtpEngineOpts.uac.tag : this.rtpEngineOpts.uas.tag; const offerMedia = dlg.type === 'uas' ? this.rtpEngineOpts.uac.mediaOpts : this.rtpEngineOpts.uas.mediaOpts;