Developing for the Asterisk GUI
Once you’ve installed the files for the Asterisk GUI, you can begin to play with developing for the GUI. Over the next few sections, we’ll walk through setting up the various components and putting them together to enhance and expand the capabilities of the GUI.
Issuing Manager Commands over HTTP
The Asterisk GUI issues commands to Asterisk by calling specially crafted URLs to the Asterisk web server. This section provides examples of some commonly used commands (actions) and the corresponding web server responses. These AMI URLs have the following general structure:
http://hostname:8088/asterisk/rawman?action=command&....parameter=value pairs... http://hostname:8088/asterisk/manager?action=command&....parameter=value pairs... http://hostname:8088/asterisk/mxml?action=command&....parameter=value pairs...
The difference between the rawman, manager and mxml URLs is important. The web server
exports three different views of the AMI interface. If you use a
rawman URL, the server returns a
series of keyword/value pairs in the HTTP response. If you use a
manager URL, the server returns the
result formatted as HTML. In a similar style, if you use a mxml URL, the server returns the results
formatted in XML. For modern Ajax-style applications, the rawman and mxml forms are probably more
useful.[132]
The actions that can be sent to the server, along with their
parameters, are the ordinary manager commands described in Appendix F. Note that the LOGIN and
CHALLENGE ...