If the order is giving you problems, create two separate outbound routes, one for local calls and one for long distance. Make sure the local route is before the LD route, and it should work for you. Both outbound routes can use the same trunk without issue.
<br><br>Alex<br><br><div><span class="gmail_quote">On 10/17/06, <b class="gmail_sendername">Chris Ramsey</b> &lt;<a href="mailto:asteriskblog@gmail.com">asteriskblog@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This was posted at <a href="http://asteriskblog.com/forum/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">The Asterisk Blog Forums</a><br><br><a href="http://asteriskblog.com/forum/viewtopic.php?t=20" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Click here for the original post.</a><br><br><span>
I need someone to explain how the dialplan rules
work? I'm having a hard time getting it. I know that to dial out you
need a 9 and to ignore that 9 once your out... requires a switch of
sorts that tells asterisk to ignore the first digit on the left. <br>

<br>
In freePBX it's this: 
<br>
9|NXXXXXX 
<br>

<br>
For Long distance it is 
<br>
9|1NXXNXXXXXX 
<br>

<br>
Here is my problem using Free PBX: 
<br>

<br>
I want to be able to dial long distance and local at will while using
free PBX to set it up. Right now we have 1 line for testing purposes
and soon to be expanded into 2. <br>

<br>
When the rules are arranged like this in FreePBX 
<br>
9|1NXXNXXXXXX 
<br>
9|NXXXXXX 
<br>

<br>
the long distance portion works but the local one does not. 
<br>

<br>
When its arranged like this 
<br>

<br>
9|NXXXXXX 
<br>
9|1NXXNXXXXXX 
<br>

<br>
They both work!
<br>

<br>
But the above is only done when it's hard coded into the configuration
file (additional_extensions.conf) and free PBX always puts it in this
order... wether I like it or not. <br>

<br>
9|1NXXNXXXXXX 
<br>
9|NXXXXXX 
<br>

<br>
And causes problems in the configuration file when and I change the settings. This isn't going to help me much! 
<br>

<br>
Im just a tad bit confused. 
<br>

<br>
A Little help here?</span><br clear="all"><span class="sg"><br>-- <br><a href="http://www.AsteriskBlog.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.AsteriskBlog.com</a><br>Your home for easy to learn Asterisk stuff.

</span><br>_______________________________________________<br>--Bandwidth and Colocation provided by <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://Easynews.com" target="_blank">Easynews.com</a> --
<br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> &nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">
http://lists.digium.com/mailman/listinfo/asterisk-users</a><br><br><br></blockquote></div><br><br clear="all"><br>-- <br>Alex Robar<br><a href="mailto:alex.robar@gmail.com">alex.robar@gmail.com</a>