Asterisk Gateway Interface

It is similar to the CGI feature of web servers in allowing any language to be used for writing the external program which communicates with Asterisk via stdin and stdout.

While the initial feature set of AGI included only a procedural control of Asterisk operations via commands and response handshake, Enhanced AGI (EAGI) also provided out-of-band access to the incoming audio stream.

FastAGI is an extension to AGI which allows the external program to run at a separate network host to avoid the overhead of creating a new process for every call on the Asterisk server.

It uses a TCP socket for communication to the external host which provides the function of an AGI service, in a manner of the client–server model.

The features may be access by a variety of application programming interfaces in various languages, such as phpagi, Perl AGI Library, CAGI, NanoAGI, and PyST