An AGI file is a script file used by the open source telephony system, Asterisk. It contains information that can be used to automate processes and Asterisk dialplan. Using AGI script files, connections can be established with relational databases such as PostgreSQL or MySQL. In addition, AGI scripts can be used to access other external resources as well. AGI scripts can turn over control of the dialplan to an external AGI script, enabling Asterisk to perform complex tasks.
AGI File Format - More Information
AGI script files are saved as text files and can be opened in any text editor for making changes.
Standard Pattern of AGI Communication
The AGI script loads the variables and their values sent to it by Asterisk. A common look of these variables is as follow.