[posted on sinologic.net] Many people who are learning Asterisk and they know the possibilities of this application, want to start developing their own solutions for Asterisk to interact with databases, files, file system and according to some value, get Asterisk to make a call, play a phrase, or a thousand other things.
This is done through a concept called Asterisk AGI (Asterisk Gateway Interface) and amounts to a program developed by us (or another user) that runs Asterisk (important to the latter) and serves to interact with the system Asterisk Linux, you can access local files, physical ports (USB, serial ports, parallel, etc.) databases, websites, and virtually anything else that can handle your Linux system.
Do not go into the "depth"which is entered in the course Advanced Asterisk, but offer a basic skeleton of a programmed in PHP AGI without external libraries and using a very simple program (ideal to become familiar with this type of system integration Asterisk-*)
Then you have an ultra-basic example on how it can be programmed in PHP AGI and without type libraries "php-agi"or "AstPHPAGI", or any other, only your Asterisk, you and PHP with MODULIT.