<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2171/18/9/_/styles/combined.css?spaceKey=AST&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+GUI">Asterisk GUI</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~espiceland">Erin Spiceland</a>
</h4>
<div id="versionComment">
<b>Comment:</b>
Add more debugging tips including addition of symlink instructions for apt-get/yum.<br />
</div>
<br/>
<h4>Changes (15)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >write = system,call,log,verbose,command,agent,config,read,write,originate{code} <br> <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">h5. Access <br> <br>Access Asterisk GUI via a URL formatted in the following way, where $IP is the IP address on which both Asterisk and Asterisk GUI are installed, $PORT is {{bindport}} from {{http.conf}}, and $PREFIX is the {{prefix}} from {{http.conf}}, and it can be omitted if blank. <br> <br>{code}http://$IP:$PORT/$PREFIX/static/config/index.html{code} <br> <br></td></tr>
<tr><td class="diff-unchanged" >h3. Troubleshooting <br> <br>Check your filesystem permissions: <br></td></tr>
<tr><td class="diff-changed-lines" >{code:lang=javascript}$ chown -R asterisk:asterisk /etc/asterisk/ /var/lib/asterisk <span class="diff-added-words"style="background-color: #dfd;">/usr/share/asterisk</span> # if asterisk runs as the user "asterisk" <br></td></tr>
<tr><td class="diff-unchanged" >$ chmod 644 /etc/asterisk/*{code} <br> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Check that the bindaddr value in /etc/asterisk/http.conf matches the IP address of the machine you're using to access Asterisk GUI. <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">Check that the bindaddr value in /etc/asterisk/http.conf matches the IP address of the machine you're using to *access* Asterisk GUI, not necessarily the IP address Asterisk GUI is running on. <br></td></tr>
<tr><td class="diff-unchanged" > <br>Check on the Asterisk CLI that Asterisk is receiving the values you've set. <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >manager show settings{code} <br> <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">Output should look like this: <br> <br>{code}amelia*CLI> http show status <br>HTTP Server Status: <br>Prefix: /asterisk <br>Server Enabled and Bound to 0.0.0.0:8088 <br> <br>Enabled URI's: <br>/asterisk/httpstatus => Asterisk HTTP General Status <br>/asterisk/phoneprov/... => Asterisk HTTP Phone Provisioning Tool <br>/asterisk/amanager => HTML Manager Event Interface w/Digest authentication <br>/asterisk/arawman => Raw HTTP Manager Event Interface w/Digest authentication <br>/asterisk/manager => HTML Manager Event Interface <br>/asterisk/rawman => Raw HTTP Manager Event Interface <br>/asterisk/static/... => Asterisk HTTP Static Delivery <br>/asterisk/amxml => XML Manager Event Interface w/Digest authentication <br>/asterisk/mxml => XML Manager Event Interface <br> <br>Enabled Redirects: <br> None. <br>amelia*CLI> manager show settings <br> <br>Global Settings: <br>---------------- <br> Manager (AMI): Yes <br> Web Manager (AMI/HTTP): Yes <br> TCP Bindaddress: 0.0.0.0:5038 <br> HTTP Timeout (minutes): 60 <br> TLS Enable: No <br> TLS Bindaddress: Disabled <br> TLS Certfile: asterisk.pem <br> TLS Privatekey: <br> TLS Cipher: <br> Allow multiple login: Yes <br> Display connects: Yes <br> Timestamp events: No <br> Channel vars: <br> Debug: No <br> Block sockets: No <br>{code} <br> <br></td></tr>
<tr><td class="diff-unchanged" >Check that the ports you've specified are open by using telnet from another computer. <br>{code}telnet $ASTERISK_SERVER_IP_ADDRESS 5038 <br>telnet $ASTERISK_SERVER_IP_ADDRESS 8088{code} <br> <br></td></tr>
<tr><td class="diff-changed-lines" >Check that the <span class="diff-changed-words"><span class="diff-added-chars"style="background-color: #dfd;">{{</span>dahdi_genconf<span class="diff-added-chars"style="background-color: #dfd;">}}</span></span> script runs correctly and creates <span class="diff-changed-words"><span class="diff-added-chars"style="background-color: #dfd;">{{</span>/etc/asterisk/dahdi_guiread.conf<span class="diff-added-chars"style="background-color: #dfd;">}}</span>.</span> <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-changed-lines" >Check the existence of <span class="diff-changed-words"><span class="diff-added-chars"style="background-color: #dfd;">{{</span>/etc/asterisk/guipreferences.conf<span class="diff-added-chars"style="background-color: #dfd;">}}</span></span> and inside that file, the existence of the following line: <br></td></tr>
<tr><td class="diff-unchanged" >{code:lang=javascript}config_upgraded = yes{code} <br> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Check the last modified date of /etc/asterisk/http.conf. Asterisk GUI modifies this file every time it is loaded. <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">Check the last modified date of {{/etc/asterisk/http.conf}}. Asterisk GUI updates the timestamp on this file every time it is loaded. If the timestamp is not getting updated, your HTTP request is either not making it to Asterisk or it is not being processed correctly by Asterisk. This indicates a configuration error. <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-changed-lines" >Check that the user Asterisk runs as has a login shell. <span class="diff-added-words"style="background-color: #dfd;"> Asterisk GUI depends on Asterisk being able to use the [System|Application_System] application.</span> <br></td></tr>
<tr><td class="diff-unchanged" >{code:lang=javascript}su - asterisk{code} <br> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h1. Development <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">If you installed Asterisk GUI via 'yum' or 'apt-get', you may need to symlink {{/var/lib/asterisk/static-http}} to {{/usr/share/asterisk/static-http}}. Unfortunately {{/usr/share/asterisk/static-http}} will already exist, but fortunately it does not contain any useful files. <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">{code}ls /var/lib/asterisk/static-http/config && rm -rf /usr/share/asterisk/static-http && ln -s /var/lib/asterisk/static-http /usr/share/asterisk/static-http{code} <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">h1. Development <br> <br></td></tr>
<tr><td class="diff-unchanged" >h3. Debugging <br> <br></td></tr>
<tr><td class="diff-changed-lines" >To turn on debug messages, open <span class="diff-changed-words"><span class="diff-added-chars"style="background-color: #dfd;">{{</span>config/js/session.js<span class="diff-added-chars"style="background-color: #dfd;">}}</span>.</span> On line 30, set "log" to "true": <br></td></tr>
<tr><td class="diff-unchanged" >{code:lang=javascript} log: true, /**< boolean toggling logging */{code} <br> <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<h1><a name="AsteriskGUI-IntroductiontoAsteriskGUI"></a>Introduction to Asterisk GUI</h1>
<p>Asterisk GUI is a framework for the creation of graphical interfaces for configuring Asterisk. Some sample graphical interfaces for specific vertical markets are included for reference or for actual use and extension.</p>
<div>
<ul>
<li><a href='#AsteriskGUI-IntroductiontoAsteriskGUI'>Introduction to Asterisk GUI</a></li>
<ul>
<li><a href='#AsteriskGUI-SoftwareLicense'>Software License</a></li>
<li><a href='#AsteriskGUI-Download'>Download</a></li>
<li><a href='#AsteriskGUI-Support'>Support</a></li>
</ul>
<li><a href='#AsteriskGUI-InstallationandConfiguration'>Installation and Configuration</a></li>
<ul>
<li><a href='#AsteriskGUI-Installation'>Installation</a></li>
<li><a href='#AsteriskGUI-Configuration'>Configuration</a></li>
<ul>
<li><a href='#AsteriskGUI-http.conf%3A'>http.conf:</a></li>
<li><a href='#AsteriskGUI-manager.conf'>manager.conf</a></li>
<li><a href='#AsteriskGUI-Access'>Access</a></li>
</ul>
<li><a href='#AsteriskGUI-Troubleshooting'>Troubleshooting</a></li>
</ul>
<li><a href='#AsteriskGUI-Development'>Development</a></li>
<ul>
<li><a href='#AsteriskGUI-Debugging'>Debugging</a></li>
<li><a href='#AsteriskGUI-HideMenuCategories'>Hide Menu Categories</a></li>
</ul>
</ul></div>
<h3><a name="AsteriskGUI-SoftwareLicense"></a>Software License</h3>
<p>Asterisk GUI HTML and Javascript files Copyright (C) 2006-2011 Digium, Inc.</p>
<p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 only. This software is also available under commercial terms from Digium, Inc.</p>
<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p>Please contact Digium for information on alternative licensing arrangements for Asterisk GUI.</p>
<h3><a name="AsteriskGUI-Download"></a>Download</h3>
<p>While package release is inconsistent and infrequent, you can always get a current copy of <a href="http://svn.asterisk.org/svn/asterisk-gui/branches/2.0/" class="external-link" rel="nofollow">Asterisk GUI from subversion</a>. The current stable version will always be under <tt>branches</tt> and is currently located in <tt>branches/2.0</tt>.</p>
<h3><a name="AsteriskGUI-Support"></a>Support</h3>
<p>Please note that Asterisk GUI is not officially supported, though bugs, patches, and feature requests may be submitted at <a href="http://issues.asterisk.org" class="external-link" rel="nofollow">http://issues.asterisk.org</a> and should reference the Asterisk GUI project. You may also find peer support in the #asterisk-gui IRC channel and the <a href="http://forums.asterisk.org/viewforum.php?f=35" class="external-link" rel="nofollow">Asterisk GUI forum</a>.</p>
<h1><a name="AsteriskGUI-InstallationandConfiguration"></a>Installation and Configuration</h1>
<h3><a name="AsteriskGUI-Installation"></a>Installation</h3>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; gutter: false">$ ./configure
$ make
$ make install
$ make checkconfig</pre>
</div></div>
<h3><a name="AsteriskGUI-Configuration"></a>Configuration</h3>
<p>You may install sample configuration files by doing "make samples". Also you will need to edit your Asterisk configuration files to enable Asterisk GUI properly, specifically:</p>
<h5><a name="AsteriskGUI-http.conf%3A"></a>http.conf:</h5>
<p>Enable http.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; gutter: false">[general]
enabled=yes
enablestatic=yes
#bindaddr=0.0.0.0 # allow GUI to be accessible from all IP addresses.
bindaddr=127.0.0.1 # require access from the machine Asterisk is running on
bindport=8088</pre>
</div></div>
<h5><a name="AsteriskGUI-manager.conf"></a>manager.conf</h5>
<p>Enable manager access.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; gutter: false">[general]
enabled = yes
webenabled = yes</pre>
</div></div>
<p>Create an appropriate entry in manager.conf for the administrative user (PLEASE READ THE security.txt FILE!)</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; gutter: false">[admin]
secret = thiswouldbeaninsecurepassword
read = system,call,log,verbose,command,agent,config,read,write,originate
write = system,call,log,verbose,command,agent,config,read,write,originate</pre>
</div></div>
<h5><a name="AsteriskGUI-Access"></a>Access</h5>
<p>Access Asterisk GUI via a URL formatted in the following way, where $IP is the IP address on which both Asterisk and Asterisk GUI are installed, $PORT is <tt>bindport</tt> from <tt>http.conf</tt>, and $PREFIX is the <tt>prefix</tt> from <tt>http.conf</tt>, and it can be omitted if blank.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">http://$IP:$PORT/$PREFIX/static/config/index.html</pre>
</div></div>
<h3><a name="AsteriskGUI-Troubleshooting"></a>Troubleshooting</h3>
<p>Check your filesystem permissions:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; gutter: false">$ chown -R asterisk:asterisk /etc/asterisk/ /var/lib/asterisk /usr/share/asterisk # if asterisk runs as the user "asterisk"
$ chmod 644 /etc/asterisk/*</pre>
</div></div>
<p>Check that the bindaddr value in /etc/asterisk/http.conf matches the IP address of the machine you're using to <b>access</b> Asterisk GUI, not necessarily the IP address Asterisk GUI is running on.</p>
<p>Check on the Asterisk CLI that Asterisk is receiving the values you've set.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">http show status
manager show settings</pre>
</div></div>
<p>Output should look like this:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">amelia*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/amanager => HTML Manager Event Interface w/Digest authentication
/asterisk/arawman => Raw HTTP Manager Event Interface w/Digest authentication
/asterisk/manager => HTML Manager Event Interface
/asterisk/rawman => Raw HTTP Manager Event Interface
/asterisk/static/... => Asterisk HTTP Static Delivery
/asterisk/amxml => XML Manager Event Interface w/Digest authentication
/asterisk/mxml => XML Manager Event Interface
Enabled Redirects:
None.
amelia*CLI> manager show settings
Global Settings:
----------------
Manager (AMI): Yes
Web Manager (AMI/HTTP): Yes
TCP Bindaddress: 0.0.0.0:5038
HTTP Timeout (minutes): 60
TLS Enable: No
TLS Bindaddress: Disabled
TLS Certfile: asterisk.pem
TLS Privatekey:
TLS Cipher:
Allow multiple login: Yes
Display connects: Yes
Timestamp events: No
Channel vars:
Debug: No
Block sockets: No</pre>
</div></div>
<p>Check that the ports you've specified are open by using telnet from another computer.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">telnet $ASTERISK_SERVER_IP_ADDRESS 5038
telnet $ASTERISK_SERVER_IP_ADDRESS 8088</pre>
</div></div>
<p>Check that the <tt>dahdi_genconf</tt> script runs correctly and creates <tt>/etc/asterisk/dahdi_guiread.conf</tt>.</p>
<p>Check the existence of <tt>/etc/asterisk/guipreferences.conf</tt> and inside that file, the existence of the following line:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; gutter: false">config_upgraded = yes</pre>
</div></div>
<p>Check the last modified date of <tt>/etc/asterisk/http.conf</tt>. Asterisk GUI updates the timestamp on this file every time it is loaded. If the timestamp is not getting updated, your HTTP request is either not making it to Asterisk or it is not being processed correctly by Asterisk. This indicates a configuration error.</p>
<p>Check that the user Asterisk runs as has a login shell. Asterisk GUI depends on Asterisk being able to use the <a href="/wiki/display/AST/Application_System" title="Application_System">System</a> application.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; gutter: false">su - asterisk</pre>
</div></div>
<p>If you installed Asterisk GUI via 'yum' or 'apt-get', you may need to symlink <tt>/var/lib/asterisk/static-http</tt> to <tt>/usr/share/asterisk/static-http</tt>. Unfortunately <tt>/usr/share/asterisk/static-http</tt> will already exist, but fortunately it does not contain any useful files.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">ls /var/lib/asterisk/static-http/config && rm -rf /usr/share/asterisk/static-http && ln -s /var/lib/asterisk/static-http /usr/share/asterisk/static-http</pre>
</div></div>
<h1><a name="AsteriskGUI-Development"></a>Development</h1>
<h3><a name="AsteriskGUI-Debugging"></a>Debugging</h3>
<p>To turn on debug messages, open <tt>config/js/session.js</tt>. On line 30, set "log" to "true":</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; gutter: false">log: true, /**< boolean toggling logging */</pre>
</div></div>
<h3><a name="AsteriskGUI-HideMenuCategories"></a>Hide Menu Categories</h3>
<p>Hide menu categories by changing the HTML class attribute to "AdvancedMode" in index.html. Show them by enabling Advanced Options in the GUI.</p>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;" class="grey">
<a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
<span style="padding: 0px 5px;">|</span>
<a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+GUI">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=13076491&revisedVersion=17&originalVersion=16">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+GUI?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>