Dialing Prefix

Asterisk: 1.4.22

Issue: Users work in a 305 area code. When they dial any area code other than 305 they want the system to automatically put in a “1”. I see the following under “trunks”:


Under dial rules wizard nothing is picked. Which option should I choose? I thought it was this one:
remove prefix from local numbers

But when i chose that one it came up with a script that I didn’t understand. It reads:
What prefix should be removed from the number? I put in a “1”.

Then it reads:
what is the dialing pattern for local numbers after 1?
It has this in the box: NXXXXXX

What should I put in to get the desired result of not having to dial 1 for LD?

First read this…


This is without actually testing it but I think it should work… remove the existing trunk dial rules (all of them) and use this:


As the document points out, normally a trunk dial rule is useless if it does not modify the number in some way - EXCEPT when you are using it as a “stopper” to prevent subsequent rules from being applied. So the above two rules should do what you want. The first matches area code 305 calls and does nothing, but stops further rules processing for those calls. NON-305 calls fall through to the next rule, which prepends the “1” as you require.

Oh, and the X. really IS useless - trunk rules do not permit or deny calls, they simply change the numbers sent to that trunk, and X. isn’t changing anything.

Thanks man! You’re a lifesaver!!!