diff --git a/lib/session/call-session.js b/lib/session/call-session.js index 1ea105be..44d6cc63 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -449,6 +449,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;