[asterisk-dev] Better pattern matching

Vasil Kolev vasil at ludost.net
Thu Aug 2 07:50:59 CDT 2007

В ср, 2007-08-01 в 16:08 -0600, Steve Murphy написа:

> We might be able to extend the current algorithm to handle a few more
> simple cases without resorting to such huge machinery. We shall see.

Going through this thread, I'm thinking - regular expressions are parsed
to finite state machines, and it shouldn't be hard (for some values of
hard, I have to brush on my discrete maths memories) to build one
automaton to handle the full dialplan for a context and to be able on
each digit to cut the possible places to go. There's some stuff that
can't be done this way for sure (as we all know, all kind of weird shit
is possible with regex), but at least the current syntax can get a bit
extended, and probably a lot of IVRs simplified.

There's also the other possibility, to give a language to define the
automaton and parse this digit-by-digit, which will be wonderful for
IVRs and hell for some cases... :)

Also, there's the question if some weird stuff can be done now, like if
you start dialing and get every digit as it's dialed (if the protocol
supports it), at some point to switch to some channel and start sending
the digits there (like - if the user dials '01', send over Zap/2 '0' and
start sending the digits as they are received, which should cut a bit on
the setup times).

Of course, this makes realtime an extremely hard task. Probably DB
lookups as a operator in the proposed language?:)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: =?UTF-8?Q?=D0=A2=D0=BE=D0=B2=D0=B0?=
	=?UTF-8?Q?_=D0=B5?= =?UTF-8?Q?_=D1=86=D0=B8=D1=84=D1=80=D0=BE=D0=B2=D0=BE?=
	=?UTF-8?Q?_=D1=87=D0=B0=D1=81=D1=82?= =?UTF-8?Q?_=D0=BE=D1=82?=
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20070802/2eb29fbc/attachment.pgp 

More information about the asterisk-dev mailing list