Sunday, 29 December 2024

BLOCKING ANONYMOUS,PRIVATE,RESTRICTED,PSTN CALLS IN VICIDIAL

 Blocking Anonymous calls in vicidial


exten => _X.,1,Set(CALLERID(num)=${
CALLERID(num)})
exten => _X.,2,NoOp(${CALLERID(num)})
exten => _X.,3,GotoIf($["${CALLERID(
num)}" = "1000000000"]?who-r-u,s,1)
exten => _X.,4,GotoIf($["${CALLERID(
num)}" = ""]?who-r-u,s,1)
exten => _X.,5,GotoIf($["foo${CALLERID(
num)}" = "foo"]?who-r-u,s,1)
exten => _X.,6,GotoIf($["${CALLERID(
name):0:9}" = "Anonymous"]?who-r-u,s,1)
exten => _X.,7,GotoIf($["${CALLERID(
name):0:7}" = "Unknown"]?who-r-u,s,1)
exten => _X.,8,GotoIf($["${CALLERID(
num):0:7}" = "Private"]?who-r-u,s,1)
exten => _X.,9,GotoIf($["${CALLERID(
name):0:7}" = "Private"]?who-r-u,s,1)
exten => _X.,10,GotoIf($["${CALLERID(
num):0:10}" = "Restricted"]?who-r-u,s,1)
exten => _X.,11,GotoIf($["${CALLERID(
num):0:4}" = "PSTN"]?who-r-u,s,1)
exten => _X.,12,AGI(agi-DID_route.agi) 

[who-r-u]
exten => s,1,Background(privacy-
unident)
exten => s,2,Background(vm-rec-name)
exten => s,3,Wait(2)
exten => s,4,Record(/tmp/asterisk-
stranger:gsm,5,15)
exten => s,5,Playback(goodbye)
exten => s,6,Hangup
======================

No comments: