bkruse: branch 1.4 r1641 - in /branches/1.4: config/ tools/
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Fri Oct 5 17:22:24 CDT 2007
Author: bkruse
Date: Fri Oct 5 17:22:24 2007
New Revision: 1641
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1641
Log:
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:
branches/1.4/config/misdn.html
Modified:
branches/1.4/config/cfgbasic.html
branches/1.4/tools/ztscan.c
Modified: branches/1.4/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/1.4/config/cfgbasic.html?view=diff&rev=1641&r1=1640&r2=1641
==============================================================================
--- branches/1.4/config/cfgbasic.html (original)
+++ branches/1.4/config/cfgbasic.html Fri Oct 5 17:22:24 2007
@@ -54,6 +54,7 @@
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"]);
Added: branches/1.4/config/misdn.html
URL: http://svn.digium.com/view/asterisk-gui/branches/1.4/config/misdn.html?view=auto&rev=1641
==============================================================================
--- branches/1.4/config/misdn.html (added)
+++ branches/1.4/config/misdn.html Fri Oct 5 17:22:24 2007
@@ -1,0 +1,24 @@
+<!--
+ * Asterisk-GUI - an Asterisk configuration interface
+ *
+ * Digital Card Setup / Detection
+ *
+ * Copyright (C) 2006-2007, Digium, Inc.
+ *
+ * Brandon Kruse <bkruse at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ *
+-->
+<script src="scripts/prototype.js"></script>
+<script src="scripts/astman.js"></script>
+<script src="scripts/tooltip.js"></script>
+
Modified: branches/1.4/tools/ztscan.c
URL: http://svn.digium.com/view/asterisk-gui/branches/1.4/tools/ztscan.c?view=diff&rev=1641&r1=1640&r2=1641
==============================================================================
--- branches/1.4/tools/ztscan.c (original)
+++ branches/1.4/tools/ztscan.c Fri Oct 5 17:22:24 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