From ae688ddc7eefca795d36b5654145ef92b7330db0 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Fri, 17 Feb 2023 09:12:54 -0500 Subject: [PATCH] when handling reinvites for SIPREC incoming calls just respond 200 OK with existing sdp --- lib/session/call-session.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/session/call-session.js b/lib/session/call-session.js index be9fc8da..0475d388 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -1450,9 +1450,15 @@ class CallSession extends Emitter { async _onReinvite(req, res) { try { if (this.ep) { - const newSdp = await this.ep.modify(req.body); - res.send(200, {body: newSdp}); - this.logger.info({offer: req.body, answer: newSdp}, 'handling reINVITE'); + if (this.isSipRecCallSession) { + this.logger.info('handling reINVITE for siprec call'); + res.send(200, {body: this.ep.local.sdp}); + } + else { + const newSdp = await this.ep.modify(req.body); + res.send(200, {body: newSdp}); + this.logger.info({offer: req.body, answer: newSdp}, 'handling reINVITE'); + } } else if (this.currentTask && this.currentTask.name === TaskName.Dial) { this.logger.info('handling reINVITE after media has been released');