mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
fix #206: prevent 2 simultaneous background gathers
This commit is contained in:
@@ -453,6 +453,10 @@ class CallSession extends Emitter {
|
|||||||
|
|
||||||
async enableBotMode(gather, autoEnable) {
|
async enableBotMode(gather, autoEnable) {
|
||||||
try {
|
try {
|
||||||
|
if (this.backgroundGatherTask) {
|
||||||
|
this.logger.info('CallSession:enableBotMode - bot mode currently enabled, stop it');
|
||||||
|
this.disableBotMode();
|
||||||
|
}
|
||||||
const t = normalizeJambones(this.logger, [gather]);
|
const t = normalizeJambones(this.logger, [gather]);
|
||||||
this.backgroundGatherTask = makeTask(this.logger, t[0]);
|
this.backgroundGatherTask = makeTask(this.logger, t[0]);
|
||||||
this._bargeInEnabled = true;
|
this._bargeInEnabled = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user