From d3f031b84172595929fb69b4e9784e1eda918fe3 Mon Sep 17 00:00:00 2001 From: Sam Machin Date: Wed, 14 Jan 2026 15:37:21 +0000 Subject: [PATCH] dont' reInvite an anchored call --- lib/session/call-session.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/session/call-session.js b/lib/session/call-session.js index c441bcaf..b26579bf 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -2727,8 +2727,14 @@ Duration=${duration} ` tidyUp(); } else { - this.logger.debug('CallSession:propagateAnswer - call already answered - re-anchor media with a reinvite'); - await this.dlg.modify(this.ep.local.sdp); + if (this.currentTask?.name === TaskName.Dial) { + if (this.currentTask?.canReleaseMedia) { + this.logger.debug('CallSession:propagateAnswer - call already answered - re-anchor media with a reinvite'); + await this.dlg.modify(this.ep.local.sdp); + } else { + this.logger.debug('CallSession:propagateAnswer - call already answered and anchored'); + } + } } }