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

Steven Critchfield critch at basesys.com
Wed Aug 30 08:31:26 MST 2006


On Wed, 2006-08-30 at 10:10 -0500, John Lange wrote:
> On Wed, 2006-08-30 at 09:38 -0400, Jared Smith wrote:
> >   (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.) 
> 
> Its inevitable that Asterisk will need regex matching at some point. The
> current matching system is heavily tilted toward numeric usernames and
> extensions but more and more we will begin to see email style address.
> 
> Already the existing system has some limitations; for example it can not
> match a variable number of digits. I had a friend who was trying to
> implement an ISDN lookup for library books (ISDNs are variable length)
> but had problems because of the limitations on the matching.

I think you meant ISBN. And variable number of digits is supported. You
just need to know how to determine when it is shorter or longer and
write your dialplan as such. 

Think about it, in dialplans, most people have short internal extensions
that can be dialed, and longer PSTN local and even longer PSTN LD
numbers that can all be handled just fine. 

> If I can throw my 2c in; I think the existing system should be preserved
> for backwards compatibility so any new system should have a different
> prefix. The natural choice for regext would seem to be "/"
> 
> exten => /[1-9][0-9]....
-- 
Steven Critchfield <critch at basesys.com>




More information about the asterisk-dev mailing list