<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="http://www.w3.org/TR/REC-html40">
<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="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        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-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Gabriel Ortiz Lour<br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, February 15, 2011
2:47 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">Asterisk
Users Mailing List - Non-Commercial Discussion</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> [asterisk-users] Dialplan
end of pattern matching question</span></font><o:p></o:p></p>
</div>
<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 style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Hi,<br>
<br>
I've noticed an unusual behavior on the dialplan execution: assume this
DP:<br>
<br>
exten => _6XXX,1,NoOp(test1)<br>
<br>
exten => _XXXX,1,NoOp(test2)<br>
exten => _XXXX,2,NoOp(test3)<br>
<br>
If I call 6000 then test1 and test3 NoOps get executed, even though the pattern
is different.<br>
<br>
I've always thought that if I call 6000 it would match the 6XXX pattern, that
only has 1 priority, that would get executed and will be the end.<br>
But it seams that it finds the 2nd priority on the other pattern, and since it
matches the dialed number it carry on with the execution.<br>
<br>
Is there a way to make asterisk behave like I've thought it would? Not keep
executing the DP when the first pattern matched ends?<br>
(I dont want to use Hangup(), since it would suppress BUSY,CONGESTION and other
status...)<br>
<br>
Thanks in advance,<br>
Gabriel<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>As I
recall, the _XXXX pattern evaluates and runs before _6XXX because X =
[0-9]. Auto fall-through is the “culprit” in your example
dialplan. If you want asterisk to “do one thing and stop”
when you dial a number, you either have to hangup after the 1 command or set autofallthrough=no
(default is yes if not there).<o:p></o:p></span></font></p>
</div>
</body>
</html>