Summary:ASTERISK-07652: [patch] Revision 41283 breaks _extension_match_core() on exact matches
Reporter:Paul Cadach (pcadach)Labels:
Date Opened:2006-08-31 23:31:17Date Closed:2006-09-01 11:09:09
Versions:Frequency of
Environment:Attachments:( 0) full-match.diff
Description:_extension_match_core() is used on digits collection to detect if
dialplan have exact match for collected digits string. If dialplan
doesn't use regular expression, then MATCHMORE test will fail on
exact match of extension and pattern (i.e. when extension and
both equal, for example, 600).


Could be easily check with standard [demo] context (for example, dial
600 and you will get into infinite loop waiting for additional digit
which will break matching to any extension).
Comments:By: Steve Murphy (murf) 2006-09-01 10:40:25

I did not see this behavior with the demo context from the sample extensions.conf file. But, if I add another extension, say 6000, to the demo context, then I get invalid selections immediately after entering '6'. So, I restricted the conditions under which the return 1 will be taken to when the input is a pattern, and E_MATCH only. This still works for the previous bugfix, and does not seem to break the extensions.conf demo testcase.

By: Steve Murphy (murf) 2006-09-01 10:53:34

I looked at your diff, and the return of 2 if in MATCHMORE would work, but... what about the other modes? I hope this is restrictive enough to give the intended result, and not mess up the other modes.

By: Steve Murphy (murf) 2006-09-01 11:01:35

I changed the test to restrict returning '1', purely to E_MATCH and the pattern beginning with '_', which hopefully will narrow the test enough to keep from having it mess up other modes and conditions. New rev=41674, formatting fix in 41692. And one more formatting update for PCadach, r41695.

By: Steve Murphy (murf) 2006-09-01 11:09:09

This hopefully will secure this issue, if not, reopen and more study will be done!