Asterisk Gateway Interface
Encyclopedia
Asterisk Gateway Interface (AGI) is a software interface and communications protocol for application level control of selected features of the Asterisk PBX
Asterisk (PBX)
Asterisk is a software implementation of a telephone private branch exchange ; it was created in 1999 by Mark Spencer of Digium. Like any PBX, it allows attached telephones to make calls to one another, and to connect to other telephone services including the public switched telephone network and...

.

AGI allows an external, user-written program, launched from the Asterisk dial plan via pipes
Pipeline (Unix)
In Unix-like computer operating systems , a pipeline is the original software pipeline: a set of processes chained by their standard streams, so that the output of each process feeds directly as input to the next one. Each connection is implemented by an anonymous pipe...

 to control telephony operations on its associated control and voice channels. It is similar to the CGI
Common Gateway Interface
The Common Gateway Interface is a standard method for web servers software to delegate the generation of web pages to executable files...

 feature of web server
Web server
Web server can refer to either the hardware or the software that helps to deliver content that can be accessed through the Internet....

s 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
Transmission Control Protocol
The Transmission Control Protocol is one of the core protocols of the Internet Protocol Suite. TCP is one of the two original components of the suite, complementing the Internet Protocol , and therefore the entire suite is commonly referred to as TCP/IP...

 socket for communication to the external host which provides the function of an AGI service, in a manner of the client–server model. The default TCP port
TCP and UDP port
In computer networking, a port is an application-specific or process-specific software construct serving as a communications endpoint in a computer's host operating system. A port is associated with an IP address of the host, as well as the type of protocol used for communication...

 for FastAGI is 4573. Similar to HTTP uniform resource identifier
Uniform Resource Identifier
In computing, a uniform resource identifier is a string of characters used to identify a name or a resource on the Internet. Such identification enables interaction with representations of the resource over a network using specific protocols...

s (URIs), FastAGI employs a URI format of.agi://hostname[:port][/program/path]

The AGI feature set of Asterisk is implemented as an Asterisk loadable module (res agi).
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK