[asterisk-users] AGI problem using mono (.Net)

Steve Edwards asterisk.org at sedwards.com
Wed Feb 25 19:36:06 CST 2009


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      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000



More information about the asterisk-users mailing list