What is AGI?

The Asterisk Gateway Interface (AGI) is a way to interface with Asterisk much like CGI is for Apache. It is language agnostic, and there are example scripts in PHP, Perl, and Python to name a few. The reason for this versatility is that AGI uses standard streams that are connected with modern UNIX operating systems. The streams used are STDIN, STDOUT, and STDERR.
Because of its flexibility, AGI can be used to create a range of different applications. Some examples that I have seen are applications that tell you the current temperature, pushing caller ID information to a MythTV system, writing to different backend databases, and the list goes on.
A small disclaimer, I wrote this guide as a learning tool for myself. I�ve attempted to present the information here in a clear, concise manner, and to be as accurate as possible. If you find any errors or have suggestions please post your suggestions.

Getting started

Asterisk has a standard location for AGI scripts when installed from source. If you�ve installed from a vendor�s package they might have changed the location to fit their standards. The location by default is /var/lib/asterisk/agi-bin/. Read the rest of this entry »


Tags: , , , , ,

Related posts