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

30 thoughts on “Setting up asterisk-gui on Ubuntu”

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

  2. 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?

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

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

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

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

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

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

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

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

  11. Thanks Tja

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

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

  13. 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 ?

  14. 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….

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

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

  17. found the “fix” for ubuntu 10.4

    uncomment

    prefix=asterisk

    in the http.conf and it should work.

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

  19. 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!

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

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

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

Your email address will not be published. Required fields are marked *