-
Notifications
You must be signed in to change notification settings - Fork 3
Asterisk Example
Lorenzo Mangani edited this page May 13, 2017
·
1 revision
Check if an IP/Destination are blocked using CURL
(none)
exten => _X.,1,Set(CURL_RESULT=${CURL(blacklist.xx.com:3001/api/get/${SIPCHANINFO(peerip)})})
same => n,Set(result=${JSONELEMENT(CURL_RESULT,blocked)})
same => n,GotoIf($["${result}" = "1"]?block:process)
same => n(block),Hangup
same => n(process),Answer
same => n,Hangup