Page 278 - Asterisk™: The Future of Telephony
P. 278

You can get the latest version of the GUI files by checking them out of Digium’s Sub-
                                ‡
               version  repository.   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.

               Setting up httpd.conf and manager.conf

               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:


               ‡ 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.

               250 | Chapter 11: The Asterisk GUI Framework
   273   274   275   276   277   278   279   280   281   282   283