Outbound route dial pattern question

pcorrigan's picture

Here in Oregon we use 10-digit dialing for local calls. If the call is long distance, even within the area code, we must prepend a "1".

I want to set up a dial plan that will dial local exchanges without the 1 and long distance with it. Logically my dial pattern, assuming one route, would look something like this:

0
411
911
503606XXXX
503623XXXX
503751XXXX
503831XXXX
503838XXXX
503420XXXX

For all other outbound calls I would like to prepend a "1", since all other calls are long distance.

For manual dialing this isn't an issue, but I want users to be able to dial from a phone book.

I have a single ZAP trunk.

Is there a way to do this?

Thanks.


__________________


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

first off I highly suggest

p_lindheimer's picture

first off I highly suggest making a separate route for 911 and put it first, nothing else in it except the acceptable patterns for dialing 911. This is good practice for several reasons.

Next, you do this in your trunk. Do the following in the trunk dialpattern configuration:

503606XXXX
503623XXXX
503751XXXX
503831XXXX
503838XXXX
503420XXXX
1+NXXNXXXXXX

and it is important that it is in that order. The patterns in the trunk configuration are scanned in order. As soon as a matching pattern is found it is executed on and then the rest are ignored.

By doing the above, it will allow all of the listed 503 numbers to pass unchanged since the rule doesn't actually do anything to the number. All other numbers will hit the last rule and assuming they are a 10 digit number, they will have a 1 pre-pended to them.


__________________

Philippe Lindheimer - FreePBX Project Leader
FreePBX Training Opportunities - Click Here
Get Official Paid Support - Click Here


Thank you!

pcorrigan's picture

That was exactly what I needed!


One more question

pcorrigan's picture

One more question: The pattern 1+NXXNXXXXXX
will prepend a "1", which will accommodate the address book. Is there a way to also accommodate the user who dials 1-xxx-xxx-xxxx?

Thanks.


it will address any number

p_lindheimer's picture

it will address any number that the trunk sees dialed as 1NXXNXXXXXX regardless of how that number gets sent to it.


__________________

Philippe Lindheimer - FreePBX Project Leader
FreePBX Training Opportunities - Click Here
Get Official Paid Support - Click Here