[asterisk-users] Matching *, + and # in the dialplan
Benny Amorsen
benny+usenet at amorsen.dk
Tue Oct 14 04:30:48 CDT 2008
Steve Murphy <murf at digium.com> writes:
> Other than the above, we could invent a slightly different syntax for
> pcre type expressions; and you'd have to invent some sort of
> disambiguation
> for when multiple extensions might be matched, to choose the 'best' one.
I'd just use strict ordering from the file. It would make my life a
lot easier if Asterisk could do that. I'm constantly adding dummy
contexts that I can include so that Asterisk gets the order right.
> You'd have to forever stick with the 'check against every extension
> in the context for the best one' sort of algorithm, which is OK when
> the extension list is fairly short, but if you end up with more than
> 100 or so extensions in a context, you'd best go with the fast
> pattern matcher if you have to/want to deal with heavy call loads.
You can turn the RE's into a finite state machine. Implementing it
would be a lot of fun actually, I wish I had the time.
/Benny
More information about the asterisk-users
mailing list