[asterisk-dev] Re: [svn-commits] murf: trunk r41283 - /trunk/main/pbx.c

Jared Smith jaredsmith at jaredsmith.net
Wed Aug 30 06:38:05 MST 2006


On 8/29/06, svn-commits at lists.digium.com <svn-commits at lists.digium.com>
wrote:
>
> URL: http://svn.digium.com/view/asterisk?rev=41283&view=rev
> Log:
> This change fixes bug 7820. Way back in April this bug was reintroduced,
> it appears, when a bunch of restructuring was done. This code was basically
> left out during the restructuring. In the case of the failure in 7820, it is
> trying to match the extension _x. with _x., and failing, because the 'x'
> should only match 0 thru 9. I **could** upgrade the code so that that N,Z,
> and X match not only their intended number ranges, but also N,Z,and X
> respectively. And, moreover, X could also match N and Z, and Z could also
> match N. I have no idea why this bug took so long to turn up. I have no idea
> what a more thorough treatment of the code would do to working code, either.
> So I left it as it ***was***.
>
>
Or, make it so that we could somehow escape the characters, so that the
parser would know that we're really trying to match on the letter.  I'm not
sure the best way to do this -- using the backslash as an escape character
might look a little funny, like this:

exten => _\Noob.,1,Verbose(3, Yup, you're a noob!)

I'm just throwing out ideas here, there's probably a much more elegant
solution that I just haven't seen.  It would be nice to be able to do more
advanced matching.  (I know what you're thinking -- I'd like to be able to
use regex matches too -- but that's probably overkill at this stage.)

-Jared
-Jared
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20060830/a44be1db/attachment.htm


More information about the asterisk-dev mailing list