<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns:st2="schemas-snapanumber-com/snap" xmlns="http://www.w3.org/TR/REC-html40"
xmlns:ns0="urn:schemas-microsoft-com:office:smarttags">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="country-region"/>
<o:SmartTagType namespaceuri="schemas-snapanumber-com/snap" name="dial"
downloadurl="http://www.snapanumber.com"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }st2\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi All,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>On a 1.4.15 system, I’ve a context as below, where I
need to catch some specific <st1:country-region w:st="on"><st1:place w:st="on">US</st1:place></st1:country-region>
ranges and dial direct via SIP rather than a PSTN trunk. But the logic
always goes via the International Trunk and I cant see why…<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>[local]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>exten => _<st2:dial w:st="on">0016501109</st2:dial>1[45]0-9],1,NoOp(I
AM HERE)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>exten => _<st2:dial w:st="on">0016501109</st2:dial>1[45]0-9],n,Macro(setcli)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>exten => _<st2:dial w:st="on">0016501109</st2:dial>1[45]0-9],n,Dial(SIP/${EXTEN:2}@someserver.com)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>exten => _<st2:dial w:st="on">0016501109</st2:dial>1[45]0-9],n,Hangup<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>….. (same context)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>Catch local (<st1:country-region w:st="on"><st1:place
w:st="on">UK</st1:place></st1:country-region>) numbers<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>exten => _0[1-9]X.,1,NoOp(Dialling <st1:country-region
w:st="on"><st1:place w:st="on">UK</st1:place></st1:country-region> number)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>exten => _0[1-9]X.,n,Macro(setcli)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>exten =>
_0[1-9]X.,n(jumpdial),Dial(SIP/+44${EXTEN:1}@brokerout)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>exten =>
_0[1-9]X.,jumpdial+101,Dial(${TRUNK}/${EXTEN},,Wr)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>exten => _0[1-9]X.,n+101,Busy<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>;Catch any (00xx) numbers<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>exten => _00X.,1,NoOp(Dialling International number)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>exten => _00X.,n,Macro(setcli)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>exten =>
_00X.,n(jumpdial),Dial(SIP/+${EXTEN:2}@brokerout)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>exten => _00X.,jumpdial+101,Dial(${TRUNK}/${EXTEN},,Wr)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>exten => _00X.,n+101,Busy<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I’ve tried putting the Catch codes above into a sub-context,
and then put an include into the [local], but it still dials via the Catch
international…<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>The odd thing is that in either, the show dialplan seems to
suggest the correct order :<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'> '_00165011091[45]0-9]' => 1. NoOp(I AM
HERE)
[pbx_config]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>
2.
Macro(setcli)
[pbx_config]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>
3. Dial(SIP/${EXTEN:2}@someserver.com)
[pbx_config]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>
4.
Hangup()
[pbx_config]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>…. (some others)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'> '_00X.'
=> 1. NoOp(Dialling International
number) [pbx_config]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>
2.
Macro(setcli)
[pbx_config]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>
[jumpdial] 3.
Dial(SIP/+${EXTEN:2}@brokerout)
[pbx_config]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>
104.
Dial(${TRUNK}/${EXTEN}||Wr)
[pbx_config]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Courier><span style='font-size:10.0pt;
font-family:Courier'>
206.
Busy()
[pbx_config]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>The page at voip-info isn’t too clear in the
differences between 1.2 and 1.4 (<a
href="http://www.voip-info.org/wiki/view/Asterisk+config+extensions.conf+sorting">http://www.voip-info.org/wiki/view/Asterisk+config+extensions.conf+sorting</a>)
so I’m not sure where I’ve gone wrong.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><st1:PersonName w:st="on"><span class=style131><font size=2
color="#003366" face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:#003366'>Adrian Marsh</span></font></span></st1:PersonName><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>