Dear Asterisk users, I have a simple question, but guess the answer is not that simple :-) 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. How can I do this with asterisk ? Best regards, Patrick
Steve Edwards
2010-Mar-02 15:41 UTC
[asterisk-users] Hide time consuming processed by prompt
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