[asterisk-users] Blacklisting Toll-Free etc.

Arnaud Ligot arnaud at cblue.be
Sat Aug 18 15:01:50 CDT 2007


Hello,

You can generate a file using bash for example which will be included
inside extension.conf.

for example, in bash:

for i1 in `seq -f %02g 0 99`
 do for i2 in `seq -g %06g 0 999999`
	echo 'exten => _N$i1N'$i2'/_888NXXXXXX,n,Playback(GoAway)'
done; done > extension-include.conf
...

you will probably want to reduce the range of number if you don't want a
really really really long file...

an other way would be to execute a macro/agi for each call which will
make your checks.

best regars,

Arnaud.


On Sat, 2007-08-18 at 14:06 -0500, voiplist wrote:
> I have always been able to block toll-free numbers by catching them
> with a line similar to this for each DID I have on my system:
> 
> exten => 5554441212/_888NXXXXXX,n,Playback(GoAway)
> 
> Where 15554441212 is one of the DIDs that rings into our Asterisk box.
> 
> The problem with this approach that I have to create a line like this
> for every pattern I want to block multiplied by every DID on my
> system, this gets old.
> 
> So for example, if I have 20 DIDs that ring into my box, and I want to
> block 10 caller-id's or caller-id patterns I need like 200 lines in my
> extensions.conf.
> 
> What I want to do is something like this:
> 
> exten => _NXXNXXXXXX/_888NXXXXXX,n,Playback(GoAway)
> 
> This never seems to work, why? Is there another way to block all calls
> from a particular caller-id or caller-id pattern without specifying
> the exact DID/Extension?
> 
> Regards,
>  Todd R.
> 
> --
> Prestige Messaging
> Live Answering Services
> SIP or Toll-Free Connectivity
> Light Accounts From $14.95/mo
> http://www.PrestigeMessaging.com
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list