bkruse: branch asterisknow r1643 - in /branches/asterisknow: ./ config/ tools/
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Fri Oct 5 17:28:02 CDT 2007
Author: bkruse
Date: Fri Oct 5 17:28:02 2007
New Revision: 1643
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1643
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:
branches/asterisknow/config/misdn.html
- copied unchanged from r1641, branches/1.4/config/misdn.html
Modified:
branches/asterisknow/ (props changed)
branches/asterisknow/config/cfgbasic.html
branches/asterisknow/tools/ztscan.c
Propchange: branches/asterisknow/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: branches/asterisknow/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/cfgbasic.html?view=diff&rev=1643&r1=1642&r2=1643
==============================================================================
--- branches/asterisknow/config/cfgbasic.html (original)
+++ branches/asterisknow/config/cfgbasic.html Fri Oct 5 17:28:02 2007
@@ -177,6 +177,7 @@
newpanel( ["Call Queues", "queues.html", "Call queues allow calls to be sequenced to one or more agents."]);
newpanel( ["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."]);
newpanel( ["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."]);
+ newpanel( ["mISDN Configuration", "misdn.html", "mISDN configuration from the asterisk GUI"]);
newpanel( ["Calling Rules", "numberplan.html", "The Calling Rules define dialing permissions and least cost routing rules."]);
newpanel( ["Incoming Calls", "incoming.html", "Define how your incoming calls should be handled & configure DID (Direct inward Dialing)"]);
newpanel( ["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"]);
Modified: branches/asterisknow/tools/ztscan.c
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/tools/ztscan.c?view=diff&rev=1643&r1=1642&r2=1643
==============================================================================
--- branches/asterisknow/tools/ztscan.c (original)
+++ branches/asterisknow/tools/ztscan.c Fri Oct 5 17:28:02 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