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 can get the latest version of the GUI files by checking them out of Digium’s Subversion repository.[131] If you have Subversion installed on your computer, you can downloaded the GUI code by using the following command:
#cd /usr/src
# or wherever you prefer to download source code to #svn co http://svn.digium.com/svn/asterisk-gui/trunk asterisk-gui
Installing the GUI is simple as this:
#cd asterisk-gui
#./configure
#make
#make install
#make samples
After running the previous commands, the GUI files are installed and part of your Asterisk distribution.
Configuring the Asterisk web server to process AJAM requests involves
several simple steps. In the /etc/asterisk/http.conf
file, add (or
un-comment) the following:
[general] enabled=yes enablestatic=yes ; without this, you can only send AMI commands, not display ; html content bindaddr=0.0.0.0 ; address you want the Asterisk HTTP server to respond on bindport=8088 ; port you want the Asterisk HTTP server to respond on prefix=asterisk ; will form part of the URI, similar to a directory name
Now that we’ve got httpd.conf
set up, we can serve up content to
a browser. To allow the web client to send commands to Asterisk, we have
to make some changes to the Asterisk Manger Interface (AMI). We do this
by adding a few lines to the [general]
section of manager.conf
, and
by adding a user account with the config
permission set. Open up manager.conf
and edit it to match the
following:
[general] enabled=yes ; you may already have AMI enabled if you are using it for other things webenabled=yes ; this enables the interaction between the Asterisk web server and AMI [asterisk_http] ; you can name the user whatever you want secret = gooey read = system,call,log,verbose,command,agent,user,config write = system,call,log,verbose,command,agent,user,config
Save the changes and restart Asterisk. You should be able to connect to Asterisk’s web server through the following URI:
http://localhost:8088/asterisk/static/ajamdemo.html
If for some reason you’re having problems getting to that demo
page, go back to the asterisk-gui
source code directory and run:
# make checkconfig
And that’s it! Asterisk is now web-enabled. Now, let’s move on to the actual work of developing with the Asterisk GUI.
[131] There is currently no way to download the GUI via FTP. That situation may change at any time, so feel free to check the Asterisk web site for updated information.