Need some help blocking certain numbers

Hi, there I have our Asterisk server setup to Dial out to our VoIP provider over SIP, it is working fine I just need to know how I can block certain numbers (for example Mobile Phone numbers)…I have looked all over the net for help on this and I cant find anything related to it.

The closest I got was a suggestion to enter the following in my extensions.conf:-

exten => _08[3567]X.,1,Goto(DeniedExtensionBlock,${EXTEN},1)

This Im told will block for example numbers beginning 083/5/6/7 (these are the mobile phone prefixes in Ireland). I tried this and it didnt work, does it matter where in the extensions.conf I put it ? It seems the information to dial our provider is in the extensions_additional.conf so I tried putting this info in our providers section in there also, but that seemed to block all calls.

Im sure there is a simple way of doing this, Im running the latest TrixBox and at the moment my Dial Pattern is setup in there as X. which seems to let me dial all numbers. I can post my extensions.conf etc if needed and any help much appreciated.



ahh, trixbox complicates things. You would get a better result on their forums.

what i can tell you is yes it matters very much where you put it. extensions.conf is divided up into [context]s. Each context is a set of things a user can dial, and one context can include another context.

If you don’t put that line in the right context, asterisk won’t even consider it when dialing out.

Since you have trixbox, i think this can be better done thru its gui, but i’m not exactly sure how. Try their forums…