mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
background gather listen only once for vad and other interrupt events
This commit is contained in:
@@ -239,10 +239,10 @@ class CallSession extends Emitter {
|
|||||||
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.backgroundGatherTask
|
this.backgroundGatherTask
|
||||||
.on('dtmf', this._clearTasks.bind(this))
|
.once('dtmf', this._clearTasks.bind(this))
|
||||||
.on('vad', this._clearTasks.bind(this))
|
.once('vad', this._clearTasks.bind(this))
|
||||||
.on('transcription', this._clearTasks.bind(this))
|
.once('transcription', this._clearTasks.bind(this))
|
||||||
.on('timeout', this._clearTasks.bind(this));
|
.once('timeout', this._clearTasks.bind(this));
|
||||||
this.logger.info({gather}, 'CallSession:enableBotMode - starting background gather');
|
this.logger.info({gather}, 'CallSession:enableBotMode - starting background gather');
|
||||||
const resources = await this._evaluatePreconditions(this.backgroundGatherTask);
|
const resources = await this._evaluatePreconditions(this.backgroundGatherTask);
|
||||||
const {span, ctx} = this.rootSpan.startChildSpan(`background-gather:${this.backgroundGatherTask.summary}`);
|
const {span, ctx} = this.rootSpan.startChildSpan(`background-gather:${this.backgroundGatherTask.summary}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user