mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
Feat/902: executing giveUpAction when noResponseGiveupTimeout is reached (#908)
* feat/893: made noResponseTimeout and noResponseGiveUpTimout independent * support for giveUpActions implemented * feat/902: using makeTask and exec of task to execute the giveUpActions * feat/902: changed version of verb-specifications and speech-utils * feat/902: fixed jslint errors * feat/902: modified log * feat/902: using a new event giveupWithTasks for processing giveUpActions * feat/902: removed check for wakeupResolver and replaceApplication already taking care of wakeupResolver, also updated the verb-specifications version * feat/902: removed sync for _onNoResponseGiveUpTimer function
This commit is contained in:
@@ -544,6 +544,17 @@ class CallSession extends Emitter {
|
||||
this.wakeupResolver = null;
|
||||
}
|
||||
});
|
||||
this._actionHookDelayProcessor.on('giveupWithTasks', (tasks) => {
|
||||
this.logger.info('CallSession: ActionHookDelayProcessor: giveupWithTasks event');
|
||||
const giveUpTasks = normalizeJambones(this.logger, tasks).map((tdata) => makeTask(this.logger, tdata));
|
||||
this.logger.info({tasks: listTaskNames(giveUpTasks)}, 'CallSession:giveupWithTasks task list');
|
||||
|
||||
// we need to clear the ahd, as we do not want to execute actionHookDelay actions again
|
||||
this.clearActionHookDelayProcessor();
|
||||
|
||||
// replace the application with giveUpTasks
|
||||
this.replaceApplication(giveUpTasks);
|
||||
});
|
||||
} catch (err) {
|
||||
this.logger.error({err}, 'CallSession: Error creating ActionHookDelayProcessor');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user