[Home]

Summary:ASTERISK-19371: Incorrect matching with new pattern match engine enabled
Reporter:Kinsey Moore (kmoore)Labels:
Date Opened:2012-02-15 15:20:31.000-0600Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:PBX/pbx_config
Versions:10.1.2 11.23.1 13.11.2 14.0.0-beta2 Frequency of
Occurrence
Constant
Related
Issues:
is duplicated byASTERISK-29510 New pattern matcher matches invalid patterns
Environment:Attachments:
Description:When executing dialplan with {{extenpatternmatchnew=yes}} set, some patterns do not match the same as they did with the old dialplan engine.  The example that I came across:
{noformat}
exten => 7,1,goto(100,1)
exten => 100,1,noop(Dialplan chose correctly)
exten => _1X[0-5],1,noop(Dialplan chose WRONG)
{noformat}

Under the old dialplan engine, the 100 extension would be chosen (correctly since it is more specific).  Under the new engine, {{_1X\[0-5]}} is chosen instead.  This is not a major issue since the new engine is disabled by default.
Comments:By: Walter Doekes (wdoekes) 2016-09-12 07:34:48.486-0500

Yeap. Ran into this just now.

In my case I had:
{noformat}
exten => +31NUMBER1,1,Goto(specific-action1)
exten => +31NUMBER2,1,Goto(specific-action2)
exten => _+Z!,1,Goto(fallback-action)
{noformat}
Here I always get the fallback action, quite useless. (Prepending a {{_}} to the two specific patterns makes it work obviously.)

It appears that the extenpatternmatchnew is not used that much or we'd see this bug being referenced more often.

By: Matt Jordan (mjordan) 2016-09-12 15:57:51.701-0500

[~wdoekes]: I know I've debated a few times with myself the value of the "new" pattern matching engine. Was there a particular reason why you were trying to use it?

By: Walter Doekes (wdoekes) 2016-09-13 01:25:42.477-0500

{quote}
Was there a particular reason why you were trying to use \[the "new" pattern matching engine\]?
{quote}
No, there was not. I must've toggled it years ago for fun; new is better right?

When I configured that machine, I didn't correlate the \+31NUMBER bug with the new pattern matching engine. I thought it was some kind of bug related to the {{+}} sign at the time. Now, my asterisklint told me remove the {{_}}'s, at which point the bug reappeared and I decided to figure out what was wrong.

Long story short: I don't mind if the new engine is dropped. I don't use it on purpose.