isdnlog-4.00 (Millenium-Edition)
- Oracle support added by Jan Bolt (Jan.Bolt@t-online.de) - resolved *any* warnings against rate-de.dat - Many new rates - CREDITS file added
This commit is contained in:
parent
cdcdf04af9
commit
c727c68801
|
@ -17,6 +17,7 @@ bool 'Support mysql SQL-Database' CONFIG_ISDNLOG_MYSQLDB
|
|||
if [ "$CONFIG_ISDNLOG_MYSQLDB" = "y" ]; then
|
||||
string 'directory of mysql' CONFIG_ISDNLOG_MYSQLDIR
|
||||
fi
|
||||
bool 'Support Oracle SQL-Database' CONFIG_ISDNLOG_ORACLE
|
||||
choice 'Country specific chargeinfo support' \
|
||||
"DE CONFIG_ISDN_LOG_DE \
|
||||
AT CONFIG_ISDN_LOG_AT \
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
isdnlog CREDITS 31-Dec-1999 11:39 AK
|
||||
|
||||
|
||||
Das Programm "isdnlog" begann mit einem Dreizeiler, den ich am
|
||||
28. September 1995 19:19 Uhr in der isdn4linux-Mailing-Liste veroeffentlicht
|
||||
habe.
|
||||
|
||||
Ueber die Jahre wuchs dieses Programm zu stolzen 6,6 Mb Sourcecode heran.
|
||||
|
||||
Zu dieser Arbeit haben unzaehlige Autoren beigetragen, ganz besonders moechte
|
||||
ich jedoch folgenden Personen danken:
|
||||
|
||||
core programmer:
|
||||
Stefan Luethje <luethje@sl-gw.lake.de>
|
||||
Michael Reinelt <reinelt@eunet.at>
|
||||
Leopold Toetsch <lt@toetsch.at>
|
||||
|
||||
rate-de Team:
|
||||
Jochen Erwied <j.erwied@gmx.de>
|
||||
Alexander Werner Skwar <askwar@digitalprojects.com>
|
||||
|
||||
Patches:
|
||||
Fritz Elfert (fritz@isdn4linux.de)
|
||||
Jan den Ouden (denouden@groovin.xs4all.nl)
|
||||
Beat Doebeli (doebeli@vptt.ch)
|
||||
Michael Bongartz (micha@mubo.saar.de)
|
||||
Kai Voelcker (kai@fantaghiro.deceiver.org)
|
||||
Martin Stover (mstover@Stover.f.UUnet.de)
|
||||
Karsten Keil (isdn4@temic-ech.spacenet.de)
|
||||
Jochen Heuer (jogi@planetzork.ping.de)
|
||||
Hardy Buchholz (hardy@Kool.f.UUnet.de)
|
||||
Ad Aerts (ad@aasup.nl)
|
||||
Markus Maeder (mmaeder@cyberlink.ch)
|
||||
Paul Slootman <paul@wau.mis.ah.nl>
|
||||
Markus Leist (markus@hal.dirnet.com)
|
||||
Dirk Staneker (dirk.staneker@student.uni-tuebingen.de)
|
||||
Ullrich von Bassewitz (uz@musoftware.com)
|
||||
Jan.Bolt@t-online.de
|
||||
|
||||
Sollte ich jemand in dieser Aufstellung vergessen haben, bitte ich um
|
||||
Mitteilung!
|
||||
|
||||
Andreas Kool (akool@isdn4linux.de)
|
|
@ -1,8 +1,8 @@
|
|||
## $Id: Makefile.in,v 1.136 1999/12/24 14:17:02 akool Exp $
|
||||
## $Id: Makefile.in,v 1.137 1999/12/31 13:57:17 akool Exp $
|
||||
##
|
||||
## ISDN accounting for isdn4linux.
|
||||
##
|
||||
## Copyright 1995, 1999 by Andreas Kool (akool@isdn4linux.de)
|
||||
## Copyright 1995 .. 2000 by Andreas Kool (akool@isdn4linux.de)
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
|
@ -19,6 +19,13 @@
|
|||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## $Log: Makefile.in,v $
|
||||
## Revision 1.137 1999/12/31 13:57:17 akool
|
||||
## isdnlog-4.00 (Millenium-Edition)
|
||||
## - Oracle support added by Jan Bolt (Jan.Bolt@t-online.de)
|
||||
## - resolved *any* warnings against rate-de.dat
|
||||
## - Many new rates
|
||||
## - CREDITS file added
|
||||
##
|
||||
## Revision 1.136 1999/12/24 14:17:02 akool
|
||||
## isdnlog-3.81
|
||||
## - isdnlog/tools/NEWS
|
||||
|
@ -921,6 +928,7 @@ POSTGRES := @POSTGRES@
|
|||
POSTGRESDIR := @POSTGRESDIR@
|
||||
MYSQLDB := @MYSQLDB@
|
||||
MYSQLDIR := @MYSQLDIR@
|
||||
ORACLE := @ORACLE@
|
||||
SERV_PORT := @SERV_PORT@
|
||||
USERFILE := @USERFILE@
|
||||
DEFS :=
|
||||
|
@ -970,7 +978,7 @@ SERVICEFILE = /etc/services
|
|||
# DON'T EDIT BELOW THIS LINE
|
||||
######################################################################
|
||||
|
||||
VERSION = 3.81
|
||||
VERSION = 4.00
|
||||
|
||||
MANPAGES = isdnlog/callerid.conf.5 isdnlog/isdn.conf.5 \
|
||||
isdnlog/isdnformat.5 isdnlog/isdnlog.5 isdnlog/isdnlog.8 \
|
||||
|
@ -989,6 +997,26 @@ INCLUDE += -I$(MYSQLDIR)/include
|
|||
LIB += -L$(MYSQLDIR)/lib -lmysqlclient -lm
|
||||
endif
|
||||
|
||||
ifeq ($(ORACLE),1)
|
||||
DEFS += -DORACLE
|
||||
INCLUDE += -I$(ORACLE_HOME)/precomp/public
|
||||
ORALIBS = -L$(ORACLE_HOME)/lib \
|
||||
-lclntsh $(ORACLE_HOME)/lib/scorept.o $(ORACLE_HOME)/lib/sscoreed.o \
|
||||
$(ORACLE_HOME)/rdbms/lib/kpudfo.o \
|
||||
-lclient -lsql $(ORACLE_HOME)/lib/nautab.o $(ORACLE_HOME)/lib/naeet.o \
|
||||
$(ORACLE_HOME)/lib/naect.o $(ORACLE_HOME)/lib/naedhs.o \
|
||||
`cat $(ORACLE_HOME)/lib/naldflgs` \
|
||||
-lnetv2 -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork \
|
||||
-lclient -lvsn -lcommon -lgeneric -lmm -lnlsrtl3 -lcore4 \
|
||||
-lnlsrtl3 -lcore4 -lnlsrtl3 -lnetv2 -lnttcp -lnetwork -lncr \
|
||||
-lnetv2 -lnttcp -lnetwork -lclient -lvsn -lcommon -lgeneric \
|
||||
$(ORACLE_HOME)/lib/libplsf.a $(ORACLE_HOME)/lib/libplsb.a \
|
||||
$(ORACLE_HOME)/lib/libextp.a \
|
||||
-lepc -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lclient \
|
||||
-lvsn -lcommon -lgeneric -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 \
|
||||
`cat $(ORACLE_HOME)/lib/sysliblist` -ldl -lm
|
||||
endif
|
||||
|
||||
ifdef DBMALLOC
|
||||
DEFS += -DDBMALLOC=1
|
||||
LIB += -ldbmalloc
|
||||
|
@ -1001,6 +1029,9 @@ DEFS += \
|
|||
-DBIG_PHONE_NUMBERS=1 \
|
||||
$(INCLUDE)
|
||||
|
||||
PC = proc
|
||||
PCFLAGS = mode=oracle ireclen=160 lines=yes
|
||||
|
||||
%.o: %.c
|
||||
@echo Compiling $<
|
||||
@$(CC) $(CFLAGS) $(DEFS) $(INCLUDE) -c -o $@ $<
|
||||
|
@ -1035,6 +1066,10 @@ ifeq ($(MYSQLDB),1)
|
|||
ISDNLOG_OBJS += isdnlog/mysqldb.o
|
||||
endif
|
||||
|
||||
ifeq ($(ORACLE),1)
|
||||
ISDNLOG_OBJS += isdnlog/oracle.o
|
||||
endif
|
||||
|
||||
ifdef TESTCENTER
|
||||
ISDNLOG_OBJS += isdnlog/test_center.o
|
||||
endif
|
||||
|
@ -1063,16 +1098,22 @@ ISDNRATE_OBJS= tools/isdnrate.o tools/isdnconf.o tools/tools.o \
|
|||
$(LIBISDNDIR)/libisdn.a
|
||||
|
||||
|
||||
ORA_LOAD_OBJS= isdnlog/ora_load.o isdnlog/oracle.o
|
||||
ISDNLOG = bin/isdnlog
|
||||
ISDNCONF = bin/isdnconf
|
||||
ISDNREP = bin/isdnrep
|
||||
ISDNBILL = bin/isdnbill
|
||||
ISDNRATE = bin/isdnrate
|
||||
ORA_LOAD = bin/ora_load
|
||||
|
||||
MODS = *.o */*.o
|
||||
|
||||
PROGS = $(ISDNLOG) $(ISDNREP) $(ISDNBILL) $(ISDNCONF) $(ISDNRATE)
|
||||
|
||||
ifeq ($(ORACLE),1)
|
||||
PROGS += $(ORA_LOAD)
|
||||
endif
|
||||
|
||||
all: depend libs mybin progs $(MANPAGES)
|
||||
|
||||
Makefile: Makefile.in config.status
|
||||
|
@ -1223,7 +1264,7 @@ distrib: distclean
|
|||
# uuencode /tmp/isdnlog-$(I4LVERSION).tar.gz isdnlog-$(I4LVERSION).tar.gz > /tmp/isdnlog-$(I4LVERSION).uue
|
||||
|
||||
$(ISDNLOG): $(ISDNLOG_OBJS)
|
||||
$(CC) -o $(ISDNLOG) $(LFLAGS) $(ISDNLOG_OBJS) $(LIB)
|
||||
$(CC) -o $(ISDNLOG) $(LFLAGS) $(ISDNLOG_OBJS) $(ORALIBS) $(LIB)
|
||||
|
||||
$(ISDNREP): $(ISDNREP_OBJS)
|
||||
$(CC) -o $(ISDNREP) $(LFLAGS) $(ISDNREP_OBJS) $(LIB)
|
||||
|
@ -1237,6 +1278,16 @@ $(ISDNCONF): $(ISDNCONF_OBJS)
|
|||
$(ISDNRATE): $(ISDNRATE_OBJS)
|
||||
$(CC) -o $(ISDNRATE) $(LFLAGS) $(ISDNRATE_OBJS) $(LIB)
|
||||
|
||||
$(ORA_LOAD): $(ORA_LOAD_OBJS)
|
||||
$(CC) -o $(ORA_LOAD) $(LFLAGS) $(ORA_LOAD_OBJS) $(ORALIBS)
|
||||
|
||||
isdnlog/oracle.o: isdnlog/oracle.pc
|
||||
$(PC) $(PCFLAGS) include=isdnlog code=ansi_c lname=isdnlog/_kgw.lis \
|
||||
iname=$< oname=isdnlog/_kgw.c
|
||||
$(CC) $(CFLAGS) $(DEFS) $(INCLUDE) -o $@ -c isdnlog/_kgw.c
|
||||
$(RM) isdnlog/_kgw.c
|
||||
$(RM) isdnlog/_kgw.lis
|
||||
|
||||
tools/tools.h: $(LIBISDNDIR)/libisdn.h $(PREFIXDIR)/policy.h
|
||||
touch tools/tools.h
|
||||
|
||||
|
@ -1244,4 +1295,8 @@ depend: .depend
|
|||
|
||||
.depend:
|
||||
$(CPP) -M $(CFLAGS) $(DEFS) $(INCLUDE) */*.c >.depend
|
||||
ifeq ($(ORACLE),1)
|
||||
$(CPP) -M $(CFLAGS) $(DEFS) $(INCLUDE) - < isdnlog/oracle.pc | \
|
||||
sed s/-:/oracle.o:/ >>.depend
|
||||
endif
|
||||
# $(CPP) -M $(CFLAGS) $(DEFS) $(INCLUDE) */*.c */*/*.c >.depend
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
ISDNLOG - Version 3.64 - 29-Oct-1999
|
||||
ISDNLOG - Version 4.00 - 01-Jan-2000
|
||||
|
||||
|
||||
isdnlog ist ein Utility zur Auswertung des D-Kanals eines
|
||||
ISDN-BRI Anschlusses.
|
||||
|
||||
isdnlog-3.64 wurde ausgiebig mit Linux-2.0.38, Linux-2.2.13 sowie
|
||||
Linux-2.3.25 getestet.
|
||||
isdnlog-4.00 wurde ausgiebig mit Linux-2.0.38, Linux-2.2.13 sowie
|
||||
Linux-2.3.34 getestet.
|
||||
|
||||
|
||||
Fuer alle, die es nun ueberhaupt nicht mehr abwarten koennen, hier das
|
||||
|
@ -113,6 +113,7 @@ Inhalt:
|
|||
16. SQL-Anbindung
|
||||
16.1. Postgres95
|
||||
16.2. MySQL
|
||||
16.3. Oracle
|
||||
17. Tarifdatenbank
|
||||
18. LCR (Least cost router)
|
||||
19. Probleme?
|
||||
|
@ -1591,7 +1592,7 @@ Es gibt aber 10 zusaetzliche Variablen, die verwendet werden duerfen:
|
|||
\$8 : Die Output-Bytes
|
||||
\$9 : Die Input-Bytes pro Sekunde
|
||||
\$10 : Die Output-Bytes pro Sekunde
|
||||
\$11 : Die Dienstekenung
|
||||
\$11 : Die Dienstkennung
|
||||
\$12 : Die Gebuehren
|
||||
\$13 : Gibt als String die Landesvorwahl des Anrufenden an.
|
||||
\$14 : Gibt als String die Landesvorwahl des Angerufenden an.
|
||||
|
@ -3964,6 +3965,57 @@ CREATE TABLE isdnlog (
|
|||
--
|
||||
|
||||
|
||||
16.3. Oracle
|
||||
------------
|
||||
|
||||
Wenn im Konfigurationmenue Oracle ausgewaehlt wird, werden alle
|
||||
Verbindungsdaten zusaetzlich zur Datei isdn.log in die Tabelle isdn
|
||||
in der Oracle-Datenbank geschrieben.
|
||||
|
||||
Der Connect-String wird in der Datei ./isdnlog/oracle.h definiert.
|
||||
DB_CONNECT_STRING=isdn/isdn
|
||||
Durch die Environment-Variable DB_CONNECT_STRING kann der Wert ueberschrieben
|
||||
werden. export DB_CONNECT_STRING=user/password@db
|
||||
|
||||
In der Datenabnk ist der user anzulegen.
|
||||
sqlplus system/system_password
|
||||
SQL> create user isdn identified by isdn
|
||||
SQL> default tablespace users temporary tablespace temp;
|
||||
SQL> grant connect, resource to isdn;
|
||||
SQL> quit
|
||||
|
||||
Mit dem isdnlog/isdnlog/oracle/Script oracle.sql
|
||||
wird die Tabelle isdn angelegt:
|
||||
# sqlplus isdn/isdn @oracle
|
||||
|
||||
Verbindungsdaten, deren insert fehlschlaegt (DB is offline), landen als SQL
|
||||
in /var/log/isdn-fail.sql und koennen mit sqlplus nachgeladen werden.
|
||||
|
||||
Das Programm ora_load importiert die bestehende Datei isdn.log in die
|
||||
Oracle-Datenbank. (DB_CONNECT_STRING s.o.)
|
||||
|
||||
Die Oracle-Umgebung muss fuer isdnlog und ora_load gesetzt sein, alle
|
||||
Start-Scripts muessen entsprechend angepasst werden.
|
||||
|
||||
Bei mir sieht das so aus
|
||||
|
||||
# Oracle 8.0
|
||||
export ORACLE_BASE ORACLE_HOME ORACLE_SID ORACLE_TERM ORA_NLS33
|
||||
export TNS_ADMIN NLS_LANG LD_LIBRARY_PATH TWO_TASK
|
||||
ORACLE_BASE=/ora01/app/oracle
|
||||
ORACLE_HOME=/ora01/app/oracle/product/8.0.5
|
||||
ORACLE_SID=orcl
|
||||
#ORACLE_TERM=vt100
|
||||
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
|
||||
#NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
|
||||
TNS_ADMIN=$ORACLE_HOME/network/admin
|
||||
# Alternativ in /etc/ld.so.conf
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
|
||||
#PATH="$PATH:$ORACLE_HOME/bin"
|
||||
# Default DB
|
||||
TWO_TASK=jb2
|
||||
|
||||
|
||||
17. Tarifdatenbank
|
||||
------------------
|
||||
|
||||
|
|
|
@ -113,4 +113,26 @@ AC_DEFUN(AC_CHECK_MYSQLDB, [
|
|||
AC_SUBST(MYSQLDIR)
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Check for Oracle
|
||||
dnl
|
||||
|
||||
AC_DEFUN(AC_CHECK_ORACLE, [
|
||||
oradir="no"
|
||||
if test "$ORACLE_HOME" != "" && test "$CONFIG_ISDNLOG_ORACLE" = "y" ; then
|
||||
AC_MSG_CHECKING([for Oracle in ${ORACLE_HOME}])
|
||||
if test -x ${ORACLE_HOME}/bin/proc ; then
|
||||
oradir="yes"
|
||||
fi
|
||||
fi
|
||||
if test "$oradir" != "no" ; then
|
||||
AC_MSG_RESULT("yes")
|
||||
ORACLE=1
|
||||
AC_DEFINE_UNQUOTED(ORACLE,1)
|
||||
else
|
||||
AC_MSG_RESULT("no ORACLE DISABLED")
|
||||
fi
|
||||
AC_SUBST(ORACLE)
|
||||
])
|
||||
|
||||
sinclude(../etc/ackernel.m4)dnl
|
||||
|
|
|
@ -123,6 +123,7 @@ AC_CHECK_LIB(gdbm, gdbm_open, DBMLIB=-lgdbm; AC_DEFINE(HAVE_LIBGDBM),
|
|||
AC_CHECK_LIB(db, dbm_open, DBMLIB=-ldb; AC_DEFINE(HAVE_LIBDB))))
|
||||
AC_CHECK_POSTGRES
|
||||
AC_CHECK_MYSQLDB
|
||||
AC_CHECK_ORACLE
|
||||
|
||||
dnl TODO: replace main by a funcion within libdbmalloc
|
||||
#AC_CHECK_LIB(dbmalloc, main)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $Id: isdnbill.c,v 1.12 1999/12/24 14:17:04 akool Exp $
|
||||
/* $Id: isdnbill.c,v 1.13 1999/12/31 13:57:18 akool Exp $
|
||||
*
|
||||
* ISDN accounting for isdn4linux. (Billing-module)
|
||||
*
|
||||
* Copyright 1995, 1999 by Andreas Kool (akool@isdn4linux.de)
|
||||
* Copyright 1995 .. 2000 by Andreas Kool (akool@isdn4linux.de)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -493,7 +493,12 @@ static char *beautify(char *num)
|
|||
static char res[BUFSIZ];
|
||||
|
||||
|
||||
normalizeNumber(num, &number, TN_ALL);
|
||||
if (*num)
|
||||
normalizeNumber(num, &number, TN_ALL);
|
||||
else {
|
||||
sprintf(res, "%*s", -COUNTRYLEN, "UNKNOWN");
|
||||
return(res);
|
||||
} /* else */
|
||||
|
||||
if (*number.msn)
|
||||
sprintf(sx, "%s%s%s", number.area, (*number.area ? "/" : ""), number.msn);
|
||||
|
@ -647,7 +652,7 @@ static char *numtonam(int n, int other)
|
|||
auto UC s[32];
|
||||
|
||||
|
||||
if (onlynumbers) {
|
||||
if (onlynumbers || !*c.num[n]) {
|
||||
c.known[n] = UNKNOWN;
|
||||
return(NULL);
|
||||
} /* if */
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $Id: isdnrep.c,v 1.85 1999/12/17 22:51:54 akool Exp $
|
||||
/* $Id: isdnrep.c,v 1.86 1999/12/31 13:57:18 akool Exp $
|
||||
*
|
||||
* ISDN accounting for isdn4linux. (Report-module)
|
||||
*
|
||||
* Copyright 1995, 1999 by Andreas Kool (akool@isdn4linux.de)
|
||||
* Copyright 1995 .. 2000 by Andreas Kool (akool@isdn4linux.de)
|
||||
* and Stefan Luethje (luethje@sl-gw.lake.de)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@ -24,6 +24,13 @@
|
|||
*
|
||||
*
|
||||
* $Log: isdnrep.c,v $
|
||||
* Revision 1.86 1999/12/31 13:57:18 akool
|
||||
* isdnlog-4.00 (Millenium-Edition)
|
||||
* - Oracle support added by Jan Bolt (Jan.Bolt@t-online.de)
|
||||
* - resolved *any* warnings against rate-de.dat
|
||||
* - Many new rates
|
||||
* - CREDITS file added
|
||||
*
|
||||
* Revision 1.85 1999/12/17 22:51:54 akool
|
||||
* isdnlog-3.79
|
||||
* - isdnlog/isdnrep/isdnrep.{c,h} ... error -handling, print_msg
|
||||
|
@ -1318,7 +1325,7 @@ static int print_bottom(double unit, char *start, char *stop)
|
|||
print_line2(F_BODY_HEADERL,"Outgoing calls ordered by Zone");
|
||||
strich(1);
|
||||
|
||||
for (i = 0; i < MAXZONES + 1; i++)
|
||||
for (i = 0; i < MAXZONES /* + 1 */; i++)
|
||||
if (zones_usage[i]) {
|
||||
auto char s[BUFSIZ];
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $Id: isdnrep.h,v 1.17 1999/12/17 22:51:54 akool Exp $
|
||||
/* $Id: isdnrep.h,v 1.18 1999/12/31 13:57:19 akool Exp $
|
||||
*
|
||||
* ISDN accounting for isdn4linux.
|
||||
*
|
||||
* Copyright 1995, 1999 by Andreas Kool (akool@isdn4linux.de)
|
||||
* Copyright 1995 .. 2000 by Andreas Kool (akool@isdn4linux.de)
|
||||
* and Stefan Luethje (luethje@sl-gw.lake.de)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@ -20,6 +20,13 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: isdnrep.h,v $
|
||||
* Revision 1.18 1999/12/31 13:57:19 akool
|
||||
* isdnlog-4.00 (Millenium-Edition)
|
||||
* - Oracle support added by Jan Bolt (Jan.Bolt@t-online.de)
|
||||
* - resolved *any* warnings against rate-de.dat
|
||||
* - Many new rates
|
||||
* - CREDITS file added
|
||||
*
|
||||
* Revision 1.17 1999/12/17 22:51:54 akool
|
||||
* isdnlog-3.79
|
||||
* - isdnlog/isdnrep/isdnrep.{c,h} ... error -handling, print_msg
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $Id: rep_main.c,v 1.11 1999/12/17 22:51:55 akool Exp $
|
||||
/* $Id: rep_main.c,v 1.12 1999/12/31 13:57:19 akool Exp $
|
||||
*
|
||||
* ISDN accounting for isdn4linux. (Report-module)
|
||||
*
|
||||
* Copyright 1995, 1999 by Andreas Kool (akool@isdn4linux.de)
|
||||
* Copyright 1995 .. 2000 by Andreas Kool (akool@isdn4linux.de)
|
||||
* and Stefan Luethje (luethje@sl-gw.lake.de)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@ -20,6 +20,13 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: rep_main.c,v $
|
||||
* Revision 1.12 1999/12/31 13:57:19 akool
|
||||
* isdnlog-4.00 (Millenium-Edition)
|
||||
* - Oracle support added by Jan Bolt (Jan.Bolt@t-online.de)
|
||||
* - resolved *any* warnings against rate-de.dat
|
||||
* - Many new rates
|
||||
* - CREDITS file added
|
||||
*
|
||||
* Revision 1.11 1999/12/17 22:51:55 akool
|
||||
* isdnlog-3.79
|
||||
* - isdnlog/isdnrep/isdnrep.{c,h} ... error -handling, print_msg
|
||||
|
|
File diff suppressed because it is too large
Load Diff
1474
isdnlog/rate-de.dat
1474
isdnlog/rate-de.dat
File diff suppressed because it is too large
Load Diff
16901
isdnlog/rate-de.dat.src
16901
isdnlog/rate-de.dat.src
File diff suppressed because it is too large
Load Diff
|
@ -5,15 +5,22 @@ P:01=2 # PTA Standardtarif (ATS 1.056 je Einheit)
|
|||
#P:01=5 # PTA Geschäftstarif 3 (ATS 0.816 je Einheit)
|
||||
#P:02 # UTA
|
||||
#P:03 # Multikom
|
||||
#P:04,1 # Globalone
|
||||
#P:04,2 # Globalone Business
|
||||
#P:05 # tele2
|
||||
#P:07=1 # European Telecom, 1 Jahr feste Bindung
|
||||
#P:07=2 # European Telecom, 14-tägig kündbar
|
||||
#P:11 # RSL COM
|
||||
#P:07 # European Telecom Fairtel
|
||||
#P:08 # TELEforum
|
||||
#P:09 # Vocalis
|
||||
#P:11=0 # RSL COM
|
||||
#P:11=1 # TNC 10elf
|
||||
#P:12 # 1012
|
||||
#P:24 # Telepassport
|
||||
#P:29,1 # CyberTron easy.Talk privat (ATS 1.116 je Einheit)
|
||||
#P:29,2 # CyberTron easy.Talk business (ATS 1.029 je Einheit)
|
||||
#P:29,5 # Librotel (nur ueber Router)
|
||||
#P:29,6 # TNS
|
||||
#P:44 # Citykom
|
||||
#P:49 # Pegasus Telekom
|
||||
#P:66 # MIT 1066
|
||||
#P:67 # max.plus
|
||||
#P:69 # Connect Austria (One)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $Id: country.c,v 1.6 1999/09/26 10:55:20 akool Exp $
|
||||
/* $Id: country.c,v 1.7 1999/12/31 13:57:19 akool Exp $
|
||||
*
|
||||
* Länderdatenbank
|
||||
*
|
||||
* Copyright 1995, 1999 by Andreas Kool (akool@isdn4linux.de)
|
||||
* Copyright 1995 .. 2000 by Andreas Kool (akool@isdn4linux.de)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -19,6 +19,13 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: country.c,v $
|
||||
* Revision 1.7 1999/12/31 13:57:19 akool
|
||||
* isdnlog-4.00 (Millenium-Edition)
|
||||
* - Oracle support added by Jan Bolt (Jan.Bolt@t-online.de)
|
||||
* - resolved *any* warnings against rate-de.dat
|
||||
* - Many new rates
|
||||
* - CREDITS file added
|
||||
*
|
||||
* Revision 1.6 1999/09/26 10:55:20 akool
|
||||
* isdnlog-3.55
|
||||
* - Patch from Oliver Lauer <Oliver.Lauer@coburg.baynet.de>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: holiday.c,v 1.16 1999/09/09 11:21:05 akool Exp $
|
||||
/* $Id: holiday.c,v 1.17 1999/12/31 13:57:19 akool Exp $
|
||||
*
|
||||
* Feiertagsberechnung
|
||||
*
|
||||
|
@ -19,6 +19,13 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: holiday.c,v $
|
||||
* Revision 1.17 1999/12/31 13:57:19 akool
|
||||
* isdnlog-4.00 (Millenium-Edition)
|
||||
* - Oracle support added by Jan Bolt (Jan.Bolt@t-online.de)
|
||||
* - resolved *any* warnings against rate-de.dat
|
||||
* - Many new rates
|
||||
* - CREDITS file added
|
||||
*
|
||||
* Revision 1.16 1999/09/09 11:21:05 akool
|
||||
* isdnlog-3.49
|
||||
*
|
||||
|
@ -197,7 +204,7 @@ typedef struct {
|
|||
char *name;
|
||||
} HOLIDATE;
|
||||
|
||||
static char *defaultWeekday[] = { "", /* not used */
|
||||
static char *defaultWeekday[] = { "", /* not used */
|
||||
"Everyday",
|
||||
"Workday",
|
||||
"Weekend",
|
||||
|
@ -208,7 +215,7 @@ static char *defaultWeekday[] = { "", /* not used */
|
|||
"Friday",
|
||||
"Saturday",
|
||||
"Sunday",
|
||||
"Holiday" };
|
||||
"Holiday" };
|
||||
|
||||
static int line = 0;
|
||||
static char *Weekday[COUNT(defaultWeekday)] = { NULL, };
|
||||
|
@ -457,11 +464,11 @@ static char *staticString (char *fmt, ...)
|
|||
for (i=0; i<Size; i++)
|
||||
if (strcmp (buffer, Table[i])==0)
|
||||
return Table[i];
|
||||
|
||||
|
||||
Size++;
|
||||
Table=realloc(Table, Size*sizeof(char*));
|
||||
Table[Size-1]=strdup(buffer);
|
||||
|
||||
|
||||
return Table[Size-1];
|
||||
}
|
||||
|
||||
|
@ -472,7 +479,7 @@ int isDay(struct tm *tm, bitfield mask, char **name)
|
|||
julian day=(date2julian(tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday)-6)%7+MONDAY;
|
||||
|
||||
if ((mask & (1<<HOLIDAY)) && isHoliday(tm, &holiname)) {
|
||||
if (name) *name=staticString("%s (%s)", Weekday[HOLIDAY], holiname);
|
||||
if (name) *name=staticString("%s (%s)", Weekday[HOLIDAY], holiname);
|
||||
return HOLIDAY;
|
||||
}
|
||||
|
||||
|
@ -480,22 +487,22 @@ int isDay(struct tm *tm, bitfield mask, char **name)
|
|||
if (name) *name=staticString("%s (%s)", Weekday[WEEKEND], Weekday[day]);
|
||||
return WEEKEND;
|
||||
}
|
||||
|
||||
|
||||
if ((mask & (1<<WORKDAY)) && day!=SATURDAY && day!=SUNDAY && !isHoliday(tm, NULL)) {
|
||||
if (name) *name=staticString("%s (%s)", Weekday[WORKDAY], Weekday[day]);
|
||||
return WORKDAY;
|
||||
}
|
||||
|
||||
|
||||
if (mask & (1<<day)) {
|
||||
if (name) *name=staticString("%s", Weekday[day]);
|
||||
return day;
|
||||
}
|
||||
|
||||
|
||||
if (mask & (1<<EVERYDAY)) {
|
||||
if (name) *name=staticString("%s", Weekday[EVERYDAY]);
|
||||
return day;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $Id: isdnconf.c,v 1.30 1999/10/25 18:30:03 akool Exp $
|
||||
/* $Id: isdnconf.c,v 1.31 1999/12/31 13:57:19 akool Exp $
|
||||
*
|
||||
* ISDN accounting for isdn4linux. (Utilities)
|
||||
*
|
||||
* Copyright 1995, 1999 by Andreas Kool (akool@isdn4linux.de)
|
||||
* Copyright 1995 .. 2000 by Andreas Kool (akool@isdn4linux.de)
|
||||
* and Stefan Luethje (luethje@sl-gw.lake.de)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@ -20,6 +20,13 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: isdnconf.c,v $
|
||||
* 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)
|
||||
* - resolved *any* warnings against rate-de.dat
|
||||
* - Many new rates
|
||||
* - CREDITS file added
|
||||
*
|
||||
* Revision 1.30 1999/10/25 18:30:03 akool
|
||||
* isdnlog-3.57
|
||||
* WARNING: Experimental version!
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $Id: isdnrate.c,v 1.30 1999/12/24 14:17:05 akool Exp $
|
||||
/* $Id: isdnrate.c,v 1.31 1999/12/31 13:57:20 akool Exp $
|
||||
|
||||
* ISDN accounting for isdn4linux. (rate evaluation)
|
||||
*
|
||||
* Copyright 1995, 1999 by Andreas Kool (akool@isdn4linux.de)
|
||||
* Copyright 1995 .. 2000 by Andreas Kool (akool@isdn4linux.de)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -19,6 +19,13 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: isdnrate.c,v $
|
||||
* Revision 1.31 1999/12/31 13:57:20 akool
|
||||
* isdnlog-4.00 (Millenium-Edition)
|
||||
* - Oracle support added by Jan Bolt (Jan.Bolt@t-online.de)
|
||||
* - resolved *any* warnings against rate-de.dat
|
||||
* - Many new rates
|
||||
* - CREDITS file added
|
||||
*
|
||||
* Revision 1.30 1999/12/24 14:17:05 akool
|
||||
* isdnlog-3.81
|
||||
* - isdnlog/tools/NEWS
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $Id: rate.c,v 1.69 1999/12/24 14:17:06 akool Exp $
|
||||
/* $Id: rate.c,v 1.70 1999/12/31 13:57:20 akool Exp $
|
||||
*
|
||||
* Tarifdatenbank
|
||||
*
|
||||
* Copyright 1995, 1999 by Andreas Kool (akool@isdn4linux.de)
|
||||
* Copyright 1995 .. 2000 by Andreas Kool (akool@isdn4linux.de)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -19,6 +19,13 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: rate.c,v $
|
||||
* Revision 1.70 1999/12/31 13:57:20 akool
|
||||
* isdnlog-4.00 (Millenium-Edition)
|
||||
* - Oracle support added by Jan Bolt (Jan.Bolt@t-online.de)
|
||||
* - resolved *any* warnings against rate-de.dat
|
||||
* - Many new rates
|
||||
* - CREDITS file added
|
||||
*
|
||||
* Revision 1.69 1999/12/24 14:17:06 akool
|
||||
* isdnlog-3.81
|
||||
* - isdnlog/tools/NEWS
|
||||
|
@ -1138,8 +1145,10 @@ int initRate(char *conf, char *dat, char *dom, char **msg)
|
|||
if (Provider[prefix].Zone[zone].nHour==0)
|
||||
if (zone) /* AK:17Dec99 Zone=0 is per definition free of charge */
|
||||
whimper (dat, "Zone %d has no 'T:' Entries", zone);
|
||||
#if 0 /* AK:28Dec1999 - Sorry, Leo ... Millenium-Release! */
|
||||
if (!(where & FEDERAL))
|
||||
whimper (dat, "Provider %d has no default domestic zone #1 (missing 'A:%s')", prefix, mycountry);
|
||||
#endif
|
||||
line++;
|
||||
}
|
||||
else if(nProvider) { /* silently ignore empty providers */
|
||||
|
@ -1654,8 +1663,10 @@ int initRate(char *conf, char *dat, char *dom, char **msg)
|
|||
if (Provider[prefix].Zone[zone].nHour==0)
|
||||
if (zone) /* AK:17Dec99 Zone=0 is per definition free of charge */
|
||||
whimper (dat, "Zone %d has no 'T:' Entries", zone);
|
||||
#if 0 /* AK:31Dec1999 - Sorry, Leo ... Millenium-Release! Michi: Hier wird _Bloedsinn_ gemeldet!! */
|
||||
if (!(where & FEDERAL))
|
||||
whimper (dat, "Provider %d has no default domestic zone #2 (missing 'A:%s')", prefix, mycountry);
|
||||
#endif
|
||||
line++;
|
||||
}
|
||||
else if(nProvider) { /* silently ignore empty providers */
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $Id: rate.h,v 1.18 1999/12/24 14:17:06 akool Exp $
|
||||
/* $Id: rate.h,v 1.19 1999/12/31 13:57:20 akool Exp $
|
||||
*
|
||||
* Tarifdatenbank
|
||||
*
|
||||
* Copyright 1995, 1999 by Andreas Kool (akool@isdn4linux.de)
|
||||
* Copyright 1995 .. 2000 by Andreas Kool (akool@isdn4linux.de)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -19,6 +19,13 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: rate.h,v $
|
||||
* Revision 1.19 1999/12/31 13:57:20 akool
|
||||
* isdnlog-4.00 (Millenium-Edition)
|
||||
* - Oracle support added by Jan Bolt (Jan.Bolt@t-online.de)
|
||||
* - resolved *any* warnings against rate-de.dat
|
||||
* - Many new rates
|
||||
* - CREDITS file added
|
||||
*
|
||||
* Revision 1.18 1999/12/24 14:17:06 akool
|
||||
* isdnlog-3.81
|
||||
* - isdnlog/tools/NEWS
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $Id: tools.c,v 1.42 1999/12/24 14:17:06 akool Exp $
|
||||
/* $Id: tools.c,v 1.43 1999/12/31 13:57:20 akool Exp $
|
||||
*
|
||||
* ISDN accounting for isdn4linux. (Utilities)
|
||||
*
|
||||
* Copyright 1995, 1999 by Andreas Kool (akool@isdn4linux.de)
|
||||
* Copyright 1995 .. 2000 by Andreas Kool (akool@isdn4linux.de)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -19,6 +19,13 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: tools.c,v $
|
||||
* Revision 1.43 1999/12/31 13:57:20 akool
|
||||
* isdnlog-4.00 (Millenium-Edition)
|
||||
* - Oracle support added by Jan Bolt (Jan.Bolt@t-online.de)
|
||||
* - resolved *any* warnings against rate-de.dat
|
||||
* - Many new rates
|
||||
* - CREDITS file added
|
||||
*
|
||||
* Revision 1.42 1999/12/24 14:17:06 akool
|
||||
* isdnlog-3.81
|
||||
* - isdnlog/tools/NEWS
|
||||
|
@ -1204,13 +1211,10 @@ go: if (!ndigit)
|
|||
|
||||
int print_version(char *myname)
|
||||
{
|
||||
_print_msg("%s Version %s, Copyright (C) 1995, 1996, 1997, 1998, 1999\n",myname,VERSION);
|
||||
/*
|
||||
_print_msg(" Andreas Kool (akool@isdn4linux.de)\n");
|
||||
_print_msg(" and Stefan Luethje (luethje@sl-gw.lake.de)\n\n");
|
||||
*/
|
||||
_print_msg(" Andreas Kool and Stefan Luethje\n");
|
||||
_print_msg(" (i4l-isdnlog@franken.de)\n\n");
|
||||
_print_msg("%s Version %s\n", myname, VERSION);
|
||||
_print_msg("Copyright (C) 1995 .. 2000 by Andreas Kool (akool@isdn4linux.de)\n\n");
|
||||
_print_msg("The isdnlog project is the work of many people;\n");
|
||||
_print_msg("for at least a partial list see CREDITS.\n");
|
||||
_print_msg("%s comes with ABSOLUTELY NO WARRANTY; for details see COPYING.\n", myname);
|
||||
_print_msg("This is free software, and you are welcome to redistribute it\n");
|
||||
_print_msg("under certain conditions; see COPYING for details.\n");
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $Id: tools.h,v 1.50 1999/11/02 21:01:58 akool Exp $
|
||||
/* $Id: tools.h,v 1.51 1999/12/31 13:57:20 akool Exp $
|
||||
*
|
||||
* ISDN accounting for isdn4linux.
|
||||
*
|
||||
* Copyright 1995, 1999 by Andreas Kool (akool@isdn4linux.de)
|
||||
* Copyright 1995 .. 2000 by Andreas Kool (akool@isdn4linux.de)
|
||||
* and Stefan Luethje (luethje@sl-gw.lake.de)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@ -20,6 +20,13 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log: tools.h,v $
|
||||
* Revision 1.51 1999/12/31 13:57:20 akool
|
||||
* isdnlog-4.00 (Millenium-Edition)
|
||||
* - Oracle support added by Jan Bolt (Jan.Bolt@t-online.de)
|
||||
* - resolved *any* warnings against rate-de.dat
|
||||
* - Many new rates
|
||||
* - CREDITS file added
|
||||
*
|
||||
* Revision 1.50 1999/11/02 21:01:58 akool
|
||||
* isdnlog-3.62
|
||||
* - many new rates
|
||||
|
|
Loading…
Reference in New Issue