Getting the Source
The Asterisk GUI is now split into branches/1.0 and branches/2.0.
Note: The gui does NOT currently work with Asterisk 1.6.x, this is being worked on now.
Those Are:
Branches/1.0 (Formerly Trunk, no longer maintained) Note! This used to be Trunk
Branches/2.0 (New Gui!)
Installation
To checkout the branch you must have subversion installed (command: svn) Example SVN Checkout Command of Trunk / Configuring / Installation
svn co http://svn.digium.com/svn/asterisk-gui/branches/2.0 asterisk-guicd asterisk-guish configure && make && make samples && make install
IMPORTANT! Watch the output of the command:
'
make checkconfig'as it will test your asterisk configuration files to make sure the GUI is ready for use.
Note! You can also type '
make update' in the GUI source directory to update your SVN checkout.
Patching
Here we will apply a patch, make a patch, and revert to whats in svn if we mess something up.
There are many reasons you want to know how to patch. These reasons include:
- A developer wants you to test some code that could fix your bug!
- After making a change yourself, submit your fixes to the project.
- Be able to test and change other peoples code submission.
Index: config/cfgbasic.html
===================================================================
--- config/cfgbasic.html (revision 1464)
+++ config/cfgbasic.html (working copy)
@@ -273,6 +273,7 @@
}
function registerajax() {
+ alert("our patch worked!");
showdiv_statusmessage();
fit_toScreen();
ASTGUI.events.add( window , 'resize', fit_toScreen );
Save that file to ourpatch.patch in the GUI source directory we just checked out.
(ast-gui, if you followed the instructions directly) To apply the patch, we will issue the command:
patch -p0 < outpatch.patchYou will see the patch results, such as:
# patch -p0 < ourpatch.patch patching file config/cfgbasic.htmlYou will also see your change by typing:
svn diff (to diff against the public repository, of which is not changed)
#svn diff
Index: config/cfgbasic.html
===================================================================
--- config/cfgbasic.html (revision 1464)
+++ config/cfgbasic.html (working copy)
@@ -273,6 +273,7 @@
}
function registerajax() {
+ alert("our patch worked!");
showdiv_statusmessage();
fit_toScreen();
ASTGUI.events.add( window , 'resize', fit_toScreen );
Making your own patch.
Now that we have made our own patch, lets go ahead and save it for others to use!
bkruse~# svn diff > ournewchange.patch
bkruse~# cat ournewchange.patch
Index: config/cfgbasic.html
===================================================================
--- config/cfgbasic.html (revision 1464)
+++ config/cfgbasic.html (working copy)
@@ -273,6 +273,7 @@
}
function registerajax() {
+ alert("our patch worked!");
showdiv_statusmessage();
fit_toScreen();
ASTGUI.events.add( window , 'resize', fit_toScreen );
Now we can submit our patches to the bug tracker, individuals, or keep them for future use!
Reverting our changes.
Now we have this annoying alert box every time we load the asterisk GUI.Luckily, SVN can save us from this trouble, we can simply:
svn revert filename eg:
bkruse:~# svn revert config/cfgbasic.html Reverted 'config/cfgbasic.html' bkruse:~# svn diff bkruse:~#There are now no local modifications, you are good to go!
404/Config File Mess/Cannot Login.
Here are my default config files I use
http.conf:[general] enabled=yes bindaddr=0.0.0.0 bindport=8088 prefix=gui enablestatic=yesmanager.conf:
[general] enabled=yes webenabled=yes port=5038 bindaddr=0.0.0.0 [bkruse] secret=blah read=system,call,log,verbose,command,agent,user,config,originate,read,write write=system,call,log,verbose,command,agent,user,config,originate,read,write
With this configuration, you can access the gui from:
http://ip:8088/gui/static/config/cfgbasic.html
help you get something working. Don't forget to harden down!)
Conclusion
Thanks for reading and learning the right way to Configure/Install/Update/Patch the Asterisk GUI. -bk
