[asterisk-users] Hide time consuming processed by prompt
Steve Edwards
asterisk.org at sedwards.com
Tue Mar 2 09:41:50 CST 2010
On Tue, 2 Mar 2010, Patrick wrote:
> What I want to achieve is to "hide" time consuming processing by a
> prompt (load of a customer history), stop the prompt and come back to
> the dial plan when the information is available. I'm actually using AGI
> script.
Many moons ago I wrote an AGI (written in C) to do credit card
authorizations. To "hide" the time it took to send the request and receive
the response, I created another thread that played "Please wait while your
card is authorized" while the "main" program did the auth. The response
was almost always received before the end of the prompt so the "customer
experience" was that the process was instantaneous.
The biggest trick was remembering that you can't execute any AGI commands
(like 'verbose') in the mainline until the prompt thread completes.
You can execute XXXs of AGIs written in C in the time it takes to load the
Perl or PHP interpreter.
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
More information about the asterisk-users
mailing list