[asterisk-dev] WaitExten design?
Dmitry Andrianov
dimas at dataart.com
Mon Dec 17 01:38:29 CST 2007
Hello.
Could someone please explain the idea behind WaitExten implementation? I was wondering how is it possible for this application to work at all because it always reads only single digit and then I discovered that actually most of the job of collecting digits and jumping to extension does __ast_pbx_run. I probably do not know the whole picture but to me it looks like the only reason why digit collection is performed by code "outer" to WaitExten application is to allow different application contribute into collection - that is Background detects first digit, WaitExten detects the second and __ast_pbx_run collects the rest.
To me, more consistent approach would be to have digit collection buffer inside a channel structure and allow applications to append there and/or use data from the buffer. This way Background would append detected digit to a buffer while WaitExten - appending more and checking if it has non-ambiguous match. Another benefit of such an approach would be the fact that Read application also gets ability to use digit pressed during Background (currently it does not).
Any thoughts?
Regards,
Dmitry Andrianov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20071217/b0f055b8/attachment-0001.htm
More information about the asterisk-dev
mailing list