Asterisk Gateway Interface
   HOME

TheInfoList



OR:

Asterisk Gateway Interface (AGI) is a software interface and communications protocol for application level control of selected features of the Asterisk PBX. AGI allows an external, user-written program, launched from the Asterisk dial plan via
pipes Pipe(s), PIPE(S) or piping may refer to: Objects * Pipe (fluid conveyance), a hollow cylinder following certain dimension rules ** Piping, the use of pipes in industry * Smoking pipe ** Tobacco pipe * Half-pipe and quarter pipe, semi-circula ...
to control telephony operations on its associated control and voice channels. 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 In computer programming, standard streams are interconnected input and output communication channels between a computer program and its environment when it begins execution. The three input/output (I/O) connections are called standard input (stdin ...
and
stdout In computer programming, standard streams are interconnected input and output communication channels between a computer program and its environment when it begins execution. The three input/output (I/O) connections are called standard input (stdin ...
. 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 client–server model is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients. Often clients and servers communicate ove ...
. The default
TCP port In computer networking, a port is a number assigned to uniquely identify a connection endpoint and to direct data to a specific service. At the software level, within an operating system, a port is a logical construct that identifies a specific ...
for FastAGI is 4573. Similar to
HTTP The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide We ...
uniform resource identifiers (URIs), FastAGI employs a URI format of . The AGI feature set of Asterisk is implemented as an Asterisk loadable module (''res_agi''). The features may be access by a variety of application programming interfaces in various languages, such a
phpagi
Perl AGI Library
CAGINanoAGI
an
PyST


References

VoIP software {{software-eng-stub