[Asterisk-Users] Block anonymous calls

Walt Reed asterisk at linuxguy.com
Sun Mar 6 07:06:37 MST 2005


On Sat, Mar 05, 2005 at 03:57:07PM -0600, Blake Van Eekeren said:
> Fredrik wrote:
> 
> > I see from my CDR's that some of my callers also have "unknown" in
> > their FROM field. I would like to let them through. Only block the
> > FROM "anonymous" that the telemarketers use.
> 
> Fredrik, I found something on the Wiki a while back... Try this...
> 
> exten => s,1,Answer
> exten => s,2,NoOp(${CALLERID})
> exten => s,3,ResponseTimeout(10)
> exten => s,4,GotoIf($["${CALLERIDNUM}" = ""]?|1000)
> exten => s,5,GotoIf($["${CALLERIDNUM:0:3}" = "877"]?s|1000)
> exten => s,6,GotoIf($["${CALLERIDNUM:0:3}" = "866"]?s|1000)
> exten => s,7,GotoIf($["${CALLERIDNUM:0:3}" = "800"]?s|1000)
> exten => s,8,Macro(stdexten,${SIP0})
> exten => s,9,Hangup
> exten => s,1000,Background(SPAMSTOPPER)
> exten => s,1001,Hangup

Yeah, I put something like that on the wiki.

It works fairly well, but does not differentiate between anonymous and
unknown. This issue has come up several times on this mailing list and I
have yet to see a real solution.

I found that most telemarketers use "unknown" and not "anonymous"
actaully. 

I require all calls without callerID to "press 5" to get through. There
is also a privacy manager app that requests callers to enter their
number, but I feel that it's too annoying to friends / relatives.

I would rather have a special message for anonymous that is different. I
don't want those calls at all.



More information about the asterisk-users mailing list