Summary:ASTERISK-11438: Introducing en extension pattern matching variables similar to X or Z, but also recognizes the * and/or #
Reporter:Murdock Elliot (buckersher)Labels:
Date Opened:2008-02-14 08:30:57.000-0600Date Closed:2011-06-07 14:10:18
Versions:Frequency of
Description:Asterisk has pattern matching mainly only for numerical digits, such as the X or Z patterns.  It would be useful if a pattern character can be introduced that will also recognize the * or #, such as when a context needs to redirect all the calls to another context.  Although the wildcard period pattern can be used in that case, it is not advisable to start a pattern matching sequence with a period.  Likewise, there are other useful implementations for having this kind of pattern matching as well.
Comments:By: Murdock Elliot (buckersher) 2008-02-14 08:43:06.000-0600

The "en" in the summary line is a mistake, so don't try figuring out if it is referring to some sort of expression or whatnot.

By: Jason Parker (jparker) 2008-02-14 09:52:18.000-0600

Is there a patch coming?  In order for it to be included, it will have to be against svn trunk, rather than the 1.4 branch.

By: Jared Smith (jsmith) 2008-02-14 10:01:07.000-0600

Also, it might be wise to note that you can already do something like this:

exten => _[2-9*#]XX,1,Verbose(1,I matched a three digit number that started with N or * or #)

without having to add new pattern matching syntax.

By: Russell Bryant (russell) 2008-02-15 17:21:06.000-0600

I'm closing this out since there is no patch and we don't accept feature requests without patches on the bug tracker.  However, like jsmith said, you can already handle a pattern like this ...