[asterisk-users] Dialplan end of pattern matching question

Danny Nicholas danny at debsinc.com
Tue Feb 15 15:01:43 CST 2011


From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Gabriel Ortiz
Lour
Sent: Tuesday, February 15, 2011 2:47 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Dialplan end of pattern matching question

 

Hi,

  I've noticed an unusual behavior on the dialplan execution: assume this
DP:

exten => _6XXX,1,NoOp(test1)

exten => _XXXX,1,NoOp(test2)
exten => _XXXX,2,NoOp(test3)

If I call 6000 then test1 and test3 NoOps get executed, even though the
pattern is different.

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.
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.

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?
(I dont want to use Hangup(), since it would suppress BUSY,CONGESTION and
other status...)

Thanks in advance,
Gabriel

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).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110215/795cfee8/attachment.htm>


More information about the asterisk-users mailing list