Configuring/Installing/Updating/Patching of the Asterisk GUI.

Getting the Source

The Asterisk GUI now has trunk, that is actively developed on.
It will eventually have more branches that are public.
Note: The gui does NOT currently work with 1.6, this is being worked on now.

We will start following asterisk major releases (1.4/1.6/1.x etc)

Those Are:
Trunk (Main) Note! This used to be the branches/asterisknow branch

Installation

To checkout the branch you must have subversion installed (command: svn) Example SVN Checkout Command of Trunk / Configuring / Installation

  1. svn co http://svn.digium.com/svn/asterisk-gui/trunk asterisk-gui
  2. cd asterisk-gui
  3. sh configure && make && make samples && make install
If there were no errors, everything went perfectly. An example you can use here is: (type this into console)
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:

  1. A developer wants you to test some code that could fix your bug!
  2. After making a change yourself, submit your fixes to the project.
  3. Be able to test and change other peoples code submission.
To apply your own patch, you must first obtain one, for the example, we will use this.
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.patch
You will see the patch results, such as:
# patch -p0 < ourpatch.patch
patching file config/cfgbasic.html
You 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=yes
manager.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

(Note: This is the most insecure settings, but if you are having problems, will
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