[Home]

Summary:ASTERISK-23927: pbx_config do incorrect matching if - happens
Reporter:Alexander Merkulov (arheops)Labels:
Date Opened:2014-06-25 06:57:03Date Closed:2014-06-25 11:12:45
Priority:CriticalRegression?
Status:Closed/CompleteComponents:PBX/pbx_config
Versions:1.8.28.2 11.10.2 Frequency of
Occurrence
Related
Issues:
Environment:linuxAttachments:
Description:If dialplan have context like this:

[testr]
exten =>_RG-6007-X.,1, NoCDR(6007)
exten =>_RG-600-X.,1, NoCDR(600)

Result of dialplan matching will be

dialplan show RG-600-7987111111501#@testr
[ Context 'testr' created by 'pbx_config' ]
 '_RG-6007-X.' =>  1. NoCDR(6007)                                [pbx_config]
 '_RG-600-X.' =>   1. NoCDR(600)                                 [pbx_config]

Resulting match of incorrect dialplan row.

Issue is critical becuase such dialplan used by freepbx 2.6+ versions for ringgroups.
Comments:By: Richard Mudgett (rmudgett) 2014-06-25 11:06:20.965-0500

This does not appear to be a bug.  The CLI "dialplan show [[exten]@context]" command shows *all* extensions that could match the given value.

Both patterns match the test extension "RG-600-7987111111501#@testr" you have given.  The _RG-6007-X. pattern is the better match because the 7 in the pattern is more specific than the X in the other pattern.  The _RG-6007-X. extension pattern will be selected when the dialplan is executed.

Please see
https://wiki.asterisk.org/wiki/display/AST/Pattern+Matching
{quote}
The dash (-) character is ignored in extensions and patterns except when it is used in a pattern to specify a range in a character set. It has no effect in matching or sorting extensions.
{quote}


By: Alexander Merkulov (arheops) 2014-06-25 11:27:01.289-0500

okay.so  you are saiing we have issue with freepbx AND extensions.conf.sample files?

since it not described anywhere except that single wiki page that dash have not work, it used in freepbx in ALL ringgroup, it used in sample dialplan  on extensions.conf.sample.

for exmaple in this fragment

exten => s-NOANSWER,1,Hangup
exten => s-BUSY,1,Hangup
exten => _s-.,1,NoOp