From 67fa489c84c9e59e7abbddb0f3942d2743b58a9f Mon Sep 17 00:00:00 2001 From: Vladimir Barkasov Date: Sun, 9 Feb 2020 21:04:00 +0700 Subject: [PATCH] Answer submodule --- src/apps/callflows/i18n/en-US.json | 4 ++++ src/apps/callflows/submodules/misc/misc.js | 24 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/apps/callflows/i18n/en-US.json b/src/apps/callflows/i18n/en-US.json index cd00081..9394daf 100644 --- a/src/apps/callflows/i18n/en-US.json +++ b/src/apps/callflows/i18n/en-US.json @@ -54,6 +54,10 @@ }, "warning": "Warning!" }, + "answer": { + "answer": "Answer", + "tooltip": "Attempts to answer the call; will block callflow execution until the call is answered" + }, "audio_macro": { "dialog_title": "Audio Macro", "macro_type": "Macro type", diff --git a/src/apps/callflows/submodules/misc/misc.js b/src/apps/callflows/submodules/misc/misc.js index bca98da..429bdba 100644 --- a/src/apps/callflows/submodules/misc/misc.js +++ b/src/apps/callflows/submodules/misc/misc.js @@ -1282,6 +1282,30 @@ define(function(require) { edit: function(node, callback) { self.miscEditSetCAV(node, callback); } + }, + 'answer[]': { + name: self.i18n.active().callflows.answer.answer, + icon: 'phone', + category: self.i18n.active().oldCallflows.basic_cat, + module: 'answer', + tip: self.i18n.active().callflows.answer.tooltip, + data: {}, + rules: [ + { + type: 'quantity', + maxSize: '1' + } + ], + isUsable: 'true', + weight: 48, + caption: function(node, caption_map) { + return ''; + }, + edit: function(node, callback) { + if (typeof callback === 'function') { + callback(); + } + } } }); },