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’
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.
39 Comments »
RSS feed for comments on this post. TrackBack URL
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 😉
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!
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??
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
Hi mattb,
I have a same problem with Tom, I added a entry to the /etc/asterisk/manager.conf. How can I fix it?
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.
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.
Asterisk is not running or you are trying to log in as a user without permissions to the Asterisk binary.
Asterisk is running. I only have 2 accounts on this machine and I’ve tried both one of which is root.
Is Asterisk running? Try ‘ps aux | grep asterisk’.
Whats do you see if you run asterisk with the ‘c’ switch as root, ‘asterisk -cvvvvvvvvvvv’?
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.
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
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.
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.
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.
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
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
Hi Richard,
Thank you for reading. what does ‘http show status’ return from the Asterisk CLI?
-Matt
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!
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.
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.
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.
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………
Sheba,
Is your firewall on or SELinux by chance?
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.
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 ^ _ ^
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
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!
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.
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.
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
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
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!
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!
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.
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.
If you have error “The GUI does not have necessary privileges.
Please check the manager permissions for the user” on request GUI
Check selinux and disable it…
I got mine to work, after running the asterisk program using at the prompt $ sudo asterisk -cvvvvv, the page loads but loops continuously , not sure what I did wrong.
I am thrilled its working but can do anything with it as the page just keeps on loading.
Kind Regards
Theo.
sure