isdnlog-4.12

- ABC_LCR enhanced
 - country-de.dat more aliases
 - new rates
 - isdnlog/Makefile.in ... defined NATION
 - isdnlog/isdnlog/processor.c ... msn patch for NL
 - isdnlog/tools/isdnconf.c ... default config
This commit is contained in:
akool 2000-02-20 19:03:07 +00:00
parent 44a696aa73
commit 7fc316b547
6 changed files with 6232 additions and 278 deletions

View File

@ -1,4 +1,4 @@
## $Id: Makefile.in,v 1.149 2000/02/12 23:50:12 keil Exp $
## $Id: Makefile.in,v 1.150 2000/02/20 19:03:07 akool Exp $
##
## ISDN accounting for isdn4linux.
##
@ -19,6 +19,15 @@
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
## $Log: Makefile.in,v $
## Revision 1.150 2000/02/20 19:03:07 akool
## isdnlog-4.12
## - ABC_LCR enhanced
## - country-de.dat more aliases
## - new rates
## - isdnlog/Makefile.in ... defined NATION
## - isdnlog/isdnlog/processor.c ... msn patch for NL
## - isdnlog/tools/isdnconf.c ... default config
##
## Revision 1.149 2000/02/12 23:50:12 keil
## Fix some syntax error in install
##
@ -1086,7 +1095,7 @@ SERVICEFILE = /etc/services
# DON'T EDIT BELOW THIS LINE
######################################################################
VERSION = 4.11
VERSION = 4.12
MANPAGES = isdnlog/callerid.conf.5 isdnlog/isdn.conf.5 \
isdnlog/isdnformat.5 isdnlog/isdnlog.5 isdnlog/isdnlog.8 \
@ -1134,6 +1143,7 @@ DEFS += \
-DVERSION=\"$(VERSION)\" \
-DI4LVERSION=\"$(I4LVERSION)\" \
-D@NATION_MACRO@=1 \
-DNATION=\"$(NATION)\" \
-DBIG_PHONE_NUMBERS=1 \
$(INCLUDE)

View File

@ -1,4 +1,4 @@
V:0.92 Int based on 1.03-Germany [07-Feb-2000 12:19:00]
V:1.04 Int [16-Feb-2000 10:11:00]
# ISO 3166 Countrycodes ( ftp://sunsite.unc.edu/pub/Linux/apps/misc/
# countrycodes.1.0.2.tar.gz
# Airportcodes: http://www.TravelDesk.com/airports.html
@ -291,7 +291,7 @@ R:CN
T:_CNMF
N:China
A:China (Volksrepublik), China (People's Republic),V.R. China
A:China (Volksrepublik), China (People's Republic),V.R. China, China VR
C:+86
T:CN
@ -469,7 +469,7 @@ C:+685
T:WS
N:Amerikanisch-Samoa
A:Samoa (Ost), Samoa (US), Samoa O.
A:Samoa (Ost), Samoa (US), Samoa O., Amerikanisches Samoa
E:American Samoa
C:+684
T:AS
@ -550,7 +550,7 @@ T:NF
N:Kokosinseln
A:Kokosinseln (Australien), Cocos Island, Cocos Island (Antarctica)
A:Cocos Inseln
A:Cocos Inseln, Kokos-InselnKeeling-Inseln
E:Cocos Islands
A:Cocos (Keeling) Islands,Keeling Islands
C:+6722, +6189162
@ -789,7 +789,7 @@ T:HT
N:St. Pierre und Miquelon
A:Saint Pierre und Miquelon, St. Pierre and Miquelon, Saint Pierre et Miquelon
A:St. Pierre & Miquelon,St. Pierre
A:St. Pierre & Miquelon,St. Pierre, St. Pierre & Miquel.
E:Saint Pierre and Miquelon
C:+508
R:FR
@ -1185,7 +1185,7 @@ T:HR
N:Jugoslawien
A:Jugoslawien (Serbien/Montenegro), Serbien, Montenegro, Yugoslavia (Servia & Montenegro)
A:Jugoslawien Montenegro, Jugoslawien Serbien und Montenegro
A:Jugoslawien Montenegro, Jugoslawien Serbien und Montenegro, Jugoslawien-Serbien
E:Yugoslavia
C:+381
T:YU
@ -1854,6 +1854,7 @@ T:JM
N:St. Kitts und Nevis
A:St. Kitts & Nevis, Saint Kitts and Nevis, St Kitts, Nevis Islands
A:Nevis/St.Kitts
A:Nevis,Nevis Is.
E:Saint Kitts und Nevis
C:+1869
@ -1878,14 +1879,14 @@ T:DO
N:Turks- und Caicosinseln
E:Turks and Caicos Islands
A:Turks & Caicos Islands
A:Turks & Caicos Islands, Turks- & Caicosins.
A:Turks und Caicos,Turks and Caicos Inseln
C:+1809946, +1809941, +1649
T:TC
N:Amerikanische Jungferninseln
A:Jungferninseln (USA), Amerikan. Jungferninseln, American Virgin Isles
A:US Jungferninseln
A:US Jungferninseln, Amer. Jungferninseln
E:Virgin Islands (US)
C:+180977, +1809719, +1809715, +1809714, +1809713, +1809712, +1809693, +1809692, +1809690, +1809611, +1809513, +1340
T:VI

View File

@ -1,4 +1,4 @@
/* $Id: processor.c,v 1.101 2000/02/12 16:40:22 akool Exp $
/* $Id: processor.c,v 1.102 2000/02/20 19:03:07 akool Exp $
*
* ISDN accounting for isdn4linux. (log-module)
*
@ -19,6 +19,15 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: processor.c,v $
* Revision 1.102 2000/02/20 19:03:07 akool
* isdnlog-4.12
* - ABC_LCR enhanced
* - country-de.dat more aliases
* - new rates
* - isdnlog/Makefile.in ... defined NATION
* - isdnlog/isdnlog/processor.c ... msn patch for NL
* - isdnlog/tools/isdnconf.c ... default config
*
* Revision 1.101 2000/02/12 16:40:22 akool
* isdnlog-4.11
* - isdnlog/Makefile.in ... sep install-targets, installs samples, no isdnconf
@ -1215,7 +1224,12 @@ void buildnumber(char *num, int oc3, int oc3a, char *result, int version,
switch (oc3 & 0x70) { /* Calling party number Information element, Octet 3 - Table 4-11/Q.931 */
case 0x00 : if (*num) { /* 000 Unknown */
if (*num != '0') {
strcpy(result, mynum);
/* in NL the MSN contains myarea w/o leading zero
so myarea get's prepended again */
if (memcmp(myarea, num, strlen(myarea)) == 0)
strcpy(result, mycountry);
else
strcpy(result, mynum);
*local = 1;
}
else {
@ -4933,12 +4947,6 @@ static void processlcr(char *p)
sprintf(s, "ABC_LCR: Request for number %s = %s", dst + trimo, formatNumber("%l via %p", &destnum));
info(chan, PRT_SHOWNUMBERS, STATE_RING, s);
if (!abclcr) {
sprintf(s, "ABC_LCR: *Disabled* -- no action --");
abort = 1;
goto action;
} /* if */
if (!*destnum.msn /* && ((abclcr & 1) == 1) */) { /* Future expansion, Sonderrufnummer? */
sprintf(s, "ABC_LCR: \"%s\" is a Sonderrufnummer -- no action --", destnum.area);
abort = 1;
@ -4987,7 +4995,7 @@ static void processlcr(char *p)
#ifdef CONFIG_ISDN_WITH_ABC_LCR_SUPPORT
if (strlen(res) < sizeof(i.lcr_ioctl_nr)) {
sprintf(s, "ABC_LCR: New number \"%s\" (via %s:%s)\n",
sprintf(s, "ABC_LCR: New number \"%s\" (via %s:%s)",
res, prov, getProvider(prefix));
}
else {
@ -5011,6 +5019,11 @@ action:
i.lcr_ioctl_sizeof = sizeof(i);
i.lcr_ioctl_callid = atol(cid);
if (!abclcr) {
strcat(s, " (ABC_LCR *disabled*, no action)");
abort = 1;
} /* if */
if (abort) { /* tell ABC_LCR to dial the *original* number (and _dont_ wait 3 seconds) */
i.lcr_ioctl_flags = 0;

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@ use wld;
use strict;
$|=1;
use vars qw( %names $COUNTRY %myalias );
$COUNTRY = '/usr/src/isdn4k-utils/isdnlog/tools/country';
$COUNTRY = '~/isdn4k-utils/isdnlog/tools/country';
&get_country;
&get_alias;
@ -21,7 +21,7 @@ sub get_country {
foreach $a (@all) {
$na++;
$names{lc $a}=$key;
}
}
}
my $co_dat = '/usr/lib/isdn/country-de.dat';
open(IN,$co_dat) || die("Cant read $co_dat");
@ -33,18 +33,18 @@ sub get_country {
&add1;
$alias='';
$name=$1;
}
}
elsif (/^[AE]:(.*)/) {
$alias = $alias ne '' ? "$alias,$1" : $1;
}
elsif (/^T:(.*)/) {
$key=$1;
}
}
}
&add1;
close IN;
print "$nn Countrys $na Aliases loaded\n";
}
}
sub get_alias {
`cp ~/.country-alias .country-alias`;
@ -53,7 +53,7 @@ sub get_alias {
chomp;
my($c,$a) = split(/\t/);
$myalias{$c}=$a;
}
}
close(IN);
}
@ -76,19 +76,19 @@ sub prep_rate {
foreach $c (@a) {
next if ($c eq '');
$c = lc $c;
ok:
ok:
if ($c =~ /^\+?\d+/ || $c eq '+') {
push(@keys,$c);
}
}
elsif ($d=$names{$c}) {
push(@keys,$d);
}
elsif ($d=$names{$myalias{$c}}) {
push(@keys,$d);
}
else {
else {
$oc = $c;
again:
again:
print "'$c'";
$m=99; $tf='';
if ($COUNTRY) {
@ -96,15 +96,15 @@ again:
($tf, $m) = $cc =~ /<.*?>=<(.*?)>\sd=(\d+)/;
$m=99 if ($cc =~/unknown/);
$tf = lc $tf;
}
}
else {
foreach $name (keys(%names)) {
if (($r=wld($name,$c)) < $m) {
$m=$r; $tf=$name;
last if($m==0);
}
}
}
}
}
}
if ($tf && $m<=1) {
push(@keys,$names{$tf});
$names{$oc}=$names{$tf};
@ -119,17 +119,17 @@ again:
if ($x =~ /^=(.*)/) {
$c = $1 if($1 ne '');
goto again;
}
}
elsif ($x =~ /^\+(.*)/) {
$c = $oc . $1;
goto again;
}
}
elsif ($x =~ /^\/(.*)/) {
print `grep -3 -i $1 /usr/lib/isdn/country-de.dat`;
goto again;
}
}
if ($x eq 'j') {
$c = $tf;
$c = $tf;
$myalias{$oc}=$tf;
$names{$oc}=$names{$tf};
goto ok;
@ -144,18 +144,18 @@ again:
print "xx => xx ausprobieren";
goto again;
}
else {
else {
$c = $x;
}
}
goto again;
}
} # else found
} # foreach
}
} # else found
} # foreach
print OUT "A:", join(',',@keys),"\n";
} # if A
} # if A
else {
print OUT $_;
}
}
} # while IN
close(IN);
close(OUT);
@ -163,7 +163,7 @@ again:
foreach my $c (sort(keys(%myalias))) {
print OUT "$c\t",$myalias{$c},"\n";
}
close(OUT);
close(OUT);
`mv .country-alias ~/.country-alias`;
print "\nOk.\n";
} # prep_rate

View File

@ -1,4 +1,4 @@
/* $Id: isdnconf.c,v 1.31 1999/12/31 13:57:19 akool Exp $
/* $Id: isdnconf.c,v 1.32 2000/02/20 19:03:08 akool Exp $
*
* ISDN accounting for isdn4linux. (Utilities)
*
@ -20,6 +20,15 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdnconf.c,v $
* Revision 1.32 2000/02/20 19:03:08 akool
* isdnlog-4.12
* - ABC_LCR enhanced
* - country-de.dat more aliases
* - new rates
* - isdnlog/Makefile.in ... defined NATION
* - isdnlog/isdnlog/processor.c ... msn patch for NL
* - isdnlog/tools/isdnconf.c ... default config
*
* Revision 1.31 1999/12/31 13:57:19 akool
* isdnlog-4.00 (Millenium-Edition)
* - Oracle support added by Jan Bolt (Jan.Bolt@t-online.de)
@ -741,7 +750,7 @@ static section* writeglobal(section *SPtr)
}
}
#if 0 /* Fixme: remove */
#if 0 /* Fixme: remove */
if (CityWeekend != 0)
{
strcpy(s, CONF_ENT_CW);
@ -1075,9 +1084,9 @@ static int _readconfig(char *_myname)
mycountry = "";
myarea = "";
currency = NULL;
#if 0 /* Fixme: remove */
#if 0 /* Fixme: remove */
CityWeekend = 0;
#endif
#endif
chargemax = 0.0;
connectmax = 0;
connectmaxmode = 0;
@ -1091,10 +1100,12 @@ static int _readconfig(char *_myname)
logfile = LOGFILE;
callfile = NULL;
callfmt = NULL;
holifile = NULL;
countryfile = NULL;
rateconf = NULL;
ratefile = NULL;
holifile = CONFIG_DATADIR"/holiday-"NATION".dat";
countryfile = CONFIG_DATADIR"/country-de.dat";
rateconf = CONFIG_I4LCONFDIR"/rate.conf";
ratefile = CONFIG_DATADIR"/rate-"NATION".dat";
zonefile = CONFIG_DATADIR"/zone-"NATION"-%s.gdbm";
destfile = CONFIG_DATADIR"/dest.gdbm";
lcdfile = NULL;
start_procs.infoargs = NULL;
start_procs.flags = 0;
@ -1264,7 +1275,7 @@ static int Set_Globals(section *SPtr)
if ((CEPtr = Get_Entry(Ptr->entries,CONF_ENT_LCDFILE)) != NULL)
lcdfile = CEPtr->value;
#if 0 /* Fixme: remove */
#if 0 /* Fixme: remove */
if ((CEPtr = Get_Entry(Ptr->entries,CONF_ENT_CW)) != NULL)
CityWeekend = toupper(*(CEPtr->value)) == 'Y'?1:0;
#endif