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
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
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. >Yup, try something like this - [macro-blocktollfree] exten => s,1,GotoIf($["${MACRO_EXTEN:3}" = "800"]?goaway) exten => s,n,GotoIf($["${MACRO_EXTEN:3}" = "888"]?goaway) (etc...) exten => s,n,MacroExit exten => s,n(goaway),Playback(goaway) Then, if this will always be your first priority, you can include it globally with something like exten => _NXXNXXXXXX,1,Macro(blocktollfree) Just make sure all other exten => lines start at priority 2 so you don't have a conflict. HTH, Trevor -- Does your Canadian VoIP service need CRTC-compliant 9-1-1 services? Please visit http://www.digitalcon.ca/voip9-1-1/ to find out more!
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) > >How about you start with lines: exten => _NXXNXXXXXX/_888NXXXXXX,1,Playback(GoAway) exten => _NXXNXXXXXX,1,NoOP(Not a Toll Free) ..and then all your DIDs start at priority 2 exten => 5554441212,2,Dial(SIP...bla bla bla) That should do the trick. Andres http://www.telesip.net>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 > > > >