Skip to content

Commit

Permalink
Block outgoing calls: add support for timeout for webex edge
Browse files Browse the repository at this point in the history
  • Loading branch information
tbjolset authored Nov 7, 2022
1 parent e1d98e1 commit 44abece
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Block Outgoing Calls/block-outgoing.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import xapi from 'xapi';
// variable that can be changed from settings ui on roomos.cisco.com
const NumberToBlock = '[email protected]';

const delayBlockSec = 0; // For webex edge, set this to 5

const denyList = [
NumberToBlock,

Expand All @@ -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);
}
});

0 comments on commit 44abece

Please sign in to comment.