On Wed, 25 Feb 2009, Steve Edwards wrote:

> The AGI interface (is that redundant?) can be summarized as:
>
> 1) Asterisk sends a bunch of cruft (the AGI environment variables) to your
> program's STDIN.

1a) Your program must read all of the AGI environment variables.

> 2) Your program sends a request to Asterisk via STDOUT.
>
> 3) Asterisk sends a result to your program via STDIN.
>
> 4) Your program does something else.
>
> 5) go to step 2.
>
> It's very simple, but not very forgiving.

If you output anything to STDOUT that is not expected, you're hosed. It is 
possible to write multi-threaded AGIs (eg, play a file while you are 
waiting for an answer from your credit card processor), but you can only 
have 1 request "active" (you've issued the request and you haven't 
received a result yet) at a time.

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      [email protected]      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to