-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Block outgoing calls: add support for timeout for webex edge
- Loading branch information
Showing
1 changed file
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, | ||
|
||
|
@@ -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); | ||
} | ||
}); |