This line was removed.
This word was removed. This word was added.
This line was added.

Changes (2)

View Page History

We will have to think of this (busy on it!)
AGI is a protocol invented, and used by Asterisk to invoke an application separate from Asterisk, e.g. a ZF2 application. In the asterisk dialplan you can specify at what point the application needs to be invoked. At that specified point the application is called as an executable and various arguments about the current call are supplied via STDIN.
In the app (which is basically run in CLI mode), the Asterisk\Agi component is instantiated, and it will read the supplied arguments from asterisk, these are stored as properties in the component, and cannot be changed after instantiation. Meaning that the AGI component basically represents one phonecall/channel.
Once the component has been instantiated and the arguments been parsed, one can specify commands which are then executed. Each command returns a boolean (true on success, false on failure (makes sense, right?)), and if the asterisk server supplied additional data with the component it is stored as property in the component, from which it can be later retrieved, prior to performing the next command.