diff --git a/lib/session/call-session.js b/lib/session/call-session.js index 476dcdbd..095213bb 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -453,6 +453,10 @@ class CallSession extends Emitter { async enableBotMode(gather, autoEnable) { try { + if (this.backgroundGatherTask) { + this.logger.info('CallSession:enableBotMode - bot mode currently enabled, stop it'); + this.disableBotMode(); + } const t = normalizeJambones(this.logger, [gather]); this.backgroundGatherTask = makeTask(this.logger, t[0]); this._bargeInEnabled = true;