Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Even he, to whom most things that most people would think were pretty smart were pretty dumb, thought it was pretty smart.
—Douglas Adams, The Salmon of Doubt
The Asterisk Gateway Interface, or AGI, provides a standard interface by which external programs may control the Asterisk dialplan. Usually, AGI scripts are used to do advanced logic, communicate with relational databases (such as PostgreSQL or MySQL), and access other external resources. Turning over control of the dialplan to an external AGI script enables Asterisk to easily perform tasks that would otherwise be difficult or impossible.