Setting up asterisk-gui on Ubuntu

Tonight I had a go at installing Digium’s asterisk-gui. I followed some instructions from Asterisk Guru, but then had to apply a fix at the end because the static-http folder was in the wrong place.

Installation Instructions

Download the asterisk-gui source code from SVN:

mkdir -p ~/downloads/asterisk-gui
cd ~/downloads/asterisk-gui
svn checkout http://svn.digium.com/svn/asterisk-gui/trunk .

Compile the source code:

./configure
./make
./make install

Backup your asterisk config:

cp -r /etc/asterisk /etc/asterisk.backup

Install the sample settings if you wish (this adds things like a list of VOIP providers to use as a PSTN gateway).

./make samples

Edit /etc/asterisk/manager.conf to enable the web management interface and to add a user:

enabled = yes
webenabled = yes
[administrator]
secret = YoUrPaSwOrD
read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config

Edit /etc/asterisk/http.conf to enable asterisk’s mini webserver. If you are accessing from your local machine use 127.0.0.1 otherwise you might want to bind to a public ip, but be aware this is less secure.

enabled=yes
enablestatic=yes
bindaddr=127.0.0.1

Run make checkconfig to verify your configuration settings:

./make checkconfig

I then had to do an additional step to link the static http scripts folder to inside /usr/share/asterisk as it seems asterisk was looking in here instead of /var/lib/asterisk/

sudo ln -s /var/lib/asterisk/static-http/ /usr/share/asterisk/

After that you should be able to login to the control panel at http://127.0.0.1:8088/asterisk/static/config/cfgbasic.html (replacing the IP address with whichever one you chose).

29 Responses to Setting up asterisk-gui on Ubuntu

  1. Robert Ndlovu July 29, 2008 at 6:51 am #

    paul I followed your notes and this is what got

    Not Found

    Nothing to see here. Move along.
    Asterisk Server

    Am running edubuntu

  2. Steve Godfrey September 3, 2008 at 9:02 pm #

    Thanks for the instructions. Unfortunately the URL is broken

    steve@M:~/downloads/asterisk-gui$ svn checkout http://svn.digium.com/svn/asterisk-gui/trunk .
    svn: URL \’http://svn.digium.com/svn/asterisk-gui/trunk\’ doesn\’t exist

  3. Paul Maunders September 3, 2008 at 10:30 pm #

    Hmm… it looks like they have removed the trunk. You could try a different repository url such as:
    http://svn.digium.com/svn/asterisk-gui/branches/2.0/

  4. Fred Young October 24, 2008 at 1:13 am #

    I don’t have the ‘svn’ command on my system. What package would I install to get it?

  5. Paul Maunders October 25, 2008 at 9:25 pm #

    To install the svn command, simply install the subversion package…

    sudo apt-get install subversion

  6. Scott Mutterer October 28, 2008 at 2:15 am #

    I am stumped as to how to get the HTTP service running. I am running a port scan from my mac and though make checkconfig says all is fine, no ports on my new ubuntu server are listing. Running Asterisk 1.6.01 and installed GUI 2.0. Anyone have any thoughts?

  7. Shailen Karur February 10, 2009 at 11:25 pm #

    I too get a 404 page:


    Not Found

    Nothing to see here. Move along.
    Asterisk Server

    This is after I restarted the asterisk server with an attached console

    Using Ubuntu 8.04 64 bit, asterisk 1.4.17

  8. Sigmaz February 13, 2009 at 12:08 am #

    Same problem here.. I have reinstalled several times assumingI did somthing wrong..

    I keep getting nothing to see here too..

    WTF.

    thats with 1.4x and 1.6x
    Please help

  9. dias February 19, 2009 at 8:45 am #

    i have success install asterisk and asterisk gui (asterisk-1.6.0.5 and asterisk-gui-2-1), and succes for access it via web but i cannot login with error:

    Verifying Dialplan contexts needed for gui

    I running on slackware 12.1

    thank’s

    dias

  10. eli March 11, 2009 at 4:52 am #

    figured out the lame ‘nothing to see error’
    create a symbolic link to /usr/share/asterisk/static-http

  11. Ashley March 16, 2009 at 12:36 pm #

    Eli,

    Where did you put your symbolic link to?

    Ashley

  12. Tja April 20, 2009 at 5:45 pm #

    On ubuntu it seems to be an empty folder that blocks the creation of the symbolic link. I run this three command to remove the folder (since its empty), create the link and restart asterisk.

    rm -rf /usr/share/asterisk/static-http/
    ln -s /var/lib/asterisk/static-http/ /usr/share/asterisk/
    /etc/init.d/asterisk restart

  13. catface July 11, 2009 at 10:38 pm #

    Tja, nice, thank you, good commands. Fixed the timeout and 404 errors for me perfectly :)

  14. sam July 20, 2009 at 10:23 am #

    “install” file is not created,
    when i tried “make install” , there is no file install… ??? pls help

  15. Eberx July 31, 2009 at 6:15 am #

    how do i define location of static-http folder ?

  16. Pierre Brico August 20, 2009 at 1:52 pm #

    Hello.

    Thanks for your procedure. I just would like to add that after finishing the procedure, I always had the messge “Checking write permission for gui folder” and the system hangs.
    Searching a little with command “strace” I found that the origin of the problem was that the directory /var/lib/asterisk/static-http was owned by root and that the user asterix could not write in. Fixing it solves my issue.

    Pierre

  17. schneemie January 6, 2010 at 4:59 pm #

    Thanks Tja

    rm -rf /usr/share/asterisk/static-http/
    ln -s /var/lib/asterisk/static-http/ /usr/share/asterisk/
    /etc/init.d/asterisk restart

  18. Vlad January 14, 2010 at 4:05 am #

    Hi all.
    Who know how to install asterisk-gui to another directory.
    For instance, i have installed asterisk to my directory:
    /usr/local/asteriskInstalled/.
    And i want to install GUI to this folder. But after make install i see that it tries copy files to /var/lib/asterisk/… (static-http and others) instead of /usr/local/asteriskInstalled/var/lib/asterisk.
    I tried use options: –prefix, –exec-prefix, env var PREFIX, but they take no effetc.

    thx

  19. Shyju Kanaprath July 23, 2010 at 8:29 pm #

    Hi,
    Asterisk GUI is not working with my Ubuntu 10.4. Asterisk is working fine for me. The “make checkconfig” command shows
    ” — Everything looks good — ”
    and I have tried Tja’s suggestions ..
    Anybody tried this in ubuntu 10.4 ?

  20. Jonathan August 15, 2010 at 8:57 am #

    You guys are far better than me! I only got as far as;
    “Compile the source code:

    ./configure
    ./make
    ./make install”

    It just says “no such file or directory”

    I have spent hours tucked away in my darkened room trying this on the operational PC, and then tried on my laptop. Could not get past this point on either.

    I am NOT a command line techie, so need simple cut and paste instructions.

    I am using Ubuntu 10.4….

  21. avesh September 23, 2010 at 3:22 am #

    i m not able to run the asterisk gui.. on terminal server its’ saying already logged in, on gui with my ip it’s not opening up. waiting very anxiously to learn asterisk..

  22. avesh September 23, 2010 at 4:03 am #

    the file http.conf.sample and manager.conf is locked and for some reason not giving me option to edit it to change as suggested in the article, i am stuck what to do

  23. Achmed October 18, 2010 at 5:19 pm #

    found the “fix” for ubuntu 10.4

    uncomment

    prefix=asterisk

    in the http.conf and it should work.

  24. Peter January 25, 2011 at 2:16 pm #

    I know its old, but as I was struggeling as well.. a trick that worked for me:

    as mentioned, make a symbolic link
    then :
    Set the right permissions on

    /var/lib/asterisk/gui_backups
    /var/lib/asterisk/static-http
    /var/lib/asterisk/scripts

    all of them:

    chown asterisk -R
    chgrp asterisk -R

    hope this helps,

    Peter

  25. tutu February 3, 2012 at 1:47 pm #

    just installed Asterisk GUI 2.0 on Ubuntu Server 10.04 (64bit) with asterisk 1.8.3.2 and instad of getting the GUI on my browser I get the html code when connecting to my asterisk system (via http://192.168.203.240:8088/asterisk/static/config/index.html) :

    <!–
    * Asterisk-GUI - an Asterisk configuration interface
    *
    * Top level index page
    *
    * Copyright (C) 2009-2011, Digium, Inc.
    *
    * Pari Nannapaneni
    * Erin Spiceland
    *
    * See http://www.asterisk.org for more information about
    * the Asterisk project. Please do not directly contact
    * any of the maintainers of this project for assistance;
    * the project provides a web site, mailing lists and IRC
    * channels for your use.
    *
    * This program is free software, distributed under the terms of
    * the GNU General Public License Version 2. See the LICENSE file
    * at the top of the source tree.
    *
    –>

    Asterisk Configuration GUI

    etcetcetc

    what is wrong ?

    this is my http.conf:

    ;
    ; Asterisk Builtin mini-HTTP server
    ;
    ;
    ; Note about Asterisk documentation:
    ; If Asterisk was installed from a tarball, then the HTML documentation should
    ; be installed in the static-http/docs directory which is
    ; (/var/lib/asterisk/static-http/docs) on linux by default. If the Asterisk
    ; HTTP server is enabled in this file by setting the “enabled”, “bindaddr”,
    ; and “bindport” options, then you should be able to view the documentation
    ; remotely by browsing to:
    ; http://:/static/docs/index.html
    ;
    [general]
    enabled = yes
    enablestatic = yes
    ;
    ; Whether HTTP/HTTPS interface is enabled or not. Default is no.
    ; This also affects manager/rawman/mxml access (see manager.conf)
    ;
    ;enabled=yes
    ;
    ; Address to bind to, both for HTTP and HTTPS. Default is 0.0.0.0
    ;
    ;bindaddr=127.0.0.1
    bindaddr=0.0.0.0

    ; Port to bind to for HTTP sessions (default is 8088)
    ;
    bindport=8088
    ;
    ; Prefix allows you to specify a prefix for all requests
    ; to the server. The default is blank. If uncommented
    ; all requests must begin with /asterisk
    ;
    prefix=asterisk
    ;
    ; Whether Asterisk should serve static content from http-static
    ; Default is no.
    ;
    enablestatic=yes
    ;
    ; Redirect one URI to another. This is how you would set a
    ; default page.
    ; Syntax: redirect=
    ; For example, if you are using the Asterisk-gui,
    ; it is convenient to enable the following redirect:
    ;
    ;redirect = / /static/config/cfgbasic.html
    ;
    ; HTTPS support. In addition to enabled=yes, you need to
    ; explicitly enable ssl, define the port to use,
    ; and have a certificate somewhere.
    ; sslenable=yes ; enable ssl – default no.
    ; sslbindport=4433 ; port to use – default is 8089
    ; sslbindaddr=0.0.0.0 ; address to bind to – default is bindaddr.
    ;
    ; sslcert=/tmp/foo.pem ; path to the certificate
    ;
    ; To produce a certificate you can e.g. use openssl
    ; openssl req -new -x509 -days 365 -nodes -out /tmp/foo.pem -keyout /tmp/foo.pem
    ;

    ; The post_mappings section maps URLs to real paths on the filesystem. If a
    ; POST is done from within an authenticated manager session to one of the
    ; configured POST mappings, then any files in the POST will be placed in the
    ; configured directory.
    ;
    ;[post_mappings]
    ;
    ; In this example, if the prefix option is set to “asterisk”, then using the
    ; POST URL: /asterisk/uploads will put files in /var/lib/asterisk/uploads/.
    ;uploads = /var/lib/asterisk/uploads/
    ;

    help appreciated!

  26. tutu February 3, 2012 at 7:28 pm #

    some additionnal info :

    only the page /asterisk/httpstatus is working, the GUI index file is not :-(

    this is the output of asterisk http show status command:

    ubuntu-server2*CLI> http show status

    HTTP Server Status:
    Prefix: /asterisk
    Server Enabled and Bound to 0.0.0.0:8088

    Enabled URI’s:
    /asterisk/httpstatus => Asterisk HTTP General Status
    /asterisk/phoneprov/… => Asterisk HTTP Phone Provisioning Tool
    /asterisk/static/… => Asterisk HTTP Static Delivery

    Enabled Redirects:
    / => /static/config/cfgbasic.html

  27. MakavelliRo April 17, 2012 at 7:13 pm #

    Instead of ./make and ./make install just use:
    make
    make install

    More info in the Readme file (cat README)

  28. Myron May 3, 2012 at 7:32 pm #

    Great post! I looked at several sites before installing the Asterisk server. I had the “write permissions error” and your note at the end solved the problem. Thank you.

  29. ad September 15, 2012 at 11:52 am #

    Great workarround, thanks a lot.
    also thanks for the additionel tips , i am also running ubuntu 10.4, and
    with this blog i have got it working
    gr. ad.

Leave a Reply