bkruse: branch bkruse/dahdi_integration r4116 - in /team/bkruse/dahdi_integra...

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri Nov 14 18:09:55 CST 2008


Author: bkruse
Date: Fri Nov 14 18:09:54 2008
New Revision: 4116

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4116
Log:
Second phase of the dahdi_integration.

Modified:
    team/bkruse/dahdi_integration/config/js/astman.js
    team/bkruse/dahdi_integration/config/js/pbx.js
    team/bkruse/dahdi_integration/scripts/editzap.sh

Modified: team/bkruse/dahdi_integration/config/js/astman.js
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/dahdi_integration/config/js/astman.js?view=diff&rev=4116&r1=4115&r2=4116
==============================================================================
--- team/bkruse/dahdi_integration/config/js/astman.js (original)
+++ team/bkruse/dahdi_integration/config/js/astman.js Fri Nov 14 18:09:54 2008
@@ -316,7 +316,7 @@
 		configfile : 'guipreferences.conf', // will be created if the file does not exist , ASTGUI.globals.configfile
 		g729RegInfo: 'g729reginfo.conf', // ASTGUI.globals.g729RegInfo, the ASTGUI.scripts.Registerg729 script will read this file to generate tab delimited file
 		hwcfgFile: 'gui_confighw.conf', // file to store configured hardware information
-		zaptelIncludeFile: 'zaptel_guiRead.conf', // file that will be used to read zapte.conf, ASTGUI.globals.zaptelIncludeFile
+		zaptelIncludeFile: 'zaptel_guiRead.conf', // file that will be used to read zaptel.conf, ASTGUI.globals.zaptelIncludeFile
 		pingInterval : 5000,
 		app_factoryReset : '/bin/reset_config', // ASTGUI.globals.app_factoryReset
 		fnf : 'ERROR:FNF',
@@ -2608,7 +2608,12 @@
 ASTGUI.scripts['SysInfo'] = 'sh ' + ASTGUI.paths['scripts'] + 'gui_sysinfo';
 ASTGUI.scripts['ListFiles'] = 'sh ' + ASTGUI.paths['scripts'] + 'listfiles';
 ASTGUI.scripts['NetworkSettings'] = 'sh ' + ASTGUI.paths['scripts'] + 'networking.sh';
-ASTGUI.scripts['generateZaptel'] = 'sh ' + ASTGUI.paths['scripts'] + 'editzap.sh';
+/* If we are using Dahdi, let's tell the script that, so it knows what to parse! */
+if (top.sessionData.PLATFORM.isDahdi) {
+	ASTGUI.scripts['generateZaptel'] = 'sh ' + ASTGUI.paths['scripts'] + 'editzap.sh dahdi';
+} else {
+	ASTGUI.scripts['generateZaptel'] = 'sh ' + ASTGUI.paths['scripts'] + 'editzap.sh';
+}
 ASTGUI.scripts['generatemISDN_init'] = 'sh ' + ASTGUI.paths['scripts'] + 'editmisdn.sh';
 ASTGUI.scripts['dldsoundpack'] = 'sh ' + ASTGUI.paths['scripts'] + 'dldsoundpack';
 ASTGUI.scripts['mastercsvexists'] = 'sh ' + ASTGUI.paths['scripts'] + 'mastercsvexists';

Modified: team/bkruse/dahdi_integration/config/js/pbx.js
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/dahdi_integration/config/js/pbx.js?view=diff&rev=4116&r1=4115&r2=4116
==============================================================================
--- team/bkruse/dahdi_integration/config/js/pbx.js (original)
+++ team/bkruse/dahdi_integration/config/js/pbx.js Fri Nov 14 18:09:54 2008
@@ -179,7 +179,12 @@
 					var u = new listOfSynActions(tmp_file) ;
 					u.new_action('delcat', 'general', "", ""); 
 					u.new_action('newcat', 'general', "", ""); 
-					u.new_action('update', 'general', '#include "../zaptel.conf" ;', ' ;');
+					/* this is one spot where the if statement would work better than the global variable */
+					if (sessionData.PLATFORM.isDahdi) {
+						u.new_action('update', 'general', '#include "../dahdi/system.conf" ;', ' ;');
+					} else {
+						u.new_action('update', 'general', '#include "../zaptel.conf" ;', ' ;');
+					}
 					u.callActions();
 				});
 				return;
@@ -877,7 +882,7 @@
 
 		// these fields are already added, delete before iterating through userinfo
 		if(! tr.hasOwnProperty('group') ){ delete tr.group ; }
-		if(! tr.hasOwnProperty('signalling') ){ delete tr.signalling ; } // we will set the signalling based on zaptel.conf, so ignore what ever signalling is passed
+		if(! tr.hasOwnProperty('signalling') ){ delete tr.signalling ; } // we will set the signalling based on zaptel.conf or system.conf (in the case of dahdi), so ignore what ever signalling is passed
 		if(! tr.hasOwnProperty('hasiax') ){ delete tr.hasiax ; }
 		if(! tr.hasOwnProperty('hassip') ){ delete tr.hassip ; }
 		if(! tr.hasOwnProperty('trunkstyle') ){ delete tr.trunkstyle ; }

Modified: team/bkruse/dahdi_integration/scripts/editzap.sh
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/dahdi_integration/scripts/editzap.sh?view=diff&rev=4116&r1=4115&r2=4116
==============================================================================
--- team/bkruse/dahdi_integration/scripts/editzap.sh (original)
+++ team/bkruse/dahdi_integration/scripts/editzap.sh Fri Nov 14 18:09:54 2008
@@ -7,7 +7,12 @@
 
 # Quick script for applying zaptel settings from the GUI.
 
-ZAPCONF="/etc/zaptel.conf"
+if [ "${1}" == "dahdi" ]; then
+	CONF="/etc/dahdi/system.conf"
+else
+	CONF="/etc/zaptel.conf"
+fi
+
 FILENAME="/etc/asterisk/applyzap.conf"
-grep -v '\;' ${FILENAME} | sed 's/\[general\]//g' > ${ZAPCONF}
+grep -v '\;' ${FILENAME} | sed 's/\[general\]//g' > ${CONF}
 




More information about the asterisk-gui-commits mailing list