From 44abece27bf7e58d9fba554ff5d5ca14768a0be5 Mon Sep 17 00:00:00 2001 From: "Tore Bjolseth (Cisco)" <78877742+tbjolset@users.noreply.github.com> Date: Mon, 7 Nov 2022 12:15:22 +0100 Subject: [PATCH] Block outgoing calls: add support for timeout for webex edge --- Block Outgoing Calls/block-outgoing.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Block Outgoing Calls/block-outgoing.js b/Block Outgoing Calls/block-outgoing.js index 575739c..07329af 100644 --- a/Block Outgoing Calls/block-outgoing.js +++ b/Block Outgoing Calls/block-outgoing.js @@ -3,6 +3,8 @@ import xapi from 'xapi'; // variable that can be changed from settings ui on roomos.cisco.com const NumberToBlock = 'macro.polo@cisco.com'; +const delayBlockSec = 0; // For webex edge, set this to 5 + const denyList = [ NumberToBlock, @@ -20,6 +22,8 @@ xapi.Status.Call.on(e => { Text: 'The number you called was not allowed by a user script on the device', Duration: 10, }); - xapi.Command.Call.Disconnect(); + setTimeout(() => { + xapi.Command.Call.Disconnect(); + }, delayBlockSec * 1000); } });