bkruse: trunk r1642 - in /trunk: ./ config/ tools/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri Oct 5 17:25:05 CDT 2007


Author: bkruse
Date: Fri Oct  5 17:25:04 2007
New Revision: 1642

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1642
Log:
Merged revisions 1641 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-gui/branches/1.4

........
r1641 | bkruse | 2007-10-05 17:22:24 -0500 (Fri, 05 Oct 2007) | 9 lines

Started the basis for misdn (just added the place
holder page.) 
Changes to ztscan:
Removed a function for changing modules from e1
to t1 (it was a hack anyways, and no longer needed)
Fixed a case pointed out by pari where a digital card
was inserted, but ztscan.conf previously existed before.
Therefore isnew was being set to no.

........

Added:
    trunk/config/misdn.html
      - copied unchanged from r1641, branches/1.4/config/misdn.html
Modified:
    trunk/   (props changed)
    trunk/config/cfgbasic.html
    trunk/tools/ztscan.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?view=diff&rev=1642&r1=1641&r2=1642
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Fri Oct  5 17:25:04 2007
@@ -45,6 +45,34 @@
 	MainScreenPanels.push(r);
 };
 
+function updateMainScreenPanels(){
+	MainScreenPanels = [];
+	newMSpanel( ["Home", "home.html", "Asterisk Configuration Panel - Please click on a panel to manage related features"]);
+	newMSpanel( ["Users", "users.html", "Users is a short cut for quickly adding and removing all the necessary configuration components for any new phone."]);
+	newMSpanel( ["Conferencing", "meetme.html", "MeetMe conference bridging allow quick, ad-hoc conferences with or without security."]);
+	newMSpanel( ["Voicemail", "voicemail.html", "General settings for voicemail"]);
+	newMSpanel( ["Call Queues", "queues.html", "Call queues allow calls to be sequenced to one or more agents."]);
+	newMSpanel( ["Service Providers", "trunks.html", "Service Providers are outbound lines used to allow the system to make calls to the real world.  Trunks can be VoIP lines or traditional telephony lines."]);
+	newMSpanel( ["Digital Config(beta)", "digital.html", "Digital Configuration and setup allow the user to detect all digital cards (t1/e1/j1) and configure them. The user can access each individual line property, and also set each line as a trunk."]);
+	newMSpanel( ["mISDN Configuration", "misdn.html", "mISDN configuration from the asterisk GUI"]);
+	newMSpanel( ["Calling Rules", "numberplan.html", "The Calling Rules define dialing permissions and least cost routing rules."]);
+	newMSpanel( ["Incoming Calls", "incoming.html", "Define how your incoming calls should be handled & configure DID (Direct inward Dialing)"]);
+	newMSpanel( ["Voice Menus", "menus.html", "Menus allow for more efficient routing of calls from incoming callers. Also known as IVR (Interactive Voice Response) menus or Digital Receptionist"]);
+	newMSpanel( ["Time Based Rules", "timerules.html", "define call routing rules based on date and time"]);
+	newMSpanel( ["Call Parking", "callparking.html", "configure call parking features"]);
+	newMSpanel( ["Ring Groups", "ringgroups.html", "define RingGroups to dial more than one extension"]);
+	newMSpanel( ["Record a Menu", "record.html", "Allows you to record custom voicemenus over a phone"]);
+	newMSpanel( ["Active Channels", "status.html", "Monitor active channels."]);
+	newMSpanel( ["Graphs", "graphs.html", "View Graphs of your System Information."]);
+	newMSpanel( ["System Info", "sysinfo.html", "System Information."]);
+	newMSpanel( ["Asterisk Logs", "syslog.html", "Asterisk Log messages."]);
+	// newpanel( ["CDR Configuration", "cdr_conf.html", "CDR Engine Configuration."]); // Uncomment when cdr_conf.html is finished, there are still some errors. 
+	newMSpanel( ["CDR Reader", "cdr.html", "Read all your call records from Asterisk."]);
+	newMSpanel( ["File Editor", "feditor.html", "Edit Asterisk Config Files"]);
+	newMSpanel( ["Asterisk CLI", "cli.html", "Asterisk Command Line Interface"]);
+	newMSpanel( ["Backup", "backup.html", "Backup Management."]);
+	newMSpanel( ["Options", "localexts.html", "Admin Settings"]);
+}
 
 function fit_toScreen(){
 	var t = ASTGUI.displayHeight();

Modified: trunk/tools/ztscan.c
URL: http://svn.digium.com/view/asterisk-gui/trunk/tools/ztscan.c?view=diff&rev=1642&r1=1641&r2=1642
==============================================================================
--- trunk/tools/ztscan.c (original)
+++ trunk/tools/ztscan.c Fri Oct  5 17:25:04 2007
@@ -199,6 +199,30 @@
 	}
 }
 
+/* function to parse the configuration file for continue = yes/no */
+int parse_value(FILE *conf, char var[10]) {
+
+	char val[96];
+	char *var_pt, *sep, *val_pt = val;
+	
+	var_pt = strdup(var);
+
+	while(!feof(conf)) {
+		if(fgets(val_pt, sizeof(val) - 1, conf)) {
+			if(!strncasecmp(val_pt, var_pt, strlen(var))) {
+				sep = strsep(&val_pt, "=");
+				sep = strsep(&val_pt, "=");
+				if(!strncmp(sep, "yes", strlen("yes"))) {
+					return 1;
+				} else {
+					return 0;
+				}
+			}
+		}
+	}
+	return 0;
+}
+
 /* function to scan for spans and return 0 for error and anything else for true */
 int scanspans() {
 
@@ -227,8 +251,12 @@
 	}
 
 	if(!conf_check) {
-		/* ztscan.conf did not previously exist.  */
 		isnew = 1;
+	} else {
+		if(parse_value(conf_check, "continue")) {
+			/* ztscan.conf did not previously exist.  */
+			isnew = 1;
+		}
 	}
 	if(!conf) {
 		printf("cannot open config file /etc/asterisk/ztscan.conf for writing\n");
@@ -275,24 +303,6 @@
 	return 1;
 }
 
-static int reloadmodules(char *type) 
-{
-
-	system("for i in `lsmod | grep zap| sed 's/,/ /g'`; do rmmod $i >> /dev/null; done; rmmod zaptel"); /* this is a horrible hack :[ */
-	if(!strcmp(type, "e1")) {
-		if(debug)
-			printf("Setting modules into e1\n");
-		system("modprobe zaptel; modprobe zttranscode; modprobe wct4xxp t1e1override=1; modprobe wcte11xp t1e1override=1; modprobe wct1xxp t1e1override=1; ztcfg");
-		/*XXX rmmod and modprobe with e1 settings */
-	} 
-	if(!strcmp(type, "t1")) {
-		if(debug)
-			printf("Setting modules into t1\n");
-		system("modprobe zaptel; modprobe zttranscode; modprobe wct4xxp t1e1override=0; modprobe wcte11xp t1e1override=0; modprobe wct1xxp t1e1override=0; ztcfg");
-	}
-	return 1;	
-}
-
 int main(int argc, char *argv[])
 {
 	ctl = open("/dev/zap/ctl", O_RDWR);




More information about the asterisk-gui-commits mailing list