[asterisk-users] Blacklisting Toll-Free etc.
voiplist
gotvoip at gmail.com
Sat Aug 18 16:06:12 CDT 2007
On 8/18/07, Trevor Peirce <tpeirce at digitalcon.ca> wrote:
> 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!
>
>
> _______________________________________________
> --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
>
Why I didn't think of this, I don't know :)
I will not do it quite like you suggested but you gave me an idea
which will work.
Gotta test a little now.. Thanks again.
Regards,
Todd R.
--
Prestige Messaging
Live Answering Services
SIP or Toll-Free Connectivity
Light Accounts From $14.95/mo
http://www.PrestigeMessaging.com
More information about the asterisk-users
mailing list