more dialogflow changes

This commit is contained in:
Dave Horton
2020-07-08 16:07:49 -04:00
parent a4bcfca9e6
commit 6e78b46674
2 changed files with 29 additions and 26 deletions

View File

@@ -99,18 +99,6 @@ class Task extends Emitter {
}
}
async performHook(hook, results, expectResponse = true) {
const json = await this.cs.requestor.request(hook, results);
if (expectResponse && json && Array.isArray(json)) {
const makeTask = require('./make_task');
const tasks = normalizeJambones(this.logger, json).map((tdata) => makeTask(this.logger, tdata));
if (tasks && tasks.length > 0) {
this.logger.info({tasks: tasks}, `${this.name} replacing application with ${tasks.length} tasks`);
this.callSession.replaceApplication(tasks);
}
}
}
async transferCallToFeatureServer(cs, sipAddress, opts) {
const uuid = uuidv4();
const {addKey} = cs.srf.locals.dbHelpers;