I’m getting bombarded with telemarketer calls at home these days and I want to block them all.
I did some searching around here, but couldn’t find the info I needed to make this work. I’m also an asterisk newb with minimal knowledge of the scripting involved.
My setup right now is very simple…
My DID is forwarded to the DEFAULT context and it looks like this:
Rob,
If you are in the US you can just sign up for the Do Not Call List. donotcall.gov/
You can also try this (I wrote this for some one that is in the US)
exten => xxxxxxxxxx,1,GotoIf($["${CALLERID(num):0:3}" = “800”]?20:2)
exten => xxxxxxxxxx,2,GotoIf($["${CALLERID(num):0:3}" = “888”]?20:3)
exten => xxxxxxxxxx,3,GotoIf($["${CALLERID(num):0:3}" = “877”]?20:4)
exten => xxxxxxxxxx,4,GotoIf($["${CALLERID(num):0:3}" = “866”]?20:5)
exten => xxxxxxxxxx,5,GotoIf($["${CALLERID(num):0:4}" = “1800”]?20:6)
exten => xxxxxxxxxx,6,GotoIf($["${CALLERID(num):0:4}" = “1888”]?20:7)
exten => xxxxxxxxxx,7,GotoIf($["${CALLERID(num):0:4}" = “1877”]?20:8)
exten => xxxxxxxxxx,8,GotoIf($["${CALLERID(num):0:4}" = “1866”]?20:9)
exten => xxxxxxxxxx,9,SetAccount(xxxxxxxxxx)
exten => xxxxxxxxxx,11,Dial(SIP/Rob_Home,22,r)
exten => xxxxxxxxxx,12,Voicemail(uxxxxxxxxxx@home)
exten => xxxxxxxxxx,14,Hangup
exten => xxxxxxxxxx,20,Congestion
Exten => XXXXXXXXXX,21,Hangup
Every line checks the CID to see if it starts with a Toll Free prefix. If it does then send it to priority 20 which plays a busy signal. If not keep going through all the lines until it makes it to your phone. I have removed the ringing line since the r in your dial command will do that. I have also removed the answer Command since asterisk will send answer supervision once you pick up the phone.
EDIT: The board seems to replace 8 ) with a smiley face. Argh !!!
Hi
to do this plz set at your incoming call context where ur call land fisrt
exten => XXXXXXXXXX/800xxxxxxx,1,Congestion
or
exten => XXXXXXXXXX/800xxxxxxx,1,plzayback(plz do not call)
exten => XXXXXXXXXX,1,Answer()
then your further call processing
here second line to recive ur other call other than 800 or 866 number