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();