diff --git a/lib/utils/place-outdial.js b/lib/utils/place-outdial.js index 4182d7f4..88413bfa 100644 --- a/lib/utils/place-outdial.js +++ b/lib/utils/place-outdial.js @@ -326,6 +326,10 @@ class SingleDialer extends Emitter { try { // retrieve set of tasks const json = await this.requestor.request('dial:confirm', confirmHook, this.callInfo.toJSON()); + if (!json || (Array.isArray(json) && json.length === 0)) { + this.logger.info('SingleDialer:_executeApp: no tasks returned from confirm hook'); + return; + } const tasks = normalizeJambones(this.logger, json).map((tdata) => makeTask(this.logger, tdata)); // verify it contains only allowed verbs const allowedTasks = tasks.filter((task) => {