<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=781092519-07012008>Greetings all,</SPAN></DIV>
<DIV><SPAN class=781092519-07012008></SPAN> </DIV>
<DIV><SPAN class=781092519-07012008>I'm not real good with dial plan programming
and need some help. I've looked at the 2nd edition of the Asterisk book about
GotoIf() and have a basic idea what I need to do but not sure
about the correct way or the best way, to set it up. I need to
branch based on whether the dialed number is long distance (international or
not) or not. I have branch offices on SIP and IAX trunks that have 4 digit
extensions and one office has a 1000 range for their extensions so I have to
make sure I don't pick that up as dialing long distance. I think what I
have below will work but it can probably be cleaned up.... alot. Any help
is greatly appreciated.</SPAN></DIV>
<DIV><SPAN class=781092519-07012008></SPAN> </DIV>
<DIV><SPAN class=781092519-07012008></SPAN><SPAN
class=781092519-07012008></SPAN> </DIV>
<DIV><SPAN class=781092519-07012008>exten => s,n,GotoIf($[${DIAL_NUMBER} =
011XXXX. ] ? yescode : steptwo)</SPAN></DIV>
<DIV><SPAN class=781092519-07012008></SPAN> </DIV>
<DIV><SPAN class=781092519-07012008>exten =>
s,n,(steptwo),GotoIf($[${DIAL_NUMBER} = 9XXXXXX. ] ? yescode :
stepthree)</SPAN></DIV>
<DIV><SPAN class=781092519-07012008></SPAN> </DIV>
<DIV><SPAN class=781092519-07012008>exten =>
s,n,(stepthree),GotoIf($[${DIAL_NUMBER} = 1NXXNX. ] ? yescode :
nocode)</SPAN></DIV>
<DIV><FONT size=1>
<P><FONT size=3>exten => s,n,<SPAN
class=781092519-07012008>(yescode),</SPAN>Playback(please-enter-the&accounting)</FONT></P>
<P><FONT size=3>exten => s,n,Read(account|number|8)</FONT></P>
<P><FONT size=3>exten => s,n,SetAccount(${account})</FONT></P>
<P><SPAN class=781092519-07012008><FONT size=3>exten => s,n,(nocode),Blah,
Blah....</FONT></SPAN></P></FONT></DIV>
<DIV> </DIV>
<DIV><SPAN class=781092519-07012008>Thanks,</SPAN></DIV>
<DIV><SPAN class=781092519-07012008></SPAN> </DIV>
<DIV><SPAN class=781092519-07012008>Glenn</SPAN></DIV></BODY></HTML>