[asterisk-bugs] [Asterisk 0015421]: Serious problem in pattern matching
Asterisk Bug Tracker
noreply at bugs.digium.com
Tue Sep 8 13:28:37 CDT 2009
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=15421
======================================================================
Reported By: jsmith
Assigned To: tilghman
======================================================================
Project: Asterisk
Issue ID: 15421
Category: PBX/pbx_config
Reproducibility: always
Severity: major
Priority: normal
Status: assigned
Asterisk Version: 1.4.25
Regression: Yes
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-06-29 14:45 CDT
Last Modified: 2009-09-08 13:28 CDT
======================================================================
Summary: Serious problem in pattern matching
Description:
There appears to be a serious problem in the pattern matching in
Asterisk... for some reason, it thinks the following two extensions are
equivalent, when they're not.
exten => _N[2-4]X,1,NoOp(foo)
exten => _N[246]X,1,NoOp(bar)
======================================================================
----------------------------------------------------------------------
(0110356) jsmith (administrator) - 2009-09-08 13:28
https://issues.asterisk.org/view.php?id=15421#c110356
----------------------------------------------------------------------
Tilghman,
By "equivalent" I mean that Asterisk wrongly ignores the second extension
(in the example I gave above), throwing it out as it thinks it's already
got that extension with priority 1.
Let me clarify:
Step 1) Add the following three lines to your dialplan:
[pattern-testing]
exten => _N[2-4]X,1,NoOp(foo)
exten => _N[246]X,1,NoOp(bar)
Step 2) Type "core set verbose 2" at the CLI. Notice how this warning
appears on your CLI:
[Sep 8 14:22:39] WARNING[26882]: pbx.c:7447 add_pri_lockopt: Unable to
register extension '_N[246]X', priority 1 in 'pattern-testing', already in
use
Step 3) Type "dialplan show 567 at pattern-testing" at the CLI, and notice
that there's nothing in the dialplan that matches that number, as Asterisk
rejected the pattern match (the "bar" extension) as a duplicate of the
earlier extension (the "foo" extension), when they aren't the same.
In short, it seems that Asterisk isn't smart enough to know that the digit
range [2-4] is not the same as [246].
Does that clarify what I mean by "equivalent"?
Issue History
Date Modified Username Field Change
======================================================================
2009-09-08 13:28 jsmith Note Added: 0110356
======================================================================
More information about the asterisk-bugs
mailing list