isdnlog-4.04
- Support for Luxemburg added: - isdnlog/country-de.dat ... no +352 1 luxemburg city - isdnlog/rate-lu.dat ... initial LU version NEW - isdnlog/holiday-lu.dat ... NEW - FIXME - isdnlog/.Config.in ... LU support - isdnlog/configure.in ... LU support - isdnlog/samples/isdn.conf.lu ... LU support NEW - German zone-table enhanced - isdnlog/tools/zone/de/01033/mk ...fixed, with verify now - isdnlog/tools/zone/redzone ... fixed - isdnlog/tools/zone/de/01033/mzoneall ... fixed, faster - isdnlog/tools/zone/mkzonedb.c .... data Version 1.21 - Patch from Philipp Matthias Hahn <pmhahn@titan.lahn.de> - PostgreSQL SEGV solved - Patch from Armin Schindler <mac@melware.de> - Eicon-Driver Support for isdnlog
This commit is contained in:
parent
450863ca2b
commit
947689f778
|
@ -22,6 +22,7 @@ choice 'Country specific chargeinfo support' \
|
|||
"DE CONFIG_ISDN_LOG_DE \
|
||||
AT CONFIG_ISDN_LOG_AT \
|
||||
NL CONFIG_ISDN_LOG_NL \
|
||||
LU CONFIG_ISDN_LOG_LU \
|
||||
CH CONFIG_ISDN_LOG_CH" DE
|
||||
if [ "$CONFIG_ISDN_LOG_DE" = "y" ]; then
|
||||
CONFIG_ISDN_LOG_DEST_DE="y"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
## $Id: Makefile.in,v 1.140 2000/01/16 12:36:58 akool Exp $
|
||||
## $Id: Makefile.in,v 1.141 2000/01/23 22:31:13 akool Exp $
|
||||
##
|
||||
## ISDN accounting for isdn4linux.
|
||||
##
|
||||
|
@ -19,6 +19,28 @@
|
|||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## $Log: Makefile.in,v $
|
||||
## Revision 1.141 2000/01/23 22:31:13 akool
|
||||
## isdnlog-4.04
|
||||
## - Support for Luxemburg added:
|
||||
## - isdnlog/country-de.dat ... no +352 1 luxemburg city
|
||||
## - isdnlog/rate-lu.dat ... initial LU version NEW
|
||||
## - isdnlog/holiday-lu.dat ... NEW - FIXME
|
||||
## - isdnlog/.Config.in ... LU support
|
||||
## - isdnlog/configure.in ... LU support
|
||||
## - isdnlog/samples/isdn.conf.lu ... LU support NEW
|
||||
##
|
||||
## - German zone-table enhanced
|
||||
## - isdnlog/tools/zone/de/01033/mk ...fixed, with verify now
|
||||
## - isdnlog/tools/zone/redzone ... fixed
|
||||
## - isdnlog/tools/zone/de/01033/mzoneall ... fixed, faster
|
||||
## - isdnlog/tools/zone/mkzonedb.c .... data Version 1.21
|
||||
##
|
||||
## - Patch from Philipp Matthias Hahn <pmhahn@titan.lahn.de>
|
||||
## - PostgreSQL SEGV solved
|
||||
##
|
||||
## - Patch from Armin Schindler <mac@melware.de>
|
||||
## - Eicon-Driver Support for isdnlog
|
||||
##
|
||||
## Revision 1.140 2000/01/16 12:36:58 akool
|
||||
## isdnlog-4.03
|
||||
## - Patch from Gerrit Pape <pape@innominate.de>
|
||||
|
@ -1003,7 +1025,7 @@ SERVICEFILE = /etc/services
|
|||
# DON'T EDIT BELOW THIS LINE
|
||||
######################################################################
|
||||
|
||||
VERSION = 4.03
|
||||
VERSION = 4.04
|
||||
|
||||
MANPAGES = isdnlog/callerid.conf.5 isdnlog/isdn.conf.5 \
|
||||
isdnlog/isdnformat.5 isdnlog/isdnlog.5 isdnlog/isdnlog.8 \
|
||||
|
|
|
@ -108,6 +108,11 @@ if test "$CONFIG_ISDN_LOG_NL" = "y" ; then
|
|||
NATION_MACRO="ISDN_NL"
|
||||
AC_DEFINE(ISDN_NL)
|
||||
fi
|
||||
if test "$CONFIG_ISDN_LOG_LU" = "y" ; then
|
||||
NATION="lu"
|
||||
NATION_MACRO="ISDN_LU"
|
||||
AC_DEFINE(ISDN_LU)
|
||||
fi
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
|
|
|
@ -1291,11 +1291,6 @@ E:Ireland
|
|||
C:+353
|
||||
T:IE
|
||||
|
||||
N:Luxemburg City
|
||||
C:+3521
|
||||
R:LU
|
||||
T:_LUXE
|
||||
|
||||
N:Luxemburg
|
||||
E:Luxembourg
|
||||
C:+352
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
V:1.00-Luxemburg [16-Jan-2000]
|
||||
# s. http://www.itm.etat.lu/droit/de/2/3/2.htm
|
||||
|
||||
W:1 Montag
|
||||
W:2 Dienstag
|
||||
W:3 Mittwoch
|
||||
W:4 Donnerstag
|
||||
W:5 Freitag
|
||||
W:6 Samstag
|
||||
W:7 Sonntag
|
||||
W:W Werktag
|
||||
W:E Wochenende
|
||||
W:H Feiertag
|
||||
|
||||
D:1.1 Neujahr
|
||||
D:easter Ostersonntag
|
||||
D:easter+1 Ostermontag
|
||||
D:1.5 1. Mai
|
||||
D:easter+39 Christi Himmelfahrt
|
||||
D:easter+49 Pfingstsonntag
|
||||
D:easter+50 Pfingstmontag
|
||||
D:23.6 Grossherzogs Geburtstag
|
||||
D:15.8 Maria Himmelfahrt
|
||||
D:1.11 Allerheiligen
|
||||
D:25.12 1. Weihnachtsfeiertag
|
||||
D:26.12 2. Weihnachtsfeiertag
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: postgres.c,v 1.1 1997/03/16 20:58:45 luethje Exp $
|
||||
/* $Id: postgres.c,v 1.2 2000/01/23 22:31:13 akool Exp $
|
||||
*
|
||||
* Interface for Postgres95-Database for isdn4linux. (db-module)
|
||||
*
|
||||
|
@ -19,6 +19,28 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: postgres.c,v $
|
||||
* Revision 1.2 2000/01/23 22:31:13 akool
|
||||
* isdnlog-4.04
|
||||
* - Support for Luxemburg added:
|
||||
* - isdnlog/country-de.dat ... no +352 1 luxemburg city
|
||||
* - isdnlog/rate-lu.dat ... initial LU version NEW
|
||||
* - isdnlog/holiday-lu.dat ... NEW - FIXME
|
||||
* - isdnlog/.Config.in ... LU support
|
||||
* - isdnlog/configure.in ... LU support
|
||||
* - isdnlog/samples/isdn.conf.lu ... LU support NEW
|
||||
*
|
||||
* - German zone-table enhanced
|
||||
* - isdnlog/tools/zone/de/01033/mk ...fixed, with verify now
|
||||
* - isdnlog/tools/zone/redzone ... fixed
|
||||
* - isdnlog/tools/zone/de/01033/mzoneall ... fixed, faster
|
||||
* - isdnlog/tools/zone/mkzonedb.c .... data Version 1.21
|
||||
*
|
||||
* - Patch from Philipp Matthias Hahn <pmhahn@titan.lahn.de>
|
||||
* - PostgreSQL SEGV solved
|
||||
*
|
||||
* - Patch from Armin Schindler <mac@melware.de>
|
||||
* - Eicon-Driver Support for isdnlog
|
||||
*
|
||||
* Revision 1.1 1997/03/16 20:58:45 luethje
|
||||
* Added the source code isdnlog. isdnlog is not working yet.
|
||||
* A workaround for that problem:
|
||||
|
@ -39,8 +61,12 @@
|
|||
|
||||
#include "postgres.h"
|
||||
|
||||
|
||||
|
||||
void _PQfinish(void)
|
||||
{
|
||||
if ( db_Conn )
|
||||
PQfinish( db_Conn);
|
||||
db_Conn = NULL;
|
||||
}
|
||||
|
||||
|
||||
int dbOpen(void)
|
||||
|
@ -100,7 +126,7 @@ int dbOpen(void)
|
|||
{
|
||||
syslog( LOG_ERR, "%s", "Connection to ISDN-database failed.");
|
||||
syslog( LOG_ERR, "%s", PQerrorMessage( db_Conn));
|
||||
PQfinish( db_Conn);
|
||||
_PQfinish();
|
||||
return( -1);
|
||||
}
|
||||
|
||||
|
@ -109,7 +135,7 @@ int dbOpen(void)
|
|||
|
||||
int dbClose(void)
|
||||
{
|
||||
PQfinish( db_Conn);
|
||||
_PQfinish();
|
||||
|
||||
if ( db_Host)
|
||||
free( db_Host);
|
||||
|
@ -150,7 +176,7 @@ int dbAdd( DbStrIn *in)
|
|||
{
|
||||
syslog( LOG_ERR, "%s", "Connection to ISDN-database failed.");
|
||||
syslog( LOG_ERR, "%s", PQerrorMessage( db_Conn));
|
||||
PQfinish( db_Conn);
|
||||
_PQfinish();
|
||||
return( -1);
|
||||
}
|
||||
|
||||
|
@ -187,7 +213,7 @@ int dbAdd( DbStrIn *in)
|
|||
{
|
||||
syslog( LOG_ERR, "%s", "Connection to ISDN-database failed.");
|
||||
syslog( LOG_ERR, "%s", PQerrorMessage( db_Conn));
|
||||
PQfinish( db_Conn);
|
||||
_PQfinish();
|
||||
return( -1);
|
||||
}
|
||||
|
||||
|
@ -201,7 +227,7 @@ int dbAdd( DbStrIn *in)
|
|||
{
|
||||
syslog( LOG_ERR, "%s", "Connection to ISDN-database failed.");
|
||||
syslog( LOG_ERR, "%s", PQerrorMessage( db_Conn));
|
||||
PQfinish( db_Conn);
|
||||
_PQfinish();
|
||||
return( -1);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: processor.c,v 1.96 2000/01/20 07:30:09 kai Exp $
|
||||
/* $Id: processor.c,v 1.97 2000/01/23 22:31:13 akool Exp $
|
||||
*
|
||||
* ISDN accounting for isdn4linux. (log-module)
|
||||
*
|
||||
|
@ -19,6 +19,28 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: processor.c,v $
|
||||
* Revision 1.97 2000/01/23 22:31:13 akool
|
||||
* isdnlog-4.04
|
||||
* - Support for Luxemburg added:
|
||||
* - isdnlog/country-de.dat ... no +352 1 luxemburg city
|
||||
* - isdnlog/rate-lu.dat ... initial LU version NEW
|
||||
* - isdnlog/holiday-lu.dat ... NEW - FIXME
|
||||
* - isdnlog/.Config.in ... LU support
|
||||
* - isdnlog/configure.in ... LU support
|
||||
* - isdnlog/samples/isdn.conf.lu ... LU support NEW
|
||||
*
|
||||
* - German zone-table enhanced
|
||||
* - isdnlog/tools/zone/de/01033/mk ...fixed, with verify now
|
||||
* - isdnlog/tools/zone/redzone ... fixed
|
||||
* - isdnlog/tools/zone/de/01033/mzoneall ... fixed, faster
|
||||
* - isdnlog/tools/zone/mkzonedb.c .... data Version 1.21
|
||||
*
|
||||
* - Patch from Philipp Matthias Hahn <pmhahn@titan.lahn.de>
|
||||
* - PostgreSQL SEGV solved
|
||||
*
|
||||
* - Patch from Armin Schindler <mac@melware.de>
|
||||
* - Eicon-Driver Support for isdnlog
|
||||
*
|
||||
* Revision 1.96 2000/01/20 07:30:09 kai
|
||||
* rewrote the ASN.1 parsing stuff. No known problems so far, apart from the
|
||||
* following:
|
||||
|
@ -3884,6 +3906,14 @@ static void processctrl(int card, char *s)
|
|||
memcpy(ps, "HEX: ", 5);
|
||||
} /* if */
|
||||
|
||||
if (!memcmp(ps, "DTRC:", 5)) { /* Eicon Driver */
|
||||
if (firsttime) {
|
||||
firsttime = 0;
|
||||
print_msg (PRT_NORMAL, "(Eicon active driver detected)\n");
|
||||
} /* if */
|
||||
memcpy(ps, "HEX: ", 5);
|
||||
} /* if */
|
||||
|
||||
if (!memcmp(ps, "HEX: ", 5)) { /* new HiSax Driver */
|
||||
|
||||
if (((verbose & VERBOSE_HEX) && !(verbose & VERBOSE_CTRL)) || stdoutput)
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
V:0.02-Luxemburg [18.01.2000]
|
||||
|
||||
U:%.3f LUF
|
||||
|
||||
P: 01 P&T Luxembourg
|
||||
B:1001 # Fixme: ???
|
||||
|
||||
Z:1 Inland # Ganzes Land
|
||||
A:+352
|
||||
T:W/8-19=0.25/240 Werktag
|
||||
T:W/6-8,19-23=0.25/480 Sparzeit
|
||||
T:6/6-23=0.25/480 Samstag
|
||||
#
|
||||
# line below works onyl f. isdnlog/rate >= 4.02
|
||||
# else you have to set all dates/times separatedly
|
||||
T:*/*=0.25/960 Sonstige Zeit
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# exapmle of /etc/isdn/isdn.conf
|
||||
# copy this file to /etc/isdn/isdn.conf and edit
|
||||
#
|
||||
# More information: /usr/doc/packages/i4l/isdnlog/README
|
||||
|
||||
|
||||
[GLOBAL]
|
||||
|
||||
COUNTRYPREFIX = +
|
||||
COUNTRYCODE = 352
|
||||
AREAPREFIX = 0
|
||||
|
||||
# EDIT THIS LINE:
|
||||
AREACODE = 0
|
||||
|
||||
[VARIABLES]
|
||||
|
||||
[ISDNLOG]
|
||||
LOGFILE = /var/log/isdn.log
|
||||
ILABEL = %b %e %T %ICall to tei %t from %N2 on %n2
|
||||
OLABEL = %b %e %T %Itei %t calling %N2 with '%n0'
|
||||
REPFMTWWW = "%X %D %17.17H %T %-17.17F %-20.20l SI: %S %9u %U %I %O"
|
||||
REPFMTSHORT = "%X%D %8.8H %T %-14.14F%U%I %O"
|
||||
REPFMT = " %X %D %15.15H %T %-15.15F %7u %U %I %O"
|
||||
CHARGEMAX = 50.00
|
||||
|
||||
CURRENCY = 1,LUF
|
||||
|
||||
COUNTRYFILE = /usr/lib/isdn/country-de.dat
|
||||
# RATECONF= /etc/isdn/rate.conf.lu
|
||||
RATEFILE= /usr/lib/isdn/rate-lu.dat
|
||||
HOLIDAYS= /usr/lib/isdn/holiday-lu.dat
|
||||
# ZONEFILE= /usr/lib/isdn/zone-lu-%s.gdbm
|
||||
DESTFILE= /usr/lib/isdn/dest.gdbm
|
||||
|
||||
# providerselect
|
||||
VBN = 10 #?
|
||||
VBNLEN = 2 #?
|
||||
PRESELECTED=1 #?
|
||||
|
|
@ -2,22 +2,34 @@
|
|||
|
||||
# This job fully generates a new "zone-de-dtag.gdbm"
|
||||
#
|
||||
# Be warned: This job runs about 2 day's, and requires more than
|
||||
# 100 Mb of free disk space!
|
||||
# Be warned: This job runs several hours, and requires more than
|
||||
# 300 Mb of free disk space!
|
||||
|
||||
cd /usr/src/isdn4k-utils/isdnlog/tools/zone/de/01033
|
||||
#cd /usr/src/isdn4k-utils/isdnlog/tools/zone/de/01033
|
||||
|
||||
# code contains 1xx numbers
|
||||
|
||||
mv ../code ../code1
|
||||
grep ^[^1] ../code1 > ../code
|
||||
|
||||
bzip2 -d zneu.de9.bz2
|
||||
./mzoneall
|
||||
bzip2 -9 zneu.de9
|
||||
|
||||
# restore code
|
||||
mv ../code1 ../code
|
||||
|
||||
../../redzone -zzoneall -rzred.dtag -l5 -v2 -n
|
||||
|
||||
rm -f zred.dtag.bz2
|
||||
bzip2 -9 zred.dtag
|
||||
|
||||
rm zoneall
|
||||
|
||||
cd ../..
|
||||
rm ../../zone-de-dtag.gdbm
|
||||
make DE
|
||||
|
||||
# verify it
|
||||
./zone -d ../../zone-de-dtag.gdbm -z de/01033/zoneall -v
|
||||
|
||||
rm de/01033/zoneall
|
||||
|
|
|
@ -84,7 +84,15 @@ unlink("$outz.temp");
|
|||
sub print1 {
|
||||
my($from, $to, $z) = @_;
|
||||
return if($from eq $to);
|
||||
if($all{$to}) {
|
||||
print OZ "$from $to $z\n";
|
||||
$done{"$from $to"}=1;
|
||||
grep { $done{"$from $_"}=1 if(/^$to/) } @{$ax[substr($to,0,1)]};
|
||||
}
|
||||
elsif (length($to)==1) {
|
||||
print OZ "$from $to $z\n";
|
||||
$done{"$from $to"}=1;
|
||||
}
|
||||
else {
|
||||
grep { print1($from,$_,$z) if(/^$to/) } @{$ax[substr($to,0,1)]};
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -204,7 +204,7 @@ static void write_db(char * df) {
|
|||
key.dptr = "vErSiO";
|
||||
key.dsize = 7;
|
||||
/* version of zone.c must be not smaller than dataversion */
|
||||
sprintf(version,"V1.20 K%c C%c N%d T%d O%d L%d",
|
||||
sprintf(version,"V1.21 K%c C%c N%d T%d O%d L%d",
|
||||
keylen==2?'S':'L',tablelen==1?'C':tablelen==2?'S':'L',
|
||||
nn,n, ortszone, numlen?numlen:keydigs);
|
||||
value.dptr = version;
|
||||
|
|
|
@ -48,7 +48,7 @@ sub getargs {
|
|||
$LEN = $opt{'l'} if ($opt{'l'});
|
||||
$keep_files=1 if(defined $opt{'k'});
|
||||
$opt_only=1 if(defined $opt{'o'});
|
||||
$rc = $LEN - 1;
|
||||
$rc = $LEN-1;
|
||||
&usage unless($inf && $outf);
|
||||
}
|
||||
|
||||
|
@ -121,9 +121,9 @@ sub normalize {
|
|||
while (<IN>) {
|
||||
chomp;
|
||||
($from, $to, $z) = split(/\s+/);
|
||||
($to, $from) = ($from, $to) if ($from gt $to);
|
||||
$from .= 'X' x ($LEN-length($from));
|
||||
$to .= 'X' x ($LEN-length($to));
|
||||
($to, $from) = ($from, $to) if ($from gt $to);
|
||||
print OUT "$from $to $z\n";
|
||||
print STDERR "$i\r" if ($verbose >= 2 && $i%1000==0);
|
||||
$i++;
|
||||
|
@ -241,8 +241,17 @@ sub reduce_2 {
|
|||
}
|
||||
$redc = ((sort {$zc{$b} <=> $zc{$a} } (keys(%zc)))[0]);
|
||||
print "Got $n: ($from[0] $to[0] - $to[$#to]) Red $redc Old '$old'\n" if ($verbose >= 3);
|
||||
print "There are ",scalar(keys(%zc))," zones\n" if($verbose>=3);
|
||||
|
||||
#if there is a shorter one than this is the default
|
||||
if (scalar(keys(%zc)) == 1) { # write shortcut
|
||||
$k=0;
|
||||
substr($to[$k], $which, $pass) = 'X' x $pass;
|
||||
print OUT "$from[$k] $to[$k] $z[$k]\n";
|
||||
$rem++;
|
||||
$redt-=$n,$red-=$n;
|
||||
}
|
||||
else {
|
||||
my ($l);
|
||||
$l = $LEN-$pass+1;
|
||||
for ($j=1 ;$j < $n; $j++) {
|
||||
|
@ -271,9 +280,10 @@ sub reduce_2 {
|
|||
$rem++;
|
||||
$redt--,$red--;
|
||||
}
|
||||
}
|
||||
# clean up & init for next bunch
|
||||
@from = @to = @z = ();
|
||||
push(@from, $from); # these we have already red
|
||||
push(@from, $from); # these we have already read
|
||||
push(@to, $to);
|
||||
push(@z, $z);
|
||||
if (length($to) > $which) {
|
||||
|
|
Loading…
Reference in New Issue