From 4d077e990f95331ba59c281c576037baafd5a419 Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Fri, 23 Aug 2024 20:28:39 +0700 Subject: [PATCH] Fix/audio issue kick conference (#878) * rest call session does not handle for RE-INVITE * fixed audio is bad after kicked from conference * fix review comment --- lib/session/call-session.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/session/call-session.js b/lib/session/call-session.js index d642608b..f49a18ce 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -2074,6 +2074,9 @@ Duration=${duration} ` // When this call kicked out from conference, session need to replace endpoint // but this.ms might be undefined/null at this case. this.ms = this.ms || this.getMS(); + // Destroy previous ep if it's still running. + if (this.ep?.connected) this.ep.destroy(); + this.ep = await this.ms.createEndpoint({remoteSdp: this.dlg.remote.sdp}); this._configMsEndpoint();