[VoIP] Blocking Individual Calls

Greg Blakely greg at vyger.net
Sun Mar 4 19:05:08 CST 2007


Shane's way is the easiest, not needing any gotoif statements.

Something like this should trap 7045791541.

exten => _136635XX/7045791541,1,Congestion
exten => _136635XX,1,Dial(ZAP/1/${EXTEN:6})
exten => _136635XX,n,Hangup

This sends anything to 1-366-35XX to your zaptel device, unless it comes
from 7045791541.  In that case, it goes to Congestion, i.e., all
circuits busy.

I use it at home for telemarketers...

exten => s/2182062192,1,Goto(spam-intercept,s,1)
exten => s/3202594099,1,Goto(spam-intercept,s,1)
exten => s/5102738910,1,Goto(spam-intercept,s,1)
exten => s/7012394294,1,Goto(spam-intercept,s,1)
exten => s/9529083215,1,Goto(spam-intercept,s,1)
exten => s/9529083216,1,Goto(spam-intercept,s,1)
exten => s/9529083218,1,Goto(spam-intercept,s,1)
exten => s/9529083219,1,Goto(spam-intercept,s,1)
exten => s/9529083220,1,Goto(spam-intercept,s,1)
exten => s/9529083221,1,Goto(spam-intercept,s,1)
exten => s/9529450192,1,Goto(spam-intercept,s,1)
;
exten => s,1,NoOp(Entering dr1 context)
exten => s,2,Answer()
And so forth.

It blocks calls from those 11 numbers, sending them to a
'spam-intercept' context, which tells the caller that the number they
have reached has been disconnected.  (I lie to telemarketers).


> -----Original Message-----
> From: voip-bounces at ckts.info [mailto:voip-bounces at ckts.info] 
> On Behalf Of Shane Young
> Sent: Sunday, March 04, 2007 3:20 PM
> To: voip at ckts.info
> Subject: Re: [VoIP] Blocking Individual Calls
> 
> I use a database myself, but the logic is sort of built-in 
> for checking callerid.  It's commonly used in the 
> "ex-girlfriend" examples.
> 
> http://www.voip-info.org/wiki/view/Asterisk+config+extensions.conf
> 
> This will match extension 123 and perform the following 
> options ONLY if the Caller-ID Number of the calling user is 
> 100. This can also be accomplished with pattern matching, as 
> seen below:
> 
>     exten => 1234/_256NXXXXXX,1,Answer()
>     and so on...
> 
> This will only match for 1234 if the Caller ID Number is 
> something beginning with 256. This is very useful to keep 
> locals from dialing your toll-free number and charging you 
> for the call.
> 



More information about the VoIP mailing list