[Home]

Summary:ASTERISK-05661: does not go to most specific pattern
Reporter:Schneur (rosenbergs)Labels:
Date Opened:2005-11-21 01:10:06.000-0600Date Closed:2011-06-07 14:10:36
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I want to restrict a certain prefix on a phone number so I did as follows

[england]
exten => _011443.,1,playback(enternum)
exten => _011444.,1,playback(enternum)
exten => _011445.,1,playback(enternum)
exten => _011447.,1,playback(enternum)
exten => _011448.,1,playback(enternum)
exten => _01144.,1,dial(SIP/00${EXTEN:3}@sipdiscount,60)

so if the prefix after 01144 is 3,4,5,7 or 8 it won't dial but when I ran asterisk it always dialed even when using those prefixes even though it had a more specific pattern
Comments:By: Olle Johansson (oej) 2005-11-21 03:45:44.000-0600

This is a support issue, not a bug report. Please read the available documentation on dial plans on voip-info.org to get a clarification on this.

/O

By: Schneur (rosenbergs) 2005-11-21 07:34:02.000-0600

I already dealt with this problem numerous times by using an include because asterisk dosent sort according to the order, but i recently read the oreily book on page 94 "One other thing to know about pattern matching is that id asterisk finds more than one pattern that matches the dialed extension, it will use the most specific one" therfore I think that it's a bug not a feature that it does not work with wildcards

By: Tilghman Lesher (tilghman) 2005-11-23 13:57:38.000-0600

You need to take that up with the book's authors.  There is nothing in Asterisk's pattern matching which makes the most specific pattern take precedence.

By: Tilghman Lesher (tilghman) 2005-11-23 13:58:43.000-0600

And if you change your last pattern to 01144X., and keep the ordering the same, you will get the behavior you want.