Feb
11
2010




How to setup the Asterisk 2.0 GUI with Asterisk 1.6

Recent versions of Asterisk 1.6 are compatible with the Asterisk 2.0 GUI.  This wasn’t always the case, as the Asterisk GUI was developed for the 1.4 branch.  Although I wish Digium had gone for the LAMP model, the GUI is pretty good and getting better all the time.  However the instructions to install are difficult to find on the asterisk.org website.  That is, if they are there at all.  My guess is that Digium doesn’t want to make it to easy to get a free GUI.  I think this a very poor strategy, but that’s another article….  Today we will run through a quick install of asterisk and the 2.0 GUI.  A far superior option as compared to to Trixbox and FreePBX.

GOALS OF THIS POST:
- Install Asterisk 1.6
- Install Asterisk 2.0 GUI

Download the most recent sources to the ‘/usr/src’ directory.  Download the Asterisk source files. To accomplish this we will use Subversion.  Remember to execute this command after changing to the ‘/usr/src’ directory.

svn checkout http://svn.digium.com/svn/asterisk/trunk asterisk
svn checkout http://svn.digium.com/svn/asterisk-gui/branches/2.0/ gui

Change to the ‘asterisk’ directory we just downloaded and build.

example commands:

./configure
make
make install
make config – note: installs redhat style init startup scripts
make samples – note: adds Asterisk example files to ‘/etc/asterisk’

gui-install

gui-install

Now we have to compile the Asterisk GUI.  Navigate you shell to to ‘/usr/src/gui’  where we will do the same for this package.

example commands:

./configure
make
make install

Now we have a basic Asterisk install with GUI.  But to make this function correctly we have to edit a couple config files located in ‘/etc/asterisk’.  To allow web configuration open /etc/asterisk/manager.conf with your favorite text editor.

change to ‘enabled=yes’ and ‘webenabled=yes’.

At the bottom of the file create a username and password for the web login page.

Next edit the ‘/etc/asterisk/http.conf’.  It should look something like this,

From the ‘/usr/src/gui’ directory run the ‘make checkconfig’ command, you should see output like this,

[root@localhost gui]# make checkconfig
— Checking Asterisk configuration to see if it will support the GUI —
* Checking for http.conf: OK
* Checking for manager.conf: OK
* Checking if HTTP is enabled: OK
* Checking if HTTP static support is enabled: OK
* Checking if manager is enabled: OK
* Checking if manager over HTTP is enabled: OK
— Everything looks good —
* GUI should be available at http://localhost:8088/asterisk/static/config/index.html



* Note: If you have bindaddr=127.0.0.1 in /etc/asterisk/http.conf
you will only be able to visit it from the local machine.



Example: http://localhost::8088/asterisk/static/config/index.html



* The login and password should be an entry from /etc/asterisk/manager.conf
which has ‘config’ permission in read and write.  For example:



[admin]
secret = mysecret11769
read = system,call,log,verbose,command,agent,config
write = system,call,log,verbose,command,agent,config



— Good luck! —
[root@localhost gui]#

If you got this message you are almost finished.  Add the ‘admin’ user to the end of the manger.conf file we edited earlier.  Start Asterisk, and open your favorite web browser to ‘http://206.196.110.44:8088/static/config/index.html’.  You should be able to login as admin using the password you set in the ‘/etc/manager.conf file.

If you like this article tell Google!!









Written by mattb in: Asterisk,Asterisk Post,Linux | Tags: , , , , ,

36 Comments »

  • Great howto!

    I had to add these two lines in my manager.conf:

    deny=0.0.0.0/0.0.0.0
    permit=192.168.1.0/255.255.255.0

    Other than that, your tutorial is painless ;)

    Comment | April 7, 2010
  • mattb

    Thanks Man! Spread the word! Savelono.com : ) If you use Polycom IP phones, be sure to read my post on setting up the Web Provisioning!

    Comment | April 8, 2010
  • Tom

    Thanks for the great howto. I get a message when I login as admin saying ‘The GUI does not have necessary privileges. Please check the manager permissions for the user.’ How can this be fixed??

    Comment | September 29, 2010
  • mattb

    Hi Tom,

    It most likely means that your manager.conf file is not setup. Did you add a entry to the /etc/asterisk/manager.conf file? It’s in the tutorial above. Let me know.

    [admin]
    secret = mysecret11769
    read = system,call,log,verbose,command,agent,config
    write = system,call,log,verbose,command,agent,config

    Comment | September 30, 2010
  • Steven

    Hi mattb,

    I have a same problem with Tom, I added a entry to the /etc/asterisk/manager.conf. How can I fix it?

    Comment | October 3, 2010
  • mattb

    Login to Asterisk from the shell. ‘[matt@localhost]$ asterisk -rvvvvvvvvvvvvvvvv’

    watch the CLI while you attempt to login. You should see a rejection from Asterisk Post your results so I can look.

    Comment | October 5, 2010
  • Tom

    Something very odd is going on. When I try to get into the CLI I get this message:
    Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)

    When I set the manager.conf back to it’s original configuration I’m able to connect to the CLI. Any thoughts on this? Thanks for the help.

    Comment | October 5, 2010
  • mattb

    Asterisk is not running or you are trying to log in as a user without permissions to the Asterisk binary.

    Comment | October 5, 2010
  • Tom

    Asterisk is running. I only have 2 accounts on this machine and I’ve tried both one of which is root.

    Comment | October 6, 2010
  • mattb

    Is Asterisk running? Try ‘ps aux | grep asterisk’.

    Whats do you see if you run asterisk with the ‘c’ switch as root, ‘asterisk -cvvvvvvvvvvv’?

    Comment | October 6, 2010
  • Tom

    The grep shows that safe_asterisk and asterisk are both running. If I run with the -cvvvvvvvvvvv it allow me into the CLI prompt. I get a lot of status messages. I’m getting ready to just remove the installation and start over. Not sure what caused this.

    Comment | October 6, 2010
  • mattb

    Tom,

    Don’t reinstall or reboot your computer… It’s time to “man up” and look at the logs. First off, it looks like you might be running two instances of Asterisk. try ‘service asterisk stop’ to shutdown safe_asterisk. Then start asterisk as root(‘asterisk -cvvvvvvvvvvv’). Attempt to login as the manager user you created. Watch the CLI to see the messages. Does this make sense? Reinstalling is not a troubleshooting technique. It’s an act of desperation. Good luck, post your results and we will work through it.

    -Matt

    Comment | October 6, 2010
  • Tom

    OK, did as you said and was able to login however the CLI isn’t displaying anything that will help with the original gui login problem. No messages are displayed at all.

    Comment | October 7, 2010
  • mattb

    You missed a step along the way then. The GUI connects through the manager interface. If you don;t see an attempt on the CLI then check to see if the http.conf and manager.conf are setup correctly. Also, is your firewall on? What OS are you running?

    If you want me to look at it send SSH crendentials to savelono@gmail.com. I’ll take a quick look for free as long as this is not for commercial use. Otherwise contact http://www.voiceipsolutions.com and I can help you from there.

    Comment | October 7, 2010
  • Tom

    Thanks Matt. I’m heading out of town for the next week so won’t have time to do anything more for now. I’ll recheck everything when I get back. I’m running on RH13 with no firewall.

    Comment | October 8, 2010
  • sandy

    i am trying to set up at asterisk-gui, but when I get the subversion and use the ./configure command it does nt work and gives the following error

    I used this :
    http://svn.digium.com/svn/asterisk-gui/branches/2.0

    Error: bash: ./configure: No such file or directory

    can somebody help

    Comment | October 21, 2010
  • Richard

    I am bashing my head against a wall. Asterisk 1.6 GUI2 will not start, http.conf enabled and manager.conf enabled as per every instruction on the web. a http show status has the server as disabled and for the life of me I can’t figure out why ….. it did work, I moved it to a new location and new IP address and then all no access.

    make checkconfig all good
    yum updates

    Everything else works fine just the gui will not start. Not worth rebuilding over but annoying that I can’t find anything that has helped so far.

    OS: Centos 5.5
    Asterisk: 1.6.2
    Gui: 2
    Times I have sworn at it: 1000 <– not a recommended troublshooting technique

    Comment | November 18, 2010
  • mattb

    Hi Richard,

    Thank you for reading. what does ‘http show status’ return from the Asterisk CLI?

    -Matt

    Comment | November 19, 2010
  • Richard

    Hi Matt,
    Thanks for the reply,

    http show status
    HTTP Server Status:
    Prefix:
    Server Disabled

    Enabled URI’s:
    /httpstatus => Asterisk HTTP General Status
    /phoneprov/… => Asterisk HTTP Phone Provisioning Tool
    /amanager => HTML Manager Event Interface w/Digest authentication
    /arawman => Raw HTTP Manager Event Interface w/Digest authentication
    /manager => HTML Manager Event Interface
    /rawman => Raw HTTP Manager Event Interface
    /static/… => Asterisk HTTP Static Delivery
    /amxml => XML Manager Event Interface w/Digest authentication
    /mxml => XML Manager Event Interface

    Enabled Redirects:
    None.

    my http.conf:
    enabled=yes
    bindaddr=0.0.0.0 (same if i have a LAN address here)
    bindport=8088
    prefix=gui
    redirect= / /static/config/index.html

    etc etc as per every http.conf setting info on the web.

    my manager.conf:

    [general]
    enabled=yes
    webenabled=yes
    displayconnects=no
    port=5038
    bindaddr=0.0.0.0

    [admin]
    secret=xxxxxxx
    deny=0.0.0.0/0.0.0.0
    permit=192.168.16.0/255.255.255.0
    read=system,call,log,verbose,command,agent,config,read,write,originate
    write=system,call,log,verbose,command,agent,config,read,write,originate

    This was working when I set it up at home and all that happened was a move to the office, now no gui. I changed the IP addressing from home to Office networks on the box. Linux is not my forte, but something I wish I understood!

    Comment | November 25, 2010
  • mattb

    So Asterisk says prefix disabled. Please remove the ‘prefix=gui’ and ‘redirect=*’. Restart Asterisk and do ‘http show status’ again. Try to login through the default URL string and see if it works please report your results! Good luck!

    -Matt

    HTTP Server Status:
    Prefix:
    Server Disabled
    Enabled URI’s:
    /httpstatus => Asterisk HTTP General Status
    /phoneprov/… => Asterisk HTTP Phone Provisioning Tool
    /amanager => HTML Manager Event Interface w/Digest authentication
    /arawman => Raw HTTP Manager Event Interface w/Digest authentication
    /manager => HTML Manager Event Interface
    /rawman => Raw HTTP Manager Event Interface
    /static/… => Asterisk HTTP Static Delivery
    /amxml => XML Manager Event Interface w/Digest authentication
    /mxml => XML Manager Event Interface
    Enabled Redirects:
    None.

    Comment | November 27, 2010
  • Richard

    Thanks for the replies and sorry for my tardy responses! I did as requested and still comes as disabled. It must have been something I have changed/ommited/screwed up.

    I have installed another server with GUI2 and all looks ok, I will also need to move it (might be able to keep the same IP though)I will see how it goes. More than likely it is somthing I have done that has screweed up the other server.

    One thing I have noticed (not related) is that FreePBX has a day/night toggle option and the asterisk gui doesn’t – or at least none I can find. This setup may be unusual in that there are 2 sip trunks going to separate queues that will need separate night messages.

    I will continue my search and many thanks for your reply and this great step through for GUI 2.

    Comment | December 10, 2010
  • mattb

    So a fresh install from scratch worked? That’s good to hear! Time intervals must be created for inbound call routes to reach a day or night menu. The intervals are assigned at menu creation time I believe.

    Comment | December 16, 2010
  • Shebo

    Hi Guys… Great Tutorial…..

    I cant log into my server via the http address.
    This is my asterisk http status output.
    ubuntu-asterisk*CLI> http show status
    HTTP Server Status:
    Prefix:
    Server Enabled and Bound to 10.1.1.10:8088

    Enabled URI’s:
    /httpstatus => Asterisk HTTP General Status
    /phoneprov/… => Asterisk HTTP Phone Provisioning Tool
    /amanager => HTML Manager Event Interface w/Digest authentication
    /arawman => Raw HTTP Manager Event Interface w/Digest authentication
    /manager => HTML Manager Event Interface
    /rawman => Raw HTTP Manager Event Interface
    /static/… => Asterisk HTTP Static Delivery
    /amxml => XML Manager Event Interface w/Digest authentication
    /mxml => XML Manager Event Interface

    Enabled Redirects:
    None.

    cant log in….. http 404… webpage cannot be found.
    I have conncetivity to the server.
    64 bytes from 10.1.1.10: icmp_req=1 ttl=64 time=0.079 ms
    64 bytes from 10.1.1.10: icmp_req=2 ttl=64 time=0.020 ms
    64 bytes from 10.1.1.10: icmp_req=3 ttl=64 time=0.016 ms
    64 bytes from 10.1.1.10: icmp_req=4 ttl=64 time=0.016 ms
    64 bytes from 10.1.1.10: icmp_req=5 ttl=64 time=0.015 ms

    http.conf
    enable = yes
    bindaddr = 10.1.1.10
    bindport = 8088
    enablestatic = yes

    manager.conf
    [general]
    enabled = yes
    webenabled = yes

    port = 5038

    [admin]
    secret = thisisnotmyrealpassword
    deny=0.0.0.0/0.0.0.0
    permit=10.1.1.0/255.255.255.0

    bindaddr = 0.0.0.0

    http://10.1.1.10:8088/asterisk/static/config/index.html

    Please help………

    Comment | March 27, 2011
  • mattb

    Sheba,

    Is your firewall on or SELinux by chance?

    Comment | March 27, 2011
  • Shebo

    HI

    I think there is a problem with the url example address in make checkconfig (http:/10.1.1.10:8088/asterisk/static/config/index.html).

    Ive looked at the example at the bottom of the tutorial and /asterisk is not present in the url. i’ve tried the url without the /asterisk (http://10.1.1.10:8088/static/config/index.html) and its working now. Thanks for you quick response.

    Comment | March 28, 2011
  • eriks

    Hello all, please help me! My asterisk is warning of “The GUI does not have Necessary privileges. Please check the manager permissions for the use”
    I’ve done command-rvvvvvvvvvvvvvvvv asterisk, asterisk-cvvvvvvvvvvv
    My asterisk is the road, but when logged in, asterisk Connected
    then there is alert “The GUI does not have Necessary privileges. Please check the manager permissions for the use” please help me …. thank you ^ _ ^

    Comment | May 31, 2011
  • Manju

    Hi All,

    Please help me to setup asterisk gui.

    I have followed the procedure but not able to open the GUI ( http://192.168.1.10:8088/static-http/config/index.html)

    I get an error

    “Not Found

    The requested URL was not found on this server.
    Asterisk Server”

    I have some basic questions
    1. Do i need to start httpd service for asterisk GUI to work?
    2. In /etc/httpd/conf/httpd.conf Documentroot = /var/www/html, but asterisk gui stored under /var/lib – please help me.

    Appreciate a feedback.

    Regards
    Manju

    Comment | July 16, 2011
  • mattb

    Asterisk has a built-in HTTP server listening on 8088. Apache by default is port 80. The asterisk HTTP server web root is ‘/var/lib/asterisk/static-http’ Recheck all your installation steps. Good Luck!

    Comment | July 16, 2011
  • Jiwan

    I am having same problem with GUI, “The GUI does not have necessary privileges.
    Please check the manager permissions for the user !”

    I tried a lot but couldn’t resolve the issue.
    Any suggestions is highly appreciated.

    Comment | November 29, 2011
  • w14219

    Alright boss,
    I am trying to get the 2.0 GUI to work with asterisk 1.8 and am having the following issue, can you help?

    ****
    http://10.2.1.102:8088/asterisk/static/config/index.html
    http://10.2.1.102:8088/static/config/index.html

    Not Found
    The requested URL was not found on this server
    ****

    Health of the Asterisk & Gui install:

    — Checking Asterisk configuration to see if it will support the GUI —
    * Checking for http.conf: OK
    * Checking for manager.conf: OK
    * Checking if HTTP is enabled: OK
    * Checking if HTTP static support is enabled: OK
    * Checking if manager is enabled: OK
    * Checking if manager over HTTP is enabled: OK
    — Everything looks good —
    * GUI should be available at http://Ubuntu-Asterisk:8088/asterisk/static/config/index.html

    ==================================
    ==================================

    Ubuntu-Asterisk*CLI> http show status
    HTTP Server Status:
    Prefix:
    Server Enabled and Bound to 0.0.0.0:8088

    Enabled URI’s:
    /httpstatus => Asterisk HTTP General Status
    /phoneprov/… => Asterisk HTTP Phone Provisioning Tool
    /amanager => HTML Manager Event Interface w/Digest authentication
    /arawman => Raw HTTP Manager Event Interface w/Digest authentication
    /manager => HTML Manager Event Interface
    /rawman => Raw HTTP Manager Event Interface
    /static/… => Asterisk HTTP Static Delivery
    /amxml => XML Manager Event Interface w/Digest authentication
    /mxml => XML Manager Event Interface

    Enabled Redirects:
    None.

    Comment | December 21, 2011
  • mattb

    Mike,

    Thanks for reading. I haven’t tried the GUI with Asterisk 1.8 yet. However this will be easy for you to figure out… Install Asterisk 1.6.2.X. Reinstall GUI. This will only take minutes and tell you if this is a version issue. But I bet it’s a name issue. Like Ubuntu-Asterisk vs. 10.2.1.102 in the URL string.

    -Matt

    Comment | December 22, 2011
  • raceway

    Hi W14219

    since i can’t see prefix: so use url “http://Ubuntu-Asterisk:8088/static/config/index.html”

    and see if it’s work

    Comment | December 26, 2011
  • w14219

    Thank you for the reply.

    I reinstalled everything from scratch and was able to get the GUI to come up. However, I am now faced with this:

    The GUI does not have necessary privileges.
    Please check the manager permissions for the user !

    my manager.conf is:
    [admin]
    secret=test
    read = all
    write = all

    I cannot seem to get past this point now.

    btw: this is the install instructions I used for 1.8: http://ofps.oreilly.com/titles/9780596517342/asterisk-Install.html

    Thanks!

    Comment | December 31, 2011
  • w14219

    Got it!

    I need to do the following:
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+GUI

    Troubleshooting
    Check your filesystem permissions:

    $ chown -R asterisk:asterisk /etc/asterisk/ /var/lib/asterisk # if asterisk runs as the user “asterisk”
    $ chmod 644 /etc/asterisk/*

    Thank you for your help!

    Happy New Year!

    Comment | December 31, 2011
  • Perazim

    Trying to get gui-2 working with asterisk-1.8 on centos-6. gui was installed from epel rpms. Followed this example and “http show status” from asterisk cli shows enabled, running and bound to correct ip and port. Browsing to /httpstatus produces the status webpage but I get file not found when I browse to /static/config/index.html (or /asterisk/static/config/index.html). I can see the installed files in /var/lib/asterisk/static-http/config.

    Maybe something changed from 1.6 to 1.8?

    Thanks for any help.

    Comment | April 27, 2012
  • mattb

    As far as I know Asterisk 1.8 is not compatible with GUI 2.0. The problem is that Asterisk GUI 2.0 is much better than Digium’s proprietary Switchvox product. So I’m guessing that this on purpose… Which sucks because there are a bunch of people now using it… Thanks again Digium.

    Comment | April 27, 2012

RSS feed for comments on this post. TrackBack URL

Leave a comment