Hello, I'm wondering if I can take benefits of long prompts to compute in the background the next step to be performed by Asterisk. Do you know what will be the behavior of asterisk if I send a STREAM FILE command immediately followed by another command ? Will asterisk stack commands or will it stop the first one to execute the second one ? If stops, is there any AGI library that handles this kind of behavior or should I code it myself using callback methods ? Thanks in advance for your answer Patrick
Steve Edwards
2009-Oct-22 13:53 UTC
[asterisk-users] AGI STREAM FILE and not blocking execution
On Thu, 22 Oct 2009, Patrick wrote:> I'm wondering if I can take benefits of long prompts to compute in the > background the next step to be performed by Asterisk.I did this a few years ago so that I could process a credit card authorization request while the "Please wait..." prompt was playing. I did it by creating a new thread (in C) in my AGI to play the prompt. Usually I get the card response before the prompt finishes playing so to the caller it's "instantaneous." -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
Jared Smith
2009-Oct-22 15:39 UTC
[asterisk-users] AGI STREAM FILE and not blocking execution
On Thu, 2009-10-22 at 08:43 +0200, Patrick wrote:> I'm wondering if I can take benefits of long prompts to compute in the > background the next step to be performed by Asterisk. > > Do you know what will be the behavior of asterisk if I send a STREAM > FILE command immediately followed by another command ? Will asterisk > stack commands or will it stop the first one to execute the second one > ?If you want non-blocking (asynchronous) commands, check out the ExternalIVR interface instead of using AGI. -- Jared Smith Training Manager Digium, Inc.