Page 277 - Asterisk™: The Future of Telephony
P. 277
Components of the Asterisk GUI
Let’s take a closer look at some of the key components of the Asterisk GUI. We’ll use
these components later in the chapter to modify the Asterisk GUI.
Asterisk Manager Interface
As explained in Chapter 10, the Asterisk Manager Interface allows external programs
to control Asterisk. The Manager interface is the heart of the Asterisk GUI, as it does
all of the heavy lifting.
Manager over HTTP and the Asterisk web server
The web server built into Asterisk allows manager commands to be sent to Asterisk via
HTTP, instead of creating a socket connection directly to the Manager interface. This
makes it much simpler for a web application to issue AMI commands to Asterisk using
the Asynchronous JavaScript Asterisk Manager (AJAM), which we will cover shortly.
The web server can also be configured to serve static content, such as HTML files and
images. †
AJAM and JavaScript
The AJAM framework uses JavaScript and XML to asynchronously send commands to
Asterisk, and to update the information displayed in the web browser.
Installing the Asterisk GUI
If you didn’t install AsteriskNOW, you need to download and install the Asterisk GUI
files. Once the files are downloaded, you simply compile and install them as part of
your Asterisk installation.
You need Asterisk 1.4 or later in order use the Asterisk GUI.
† You may be asking yourself, “Why embed a web server inside of Asterisk? Why not just use an external web
server?” While you can use an external web server to serve up the Asterisk GUI, it’s beyond the scope of this
chapter, as the security model behind Ajax permits Ajax requests only to the same domain, port, and protocol
that sent the HTML page. This is often referred to as the same-origin policy.
Installing the Asterisk GUI | 249