isdnlog-3.72
- new rates for 01051 - next version of isdnbill - isdnlog/tools/telnum.c ... cleanup - isdnlog/tools/isdnrate.c ... -s Service - isdnlog/tools/rate.{c,h} ... -s - isdnlog/tools/NEWS ... -s - doc/isdnrate.man .. updated -o, -s - doc/rate-files.man ... updated - isdnlog/tools/dest/README.makedest ... updt. - isdnlog/isdnlog/isdnlog.8.in .. updt. Telrate - isdnlog/tools/telrate/README-telrate - isdnlog/tools/telrate/config.in NEW - isdnlog/tools/telrate/configure NEW - isdnlog/tools/telrate/Makefile.in NEW - isdnlog/tools/telrate/index.html.in was index.html - isdnlog/tools/telrate/info.html.in was info.html - isdnlog/tools/telrate/telrate.cgi.in was telrate.cgi - isdnlog/tools/telrate/leo.sample NEW sample config - isdnlog/tools/telrate/alex.sample NEW sample config
This commit is contained in:
parent
688d0442d3
commit
3ee031023e
|
@ -95,6 +95,7 @@ libyien libyen
|
||||||
liechtensctein liechtenstein
|
liechtensctein liechtenstein
|
||||||
madaira madeira
|
madaira madeira
|
||||||
maderia madeira
|
maderia madeira
|
||||||
|
malayisa malaysia
|
||||||
marianen (nördliche) marianen (saipannord-)
|
marianen (nördliche) marianen (saipannord-)
|
||||||
marokka marokko
|
marokka marokko
|
||||||
marshall inseln marshallinseln
|
marshall inseln marshallinseln
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
## $Id: Makefile.in,v 1.126 1999/11/28 19:32:41 akool Exp $
|
## $Id: Makefile.in,v 1.127 1999/12/01 21:47:23 akool Exp $
|
||||||
##
|
##
|
||||||
## ISDN accounting for isdn4linux.
|
## ISDN accounting for isdn4linux.
|
||||||
##
|
##
|
||||||
|
@ -19,6 +19,31 @@
|
||||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
##
|
##
|
||||||
## $Log: Makefile.in,v $
|
## $Log: Makefile.in,v $
|
||||||
|
## Revision 1.127 1999/12/01 21:47:23 akool
|
||||||
|
## isdnlog-3.72
|
||||||
|
## - new rates for 01051
|
||||||
|
## - next version of isdnbill
|
||||||
|
##
|
||||||
|
## - isdnlog/tools/telnum.c ... cleanup
|
||||||
|
## - isdnlog/tools/isdnrate.c ... -s Service
|
||||||
|
## - isdnlog/tools/rate.{c,h} ... -s
|
||||||
|
## - isdnlog/tools/NEWS ... -s
|
||||||
|
## - doc/isdnrate.man .. updated -o, -s
|
||||||
|
## - doc/rate-files.man ... updated
|
||||||
|
## - isdnlog/tools/dest/README.makedest ... updt.
|
||||||
|
## - isdnlog/isdnlog/isdnlog.8.in .. updt.
|
||||||
|
##
|
||||||
|
## Telrate
|
||||||
|
## - isdnlog/tools/telrate/README-telrate
|
||||||
|
## - isdnlog/tools/telrate/config.in NEW
|
||||||
|
## - isdnlog/tools/telrate/configure NEW
|
||||||
|
## - isdnlog/tools/telrate/Makefile.in NEW
|
||||||
|
## - isdnlog/tools/telrate/index.html.in was index.html
|
||||||
|
## - isdnlog/tools/telrate/info.html.in was info.html
|
||||||
|
## - isdnlog/tools/telrate/telrate.cgi.in was telrate.cgi
|
||||||
|
## - isdnlog/tools/telrate/leo.sample NEW sample config
|
||||||
|
## - isdnlog/tools/telrate/alex.sample NEW sample config
|
||||||
|
##
|
||||||
## Revision 1.126 1999/11/28 19:32:41 akool
|
## Revision 1.126 1999/11/28 19:32:41 akool
|
||||||
## isdnlog-3.71
|
## isdnlog-3.71
|
||||||
##
|
##
|
||||||
|
@ -867,7 +892,7 @@ SERVICEFILE = /etc/services
|
||||||
# DON'T EDIT BELOW THIS LINE
|
# DON'T EDIT BELOW THIS LINE
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
VERSION = 3.71
|
VERSION = 3.72
|
||||||
|
|
||||||
MANPAGES = isdnlog/callerid.conf.5 isdnlog/isdn.conf.5 \
|
MANPAGES = isdnlog/callerid.conf.5 isdnlog/isdn.conf.5 \
|
||||||
isdnlog/isdnformat.5 isdnlog/isdnlog.5 isdnlog/isdnlog.8 \
|
isdnlog/isdnformat.5 isdnlog/isdnlog.5 isdnlog/isdnlog.8 \
|
||||||
|
|
|
@ -368,7 +368,7 @@ T:_RUMF
|
||||||
|
|
||||||
N:Russische Föderat. (westl.)
|
N:Russische Föderat. (westl.)
|
||||||
A:Russische Foderat. (westl.)
|
A:Russische Foderat. (westl.)
|
||||||
A:Rußland (westl.), GUS (Russische Föderation), GUS
|
A:Rußland (westl.), GUS (Russische Föderation), GUS, Russische Förderation West
|
||||||
C:+7863, +7862, +7861, +7820, +7817, +7816, +7815, +7814
|
C:+7863, +7862, +7861, +7820, +7817, +7816, +7815, +7814
|
||||||
C:+7811, +7543, +7517, +75112, +75110, +7510, +7505, +7503, +7501, +709246
|
C:+7811, +7543, +7517, +75112, +75110, +7510, +7505, +7503, +7501, +709246
|
||||||
C:+709245, +709244, +709243, +709237, +7091, +7087, +7086, +7085, +7084
|
C:+709245, +709244, +709243, +709237, +7091, +7087, +7086, +7085, +7084
|
||||||
|
@ -396,7 +396,7 @@ R:RU
|
||||||
T:MOW
|
T:MOW
|
||||||
|
|
||||||
N:Russische Forderation (ostl.)
|
N:Russische Forderation (ostl.)
|
||||||
A:Rußland, Rußland (östl.), Russische Föderation, Russian Federation
|
A:Rußland, Rußland (östl.), Russische Föderation, Russian Federation, Russische Förderation Ost
|
||||||
C:+7
|
C:+7
|
||||||
T:SU
|
T:SU
|
||||||
|
|
||||||
|
@ -835,15 +835,15 @@ E:Germany
|
||||||
C:+49
|
C:+49
|
||||||
T:DE
|
T:DE
|
||||||
|
|
||||||
N:Deutschland Mobilfunk
|
# N:Deutschland Mobilfunk
|
||||||
C:+491610,+491611,+491612,+491613,+491614,+491615,+491616,+491617,+491619 # C
|
# C:+491610,+491611,+491612,+491613,+491614,+491615,+491616,+491617,+491619 # C
|
||||||
C:+491618 # T-C-Tel Voice Mail
|
# C:+491618 # T-C-Tel Voice Mail
|
||||||
C:+49170,+49171,+49175 # D1
|
# C:+49170,+49171,+49175 # D1
|
||||||
C:+49172,+49173,+49174 # D2
|
# C:+49172,+49173,+49174 # D2
|
||||||
C:+49177,+49178 # Eplus
|
# C:+49177,+49178 # Eplus
|
||||||
C:+49176,+49179 # E2
|
# C:+49176,+49179 # E2
|
||||||
R:DE
|
# R:DE
|
||||||
T:_DEMF
|
# T:_DEMF
|
||||||
|
|
||||||
N:Deutschland Mobilfunk C-Tel Voice Mail
|
N:Deutschland Mobilfunk C-Tel Voice Mail
|
||||||
A:C-Tel Voice Mail
|
A:C-Tel Voice Mail
|
||||||
|
@ -854,7 +854,7 @@ T:_DEMCM
|
||||||
N:Deutschland Mobilfunk C-Netz
|
N:Deutschland Mobilfunk C-Netz
|
||||||
A:C-Netz
|
A:C-Netz
|
||||||
C:+491610,+491611,+491612,+491613,+491614,+491615,+491616,+491617,+491619
|
C:+491610,+491611,+491612,+491613,+491614,+491615,+491616,+491617,+491619
|
||||||
R:_DEMF
|
R:DE
|
||||||
T:_DEMC
|
T:_DEMC
|
||||||
|
|
||||||
N:Deutschland Mobilfunk D1
|
N:Deutschland Mobilfunk D1
|
||||||
|
|
|
@ -1,13 +1,19 @@
|
||||||
.\" $Id: isdnlog.8.in,v 1.2 1998/12/29 15:53:50 paul Exp $
|
.\" $Id: isdnlog.8.in,v 1.3 1999/12/01 21:47:24 akool Exp $
|
||||||
.\" CHECKIN $Date: 1998/12/29 15:53:50 $
|
.\" CHECKIN $Date: 1999/12/01 21:47:24 $
|
||||||
.TH isdnlog 8 "@MANDATE_ISDNLOG8@" "ISDN 4 Linux @I4LVERSION@" "Linux System Administration"
|
.TH isdnlog 8 "@MANDATE_ISDNLOG8@" "ISDN 4 Linux @I4LVERSION@" "Linux System Administration"
|
||||||
.PD 0
|
.PD 0
|
||||||
.SH NAME
|
.SH NAME
|
||||||
isdnlog \- isdn log system (and more)
|
isdnlog \- isdn log system (and more)
|
||||||
|
|
||||||
|
.SH "DESCRIPTION"
|
||||||
|
Isdnlog gets information from your isdn card, decodes this
|
||||||
|
information, and can do anything with it, such as logging, starting
|
||||||
|
programs, and more. All options to isdnlog can be given as command line
|
||||||
|
flags, or you can specify a file with options (recommended).
|
||||||
|
|
||||||
.SH "RESTRICTION"
|
.SH "RESTRICTION"
|
||||||
Isdnlog only works with the HiSax isdn driver. Other cards with their
|
Isdnlog only works with the HiSax isdn driver. Other cards with their
|
||||||
own driver are not supported. Additionally you need to enable d-channel logging
|
own driver are not supported. Additionally you need to enable d-channel logging
|
||||||
(you can use "hisaxctrl <DriverId> 1 4" to do that, e.g. "hisaxctrl
|
(you can use "hisaxctrl <DriverId> 1 4" to do that, e.g. "hisaxctrl
|
||||||
line0 1 4"). Isdnlog can only log outgoing calls that
|
line0 1 4"). Isdnlog can only log outgoing calls that
|
||||||
originate from
|
originate from
|
||||||
|
@ -17,12 +23,6 @@ isdn card, with crossed lines. Such a card is not usable for communicating,
|
||||||
but can log
|
but can log
|
||||||
outgoing calls from any device (see dual option below).
|
outgoing calls from any device (see dual option below).
|
||||||
|
|
||||||
.SH "DESCRIPTION"
|
|
||||||
Isdnlog gets information from your isdn card, decodes this
|
|
||||||
information, and can do anything with it, such as logging, starting
|
|
||||||
programs, and more. All options to isdnlog can be given as command line
|
|
||||||
flags, or you can specify a file with options (recommended).
|
|
||||||
|
|
||||||
.SH "GENERAL OPTIONS"
|
.SH "GENERAL OPTIONS"
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
|
@ -30,8 +30,10 @@ flags, or you can specify a file with options (recommended).
|
||||||
show version information and exit.
|
show version information and exit.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-fFILE
|
.BI \-f FILE
|
||||||
read options from the config file FILE. The first line should be
|
read options from the config file
|
||||||
|
.IR FILE .
|
||||||
|
The first line should be
|
||||||
"[options]". You may use blank lines and comments (starting with a #).
|
"[options]". You may use blank lines and comments (starting with a #).
|
||||||
All config files for isdnlog have the format described in isdn.conf(5).
|
All config files for isdnlog have the format described in isdn.conf(5).
|
||||||
Debug options must be given on the command line, they cannot be stored in a
|
Debug options must be given on the command line, they cannot be stored in a
|
||||||
|
@ -47,38 +49,34 @@ Isdnlog has a replay mode for debugging, where you can simulate previous
|
||||||
recorded events. In that case use "-" instead of a device.
|
recorded events. In that case use "-" instead of a device.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-r
|
.B \-A\fIx\fB amt="value"
|
||||||
Replay a debug file (e.g. /tmp/isdnctrl0) to find bugs. With this flag
|
|
||||||
you should give a filename with the debug information instead of a device.
|
|
||||||
It will also work with files not created by isdnlog (e.g.
|
|
||||||
"cat /dev/isdnctrl0").
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B \-n newline={yes|no}
|
|
||||||
Display throughput messages on the same line (only useful with logging to
|
|
||||||
stderr or a console device).
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B \-Wx width="value"
|
|
||||||
Limit all messages to X characters per line.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B \-Ax amt="value"
|
|
||||||
Set digits necessary to get an outside line, when connected through a PABX.
|
Set digits necessary to get an outside line, when connected through a PABX.
|
||||||
You can
|
You can
|
||||||
give several codes padded with a ":" (e.g. -A0:80:81:82).
|
give several codes padded with a ":" (e.g. -A0:80:81:82).
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-0x:y trim="value:value"
|
.B \-B\fIvbn\fB vbn="value"
|
||||||
Suppress leading zeroes. If isdnlog is connected through a PABX, it is
|
Set the provider preselectio to the given value. More prefixes may be separated
|
||||||
|
by a ":".
|
||||||
|
.br
|
||||||
|
Values are e.g. "010" for DE, "10" for AT, "16:17" for NL, "9" for FR.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B \-R\fIprefix\fB preselected="value"
|
||||||
|
Set the preselected (i.e the provider choosen, if no prefix is dialed)
|
||||||
|
provider to value. Value should be without \fIvbn\fR.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B \-0\fIx:y\fB trim="value:value"
|
||||||
|
Suppress leading digits. If isdnlog is connected through a PABX, it is
|
||||||
sometimes not possible to let isdnlog distinguish between a national and an
|
sometimes not possible to let isdnlog distinguish between a national and an
|
||||||
international call, even with help of the
|
international call, even with help of the
|
||||||
.B \-A
|
.B \-A
|
||||||
option.
|
option.
|
||||||
.br
|
.br
|
||||||
This option requires two digits separated with ":" as an argument. These digits
|
This option requires two values separated with ":" as an argument. These values
|
||||||
tell isdnlog how many leading zeroes to remove from incoming and outgoing calls
|
tell isdnlog how many leading digits to remove from incoming and outgoing calls
|
||||||
respectively. If only one digit is given, it is used for both values.
|
respectively. If only one value is given, it is used for both incoming and outgoing calls.
|
||||||
.br
|
.br
|
||||||
Don't use this in combination with the
|
Don't use this in combination with the
|
||||||
.B \-A
|
.B \-A
|
||||||
|
@ -93,23 +91,57 @@ numbers must have one leading zero). So, in this case, the option \fB-03:2\fR
|
||||||
would be correct.
|
would be correct.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-o other={yes|no}
|
.B \-o other={yes|no}
|
||||||
Normally "causes" (e.g. "non-selected user clearing") for other connected
|
Normally "causes" (e.g. "non-selected user clearing") for other connected
|
||||||
ISDN devices are not displayed, only those which are related to the connection
|
ISDN devices are not displayed, only those which are related to the connection
|
||||||
will be shown. With this option the causes for the other devices are also
|
will be shown. With this option the causes for the other devices are also
|
||||||
displayed.
|
displayed.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-2x dual="value"
|
.B \-u\fIx\fB ignoreRR="value"
|
||||||
|
Ignore "housekeeping" frames.
|
||||||
|
.I x
|
||||||
|
may be 1 (ignore RR=Receiver ready) or 2 (ignore EMP=Euracom Management Protokoll) frames.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B \-U\fIx\fB ignoreCOLP="value"
|
||||||
|
Ignore COLP/CLIP frames.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B \-2\fIx\fB dual="value"
|
||||||
Enable dual mode. You need this if you have a second isdn card attached with
|
Enable dual mode. You need this if you have a second isdn card attached with
|
||||||
crossed lines so it can listen to what other isdn devices like telephones
|
crossed lines so it can listen to what other isdn devices like telephones
|
||||||
are doing. With x=2 you can increase the debug output - every single
|
are doing. With \fIx\fR=2 you can increase the debug output - every single
|
||||||
digit will be displayed.
|
digit will be displayed.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B \-1
|
||||||
|
A HFC-based card is used for echo mode. Enable echo mode for the HFC card with
|
||||||
|
.br
|
||||||
|
.I hisaxctrl id 10 1
|
||||||
|
.br
|
||||||
|
.I hisaxctrl id 12 1
|
||||||
|
|
||||||
.SH "DEBUG MODULE"
|
.SH "DEBUG MODULE"
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-vX log=X
|
.B \-r
|
||||||
|
Replay a debug file (e.g. /tmp/isdnctrl0) to find bugs. With this flag
|
||||||
|
you should give a filename with the debug information instead of a device.
|
||||||
|
It will also work with files not created by isdnlog (e.g.
|
||||||
|
"cat /dev/isdnctrl0").
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B \-n newline={yes|no}
|
||||||
|
Display throughput messages on the same line (only useful with logging to
|
||||||
|
stderr or a console device).
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B \-W\fIX\fR width="value"
|
||||||
|
Limit all messages to X characters per line.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B \-v\fIX\fR log=X
|
||||||
Isdnlog can copy all information to /tmp/DEVICE (e.g. /tmp/isdnctrl0 if
|
Isdnlog can copy all information to /tmp/DEVICE (e.g. /tmp/isdnctrl0 if
|
||||||
you started isdnlog with /dev/isdnctrl0). Choose what debugging you want
|
you started isdnlog with /dev/isdnctrl0). Choose what debugging you want
|
||||||
from the following list, add the corresponding numbers together and use
|
from the following list, add the corresponding numbers together and use
|
||||||
|
@ -124,7 +156,7 @@ copy all "HEX:" lines from the hisax isdn device driver.
|
||||||
copy /dev/isdnctrl output (or whatever device you specified).
|
copy /dev/isdnctrl output (or whatever device you specified).
|
||||||
.TP
|
.TP
|
||||||
4
|
4
|
||||||
copy /dev/isdninfo output
|
copy /dev/isdninfo output
|
||||||
.TP
|
.TP
|
||||||
8
|
8
|
||||||
copy transfer values ("ibyte","obyte").
|
copy transfer values ("ibyte","obyte").
|
||||||
|
@ -237,20 +269,20 @@ You should log at least 0x7 (errors, warnings, notice) messages.
|
||||||
Log estimated time till next charge signal.
|
Log estimated time till next charge signal.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-mX stdout="value"
|
.B \-m\fIX\fB stdout="value"
|
||||||
Log to stderr.
|
Log to stderr.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-OX outfile="path"
|
.B \-O\fIX\fB outfile="path"
|
||||||
Log to file X instead of stderr. Isdnlog will close this device when it
|
Log to file \fIX\fR instead of stderr. Isdnlog will close this device when it
|
||||||
gets a signal -SIGHUP (-1). Only valid with -m option.
|
gets a signal -SIGHUP (-1). Only valid with -m option.
|
||||||
.br
|
.br
|
||||||
If the name starts with a "+", new data will be appended to the existing file.
|
If the name starts with a "+", new data will be appended to the existing file.
|
||||||
Default behaviour is to truncate the file when isdnlog opens it.
|
Default behaviour is to truncate the file when isdnlog opens it.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-C X console="path"
|
.B \-C \fIX\fB console="path"
|
||||||
Log to console X instead of stderr. You can use -O and -C together,
|
Log to console \fIX\fR instead of stderr. You can use -O and -C together,
|
||||||
so that isdnlog copies output to both. Specify a full pathname.
|
so that isdnlog copies output to both. Specify a full pathname.
|
||||||
Beware: you
|
Beware: you
|
||||||
.ul
|
.ul
|
||||||
|
@ -263,50 +295,53 @@ With this flag, isdnlog will generate output for monitor programs like
|
||||||
imon, imontty or isdnmon. You must also give -m with 0x800 enabled.
|
imon, imontty or isdnmon. You must also give -m with 0x800 enabled.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-lX syslog="value"
|
.B \-l\fIX\fB syslog="value"
|
||||||
Log to syslog. X is the log code. You can log to syslog and to stdout at
|
Log to syslog. \fIX\fR is the log code. You can log to syslog and to stdout at
|
||||||
the same time.
|
the same time.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-xX xisdn="value"
|
.B \-x\fIX\fB xisdn="value"
|
||||||
Pass information to x11 client. X is the log code. You can pass
|
Pass information to x11 client. X is the log code. You can pass
|
||||||
information to x11 clients and log to syslog and/or stdout at the same
|
information to x11 clients and log to syslog and/or stdout at the same
|
||||||
time.
|
time.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-cX calls="value"
|
.B \-p\fIPORT\fB port="value"
|
||||||
Only with -xX : save the last X calls and pass this information to an
|
Pass information to x11 client on this \fIPORT\fR.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B \-c\fIX\fB calls="value"
|
||||||
|
Only with -x\fIX\fR : save the last \fIX\fR calls and pass this information to an
|
||||||
x11 client. Default value is 100.
|
x11 client. Default value is 100.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-LX xlog="value"
|
.B \-L\fIX\fB xlog="value"
|
||||||
Only with -xX : save the last X messages and pass this information to an
|
Only with -x\fIX\fR : save the last \fIX\fR messages and pass this information to an
|
||||||
x11 client. Default value is 500.
|
x11 client. Default value is 500.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-wX thruput="value"
|
.B \-w\fIX\fB thruput="value"
|
||||||
If you enabled throughput logging (0x400), isdnlog will log the throughput
|
If you enabled throughput logging (0x400), isdnlog will log the throughput
|
||||||
every X seconds.
|
every \fIX\fR seconds.
|
||||||
|
|
||||||
.SH "TIME MODULE"
|
.SH "TIME MODULE"
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-tX time={0|1|2}
|
.B \-t\fIX\fB time={0|1|2}
|
||||||
Isdnlog will set your local system time to the time transmitted by your
|
Isdnlog will set your local system time to the time transmitted by your
|
||||||
isdn service provider: -t1 = once, -t2 = every time.
|
isdn service provider: -t1 = once, -t2 = every time.
|
||||||
|
|
||||||
.SH "CHARGEHUP MODULE"
|
.SH "CHARGEHUP MODULE"
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-hX hangup="value"
|
.B \-h\fIX\fB hangup="value"
|
||||||
The isdn kernel system has a chargehup system, so it will hang up a few
|
The isdn kernel system has a chargehup system, so it will hang up a few
|
||||||
seconds before the next charge signal. If you don't get a charge
|
seconds before the next charge signal. If you don't get a charge
|
||||||
signal from your phone company, isdnlog can emulate it.
|
signal from your phone company, isdnlog can emulate it.
|
||||||
|
|
||||||
On every outgoing connection, isdnlog will calculate the charge
|
On every outgoing connection, isdnlog will calculate the charge
|
||||||
time from day of week, time of day and the distance zone of the
|
time from day of week, time of day and the distance zone of the
|
||||||
connection. So you need to list the system in isdn.conf with a ZONE=
|
connection.
|
||||||
line.
|
|
||||||
|
|
||||||
The kernel needs to know how long the charge time is, and how many
|
The kernel needs to know how long the charge time is, and how many
|
||||||
seconds before the next charge signal it should hang up. You have to set
|
seconds before the next charge signal it should hang up. You have to set
|
||||||
|
@ -322,18 +357,6 @@ isdnctrl, but this would have the same effect).
|
||||||
You should run isdnlog with -t1 or better with -t2, so isdnlog sets the
|
You should run isdnlog with -t1 or better with -t2, so isdnlog sets the
|
||||||
local time in sync with telephone switching office.
|
local time in sync with telephone switching office.
|
||||||
|
|
||||||
.TP
|
|
||||||
.B \-F cityweekend=y
|
|
||||||
Deutsche Telekom offer an option where on weekends and national holidays,
|
|
||||||
you are charged one unit every four minutes, instead of the normal rate
|
|
||||||
of one unit every 2.5 minutes from 5:00 - 21:00. Isdnlog must be informed
|
|
||||||
of this option when the chargehup option is used, or it will hangup at
|
|
||||||
completely the wrong time. As the charge info delivered is
|
|
||||||
.B not
|
|
||||||
modified, only the final bill you get is lower, isdnlog also needs to
|
|
||||||
override the charge info if it is delivered.
|
|
||||||
|
|
||||||
|
|
||||||
.SH "START MODULE"
|
.SH "START MODULE"
|
||||||
|
|
||||||
isdnlog can react on any event and start programs. This feature is
|
isdnlog can react on any event and start programs. This feature is
|
||||||
|
@ -385,7 +408,7 @@ access that device.
|
||||||
.TP
|
.TP
|
||||||
.B @I4LCONFDIR@/@CONFFILE@
|
.B @I4LCONFDIR@/@CONFFILE@
|
||||||
isdnlog config file. Options to isdnlog can be given on the command line, can
|
isdnlog config file. Options to isdnlog can be given on the command line, can
|
||||||
be stored in this file in [options] (with command line option
|
be stored in this file in [options] (with command line option
|
||||||
-f@I4LCONFDIR@/@CONFFILE@), or in a different config file, but isdnlog will
|
-f@I4LCONFDIR@/@CONFFILE@), or in a different config file, but isdnlog will
|
||||||
look at this file for sections [global] [variables] [isdnlog].
|
look at this file for sections [global] [variables] [isdnlog].
|
||||||
|
|
||||||
|
@ -414,7 +437,7 @@ syslog=0x1ff7 # syslog logging level
|
||||||
thruput=60 # if throughput logging is enabled: log every X seconds
|
thruput=60 # if throughput logging is enabled: log every X seconds
|
||||||
time=2 # set time: 0 = never; 1 = once; 2 = every time
|
time=2 # set time: 0 = never; 1 = once; 2 = every time
|
||||||
#hangup= # simulate charge signals
|
#hangup= # simulate charge signals
|
||||||
start=yes # enable starting programs
|
start=yes # enable starting programs
|
||||||
|
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.B isdnconf(8) isdn.conf(5) callerid.conf(5)
|
.B isdnconf(8) isdn.conf(5) callerid.conf(5)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: isdnbill.c,v 1.4 1999/11/28 19:32:41 akool Exp $
|
/* $Id: isdnbill.c,v 1.5 1999/12/01 21:47:25 akool Exp $
|
||||||
*
|
*
|
||||||
* ISDN accounting for isdn4linux. (Billing-module)
|
* ISDN accounting for isdn4linux. (Billing-module)
|
||||||
*
|
*
|
||||||
|
@ -40,6 +40,7 @@
|
||||||
#define CALLED 1
|
#define CALLED 1
|
||||||
|
|
||||||
#define MAXMYMSN 20
|
#define MAXMYMSN 20
|
||||||
|
#define MAXSI 10
|
||||||
|
|
||||||
#define FREECALL 0
|
#define FREECALL 0
|
||||||
#define ORTSZONE 1
|
#define ORTSZONE 1
|
||||||
|
@ -54,11 +55,18 @@
|
||||||
#define SUBTOTAL 0
|
#define SUBTOTAL 0
|
||||||
#define TOTAL 1
|
#define TOTAL 1
|
||||||
|
|
||||||
#define COUNTRYLEN 30
|
#define COUNTRYLEN 32
|
||||||
#define PROVLEN 20
|
#define PROVLEN 20
|
||||||
|
#define MSNLEN 6
|
||||||
|
|
||||||
|
#undef ME
|
||||||
|
#undef OTHER
|
||||||
|
|
||||||
|
#define ME (c.dialout ? CALLING : CALLED)
|
||||||
|
#define OTHER (c.dialout ? CALLED : CALLING)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char num[2][64];
|
char num[2][64];
|
||||||
double duration;
|
double duration;
|
||||||
time_t connect;
|
time_t connect;
|
||||||
int units;
|
int units;
|
||||||
|
@ -73,7 +81,6 @@ typedef struct {
|
||||||
char currency[64];
|
char currency[64];
|
||||||
double pay;
|
double pay;
|
||||||
int provider;
|
int provider;
|
||||||
int zone;
|
|
||||||
|
|
||||||
double compute;
|
double compute;
|
||||||
int computed;
|
int computed;
|
||||||
|
@ -81,6 +88,9 @@ typedef struct {
|
||||||
char country[BUFSIZ];
|
char country[BUFSIZ];
|
||||||
char sprovider[BUFSIZ];
|
char sprovider[BUFSIZ];
|
||||||
char error[BUFSIZ];
|
char error[BUFSIZ];
|
||||||
|
int zone;
|
||||||
|
int ihome;
|
||||||
|
int known[2];
|
||||||
} CALLER;
|
} CALLER;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -90,7 +100,7 @@ typedef struct {
|
||||||
double duration;
|
double duration;
|
||||||
double compute;
|
double compute;
|
||||||
double aktiv;
|
double aktiv;
|
||||||
char *alias[8];
|
char *alias;
|
||||||
} MSNSUM;
|
} MSNSUM;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -110,17 +120,32 @@ typedef struct {
|
||||||
double aktiv;
|
double aktiv;
|
||||||
} ZONESUM;
|
} ZONESUM;
|
||||||
|
|
||||||
static CALLER curcall;
|
typedef struct {
|
||||||
static MSNSUM msnsum[2][MAXMYMSN];
|
char msn[32];
|
||||||
static PROVSUM provsum[2][MAXPROVIDER];
|
int ncalls;
|
||||||
static ZONESUM zonesum[2][MAXZONE];
|
double pay;
|
||||||
static char rstr[BUFSIZ];
|
double duration;
|
||||||
|
double compute;
|
||||||
|
} PARTNER;
|
||||||
|
|
||||||
static int nhome = 0;
|
static char options[] = "nv:V";
|
||||||
static int homei = 0;
|
static char usage[] = "%s: usage: %s [ -%s ]\n";
|
||||||
|
|
||||||
|
|
||||||
|
static CALLER c;
|
||||||
|
static MSNSUM msnsum[2][MAXSI][MAXMYMSN];
|
||||||
|
static PROVSUM provsum[2][MAXPROVIDER];
|
||||||
|
static ZONESUM zonesum[2][MAXZONE];
|
||||||
|
static PARTNER *partner[2];
|
||||||
|
static TELNUM number[2];
|
||||||
|
static char rstr[BUFSIZ];
|
||||||
|
static char home[BUFSIZ];
|
||||||
|
static int nhome = 0;
|
||||||
|
|
||||||
int verbose = 0;
|
int verbose = 0;
|
||||||
|
|
||||||
|
static int onlynumbers = 0;
|
||||||
|
|
||||||
|
|
||||||
int print_msg(int Level, const char *fmt, ...)
|
int print_msg(int Level, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
@ -155,16 +180,16 @@ int print_in_modules(const char *fmt, ...)
|
||||||
} /* print_in_modules */
|
} /* print_in_modules */
|
||||||
|
|
||||||
|
|
||||||
static int when(time_t connect, char *s)
|
static void when(char *s, int *day, int *month)
|
||||||
{
|
{
|
||||||
auto struct tm *tm = localtime(&connect);
|
auto struct tm *tm = localtime(&c.connect);
|
||||||
|
|
||||||
|
|
||||||
|
*day = tm->tm_mday;
|
||||||
|
*month = tm->tm_mon + 1;
|
||||||
|
|
||||||
sprintf(s, "%02d.%02d.%04d %02d:%02d:%02d",
|
sprintf(s, "%02d.%02d.%04d %02d:%02d:%02d",
|
||||||
tm->tm_mday, tm->tm_mon + 1, tm->tm_year + 1900,
|
*day, *month, tm->tm_year + 1900, tm->tm_hour, tm->tm_min, tm->tm_sec);
|
||||||
tm->tm_hour, tm->tm_min, tm->tm_sec);
|
|
||||||
|
|
||||||
return(tm->tm_mon + 1);
|
|
||||||
} /* when */
|
} /* when */
|
||||||
|
|
||||||
|
|
||||||
|
@ -216,37 +241,57 @@ char *timestr(double n)
|
||||||
|
|
||||||
static void total(int w)
|
static void total(int w)
|
||||||
{
|
{
|
||||||
register int i;
|
register int i, j;
|
||||||
|
auto int ncalls = 0;
|
||||||
|
auto double duration = 0.0, pay = 0.0, compute = 0.0;
|
||||||
|
|
||||||
|
|
||||||
printf("------------------------------------------------------------------------------\n");
|
printf("------------------------------------------------------------------------------\n");
|
||||||
|
|
||||||
printf("\nMSN calls Duration Charge Computed\n");
|
printf("\nMSN calls Duration Charge Computed\n");
|
||||||
printf("------------------------------------------------\n");
|
printf("---------------------------------------------------------------\n");
|
||||||
|
|
||||||
for (i = 0; i < nhome; i++) {
|
for (i = 0; i < nhome; i++) {
|
||||||
if (msnsum[w][i].ncalls)
|
for (j = 0; j < MAXSI; j++) {
|
||||||
printf("%6s %5d %s DM %8.3f DM %8.3f\n",
|
if (msnsum[w][j][i].ncalls) {
|
||||||
msnsum[w][i].msn,
|
printf("%6s,%d %-12s %5d %s DM %8.3f DM %8.3f\n",
|
||||||
msnsum[w][i].ncalls,
|
msnsum[w][j][i].msn,
|
||||||
timestr(msnsum[w][i].duration),
|
j,
|
||||||
msnsum[w][i].pay,
|
msnsum[w][j][i].alias,
|
||||||
msnsum[w][i].compute);
|
msnsum[w][j][i].ncalls,
|
||||||
|
timestr(msnsum[w][j][i].duration),
|
||||||
|
msnsum[w][j][i].pay,
|
||||||
|
msnsum[w][j][i].compute);
|
||||||
|
|
||||||
if (w == SUBTOTAL) {
|
ncalls += msnsum[w][j][i].ncalls;
|
||||||
strcpy(msnsum[TOTAL][i].msn, msnsum[SUBTOTAL][i].msn);
|
duration += msnsum[w][j][i].duration;
|
||||||
msnsum[TOTAL][i].ncalls += msnsum[SUBTOTAL][i].ncalls;
|
pay += msnsum[w][j][i].pay;
|
||||||
msnsum[TOTAL][i].duration += msnsum[SUBTOTAL][i].duration;
|
compute += msnsum[w][j][i].compute;
|
||||||
msnsum[TOTAL][i].pay += msnsum[SUBTOTAL][i].pay;
|
} /* if */
|
||||||
msnsum[TOTAL][i].compute += msnsum[SUBTOTAL][i].compute;
|
|
||||||
|
|
||||||
msnsum[SUBTOTAL][i].ncalls = 0;
|
if (w == SUBTOTAL) {
|
||||||
msnsum[SUBTOTAL][i].duration = 0;
|
strcpy(msnsum[TOTAL][j][i].msn, msnsum[SUBTOTAL][j][i].msn);
|
||||||
msnsum[SUBTOTAL][i].pay = 0;
|
msnsum[TOTAL][j][i].alias = msnsum[SUBTOTAL][j][i].alias;
|
||||||
msnsum[SUBTOTAL][i].compute = 0;
|
msnsum[TOTAL][j][i].ncalls += msnsum[SUBTOTAL][j][i].ncalls;
|
||||||
} /* if */
|
msnsum[TOTAL][j][i].duration += msnsum[SUBTOTAL][j][i].duration;
|
||||||
|
msnsum[TOTAL][j][i].pay += msnsum[SUBTOTAL][j][i].pay;
|
||||||
|
msnsum[TOTAL][j][i].compute += msnsum[SUBTOTAL][j][i].compute;
|
||||||
|
|
||||||
|
msnsum[SUBTOTAL][j][i].ncalls = 0;
|
||||||
|
msnsum[SUBTOTAL][j][i].duration = 0;
|
||||||
|
msnsum[SUBTOTAL][j][i].pay = 0;
|
||||||
|
msnsum[SUBTOTAL][j][i].compute = 0;
|
||||||
|
} /* if */
|
||||||
|
} /* for */
|
||||||
} /* for */
|
} /* for */
|
||||||
|
|
||||||
|
printf("---------------------------------------------------------------\n");
|
||||||
|
printf(" %5d %s DM %8.3f DM %8.3f\n",
|
||||||
|
ncalls,
|
||||||
|
timestr(duration),
|
||||||
|
pay,
|
||||||
|
compute);
|
||||||
|
|
||||||
|
|
||||||
printf("\nProvider calls Duration Charge Computed failures avail\n");
|
printf("\nProvider calls Duration Charge Computed failures avail\n");
|
||||||
printf("---------------------------------------------------------------------------------------\n");
|
printf("---------------------------------------------------------------------------------------\n");
|
||||||
|
@ -258,7 +303,7 @@ static void total(int w)
|
||||||
else
|
else
|
||||||
printf("%s%03d", vbn, i - 100);
|
printf("%s%03d", vbn, i - 100);
|
||||||
|
|
||||||
printf(":%-24s", getProvider(pnum2prefix(i, 0)));
|
printf(":%-24s", getProvider(pnum2prefix(i, c.connect)));
|
||||||
|
|
||||||
printf("%5d %s DM %8.3f DM %8.3f %8d %5.1f%%\n",
|
printf("%5d %s DM %8.3f DM %8.3f %8d %5.1f%%\n",
|
||||||
provsum[w][i].ncalls,
|
provsum[w][i].ncalls,
|
||||||
|
@ -307,7 +352,7 @@ static void total(int w)
|
||||||
timestr(zonesum[w][i].duration),
|
timestr(zonesum[w][i].duration),
|
||||||
zonesum[w][i].pay,
|
zonesum[w][i].pay,
|
||||||
zonesum[w][i].compute,
|
zonesum[w][i].compute,
|
||||||
zonesum[w][i].pay - zonesum[w][i].aktiv);
|
zonesum[w][i].aktiv);
|
||||||
} /* if */
|
} /* if */
|
||||||
|
|
||||||
if (w == SUBTOTAL) {
|
if (w == SUBTOTAL) {
|
||||||
|
@ -329,31 +374,62 @@ static void total(int w)
|
||||||
} /* total */
|
} /* total */
|
||||||
|
|
||||||
|
|
||||||
|
static void showpartner()
|
||||||
|
{
|
||||||
|
register int i, k;
|
||||||
|
|
||||||
|
|
||||||
|
for (k = 0; k < 2; k++) {
|
||||||
|
switch (k) {
|
||||||
|
case 0 : printf("Angerufene Partner:\n"); break;
|
||||||
|
case 1 : printf("Anrufer:\n"); break;
|
||||||
|
} /* switch */
|
||||||
|
|
||||||
|
for (i = 0; i < knowns; i++)
|
||||||
|
if (partner[k][i].ncalls)
|
||||||
|
printf("%-32s %-32s %5d %10.3f %s %10.3f\n",
|
||||||
|
partner[k][i].msn,
|
||||||
|
known[i]->who,
|
||||||
|
partner[k][i].ncalls,
|
||||||
|
partner[k][i].pay,
|
||||||
|
timestr(partner[k][i].duration),
|
||||||
|
partner[k][i].compute);
|
||||||
|
} /* for */
|
||||||
|
} /* showpartner */
|
||||||
|
|
||||||
|
|
||||||
static char *numtonam(int n)
|
static char *numtonam(int n)
|
||||||
{
|
{
|
||||||
register int i, j = -1;
|
register int i, j = -1;
|
||||||
|
|
||||||
|
|
||||||
|
if (onlynumbers)
|
||||||
|
return(NULL);
|
||||||
|
|
||||||
for (i = 0; i < knowns; i++) {
|
for (i = 0; i < knowns; i++) {
|
||||||
if (!num_match(known[i]->num, curcall.num[n])) {
|
if (!num_match(known[i]->num, c.num[n])) {
|
||||||
j = i;
|
j = i;
|
||||||
|
|
||||||
if (known[i]->si == curcall.si1)
|
if (known[i]->si == c.si1) {
|
||||||
|
c.known[n] = i;
|
||||||
return(known[i]->who);
|
return(known[i]->who);
|
||||||
|
} /* if */
|
||||||
} /* if */
|
} /* if */
|
||||||
} /* for */
|
} /* for */
|
||||||
|
|
||||||
|
c.known[n] = j;
|
||||||
|
|
||||||
return((j == -1) ? NULL : known[j]->who);
|
return((j == -1) ? NULL : known[j]->who);
|
||||||
} /* numtonam */
|
} /* numtonam */
|
||||||
|
|
||||||
|
|
||||||
static void justify(char *fromnum, char *tonum, int dialout, TELNUM number)
|
static void justify(char *fromnum, char *tonum, TELNUM number)
|
||||||
{
|
{
|
||||||
register char *p1, *p2;
|
register char *p1, *p2;
|
||||||
auto char s[BUFSIZ], sx[BUFSIZ];
|
auto char s[BUFSIZ], sx[BUFSIZ], sy[BUFSIZ];
|
||||||
|
|
||||||
|
|
||||||
p1 = numtonam(dialout ? CALLED : CALLING);
|
p1 = numtonam(c.dialout ? CALLED : CALLING);
|
||||||
|
|
||||||
if (*number.msn)
|
if (*number.msn)
|
||||||
sprintf(sx, "%s%s%s", number.area, (*number.area ? "/" : ""), number.msn);
|
sprintf(sx, "%s%s%s", number.area, (*number.area ? "/" : ""), number.msn);
|
||||||
|
@ -365,11 +441,11 @@ static void justify(char *fromnum, char *tonum, int dialout, TELNUM number)
|
||||||
else
|
else
|
||||||
sprintf(s, "%s%s", (*number.country ? "0" : ""), sx);
|
sprintf(s, "%s%s", (*number.country ? "0" : ""), sx);
|
||||||
|
|
||||||
p2 = msnsum[SUBTOTAL][homei].alias[curcall.si1];
|
p2 = msnsum[SUBTOTAL][c.si1][c.ihome].alias;
|
||||||
|
|
||||||
printf("%12s %s %-17s",
|
printf("%12s %s %-21s",
|
||||||
p2 ? p2 : fromnum,
|
p2 ? p2 : fromnum,
|
||||||
(dialout ? "->" : "<-"),
|
(c.dialout ? "->" : "<-"),
|
||||||
p1 ? p1 : s);
|
p1 ? p1 : s);
|
||||||
|
|
||||||
*s = 0;
|
*s = 0;
|
||||||
|
@ -387,6 +463,11 @@ static void justify(char *fromnum, char *tonum, int dialout, TELNUM number)
|
||||||
strcat(s, ", ");
|
strcat(s, ", ");
|
||||||
|
|
||||||
strcat(s, number.sarea);
|
strcat(s, number.sarea);
|
||||||
|
|
||||||
|
if (c.dialout) {
|
||||||
|
sprintf(sy, ",%d", c.zone);
|
||||||
|
strcat(s, sy);
|
||||||
|
} /* if */
|
||||||
} /* if */
|
} /* if */
|
||||||
|
|
||||||
if (!*s)
|
if (!*s)
|
||||||
|
@ -395,297 +476,403 @@ static void justify(char *fromnum, char *tonum, int dialout, TELNUM number)
|
||||||
|
|
||||||
s[COUNTRYLEN] = 0; /* clipping */
|
s[COUNTRYLEN] = 0; /* clipping */
|
||||||
|
|
||||||
sprintf(curcall.country, "%-*s", COUNTRYLEN, s);
|
sprintf(c.country, "%-*s", COUNTRYLEN, s);
|
||||||
} /* justify */
|
} /* justify */
|
||||||
|
|
||||||
|
|
||||||
|
static void findme()
|
||||||
|
{
|
||||||
|
register int i;
|
||||||
|
register char *p;
|
||||||
|
auto char s[BUFSIZ];
|
||||||
|
|
||||||
|
|
||||||
|
sprintf(s, "%*s", -MSNLEN, number[ME].msn);
|
||||||
|
s[MSNLEN] = 0;
|
||||||
|
|
||||||
|
p = strstr(home, s);
|
||||||
|
|
||||||
|
if (p == NULL) {
|
||||||
|
strcat(home, s);
|
||||||
|
strcat(home, "|");
|
||||||
|
|
||||||
|
p = strstr(home, s);
|
||||||
|
c.ihome = (int)(p - home) / 7;
|
||||||
|
|
||||||
|
i = c.si1;
|
||||||
|
|
||||||
|
for (c.si1 = 0; c.si1 < MAXSI; c.si1++) {
|
||||||
|
strcpy(msnsum[SUBTOTAL][c.si1][c.ihome].msn, number[ME].msn);
|
||||||
|
msnsum[SUBTOTAL][c.si1][c.ihome].alias = numtonam(ME);
|
||||||
|
} /* for */
|
||||||
|
|
||||||
|
c.si1 = i;
|
||||||
|
|
||||||
|
nhome++;
|
||||||
|
} /* if */
|
||||||
|
|
||||||
|
c.ihome = (int)(p - home) / 7;
|
||||||
|
} /* findme */
|
||||||
|
|
||||||
|
|
||||||
|
static void findrate()
|
||||||
|
{
|
||||||
|
auto RATE Rate;
|
||||||
|
auto char *version;
|
||||||
|
|
||||||
|
|
||||||
|
clearRate(&Rate);
|
||||||
|
Rate.start = c.connect;
|
||||||
|
Rate.now = c.connect + c.duration;
|
||||||
|
Rate.prefix = pnum2prefix(c.provider, c.connect);
|
||||||
|
|
||||||
|
Rate.src[0] = number[CALLING].country;
|
||||||
|
Rate.src[1] = number[CALLING].area;
|
||||||
|
Rate.src[2] = number[CALLING].msn;
|
||||||
|
|
||||||
|
Rate.dst[0] = number[CALLED].country;
|
||||||
|
Rate.dst[1] = number[CALLED].area;
|
||||||
|
Rate.dst[2] = number[CALLED].msn;
|
||||||
|
|
||||||
|
if (getRate(&Rate, &version) != UNKNOWN) {
|
||||||
|
c.zone = Rate.z;
|
||||||
|
|
||||||
|
if (!c.zone && (*number[CALLED].country && strcmp(number[CALLED].country, mycountry)))
|
||||||
|
c.zone = AUSLAND;
|
||||||
|
else if (getSpecial(c.num[CALLED]))
|
||||||
|
c.zone = SONDERRUFNUMMERN;
|
||||||
|
else if (c.zone == UNKNOWN)
|
||||||
|
c.zone = ELSEWHERE;
|
||||||
|
|
||||||
|
zonesum[SUBTOTAL][c.zone].ncalls++;
|
||||||
|
|
||||||
|
c.compute = Rate.Charge;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
c.zone = ELSEWHERE;
|
||||||
|
c.compute = c.pay;
|
||||||
|
sprintf(c.error, " ??? %s", version);
|
||||||
|
} /* else */
|
||||||
|
} /* findrate */
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[], char *envp[])
|
int main(int argc, char *argv[], char *envp[])
|
||||||
{
|
{
|
||||||
register char *pl, *pr, *p;
|
register char *pl, *pr, *p, x;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
auto FILE *f = fopen("/www/log/isdn.log", "r");
|
auto FILE *f = fopen("/www/log/isdn.log", "r");
|
||||||
#else
|
#else
|
||||||
auto FILE *f = fopen("/var/log/isdn.log", "r");
|
auto FILE *f = fopen("/var/log/isdn.log", "r");
|
||||||
#endif
|
#endif
|
||||||
auto char s[BUFSIZ], sx[BUFSIZ], home[BUFSIZ];
|
auto char s[BUFSIZ], sx[BUFSIZ];
|
||||||
auto int z, i, l, col, month = -1;
|
auto int l, col, day, lday = -1, month, lmonth = -1;
|
||||||
auto TELNUM number[2];
|
|
||||||
auto double dur;
|
auto double dur;
|
||||||
auto RATE Rate;
|
|
||||||
auto char *version;
|
auto char *version;
|
||||||
auto char *myname = basename(argv[0]);
|
auto char *myname = basename(argv[0]);
|
||||||
|
auto int opt;
|
||||||
|
|
||||||
|
|
||||||
if (f != (FILE *)NULL) {
|
if (f != (FILE *)NULL) {
|
||||||
|
|
||||||
|
while ((opt = getopt(argc, argv, options)) != EOF)
|
||||||
|
switch (opt) {
|
||||||
|
case 'n' : onlynumbers++;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'v' : verbose = atoi(optarg);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'V' : print_version(myname);
|
||||||
|
exit(0);
|
||||||
|
|
||||||
|
case '?' : printf(usage, argv[0], argv[0], options);
|
||||||
|
return(1);
|
||||||
|
} /* switch */
|
||||||
|
|
||||||
|
|
||||||
*home = 0;
|
*home = 0;
|
||||||
|
|
||||||
set_print_fct_for_tools(print_in_modules);
|
set_print_fct_for_tools(print_in_modules);
|
||||||
|
|
||||||
if (readconfig(myname) != 0)
|
if (!readconfig(myname)) {
|
||||||
return(1);
|
|
||||||
|
|
||||||
initHoliday("/usr/lib/isdn/holiday-de.dat", &version);
|
initHoliday(holifile, &version);
|
||||||
|
|
||||||
initDest("/usr/lib/isdn/dest.gdbm", &version);
|
if (verbose)
|
||||||
|
fprintf(stderr, "%s\n", version);
|
||||||
|
|
||||||
initRate("/etc/isdn/rate.conf", "/usr/lib/isdn/rate-de.dat", "/usr/lib/isdn/zone-de-%s.gdbm", &version);
|
initDest(destfile, &version);
|
||||||
|
|
||||||
memset(&msnsum, 0, sizeof(msnsum));
|
if (verbose)
|
||||||
memset(&provsum, 0, sizeof(provsum));
|
fprintf(stderr, "%s\n", version);
|
||||||
memset(&zonesum, 0, sizeof(zonesum));
|
|
||||||
|
|
||||||
while (fgets(s, BUFSIZ, f)) {
|
initRate(rateconf, ratefile, zonefile, &version);
|
||||||
pl = s;
|
|
||||||
col = 0;
|
|
||||||
|
|
||||||
memset(&curcall, 0, sizeof(curcall));
|
if (verbose)
|
||||||
|
fprintf(stderr, "%s\n", version);
|
||||||
|
|
||||||
while ((pr = strchr(pl, '|'))) {
|
|
||||||
memcpy(sx, pl, (l = (pr - pl)));
|
|
||||||
sx[l] = 0;
|
|
||||||
pl = pr + 1;
|
|
||||||
|
|
||||||
switch (col++) {
|
memset(&msnsum, 0, sizeof(msnsum));
|
||||||
case 0 : break;
|
memset(&provsum, 0, sizeof(provsum));
|
||||||
|
memset(&zonesum, 0, sizeof(zonesum));
|
||||||
|
|
||||||
case 1 : deb(sx);
|
partner[0] = (PARTNER *)calloc(knowns, sizeof(PARTNER));
|
||||||
strcpy(curcall.num[CALLING], sx);
|
partner[1] = (PARTNER *)calloc(knowns, sizeof(PARTNER));
|
||||||
break;
|
|
||||||
|
|
||||||
case 2 : deb(sx);
|
while (fgets(s, BUFSIZ, f)) {
|
||||||
strcpy(curcall.num[CALLED], sx);
|
pl = s;
|
||||||
break;
|
col = 0;
|
||||||
|
|
||||||
case 3 : dur = atoi(sx); break;
|
memset(&c, 0, sizeof(c));
|
||||||
|
|
||||||
case 4 : curcall.duration = atol(sx) / HZ;
|
while ((pr = strchr(pl, '|'))) {
|
||||||
|
memcpy(sx, pl, (l = (pr - pl)));
|
||||||
|
sx[l] = 0;
|
||||||
|
pl = pr + 1;
|
||||||
|
|
||||||
if (abs((int)dur - (int)curcall.duration) > 1)
|
switch (col++) {
|
||||||
curcall.duration = dur;
|
case 0 : break;
|
||||||
break;
|
|
||||||
|
|
||||||
case 5 : curcall.connect = atol(sx); break;
|
case 1 : deb(sx);
|
||||||
case 6 : curcall.units = atoi(sx); break;
|
strcpy(c.num[CALLING], sx);
|
||||||
case 7 : curcall.dialout = *sx == 'O'; break;
|
break;
|
||||||
case 8 : curcall.cause = atoi(sx); break;
|
|
||||||
case 9 : curcall.ibytes = atoi(sx); break;
|
|
||||||
case 10 : curcall.obytes = atoi(sx); break;
|
|
||||||
case 11 : strcpy(curcall.version, sx); break;
|
|
||||||
case 12 : curcall.si1 = atoi(sx); break;
|
|
||||||
case 13 : curcall.si2 = atoi(sx); break;
|
|
||||||
case 14 : curcall.currency_factor = atof(sx); break;
|
|
||||||
case 15 : strcpy(curcall.currency, sx); break;
|
|
||||||
case 16 : curcall.pay = atof(sx); break;
|
|
||||||
case 17 : curcall.provider = atoi(sx); break;
|
|
||||||
case 18 : break;
|
|
||||||
} /* switch */
|
|
||||||
|
|
||||||
} /* while */
|
case 2 : deb(sx);
|
||||||
|
strcpy(c.num[CALLED], sx);
|
||||||
|
break;
|
||||||
|
|
||||||
/* Repair wrong entries from older isdnlog-versions ... */
|
case 3 : dur = atoi(sx); break;
|
||||||
|
|
||||||
if (!curcall.provider || (curcall.provider == UNKNOWN))
|
case 4 : c.duration = atol(sx) / HZ;
|
||||||
curcall.provider = preselect;
|
break;
|
||||||
|
|
||||||
if (curcall.dialout && (strlen(curcall.num[CALLED]) > 3) && !getSpecial(curcall.num[CALLED])) {
|
case 5 : c.connect = atol(sx); break;
|
||||||
sprintf(s, "0%s", curcall.num[CALLED] + 3);
|
case 6 : c.units = atoi(sx); break;
|
||||||
|
case 7 : c.dialout = *sx == 'O'; break;
|
||||||
|
case 8 : c.cause = atoi(sx); break;
|
||||||
|
case 9 : c.ibytes = atoi(sx); break;
|
||||||
|
case 10 : c.obytes = atoi(sx); break;
|
||||||
|
case 11 : strcpy(c.version, sx); break;
|
||||||
|
case 12 : c.si1 = atoi(sx); break;
|
||||||
|
case 13 : c.si2 = atoi(sx); break;
|
||||||
|
case 14 : c.currency_factor = atof(sx); break;
|
||||||
|
case 15 : strcpy(c.currency, sx); break;
|
||||||
|
case 16 : c.pay = atof(sx); break;
|
||||||
|
case 17 : c.provider = atoi(sx); break;
|
||||||
|
case 18 : break;
|
||||||
|
} /* switch */
|
||||||
|
|
||||||
if (getSpecial(s))
|
} /* while */
|
||||||
strcpy(curcall.num[CALLED], s);
|
|
||||||
} /* if */
|
|
||||||
|
|
||||||
if (!curcall.dialout && (strlen(curcall.num[CALLING]) > 3) && !getSpecial(curcall.num[CALLING])) {
|
|
||||||
sprintf(s, "0%s", curcall.num[CALLING] + 3);
|
|
||||||
|
|
||||||
if (getSpecial(s))
|
/* Repair wrong entries from older (or current?) isdnlog-versions ... */
|
||||||
strcpy(curcall.num[CALLING], s);
|
|
||||||
} /* if */
|
|
||||||
|
|
||||||
/* if (curcall.dialout) */
|
if (abs((int)dur - (int)c.duration) > 1) {
|
||||||
/* if (curcall.duration) */
|
if (verbose)
|
||||||
/* if (curcall.provider != UNKNOWN) */
|
fprintf(stderr, "REPAIR: Duration %f -> %f\n", c.duration, dur);
|
||||||
|
|
||||||
if (*curcall.num[CALLING] && *curcall.num[CALLED]) {
|
c.duration = dur;
|
||||||
|
|
||||||
i = when(curcall.connect, s);
|
|
||||||
|
|
||||||
if (month == -1)
|
|
||||||
month = i;
|
|
||||||
else if (i != month) {
|
|
||||||
total(SUBTOTAL);
|
|
||||||
month = i;
|
|
||||||
} /* if */
|
} /* if */
|
||||||
|
|
||||||
printf("%s%s ", s, timestr(curcall.duration));
|
if (!memcmp(c.num[CALLED], "+4910", 5)) {
|
||||||
|
p = c.num[CALLED] + 7;
|
||||||
|
x = *p;
|
||||||
|
*p = 0;
|
||||||
|
|
||||||
normalizeNumber(curcall.num[CALLING], &number[CALLING], TN_ALL);
|
c.provider = atoi(c.num[CALLED] + 5);
|
||||||
normalizeNumber(curcall.num[CALLED], &number[CALLED], TN_ALL);
|
|
||||||
|
|
||||||
if (curcall.dialout) {
|
*p = x;
|
||||||
|
|
||||||
p = strstr(home, number[CALLING].msn);
|
memmove(c.num[CALLED] + 3, c.num[CALLED] + 8, strlen(c.num[CALLED]) - 7);
|
||||||
|
|
||||||
if (p == NULL) {
|
if (verbose)
|
||||||
strcat(home, number[CALLING].msn);
|
fprintf(stderr, "REPAIR: Provider=%d\n", c.provider);
|
||||||
strcat(home, "|");
|
} /* if */
|
||||||
|
|
||||||
p = strstr(home, number[CALLING].msn);
|
if (!c.provider || (c.provider == UNKNOWN)) {
|
||||||
homei = (int)(p - home) / 7;
|
if (verbose)
|
||||||
|
fprintf(stderr, "REPAIR: Provider %d -> %d\n", c.provider, preselect);
|
||||||
|
|
||||||
strcpy(msnsum[SUBTOTAL][homei].msn, number[CALLING].msn);
|
c.provider = preselect;
|
||||||
|
} /* if */
|
||||||
|
|
||||||
i = curcall.si1;
|
if (c.dialout && (strlen(c.num[CALLED]) > 3) && !getSpecial(c.num[CALLED])) {
|
||||||
|
sprintf(s, "0%s", c.num[CALLED] + 3);
|
||||||
|
|
||||||
for (curcall.si1 = 1; curcall.si1 < 8; curcall.si1++)
|
if (getSpecial(s)) {
|
||||||
msnsum[SUBTOTAL][homei].alias[curcall.si1] = numtonam(CALLING);
|
if (verbose)
|
||||||
|
fprintf(stderr, "REPAIR: Callee %s -> %s\n", c.num[CALLED], s);
|
||||||
|
|
||||||
curcall.si1 = i;
|
strcpy(c.num[CALLED], s);
|
||||||
|
} /* if */
|
||||||
|
} /* if */
|
||||||
|
|
||||||
nhome++;
|
if (!c.dialout && (strlen(c.num[CALLING]) > 3) && !getSpecial(c.num[CALLING])) {
|
||||||
|
sprintf(s, "0%s", c.num[CALLING] + 3);
|
||||||
|
|
||||||
|
if (getSpecial(s)) {
|
||||||
|
if (verbose)
|
||||||
|
fprintf(stderr, "REPAIR: Caller %s -> %s\n", c.num[CALLING], s);
|
||||||
|
|
||||||
|
strcpy(c.num[CALLING], s);
|
||||||
|
} /* if */
|
||||||
|
} /* if */
|
||||||
|
|
||||||
|
/* if (c.dialout) */
|
||||||
|
/* if (c.duration) */
|
||||||
|
/* if (c.provider != UNKNOWN) */
|
||||||
|
|
||||||
|
if (*c.num[CALLING] && *c.num[CALLED]) {
|
||||||
|
|
||||||
|
when(s, &day, &month);
|
||||||
|
|
||||||
|
if (lmonth == -1)
|
||||||
|
lmonth = month;
|
||||||
|
else if (month != lmonth) {
|
||||||
|
total(SUBTOTAL);
|
||||||
|
lmonth = month;
|
||||||
} /* if */
|
} /* if */
|
||||||
|
|
||||||
homei = (int)(p - home) / 7;
|
if (lday == -1)
|
||||||
msnsum[SUBTOTAL][homei].ncalls++;
|
lday = day;
|
||||||
|
else if (day != lday) {
|
||||||
justify(number[CALLING].msn, curcall.num[CALLED], curcall.dialout, number[CALLED]);
|
printf("\n");
|
||||||
|
lday = day;
|
||||||
provsum[SUBTOTAL][curcall.provider].ncalls++;
|
|
||||||
|
|
||||||
strcpy(s, getProvider(pnum2prefix(curcall.provider, 0)));
|
|
||||||
s[PROVLEN] = 0;
|
|
||||||
|
|
||||||
if (curcall.provider < 100)
|
|
||||||
sprintf(curcall.sprovider, " %s%02d:%-*s", vbn, curcall.provider, PROVLEN, s);
|
|
||||||
else
|
|
||||||
sprintf(curcall.sprovider, "%s%03d:%-*s", vbn, curcall.provider - 100, PROVLEN, s);
|
|
||||||
|
|
||||||
|
|
||||||
if (!curcall.duration) {
|
|
||||||
printf(" %s%s", curcall.country, curcall.sprovider);
|
|
||||||
|
|
||||||
if ((curcall.cause != 0x1f) && /* Normal, unspecified */
|
|
||||||
(curcall.cause != 0x10)) /* Normal call clearing */
|
|
||||||
printf(" %s", qmsg(TYPE_CAUSE, VERSION_EDSS1, curcall.cause));
|
|
||||||
|
|
||||||
if ((curcall.cause == 0x22) || /* No circuit/channel available */
|
|
||||||
(curcall.cause == 0x2a) || /* Switching equipment congestion */
|
|
||||||
(curcall.cause == 0x2f)) /* Resource unavailable, unspecified */
|
|
||||||
provsum[SUBTOTAL][curcall.provider].failed++;
|
|
||||||
|
|
||||||
printf("\n");
|
|
||||||
continue;
|
|
||||||
} /* if */
|
|
||||||
|
|
||||||
|
|
||||||
clearRate(&Rate);
|
|
||||||
Rate.start = curcall.connect;
|
|
||||||
Rate.now = curcall.connect + curcall.duration;
|
|
||||||
Rate.prefix = pnum2prefix(curcall.provider, 0);
|
|
||||||
|
|
||||||
Rate.src[0] = number[CALLING].country;
|
|
||||||
Rate.src[1] = number[CALLING].area;
|
|
||||||
Rate.src[2] = number[CALLING].msn;
|
|
||||||
|
|
||||||
Rate.dst[0] = number[CALLED].country;
|
|
||||||
Rate.dst[1] = number[CALLED].area;
|
|
||||||
Rate.dst[2] = number[CALLED].msn;
|
|
||||||
|
|
||||||
if (getRate(&Rate, &version) != UNKNOWN) {
|
|
||||||
z = Rate.z;
|
|
||||||
|
|
||||||
if (!z && (*number[CALLED].country && strcmp(number[CALLED].country, mycountry)))
|
|
||||||
z = AUSLAND;
|
|
||||||
else if (getSpecial(curcall.num[CALLED]))
|
|
||||||
z = SONDERRUFNUMMERN;
|
|
||||||
else if (z == UNKNOWN)
|
|
||||||
z = ELSEWHERE;
|
|
||||||
|
|
||||||
zonesum[SUBTOTAL][z].ncalls++;
|
|
||||||
|
|
||||||
curcall.compute = Rate.Charge;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
z = ELSEWHERE;
|
|
||||||
curcall.compute = curcall.pay;
|
|
||||||
sprintf(curcall.error, " ??? %s", version);
|
|
||||||
} /* else */
|
} /* else */
|
||||||
|
|
||||||
if ((z == 1) || (z == 2)) {
|
printf("%s%s ", s, timestr(c.duration));
|
||||||
auto struct tm *tm = localtime(&curcall.connect);
|
|
||||||
auto int takte;
|
normalizeNumber(c.num[CALLING], &number[CALLING], TN_ALL);
|
||||||
auto double price;
|
normalizeNumber(c.num[CALLED], &number[CALLED], TN_ALL);
|
||||||
|
|
||||||
|
findme();
|
||||||
|
|
||||||
|
if (c.dialout) {
|
||||||
|
|
||||||
|
findrate();
|
||||||
|
|
||||||
|
msnsum[SUBTOTAL][c.si1][c.ihome].ncalls++;
|
||||||
|
|
||||||
|
justify(number[CALLING].msn, c.num[CALLED], number[CALLED]);
|
||||||
|
|
||||||
|
provsum[SUBTOTAL][c.provider].ncalls++;
|
||||||
|
|
||||||
|
strcpy(s, getProvider(pnum2prefix(c.provider, c.connect)));
|
||||||
|
s[PROVLEN] = 0;
|
||||||
|
|
||||||
|
if (c.provider < 100)
|
||||||
|
sprintf(c.sprovider, " %s%02d:%-*s", vbn, c.provider, PROVLEN, s);
|
||||||
|
else
|
||||||
|
sprintf(c.sprovider, "%s%03d:%-*s", vbn, c.provider - 100, PROVLEN, s);
|
||||||
|
|
||||||
|
|
||||||
takte = (curcall.duration + 59) / 60;
|
if (!c.duration) {
|
||||||
|
printf(" %s%s", c.country, c.sprovider);
|
||||||
|
|
||||||
if ((tm->tm_wday > 0) && (tm->tm_wday < 5)) { /* Wochentag */
|
if ((c.cause != 0x1f) && /* Normal, unspecified */
|
||||||
if ((tm->tm_hour > 8) && (tm->tm_hour < 18)) /* Hauptzeit */
|
(c.cause != 0x10)) /* Normal call clearing */
|
||||||
price = 0.06;
|
printf(" %s", qmsg(TYPE_CAUSE, VERSION_EDSS1, c.cause));
|
||||||
else
|
|
||||||
|
if ((c.cause == 0x22) || /* No circuit/channel available */
|
||||||
|
(c.cause == 0x2a) || /* Switching equipment congestion */
|
||||||
|
(c.cause == 0x2f)) /* Resource unavailable, unspecified */
|
||||||
|
provsum[SUBTOTAL][c.provider].failed++;
|
||||||
|
|
||||||
|
printf("\n");
|
||||||
|
continue;
|
||||||
|
} /* if */
|
||||||
|
|
||||||
|
if ((c.zone == 1) || (c.zone == 2)) {
|
||||||
|
auto struct tm *tm = localtime(&c.connect);
|
||||||
|
auto int takte;
|
||||||
|
auto double price;
|
||||||
|
|
||||||
|
|
||||||
|
takte = (c.duration + 59) / 60;
|
||||||
|
|
||||||
|
if ((tm->tm_wday > 0) && (tm->tm_wday < 5)) { /* Wochentag */
|
||||||
|
if ((tm->tm_hour > 8) && (tm->tm_hour < 18)) /* Hauptzeit */
|
||||||
|
price = 0.06;
|
||||||
|
else
|
||||||
|
price = 0.03;
|
||||||
|
}
|
||||||
|
else /* Wochenende */
|
||||||
price = 0.03;
|
price = 0.03;
|
||||||
}
|
|
||||||
else /* Wochenende */
|
|
||||||
price = 0.03;
|
|
||||||
|
|
||||||
curcall.aktiv = takte * price;
|
c.aktiv = takte * price;
|
||||||
|
|
||||||
// printf("AKTIVPLUS:%8.3f, gespart: %8.3f", curcall.aktiv, curcall.pay - curcall.aktiv);
|
msnsum[SUBTOTAL][c.si1][c.ihome].aktiv += c.aktiv;
|
||||||
|
provsum[SUBTOTAL][c.provider].aktiv += c.aktiv;
|
||||||
|
zonesum[SUBTOTAL][c.zone].aktiv += c.aktiv;
|
||||||
|
} /* if */
|
||||||
|
|
||||||
msnsum[SUBTOTAL][homei].aktiv += curcall.aktiv;
|
if (c.pay < 0.0) { /* impossible! */
|
||||||
provsum[SUBTOTAL][curcall.provider].aktiv += curcall.aktiv;
|
c.pay = c.compute;
|
||||||
zonesum[SUBTOTAL][z].aktiv += curcall.aktiv;
|
c.computed++;
|
||||||
} /* if */
|
} /* if */
|
||||||
|
|
||||||
if (curcall.pay < 0.0) { /* impossible! */
|
if (c.compute && fabs(c.pay - c.compute) > 1.00) {
|
||||||
curcall.pay = curcall.compute;
|
c.pay = c.compute;
|
||||||
curcall.computed++;
|
c.computed++;
|
||||||
} /* if */
|
} /* if */
|
||||||
|
|
||||||
if (curcall.compute && fabs(curcall.pay - Rate.Charge) > 1.00) {
|
|
||||||
curcall.pay = curcall.compute;
|
|
||||||
curcall.computed++;
|
|
||||||
} /* if */
|
|
||||||
|
|
||||||
|
|
||||||
if (curcall.pay)
|
if (c.pay)
|
||||||
printf("%s%7.3f%s ", curcall.currency, curcall.pay, curcall.computed ? "*" : " ");
|
printf("%s%7.3f%s ", c.currency, c.pay, c.computed ? "*" : " ");
|
||||||
else
|
else
|
||||||
printf(" ", curcall.currency, curcall.pay, curcall.computed ? "*" : " ");
|
printf(" ");
|
||||||
|
|
||||||
printf("%s%s%s", curcall.country, curcall.sprovider, curcall.error);
|
printf("%s%s%s", c.country, c.sprovider, c.error);
|
||||||
|
|
||||||
|
if (c.aktiv)
|
||||||
|
printf(" AktivPlus - %s%6.3f", c.currency, c.pay - c.aktiv);
|
||||||
|
|
||||||
|
msnsum[SUBTOTAL][c.si1][c.ihome].pay += c.pay;
|
||||||
|
msnsum[SUBTOTAL][c.si1][c.ihome].duration += c.duration;
|
||||||
|
msnsum[SUBTOTAL][c.si1][c.ihome].compute += c.compute;
|
||||||
|
|
||||||
|
provsum[SUBTOTAL][c.provider].pay += c.pay;
|
||||||
|
provsum[SUBTOTAL][c.provider].duration += c.duration;
|
||||||
|
provsum[SUBTOTAL][c.provider].compute += c.compute;
|
||||||
|
|
||||||
|
zonesum[SUBTOTAL][c.zone].pay += c.pay;
|
||||||
|
zonesum[SUBTOTAL][c.zone].duration += c.duration;
|
||||||
|
zonesum[SUBTOTAL][c.zone].compute += c.compute;
|
||||||
|
|
||||||
|
strcpy(partner[0][c.known[CALLING]].msn, c.num[OTHER]);
|
||||||
|
partner[0][c.known[CALLING]].ncalls++;
|
||||||
|
partner[0][c.known[CALLING]].pay += c.pay;
|
||||||
|
partner[0][c.known[CALLING]].duration += c.duration;
|
||||||
|
partner[0][c.known[CALLING]].compute += c.compute;
|
||||||
|
|
||||||
if (curcall.aktiv) {
|
|
||||||
printf(" AktivPlus - %s%6.3f", curcall.currency, curcall.pay - curcall.aktiv);
|
|
||||||
}
|
}
|
||||||
|
else { /* Dialin: */
|
||||||
|
justify(number[CALLED].msn, c.num[CALLING], number[CALLING]);
|
||||||
|
printf(" %s%s", c.country, c.sprovider);
|
||||||
|
|
||||||
msnsum[SUBTOTAL][homei].pay += curcall.pay;
|
strcpy(partner[1][c.known[CALLING]].msn, c.num[OTHER]);
|
||||||
msnsum[SUBTOTAL][homei].duration += curcall.duration;
|
partner[1][c.known[CALLING]].ncalls++;
|
||||||
msnsum[SUBTOTAL][homei].compute += curcall.compute;
|
partner[1][c.known[CALLING]].duration += c.duration;
|
||||||
|
} /* else */
|
||||||
|
|
||||||
provsum[SUBTOTAL][curcall.provider].pay += curcall.pay;
|
|
||||||
provsum[SUBTOTAL][curcall.provider].duration += curcall.duration;
|
|
||||||
provsum[SUBTOTAL][curcall.provider].compute += curcall.compute;
|
|
||||||
|
|
||||||
zonesum[SUBTOTAL][z].pay += curcall.pay;
|
printf("\n");
|
||||||
zonesum[SUBTOTAL][z].duration += curcall.duration;
|
|
||||||
zonesum[SUBTOTAL][z].compute += curcall.compute;
|
|
||||||
}
|
|
||||||
else { /* Dialin: */
|
|
||||||
justify(number[CALLED].msn, curcall.num[CALLING], curcall.dialout, number[CALLING]);
|
|
||||||
printf(" %s%s", curcall.country, curcall.sprovider);
|
|
||||||
} /* else */
|
|
||||||
|
|
||||||
printf("\n");
|
} /* if */
|
||||||
|
} /* while */
|
||||||
|
|
||||||
} /* if */
|
fclose(f);
|
||||||
} /* while */
|
total(SUBTOTAL);
|
||||||
|
total(TOTAL);
|
||||||
|
|
||||||
fclose(f);
|
showpartner();
|
||||||
total(SUBTOTAL);
|
|
||||||
total(TOTAL);
|
|
||||||
|
|
||||||
} /* if */
|
}
|
||||||
|
else
|
||||||
|
fprintf(stderr, "%s: Can't read configuration file(s)\n", myname);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
fprintf(stderr, "%s: Can't open \"isdn.log\" file\n", myname);
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
} /* isdnbill */
|
} /* isdnbill */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
V:1.10-Germany [27-Nov-1999 13:09:30]
|
V:1.10-Germany [01-Dec-1999 18:41:57]
|
||||||
|
|
||||||
# Währungsformat
|
# Währungsformat
|
||||||
U:%.3f DM
|
U:%.3f DM
|
||||||
|
@ -8,7 +8,7 @@ U:%.3f DM
|
||||||
#
|
#
|
||||||
# (C) Copyright 1999 by Andreas Kool (akool@isdn4linux.de)
|
# (C) Copyright 1999 by Andreas Kool (akool@isdn4linux.de)
|
||||||
#
|
#
|
||||||
# $Id: rate-de.dat,v 1.64 1999/11/27 19:24:17 akool Exp $
|
# $Id: rate-de.dat,v 1.65 1999/12/01 21:47:23 akool Exp $
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Das "A:" Tag muß folgendermaßen gefüllt werden:
|
# Das "A:" Tag muß folgendermaßen gefüllt werden:
|
||||||
|
@ -12472,7 +12472,7 @@ T:*/*=2.3084(60)/1
|
||||||
P:51 01051
|
P:51 01051
|
||||||
B:01051
|
B:01051
|
||||||
C:ID-Switch GmbH, Graf-Adolf-Straße, 40210 Düsseldorf 01051
|
C:ID-Switch GmbH, Graf-Adolf-Straße, 40210 Düsseldorf 01051
|
||||||
# G:18-Nov-1999
|
# G:01-Dec-1999
|
||||||
C:Homepage: http://www.01051.com
|
C:Homepage: http://www.01051.com
|
||||||
C:Adresse: Koenigsallee 60f
|
C:Adresse: Koenigsallee 60f
|
||||||
C: 40210 Duesseldorf
|
C: 40210 Duesseldorf
|
||||||
|
@ -12633,7 +12633,40 @@ T:*/*=0.35/60
|
||||||
Z:246 Polen
|
Z:246 Polen
|
||||||
A:PL
|
A:PL
|
||||||
T:*/*=0.38/60
|
T:*/*=0.38/60
|
||||||
Z:247 impossible
|
Z:247 Russische Förderation
|
||||||
|
A:RU,SU
|
||||||
|
T:*/*=0.55/60
|
||||||
|
Z:248 Bahamas
|
||||||
|
A:BS
|
||||||
|
T:*/*=0.37/60
|
||||||
|
Z:249 Bulgarien
|
||||||
|
A:BG
|
||||||
|
T:*/*=0.62/60
|
||||||
|
Z:250 Lettland
|
||||||
|
A:LV
|
||||||
|
T:*/*=0.64/60
|
||||||
|
Z:251 Litauen
|
||||||
|
A:LT
|
||||||
|
T:*/*=0.57/60
|
||||||
|
Z:252 Malaysia
|
||||||
|
A:MY
|
||||||
|
T:*/*=0.42/60
|
||||||
|
Z:253 Malta
|
||||||
|
A:MT
|
||||||
|
T:*/*=0.44/60
|
||||||
|
Z:254 Moldawien
|
||||||
|
A:MD
|
||||||
|
T:*/*=0.79/60
|
||||||
|
Z:255 Philippinen
|
||||||
|
A:PH
|
||||||
|
T:*/*=0.61/60
|
||||||
|
Z:256 Thailand
|
||||||
|
A:TH
|
||||||
|
T:*/*=0.75/60
|
||||||
|
Z:257 Ukraine
|
||||||
|
A:UA
|
||||||
|
T:*/*=0.75/60
|
||||||
|
Z:258 impossible
|
||||||
A:_ARMF
|
A:_ARMF
|
||||||
A:_AUMF
|
A:_AUMF
|
||||||
A:_BEMF
|
A:_BEMF
|
||||||
|
@ -12660,6 +12693,17 @@ A:_CHMF
|
||||||
A:_ESMF
|
A:_ESMF
|
||||||
A:_TWMF
|
A:_TWMF
|
||||||
A:_VEMF
|
A:_VEMF
|
||||||
|
# A:Russische F”rderation West Mobilfunk, Russische F”rderation Ost Mobilfunk
|
||||||
|
# A:Bahamas Mobilfunk
|
||||||
|
# A:Bulgarien Mobilfunk
|
||||||
|
# A:Lettland Mobilfunk
|
||||||
|
# A:Litauen Mobilfunk
|
||||||
|
# A:Malayisa Mobilfunk
|
||||||
|
# A:Malta Mobilfunk
|
||||||
|
# A:Moldawien Mobilfunk
|
||||||
|
A:_PHMF
|
||||||
|
# A:Thailand Mobilfunk
|
||||||
|
# A:Ukraine Mobilfunk
|
||||||
T:*/*=99.99/60
|
T:*/*=99.99/60
|
||||||
#####################################################################
|
#####################################################################
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
V:1.10-Germany [27-Nov-1999 13:09:30]
|
V:1.10-Germany [01-Dec-1999 18:41:57]
|
||||||
|
|
||||||
# Währungsformat
|
# Währungsformat
|
||||||
U:%.3f DM
|
U:%.3f DM
|
||||||
|
@ -8,7 +8,7 @@ U:%.3f DM
|
||||||
#
|
#
|
||||||
# (C) Copyright 1999 by Andreas Kool (akool@isdn4linux.de)
|
# (C) Copyright 1999 by Andreas Kool (akool@isdn4linux.de)
|
||||||
#
|
#
|
||||||
# $Id: rate-de.dat.src,v 1.14 1999/11/27 19:24:18 akool Exp $
|
# $Id: rate-de.dat.src,v 1.15 1999/12/01 21:47:23 akool Exp $
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Das "A:" Tag muß folgendermaßen gefüllt werden:
|
# Das "A:" Tag muß folgendermaßen gefüllt werden:
|
||||||
|
@ -12472,7 +12472,7 @@ T:*/*=2.3084(60)/1
|
||||||
P:51 01051
|
P:51 01051
|
||||||
B:01051
|
B:01051
|
||||||
C:ID-Switch GmbH, Graf-Adolf-Straße, 40210 Düsseldorf 01051
|
C:ID-Switch GmbH, Graf-Adolf-Straße, 40210 Düsseldorf 01051
|
||||||
# G:18-Nov-1999
|
# G:01-Dec-1999
|
||||||
C:Homepage: http://www.01051.com
|
C:Homepage: http://www.01051.com
|
||||||
C:Adresse: Koenigsallee 60f
|
C:Adresse: Koenigsallee 60f
|
||||||
C: 40210 Duesseldorf
|
C: 40210 Duesseldorf
|
||||||
|
@ -12633,7 +12633,40 @@ T:*/*=0.35/60
|
||||||
Z:246 Polen
|
Z:246 Polen
|
||||||
A:Polen
|
A:Polen
|
||||||
T:*/*=0.38/60
|
T:*/*=0.38/60
|
||||||
Z:247 impossible
|
Z:247 Russische Förderation
|
||||||
|
A:Russische Förderation West, Russische Förderation Ost
|
||||||
|
T:*/*=0.55/60
|
||||||
|
Z:248 Bahamas
|
||||||
|
A:Bahamas
|
||||||
|
T:*/*=0.37/60
|
||||||
|
Z:249 Bulgarien
|
||||||
|
A:Bulgarien
|
||||||
|
T:*/*=0.62/60
|
||||||
|
Z:250 Lettland
|
||||||
|
A:Lettland
|
||||||
|
T:*/*=0.64/60
|
||||||
|
Z:251 Litauen
|
||||||
|
A:Litauen
|
||||||
|
T:*/*=0.57/60
|
||||||
|
Z:252 Malaysia
|
||||||
|
A:Malayisa
|
||||||
|
T:*/*=0.42/60
|
||||||
|
Z:253 Malta
|
||||||
|
A:Malta
|
||||||
|
T:*/*=0.44/60
|
||||||
|
Z:254 Moldawien
|
||||||
|
A:Moldawien
|
||||||
|
T:*/*=0.79/60
|
||||||
|
Z:255 Philippinen
|
||||||
|
A:Philippinen
|
||||||
|
T:*/*=0.61/60
|
||||||
|
Z:256 Thailand
|
||||||
|
A:Thailand
|
||||||
|
T:*/*=0.75/60
|
||||||
|
Z:257 Ukraine
|
||||||
|
A:Ukraine
|
||||||
|
T:*/*=0.75/60
|
||||||
|
Z:258 impossible
|
||||||
A:Argentinien Mobilfunk
|
A:Argentinien Mobilfunk
|
||||||
A:Australien Mobilfunk
|
A:Australien Mobilfunk
|
||||||
A:Belgien Mobilfunk
|
A:Belgien Mobilfunk
|
||||||
|
@ -12660,6 +12693,17 @@ A:Schweiz Mobilfunk
|
||||||
A:Spanien Mobilfunk
|
A:Spanien Mobilfunk
|
||||||
A:Taiwan Mobilfunk
|
A:Taiwan Mobilfunk
|
||||||
A:Venezuela Mobilfunk
|
A:Venezuela Mobilfunk
|
||||||
|
# A:Russische F”rderation West Mobilfunk, Russische F”rderation Ost Mobilfunk
|
||||||
|
# A:Bahamas Mobilfunk
|
||||||
|
# A:Bulgarien Mobilfunk
|
||||||
|
# A:Lettland Mobilfunk
|
||||||
|
# A:Litauen Mobilfunk
|
||||||
|
# A:Malayisa Mobilfunk
|
||||||
|
# A:Malta Mobilfunk
|
||||||
|
# A:Moldawien Mobilfunk
|
||||||
|
A:Philippinen Mobilfunk
|
||||||
|
# A:Thailand Mobilfunk
|
||||||
|
# A:Ukraine Mobilfunk
|
||||||
T:*/*=99.99/60
|
T:*/*=99.99/60
|
||||||
#####################################################################
|
#####################################################################
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,5 +1,16 @@
|
||||||
NEWS for tools: (rate, isdnrate, isdnrep)
|
NEWS for tools: (rate, isdnrate, isdnrep)
|
||||||
|
|
||||||
|
|
||||||
|
1999.11.30
|
||||||
|
isdnrate:
|
||||||
|
new option -s shows services
|
||||||
|
e.g.
|
||||||
|
isdnrate -s Internet
|
||||||
|
|
||||||
|
1999.11.28
|
||||||
|
isdnrate:
|
||||||
|
new option -o shows only booked providers
|
||||||
|
|
||||||
1999.11.08
|
1999.11.08
|
||||||
all utils:
|
all utils:
|
||||||
initRate reads now all provider-variants.
|
initRate reads now all provider-variants.
|
||||||
|
@ -14,28 +25,28 @@ NEWS for tools: (rate, isdnrate, isdnrep)
|
||||||
e.g.
|
e.g.
|
||||||
|
|
||||||
isdnrate -ZX 19430
|
isdnrate -ZX 19430
|
||||||
|
|
||||||
rate.c / getLeastCost
|
rate.c / getLeastCost
|
||||||
if number is a special number, this function looks at the service
|
if number is a special number, this function looks at the service
|
||||||
and performs LCR for all numbers listet in this service.
|
and performs LCR for all numbers listet in this service.
|
||||||
So its possible now to find the cheapest online number / provider.
|
So its possible now to find the cheapest online number / provider.
|
||||||
|
|
||||||
1999.10.21
|
1999.10.21
|
||||||
Destination DB runs with isdnrate / isdnlog
|
Destination DB runs with isdnrate / isdnlog
|
||||||
Removed a lot of country-specific stuff in various files
|
Removed a lot of country-specific stuff in various files
|
||||||
|
|
||||||
all
|
all
|
||||||
new entries in isdn.conf section
|
new entries in isdn.conf section
|
||||||
[ISDNLOG]
|
[ISDNLOG]
|
||||||
DESTFILE=/usr/lib/isdn/dest.gdbm
|
DESTFILE=/usr/lib/isdn/dest.gdbm
|
||||||
VBN=Providerselection-Prefix (DE 010, AT 10, NL 16:17)
|
VBN=Providerselection-Prefix (DE 010, AT 10, NL 16:17)
|
||||||
VBNLEN=Number of digits following VBN (DE 2:3, AT 2, NL 1 ??, FR 1)
|
VBNLEN=Number of digits following VBN (DE 2:3, AT 2, NL 1 ??, FR 1)
|
||||||
PRESELECTED=provider# (DE 33, AT 1, NL 999)
|
PRESELECTED=provider# (DE 33, AT 1, NL 999)
|
||||||
s. isdnlog/samples or isdnlog/README
|
s. isdnlog/samples or isdnlog/README
|
||||||
|
|
||||||
isdnrep.c
|
isdnrep.c
|
||||||
shows now zone names from rate-CC.dat
|
shows now zone names from rate-CC.dat
|
||||||
|
|
||||||
isdnrate.c
|
isdnrate.c
|
||||||
new option -N
|
new option -N
|
||||||
show info about number parsing
|
show info about number parsing
|
||||||
|
@ -52,7 +63,7 @@ NEWS for tools: (rate, isdnrate, isdnrep)
|
||||||
|
|
||||||
1999.09.07
|
1999.09.07
|
||||||
rate-CC.dat: Syntaxerweiterung im C:Tag
|
rate-CC.dat: Syntaxerweiterung im C:Tag
|
||||||
|
|
||||||
C:TarifChanged:dd.mm.yyyy
|
C:TarifChanged:dd.mm.yyyy
|
||||||
(Datum der letzten Tarifwartung)
|
(Datum der letzten Tarifwartung)
|
||||||
|
|
||||||
|
@ -61,16 +72,16 @@ NEWS for tools: (rate, isdnrate, isdnrep)
|
||||||
telrate.cgi:
|
telrate.cgi:
|
||||||
uses now gd 1.6.3, GD 1.21 with PNG instead of GIF
|
uses now gd 1.6.3, GD 1.21 with PNG instead of GIF
|
||||||
(smaller, no licence troubles)
|
(smaller, no licence troubles)
|
||||||
|
|
||||||
requires
|
requires
|
||||||
gd 1.6.3 which
|
gd 1.6.3 which
|
||||||
requires
|
requires
|
||||||
libz, libpng
|
libz, libpng
|
||||||
(e.g. ln -s /usr/X11R6/lib/libz.so /usr/lib/libz.so
|
(e.g. ln -s /usr/X11R6/lib/libz.so /usr/lib/libz.so
|
||||||
ln -s /usr/X11R6/lib/libpng.so /usr/lib/libpng.so
|
ln -s /usr/X11R6/lib/libpng.so /usr/lib/libpng.so
|
||||||
ln -s /usr/X11R6/include/png.h /usr/local/include/png.h
|
ln -s /usr/X11R6/include/png.h /usr/local/include/png.h
|
||||||
ln -s /usr/X11R6/include/pngconf.h /usr/local/include/pngconf.h
|
ln -s /usr/X11R6/include/pngconf.h /usr/local/include/pngconf.h
|
||||||
)
|
)
|
||||||
or from GD README
|
or from GD README
|
||||||
Make sure you have downloaded and installed the following packages:
|
Make sure you have downloaded and installed the following packages:
|
||||||
|
|
||||||
|
@ -82,7 +93,7 @@ NEWS for tools: (rate, isdnrate, isdnrep)
|
||||||
http://www.cdrom.com/pub/png/
|
http://www.cdrom.com/pub/png/
|
||||||
d. The zlib compression library:
|
d. The zlib compression library:
|
||||||
http://www.cdrom.com/pub/infozip/zlib/
|
http://www.cdrom.com/pub/infozip/zlib/
|
||||||
|
|
||||||
dann noch ein kleiner Patch in GD.c, weiss der Geier warum
|
dann noch ein kleiner Patch in GD.c, weiss der Geier warum
|
||||||
|
|
||||||
--- GD.c Sat Sep 4 19:06:37 1999
|
--- GD.c Sat Sep 4 19:06:37 1999
|
||||||
|
@ -100,18 +111,18 @@ NEWS for tools: (rate, isdnrate, isdnrep)
|
||||||
@@ -2039,7 +2040,7 @@
|
@@ -2039,7 +2040,7 @@
|
||||||
XSRETURN_YES;
|
XSRETURN_YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
-
|
-
|
||||||
+#if 0
|
+#if 0
|
||||||
#define XSCAPI(name) void name(CV* cv, void* pPerl)
|
#define XSCAPI(name) void name(CV* cv, void* pPerl)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -2051,3 +2052,4 @@
|
@@ -2051,3 +2052,4 @@
|
||||||
boot__CAPI_entry(cv);
|
boot__CAPI_entry(cv);
|
||||||
}
|
}
|
||||||
|
|
||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
|
|
||||||
1999.09.04
|
1999.09.04
|
||||||
|
|
||||||
|
@ -119,10 +130,10 @@ NEWS for tools: (rate, isdnrate, isdnrep)
|
||||||
-p, -x take now an additional argument 'B'
|
-p, -x take now an additional argument 'B'
|
||||||
-pB ... show only business providers
|
-pB ... show only business providers
|
||||||
-xB ... don't show
|
-xB ... don't show
|
||||||
|
|
||||||
The provider is considered as a business-provider if the
|
The provider is considered as a business-provider if the
|
||||||
C:GT:-Tag contains the string "Business" (uppercase)
|
C:GT:-Tag contains the string "Business" (uppercase)
|
||||||
|
|
||||||
|
|
||||||
1999.09.03
|
1999.09.03
|
||||||
|
|
||||||
|
@ -130,49 +141,49 @@ NEWS for tools: (rate, isdnrate, isdnrep)
|
||||||
...
|
...
|
||||||
W:H Feiertag
|
W:H Feiertag
|
||||||
W:* Immer # APPEND THIS
|
W:* Immer # APPEND THIS
|
||||||
|
|
||||||
Hat ein Provider jeden Tag den gleichen Tarif (T:*/...) wird nun statt
|
Hat ein Provider jeden Tag den gleichen Tarif (T:*/...) wird nun statt
|
||||||
dem Wochentag 'Immer' ausgegeben. Damit ist eine klarere Unterscheidung
|
dem Wochentag 'Immer' ausgegeben. Damit ist eine klarere Unterscheidung
|
||||||
zu Providern mit tagesabhaengigen Tarifen gegeben.
|
zu Providern mit tagesabhaengigen Tarifen gegeben.
|
||||||
|
|
||||||
|
|
||||||
1999.09.01
|
|
||||||
|
1999.09.01
|
||||||
|
|
||||||
Neues Feld in struct RATE
|
Neues Feld in struct RATE
|
||||||
double Sales; (Mindestgesprächsgebühr)
|
double Sales; (Mindestgesprächsgebühr)
|
||||||
|
|
||||||
rate-CC.dat: Syntaxerweiterung im T:Tag
|
rate-CC.dat: Syntaxerweiterung im T:Tag
|
||||||
|
|
||||||
T:*.*=0.30|2.20(60)/1
|
T:*.*=0.30|2.20(60)/1
|
||||||
Mindestens 0.30, sonst 2.20 per Minute
|
Mindestens 0.30, sonst 2.20 per Minute
|
||||||
|
|
||||||
aber:
|
aber:
|
||||||
|
|
||||||
T:*.*=0.30/0,2.20(60/1
|
T:*.*=0.30/0,2.20(60/1
|
||||||
0.30 + 2.20/Min (0.30 = Herstellungsgebühr)
|
0.30 + 2.20/Min (0.30 = Herstellungsgebühr)
|
||||||
|
|
||||||
rate-CC.dat: Syntaxerweiterung im C:Tag
|
rate-CC.dat: Syntaxerweiterung im C:Tag
|
||||||
|
|
||||||
gleichlautende C:Tags werden per '\n' appended
|
gleichlautende C:Tags werden per '\n' appended
|
||||||
|
|
||||||
telnum.c:
|
telnum.c:
|
||||||
Dirty hack fuer +1, +7 (s. _getCountry...)
|
Dirty hack fuer +1, +7 (s. _getCountry...)
|
||||||
|
|
||||||
isdnrate.c:
|
isdnrate.c:
|
||||||
Neue Option -S[v|n] (sort VBN oder Name statt Preis)
|
Neue Option -S[v|n] (sort VBN oder Name statt Preis)
|
||||||
|
|
||||||
z.B.
|
z.B.
|
||||||
isdnrate -C -Sv -XHomepage
|
isdnrate -C -Sv -XHomepage
|
||||||
(sortierte Proiderliste mit Homepage)
|
(sortierte Proiderliste mit Homepage)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1999.08.24
|
1999.08.24
|
||||||
|
|
||||||
rate-CC.dat: Syntaxerweiterung im C:Tag
|
rate-CC.dat: Syntaxerweiterung im C:Tag
|
||||||
|
|
||||||
folgende C:-Tags sind dzt. in Verwendung:
|
folgende C:-Tags sind dzt. in Verwendung:
|
||||||
|
|
||||||
C:Name:Provider-Firmenbezeichnung
|
C:Name:Provider-Firmenbezeichnung
|
||||||
C:Address:Provider-Adresse
|
C:Address:Provider-Adresse
|
||||||
C:Homepage:http://www.provider.CC
|
C:Homepage:http://www.provider.CC
|
||||||
|
@ -190,37 +201,37 @@ NEWS for tools: (rate, isdnrate, isdnrep)
|
||||||
z.B.
|
z.B.
|
||||||
C:GT:99 Mindestumsatz (per Monat)
|
C:GT:99 Mindestumsatz (per Monat)
|
||||||
C:GF:Cost = Ch > 99 ? 0 : 99
|
C:GF:Cost = Ch > 99 ? 0 : 99
|
||||||
|
|
||||||
C:GT:Businesskunden ab 5000 Umsatz
|
C:GT:Businesskunden ab 5000 Umsatz
|
||||||
C:GF:Ch >= 5000 ? 1 : -1
|
C:GF:Ch >= 5000 ? 1 : -1
|
||||||
|
|
||||||
C:GT:Freischaltgebühr einmalig 480
|
C:GT:Freischaltgebühr einmalig 480
|
||||||
C:GF:Cost = 480/12
|
C:GF:Cost = 480/12
|
||||||
|
|
||||||
Vom telrate.cgi sind dzt. die Variablen
|
Vom telrate.cgi sind dzt. die Variablen
|
||||||
'Ch' ... Kosten pro Mix
|
'Ch' ... Kosten pro Mix
|
||||||
'MaxCh' ... Teuerste Spalte im Mix
|
'MaxCh' ... Teuerste Spalte im Mix
|
||||||
'Cost' ... Angefallenen Kosten
|
'Cost' ... Angefallenen Kosten
|
||||||
definiert.
|
definiert.
|
||||||
|
|
||||||
Ist der Rückgabewert (i.e. die letzte Expression) -1, wird der
|
|
||||||
Provider verworfen (z.B. Mindestumsatz nicht erreicht).
|
|
||||||
|
|
||||||
|
|
||||||
isdnrate:
|
|
||||||
|
|
||||||
isdnrate -D2
|
Ist der Rückgabewert (i.e. die letzte Expression) -1, wird der
|
||||||
|
Provider verworfen (z.B. Mindestumsatz nicht erreicht).
|
||||||
|
|
||||||
|
|
||||||
|
isdnrate:
|
||||||
|
|
||||||
|
isdnrate -D2
|
||||||
begibt sich nach dem Starten in den Hintergund
|
begibt sich nach dem Starten in den Hintergund
|
||||||
isdnrate -CX9 Argentinien
|
isdnrate -CX9 Argentinien
|
||||||
verbindet ich mit dem oben gestarteten Daemon und wirft die
|
verbindet ich mit dem oben gestarteten Daemon und wirft die
|
||||||
Tarifliste aus.
|
Tarifliste aus.
|
||||||
isdnrate -CD3
|
isdnrate -CD3
|
||||||
killed den Daemon wieder
|
killed den Daemon wieder
|
||||||
|
|
||||||
|
|
||||||
1999.08.24
|
1999.08.24
|
||||||
|
|
||||||
Neues Feld in struct RATE
|
Neues Feld in struct RATE
|
||||||
double Rhythm[2]; (Takt z.B. 60,1)
|
double Rhythm[2]; (Takt z.B. 60,1)
|
||||||
|
|
||||||
-lt-
|
-lt-
|
||||||
|
|
|
@ -1,3 +1,39 @@
|
||||||
|
makedest makes a destination database
|
||||||
|
|
||||||
|
usage:
|
||||||
|
makedest [-en] [-a] [-v[2]] [cc ...] [ -cCC file|-]
|
||||||
|
eg.
|
||||||
|
$ makedest at de nl
|
||||||
|
which is the same as
|
||||||
|
$ makedest
|
||||||
|
$ makedest -a at de nl
|
||||||
|
or
|
||||||
|
$ makedest -a -c43 somecodes
|
||||||
|
|
||||||
|
-a ... append country cc to database
|
||||||
|
-en .. write english names for countries
|
||||||
|
-v ... verbose, -v2 warns also for duplicate city names, which can be many
|
||||||
|
-c ... appends file or stdin to country CC (CC may be number or isocode)
|
||||||
|
|
||||||
|
input files:
|
||||||
|
global (de/en) /usr/lib/isdn/country-de.dat
|
||||||
|
|
||||||
|
code-files /usr/lib/isdn/code-CC.dat or ../zone/CC/code
|
||||||
|
where CC is the given countrycode
|
||||||
|
code-files (and input for stdin) consists of lines
|
||||||
|
number\tcity[\tlen of prefix]
|
||||||
|
|
||||||
|
outputfile dest.gdbm is written to current directory and shoud be
|
||||||
|
installed to desired destination.
|
||||||
|
|
||||||
|
Troubleshooting:
|
||||||
|
|
||||||
|
Jochen Erwied reported that he had troubles building the destination database
|
||||||
|
(a empty dest.gdbm was built).
|
||||||
|
After updateing from perl 5.004_04 to 5.005_02 everything worked fine.
|
||||||
|
|
||||||
|
Author: Leopold Toetsch <lt@toetsch.at>
|
||||||
|
Licence: GPL
|
||||||
makedest makes a destination database
|
makedest makes a destination database
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: isdnrate.c,v 1.25 1999/11/08 21:09:41 akool Exp $
|
/* $Id: isdnrate.c,v 1.26 1999/12/01 21:47:25 akool Exp $
|
||||||
|
|
||||||
* ISDN accounting for isdn4linux. (rate evaluation)
|
* ISDN accounting for isdn4linux. (rate evaluation)
|
||||||
*
|
*
|
||||||
|
@ -19,6 +19,31 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Log: isdnrate.c,v $
|
* $Log: isdnrate.c,v $
|
||||||
|
* Revision 1.26 1999/12/01 21:47:25 akool
|
||||||
|
* isdnlog-3.72
|
||||||
|
* - new rates for 01051
|
||||||
|
* - next version of isdnbill
|
||||||
|
*
|
||||||
|
* - isdnlog/tools/telnum.c ... cleanup
|
||||||
|
* - isdnlog/tools/isdnrate.c ... -s Service
|
||||||
|
* - isdnlog/tools/rate.{c,h} ... -s
|
||||||
|
* - isdnlog/tools/NEWS ... -s
|
||||||
|
* - doc/isdnrate.man .. updated -o, -s
|
||||||
|
* - doc/rate-files.man ... updated
|
||||||
|
* - isdnlog/tools/dest/README.makedest ... updt.
|
||||||
|
* - isdnlog/isdnlog/isdnlog.8.in .. updt.
|
||||||
|
*
|
||||||
|
* Telrate
|
||||||
|
* - isdnlog/tools/telrate/README-telrate
|
||||||
|
* - isdnlog/tools/telrate/config.in NEW
|
||||||
|
* - isdnlog/tools/telrate/configure NEW
|
||||||
|
* - isdnlog/tools/telrate/Makefile.in NEW
|
||||||
|
* - isdnlog/tools/telrate/index.html.in was index.html
|
||||||
|
* - isdnlog/tools/telrate/info.html.in was info.html
|
||||||
|
* - isdnlog/tools/telrate/telrate.cgi.in was telrate.cgi
|
||||||
|
* - isdnlog/tools/telrate/leo.sample NEW sample config
|
||||||
|
* - isdnlog/tools/telrate/alex.sample NEW sample config
|
||||||
|
*
|
||||||
* Revision 1.25 1999/11/08 21:09:41 akool
|
* Revision 1.25 1999/11/08 21:09:41 akool
|
||||||
* isdnlog-3.65
|
* isdnlog-3.65
|
||||||
* - added "B:" Tag to "rate-xx.dat"
|
* - added "B:" Tag to "rate-xx.dat"
|
||||||
|
@ -40,7 +65,7 @@
|
||||||
* Revision 1.21 1999/10/25 18:30:03 akool
|
* Revision 1.21 1999/10/25 18:30:03 akool
|
||||||
* isdnlog-3.57
|
* isdnlog-3.57
|
||||||
* WARNING: Experimental version!
|
* WARNING: Experimental version!
|
||||||
* Please use isdnlog-3.56 for production systems!
|
* Please use isdnlog-3.56 for production systems!
|
||||||
*
|
*
|
||||||
* Revision 1.20 1999/09/19 14:16:27 akool
|
* Revision 1.20 1999/09/19 14:16:27 akool
|
||||||
* isdnlog-3.53
|
* isdnlog-3.53
|
||||||
|
@ -128,12 +153,11 @@
|
||||||
static void print_header(void);
|
static void print_header(void);
|
||||||
|
|
||||||
static char *myname, *myshortname;
|
static char *myname, *myshortname;
|
||||||
static char options[] = "ab:d:f:h:l:p:t:v::x:CD::G:HLNS:TUVX::Z";
|
static char options[] = "ab:d:f:h:l:op:st:v::x:CD::G:HLNS:TUVX::Z";
|
||||||
static char usage[] = "%s: usage: %s [ -%s ] Destination ...\n";
|
static char usage[] = "%s: usage: %s [ -%s ] Destination ...\n";
|
||||||
|
|
||||||
static int header = 0, best = MAXPROVIDER, table = 0,
|
static int header = 0, best = MAXPROVIDER, table = 0, explain = 0;
|
||||||
explain = 0;
|
int verbose = 0;
|
||||||
int verbose = 0;
|
|
||||||
static int usestat = 0;
|
static int usestat = 0;
|
||||||
static int duration = LCR_DURATION;
|
static int duration = LCR_DURATION;
|
||||||
static time_t start;
|
static time_t start;
|
||||||
|
@ -145,11 +169,13 @@ static int list = 0;
|
||||||
static char *comment;
|
static char *comment;
|
||||||
static char **providers = 0; /* incl these */
|
static char **providers = 0; /* incl these */
|
||||||
static int n_providers = 0;
|
static int n_providers = 0;
|
||||||
static int business=0;
|
static int business = 0;
|
||||||
static char **xproviders = 0; /* excl these */
|
static char **xproviders = 0; /* excl these */
|
||||||
static int nx_providers = 0;
|
static int nx_providers = 0;
|
||||||
static int xbusiness=0;
|
static int xbusiness = 0;
|
||||||
static int all=0;
|
static int all = 0;
|
||||||
|
static int booked = 0;
|
||||||
|
static int service = 0;
|
||||||
|
|
||||||
#define SOCKNAME "/tmp/isdnrate"
|
#define SOCKNAME "/tmp/isdnrate"
|
||||||
static int is_daemon = 0;
|
static int is_daemon = 0;
|
||||||
|
@ -158,9 +184,8 @@ static int we_are_daemon = 0;
|
||||||
static int takt = 99999;
|
static int takt = 99999;
|
||||||
static char sortby;
|
static char sortby;
|
||||||
static int need_dest;
|
static int need_dest;
|
||||||
static int h_param=0;
|
static int h_param = 0;
|
||||||
static int lcr=0;
|
static int lcr = 0;
|
||||||
|
|
||||||
static TELNUM srcnum, destnum;
|
static TELNUM srcnum, destnum;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -188,8 +213,8 @@ int print_msg(int Level, const char *fmt,...)
|
||||||
auto va_list ap;
|
auto va_list ap;
|
||||||
auto char String[BUFSIZ * 3];
|
auto char String[BUFSIZ * 3];
|
||||||
|
|
||||||
if ((Level > 1 && !verbose) || (Level>2&&verbose<2))
|
if ((Level > 1 && !verbose) || (Level > 2 && verbose < 2))
|
||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
(void) vsnprintf(String, BUFSIZ * 3, fmt, ap);
|
(void) vsnprintf(String, BUFSIZ * 3, fmt, ap);
|
||||||
|
@ -234,6 +259,7 @@ static void deinit(void)
|
||||||
exitDest();
|
exitDest();
|
||||||
exitHoliday();
|
exitHoliday();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* calc a day/time W | E | H */
|
/* calc a day/time W | E | H */
|
||||||
static void get_day(char d)
|
static void get_day(char d)
|
||||||
{
|
{
|
||||||
|
@ -243,22 +269,21 @@ static void get_day(char d)
|
||||||
|
|
||||||
tm = localtime(&start); /* now */
|
tm = localtime(&start); /* now */
|
||||||
switch (d) {
|
switch (d) {
|
||||||
case 'W': /* we need a normal weekday, so we take
|
case 'W': /* we need a normal weekday, so we take
|
||||||
|
|
||||||
today and inc. day if today is
|
today and inc. day if today is
|
||||||
holiday */
|
holiday */
|
||||||
what = WORKDAY;
|
what = WORKDAY;
|
||||||
if(!h_param)
|
if (!h_param)
|
||||||
hour = 10;
|
hour = 10;
|
||||||
break;
|
break;
|
||||||
case 'N':
|
case 'N':
|
||||||
what = WORKDAY;
|
what = WORKDAY;
|
||||||
if(!h_param)
|
if (!h_param)
|
||||||
hour = 23;
|
hour = 23;
|
||||||
break;
|
break;
|
||||||
case 'E':
|
case 'E':
|
||||||
what = SUNDAY;
|
what = SUNDAY;
|
||||||
if(!h_param)
|
if (!h_param)
|
||||||
hour = 10;
|
hour = 10;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -292,20 +317,21 @@ static int opts(int argc, char *argv[])
|
||||||
register int c;
|
register int c;
|
||||||
register char *p;
|
register char *p;
|
||||||
int x;
|
int x;
|
||||||
h_param=0;
|
|
||||||
|
h_param = 0;
|
||||||
|
|
||||||
optind = 0; /* make it repeatable */
|
optind = 0; /* make it repeatable */
|
||||||
need_dest=1;
|
need_dest = 1;
|
||||||
while ((c = getopt(argc, argv, options)) != EOF) {
|
while ((c = getopt(argc, argv, options)) != EOF) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'a': /* all rates old/newer */
|
case 'a': /* all rates old/newer */
|
||||||
all++;
|
all++;
|
||||||
break;
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
best = strtol(optarg, NIL, 0);
|
best = strtol(optarg, NIL, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* case 'c': country */
|
/* case 'c': country */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
|
@ -346,57 +372,69 @@ static int opts(int argc, char *argv[])
|
||||||
sec = atoi(p + 1);
|
sec = atoi(p + 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
min=0;
|
min = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'l':
|
case 'l':
|
||||||
duration = strtol(optarg, NIL, 0); /* l wie lt */
|
duration = strtol(optarg, NIL, 0); /* l wie lt */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'o': /* booked only */
|
||||||
|
booked++;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 's': /* service */
|
||||||
|
service++;
|
||||||
|
break;
|
||||||
|
|
||||||
case 't':
|
case 't':
|
||||||
x = strtol(optarg, NIL, 0);
|
x = strtol(optarg, NIL, 0);
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
takt = x;
|
takt = x;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'x': /* eXclude Poviders */
|
case 'x': /* eXclude Poviders */
|
||||||
{
|
{
|
||||||
char *arg = strdup(optarg);
|
char *arg = strdup(optarg);
|
||||||
p = strtok(arg, ",");
|
|
||||||
while (p) {
|
p = strtok(arg, ",");
|
||||||
|
while (p) {
|
||||||
if (*p == 'B') { /* Business Provider */
|
if (*p == 'B') { /* Business Provider */
|
||||||
xbusiness=1;
|
xbusiness = 1;
|
||||||
p = strtok(0, ",");
|
p = strtok(0, ",");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
xproviders = realloc(xproviders, (nx_providers + 1) * sizeof(char*));
|
xproviders = realloc(xproviders, (nx_providers + 1) * sizeof(char *));
|
||||||
|
|
||||||
xproviders[nx_providers] = strdup(p);
|
xproviders[nx_providers] = strdup(p);
|
||||||
p = strtok(0, ",");
|
p = strtok(0, ",");
|
||||||
nx_providers++;
|
nx_providers++;
|
||||||
}
|
}
|
||||||
free(arg);
|
free(arg);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'p': /* Providers ... */
|
case 'p': /* Providers ... */
|
||||||
{
|
{
|
||||||
char *arg = strdup(optarg);
|
char *arg = strdup(optarg);
|
||||||
p = strtok(arg, ",");
|
|
||||||
while (p) {
|
p = strtok(arg, ",");
|
||||||
|
while (p) {
|
||||||
if (*p == 'B') { /* Business Provider */
|
if (*p == 'B') { /* Business Provider */
|
||||||
business=1;
|
business = 1;
|
||||||
p = strtok(0, ",");
|
p = strtok(0, ",");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
providers = realloc(providers, (n_providers + 1) * sizeof(char*));
|
providers = realloc(providers, (n_providers + 1) * sizeof(char *));
|
||||||
|
|
||||||
providers[n_providers] = strdup(p);
|
providers[n_providers] = strdup(p);
|
||||||
p = strtok(0, ",");
|
p = strtok(0, ",");
|
||||||
n_providers++;
|
n_providers++;
|
||||||
}
|
}
|
||||||
free(arg);
|
free(arg);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
verbose++;
|
verbose++;
|
||||||
if (optarg && (x = atoi(optarg)))
|
if (optarg && (x = atoi(optarg)))
|
||||||
|
@ -436,7 +474,7 @@ static int opts(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
sortby = *optarg;
|
sortby = *optarg;
|
||||||
break;
|
break;
|
||||||
case 'T':
|
case 'T':
|
||||||
table++;
|
table++;
|
||||||
break;
|
break;
|
||||||
|
@ -454,13 +492,13 @@ static int opts(int argc, char *argv[])
|
||||||
explain++;
|
explain++;
|
||||||
if (optarg && isdigit(*optarg) && (x = atoi(optarg))) {
|
if (optarg && isdigit(*optarg) && (x = atoi(optarg))) {
|
||||||
explain = x;
|
explain = x;
|
||||||
if (x==50||x==51)
|
if (x == 50 || x == 51)
|
||||||
need_dest=0;
|
need_dest = 0;
|
||||||
}
|
}
|
||||||
else if(optarg) {
|
else if (optarg) {
|
||||||
comment = strdup(optarg);
|
comment = strdup(optarg);
|
||||||
explain = 8;
|
explain = 8;
|
||||||
need_dest=0;
|
need_dest = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -492,9 +530,13 @@ static int opts(int argc, char *argv[])
|
||||||
best = MAXPROVIDER;
|
best = MAXPROVIDER;
|
||||||
print_msg(PRT_V, "Illegal options, -b ignored\n");
|
print_msg(PRT_V, "Illegal options, -b ignored\n");
|
||||||
}
|
}
|
||||||
if ((explain==50||explain==51) && header) {
|
if ((explain == 50 || explain == 51) && header) {
|
||||||
print_msg(PRT_V, "Conflicting options, -H ignored\n");
|
print_msg(PRT_V, "Conflicting options, -H ignored\n");
|
||||||
}
|
}
|
||||||
|
if (explain >= 10 && service) {
|
||||||
|
print_msg(PRT_V, "Conflicting options, -s ignored\n");
|
||||||
|
service=0;
|
||||||
|
}
|
||||||
if (argc > optind)
|
if (argc > optind)
|
||||||
return (optind);
|
return (optind);
|
||||||
else
|
else
|
||||||
|
@ -502,7 +544,7 @@ static int opts(int argc, char *argv[])
|
||||||
} /* opts */
|
} /* opts */
|
||||||
|
|
||||||
|
|
||||||
static int (*compare_func)(const void *s1, const void *s2);
|
static int (*compare_func) (const void *s1, const void *s2);
|
||||||
static int compare(const void *s1, const void *s2)
|
static int compare(const void *s1, const void *s2)
|
||||||
{
|
{
|
||||||
return (((SORT *) s1)->rate > ((SORT *) s2)->rate);
|
return (((SORT *) s1)->rate > ((SORT *) s2)->rate);
|
||||||
|
@ -516,8 +558,6 @@ static int compare_name(const void *s1, const void *s2)
|
||||||
return strcasecmp(((SORT *) s1)->name, ((SORT *) s2)->name);
|
return strcasecmp(((SORT *) s1)->name, ((SORT *) s2)->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static int compare2(const void *s1, const void *s2)
|
static int compare2(const void *s1, const void *s2)
|
||||||
{
|
{
|
||||||
return (((SORT2 *) s1)->weight < ((SORT2 *) s2)->weight);
|
return (((SORT2 *) s1)->weight < ((SORT2 *) s2)->weight);
|
||||||
|
@ -529,6 +569,9 @@ char *short_explainRate(RATE * Rate)
|
||||||
static char buffer[BUFSIZ];
|
static char buffer[BUFSIZ];
|
||||||
char *p = buffer;
|
char *p = buffer;
|
||||||
|
|
||||||
|
if (service && Rate->dst[1] && *Rate->dst[1])
|
||||||
|
p += sprintf(p, "%s, ", Rate->dst[1]);
|
||||||
|
|
||||||
if (Rate->Zone && *Rate->Zone)
|
if (Rate->Zone && *Rate->Zone)
|
||||||
p += sprintf(p, "%s", Rate->Zone);
|
p += sprintf(p, "%s", Rate->Zone);
|
||||||
else
|
else
|
||||||
|
@ -550,7 +593,6 @@ static char *printrate(RATE * Rate)
|
||||||
{
|
{
|
||||||
static char message[BUFSIZ];
|
static char message[BUFSIZ];
|
||||||
|
|
||||||
|
|
||||||
if (Rate->Basic > 0)
|
if (Rate->Basic > 0)
|
||||||
sprintf(message, "%s + %s/%.4fs = %s + %s/Min (%s)",
|
sprintf(message, "%s + %s/%.4fs = %s + %s/Min (%s)",
|
||||||
printRate(Rate->Basic),
|
printRate(Rate->Basic),
|
||||||
|
@ -637,10 +679,11 @@ static char *takt_str(RATE * Rate)
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char * P_EMPTY(char *s)
|
static inline char *P_EMPTY(char *s)
|
||||||
{
|
{
|
||||||
char *p = s;
|
char *p = s;
|
||||||
return p ? p : "";
|
|
||||||
|
return p ? p : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DEL ';'
|
#define DEL ';'
|
||||||
|
@ -653,15 +696,19 @@ static int compute(char *num)
|
||||||
struct tm *tm;
|
struct tm *tm;
|
||||||
char prov[TN_MAX_PROVIDER_LEN];
|
char prov[TN_MAX_PROVIDER_LEN];
|
||||||
int first = 1;
|
int first = 1;
|
||||||
static char BUSINESS[] = "Business"; /* in C:GT:Tag */
|
static char BUSINESS[] = "Business"; /* in C:GT:Tag */
|
||||||
|
|
||||||
if (destnum.nprovider != UNKNOWN) {
|
if (destnum.nprovider != UNKNOWN) {
|
||||||
low = high = destnum.nprovider;
|
low = high = destnum.nprovider;
|
||||||
} /* if */
|
} /* if */
|
||||||
compare_func = compare;
|
compare_func = compare;
|
||||||
switch (sortby) {
|
switch (sortby) {
|
||||||
case 'v' : compare_func = compare_vbn; break;
|
case 'v':
|
||||||
case 'n' : compare_func = compare_name; break;
|
compare_func = compare_vbn;
|
||||||
|
break;
|
||||||
|
case 'n':
|
||||||
|
compare_func = compare_name;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
buildtime();
|
buildtime();
|
||||||
|
@ -682,26 +729,29 @@ static int compute(char *num)
|
||||||
}
|
}
|
||||||
for (i = low; i <= high; i++) {
|
for (i = low; i <= high; i++) {
|
||||||
int found, p;
|
int found, p;
|
||||||
char *t;
|
char *t;
|
||||||
if (ignore[i]) /* Fixme: */
|
|
||||||
|
if (ignore[i]) /* Fixme: */
|
||||||
continue;
|
continue;
|
||||||
if(!all && !isProviderValid(i,start))
|
if (booked && !isProviderBooked(i))
|
||||||
|
continue;
|
||||||
|
if (!all && !isProviderValid(i, start))
|
||||||
continue;
|
continue;
|
||||||
t = getProvider(i);
|
t = getProvider(i);
|
||||||
if (!t || t[strlen(t) - 1] == '?') /* UNKNOWN Provider */
|
if (!t || t[strlen(t) - 1] == '?') /* UNKNOWN Provider */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
t = getComment(i, "GT"); /* get Geb. Text comment */
|
t = getComment(i, "GT"); /* get Geb. Text comment */
|
||||||
if (business) { /* only business wanted */
|
if (business) { /* only business wanted */
|
||||||
if (t == 0)
|
if (t == 0)
|
||||||
continue;
|
continue;
|
||||||
else if(strstr(t, BUSINESS) == 0)
|
else if (strstr(t, BUSINESS) == 0)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (xbusiness) { /* no business wanted */
|
if (xbusiness) { /* no business wanted */
|
||||||
if(t && strstr(t, BUSINESS) > 0)
|
if (t && strstr(t, BUSINESS) > 0)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
found = 0;
|
found = 0;
|
||||||
if (n_providers) {
|
if (n_providers) {
|
||||||
for (p = 0; p < n_providers; p++)
|
for (p = 0; p < n_providers; p++)
|
||||||
|
@ -727,7 +777,7 @@ static int compute(char *num)
|
||||||
Rate.src[2] = "";
|
Rate.src[2] = "";
|
||||||
|
|
||||||
destnum.nprovider = i;
|
destnum.nprovider = i;
|
||||||
Strncpy(destnum.provider,getProvider(i),TN_MAX_PROVIDER_LEN);
|
Strncpy(destnum.provider, getProvider(i), TN_MAX_PROVIDER_LEN);
|
||||||
if (normalizeNumber(num, &destnum, TN_NO_PROVIDER) == UNKNOWN) {
|
if (normalizeNumber(num, &destnum, TN_NO_PROVIDER) == UNKNOWN) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -785,17 +835,19 @@ static int compute(char *num)
|
||||||
if (Rate.Duration <= takt)
|
if (Rate.Duration <= takt)
|
||||||
printf("@----- %s %s\n", currency, Rate.Provider);
|
printf("@----- %s %s\n", currency, Rate.Provider);
|
||||||
}
|
}
|
||||||
else if (explain==50||explain==51) {
|
else if (explain == 50 || explain == 51) {
|
||||||
int fi=1;
|
int fi = 1;
|
||||||
while(getZoneRate(&Rate, explain-50,fi) == 0) {
|
|
||||||
|
while (getZoneRate(&Rate, explain - 50, fi) == 0) {
|
||||||
double cpm = Rate.Duration > 0 ? 60 * Rate.Price / Rate.Duration : 99.99;
|
double cpm = Rate.Duration > 0 ? 60 * Rate.Price / Rate.Duration : 99.99;
|
||||||
fi=0;
|
|
||||||
|
fi = 0;
|
||||||
if (Rate.Price != 99.99)
|
if (Rate.Price != 99.99)
|
||||||
printf("%s%c%s%c%s%c%.2f%c%.2f%c%s\n", prefix2provider(Rate.prefix, prov), DEL,
|
printf("%s%c%s%c%s%c%.2f%c%.2f%c%s\n", prefix2provider(Rate.prefix, prov), DEL,
|
||||||
Rate.Provider,DEL,currency,DEL,Rate.Charge,DEL,cpm,DEL,
|
Rate.Provider, DEL, currency, DEL, Rate.Charge, DEL, cpm, DEL,
|
||||||
P_EMPTY(Rate.Country));
|
P_EMPTY(Rate.Country));
|
||||||
free(Rate.Country);
|
free(Rate.Country);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* kludge to suppress "impossible" Rates */
|
/* kludge to suppress "impossible" Rates */
|
||||||
|
@ -807,7 +859,10 @@ static int compute(char *num)
|
||||||
sort[n].name = Rate.Provider;
|
sort[n].name = Rate.Provider;
|
||||||
switch (explain) {
|
switch (explain) {
|
||||||
case 1:
|
case 1:
|
||||||
sprintf(s, " (%s)", Rate.Zone);
|
if (service)
|
||||||
|
sprintf(s, " (%s, %s)", P_EMPTY(Rate.dst[1]), Rate.Zone);
|
||||||
|
else
|
||||||
|
sprintf(s, " (%s)", Rate.Zone);
|
||||||
sort[n].explain = strdup(s);
|
sort[n].explain = strdup(s);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -846,19 +901,20 @@ static int compute(char *num)
|
||||||
} /* for i */
|
} /* for i */
|
||||||
if (explain < 10) {
|
if (explain < 10) {
|
||||||
qsort((void *) sort, n, sizeof(SORT), compare_func);
|
qsort((void *) sort, n, sizeof(SORT), compare_func);
|
||||||
if(lcr) {
|
if (lcr) {
|
||||||
RATE Cheap;
|
RATE Cheap;
|
||||||
int res=getLeastCost(&Rate, &Cheap, 0, -1);
|
int res = getLeastCost(&Rate, &Cheap, 0, -1);
|
||||||
if(res!= UNKNOWN) {
|
|
||||||
|
if (res != UNKNOWN) {
|
||||||
sort[n].prefix = Cheap.prefix;
|
sort[n].prefix = Cheap.prefix;
|
||||||
sort[n].rate = Cheap.Charge;
|
sort[n].rate = Cheap.Charge;
|
||||||
sort[n].name = Cheap.Provider;
|
sort[n].name = Cheap.Provider;
|
||||||
sprintf(s,"(Cheapest: %s)", Cheap.dst[1]);
|
sprintf(s, "(Cheapest: %s)", Cheap.dst[1]);
|
||||||
sort[n].explain = strdup(s);
|
sort[n].explain = strdup(s);
|
||||||
n++;
|
n++;
|
||||||
} /* res*/
|
} /* res */
|
||||||
} /* lcr */
|
} /* lcr */
|
||||||
} /* explain */
|
} /* explain */
|
||||||
return (n);
|
return (n);
|
||||||
} /* compute */
|
} /* compute */
|
||||||
|
|
||||||
|
@ -866,7 +922,7 @@ static void print_header(void)
|
||||||
{
|
{
|
||||||
printf("Eine %d Sekunden lange Verbindung von %s nach %s kostet am %s\n",
|
printf("Eine %d Sekunden lange Verbindung von %s nach %s kostet am %s\n",
|
||||||
duration, formatNumber("%F", &srcnum), formatNumber("%F", &destnum),
|
duration, formatNumber("%F", &srcnum), formatNumber("%F", &destnum),
|
||||||
ctime(&start));
|
ctime(&start));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void printList(int n)
|
static void printList(int n)
|
||||||
|
@ -902,13 +958,11 @@ static void purge(int n)
|
||||||
{
|
{
|
||||||
register int i;
|
register int i;
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
if (sort[i].explain)
|
if (sort[i].explain)
|
||||||
free(sort[i].explain);
|
free(sort[i].explain);
|
||||||
} /* purge */
|
} /* purge */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Werktag
|
Werktag
|
||||||
Wochenende
|
Wochenende
|
||||||
|
@ -932,13 +986,12 @@ static void printTable(char *num)
|
||||||
auto SORT2 wsort[MAXPROVIDER];
|
auto SORT2 wsort[MAXPROVIDER];
|
||||||
static int firsttime = 1;
|
static int firsttime = 1;
|
||||||
int first;
|
int first;
|
||||||
int prefix;
|
int prefix;
|
||||||
|
|
||||||
memset(used, 0, sizeof(used));
|
memset(used, 0, sizeof(used));
|
||||||
memset(hours, 0, sizeof(hours));
|
memset(hours, 0, sizeof(hours));
|
||||||
memset(weight, 0, sizeof(weight));
|
memset(weight, 0, sizeof(weight));
|
||||||
|
|
||||||
|
|
||||||
for (d = 0; d < 2; d++) {
|
for (d = 0; d < 2; d++) {
|
||||||
last[0].prefix = UNKNOWN;
|
last[0].prefix = UNKNOWN;
|
||||||
lasthour = UNKNOWN;
|
lasthour = UNKNOWN;
|
||||||
|
@ -964,8 +1017,9 @@ static void printTable(char *num)
|
||||||
first = 1;
|
first = 1;
|
||||||
while (1) {
|
while (1) {
|
||||||
destnum.nprovider = UNKNOWN;
|
destnum.nprovider = UNKNOWN;
|
||||||
if(provider2prefix(num, &prefix)) /* set provider if it is in number */
|
if (provider2prefix(num, &prefix)) /* set provider if it
|
||||||
normalizeNumber(num, &destnum, TN_PROVIDER);
|
is in number */
|
||||||
|
normalizeNumber(num, &destnum, TN_PROVIDER);
|
||||||
n = compute(num);
|
n = compute(num);
|
||||||
|
|
||||||
if (header && first && d == 0 && firsttime)
|
if (header && first && d == 0 && firsttime)
|
||||||
|
@ -992,16 +1046,16 @@ static void printTable(char *num)
|
||||||
|
|
||||||
if (!i)
|
if (!i)
|
||||||
printf(" %02d:00 .. %02d:59 %s = %s %s%s\n",
|
printf(" %02d:00 .. %02d:59 %s = %s %s%s\n",
|
||||||
lasthour, hour - 1, Provider(last[i].prefix),
|
lasthour, hour - 1, Provider(last[i].prefix),
|
||||||
currency,
|
currency,
|
||||||
double2str(last[i].rate, 5, 3, DEB),
|
double2str(last[i].rate, 5, 3, DEB),
|
||||||
last[i].explain);
|
last[i].explain);
|
||||||
else
|
else
|
||||||
printf(" %s = %s %s%s\n",
|
printf(" %s = %s %s%s\n",
|
||||||
Provider(last[i].prefix),
|
Provider(last[i].prefix),
|
||||||
currency,
|
currency,
|
||||||
double2str(last[i].rate, 5, 3, DEB),
|
double2str(last[i].rate, 5, 3, DEB),
|
||||||
last[i].explain);
|
last[i].explain);
|
||||||
} /* for */
|
} /* for */
|
||||||
|
|
||||||
used[last[0].prefix]++;
|
used[last[0].prefix]++;
|
||||||
|
@ -1042,23 +1096,23 @@ static void printTable(char *num)
|
||||||
if (!i) {
|
if (!i) {
|
||||||
if ((lasthour == 7) && (hour == 7))
|
if ((lasthour == 7) && (hour == 7))
|
||||||
printf(" immer %s = %s %s%s\n",
|
printf(" immer %s = %s %s%s\n",
|
||||||
Provider(last[i].prefix),
|
Provider(last[i].prefix),
|
||||||
currency,
|
currency,
|
||||||
double2str(last[i].rate, 5, 3, DEB),
|
double2str(last[i].rate, 5, 3, DEB),
|
||||||
last[i].explain);
|
last[i].explain);
|
||||||
else
|
else
|
||||||
printf(" %02d:00 .. %02d:59 %s = %s %s%s\n",
|
printf(" %02d:00 .. %02d:59 %s = %s %s%s\n",
|
||||||
lasthour, hour - 1, Provider(last[i].prefix),
|
lasthour, hour - 1, Provider(last[i].prefix),
|
||||||
currency,
|
currency,
|
||||||
double2str(last[i].rate, 5, 3, DEB),
|
double2str(last[i].rate, 5, 3, DEB),
|
||||||
last[i].explain);
|
last[i].explain);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
printf( " %s = %s %s%s\n",
|
printf(" %s = %s %s%s\n",
|
||||||
Provider(last[i].prefix),
|
Provider(last[i].prefix),
|
||||||
currency,
|
currency,
|
||||||
double2str(last[i].rate, 5, 3, DEB),
|
double2str(last[i].rate, 5, 3, DEB),
|
||||||
last[i].explain);
|
last[i].explain);
|
||||||
} /* for */
|
} /* for */
|
||||||
|
|
||||||
used[last[0].prefix]++;
|
used[last[0].prefix]++;
|
||||||
|
@ -1086,7 +1140,7 @@ static void printTable(char *num)
|
||||||
for (i = 0; i < MAXPROVIDER; i++)
|
for (i = 0; i < MAXPROVIDER; i++)
|
||||||
if (used[i]) {
|
if (used[i]) {
|
||||||
printf("%s %d times, %d hours, weight = %d\n",
|
printf("%s %d times, %d hours, weight = %d\n",
|
||||||
Provider(i), used[i], hours[i], weight[i]);
|
Provider(i), used[i], hours[i], weight[i]);
|
||||||
|
|
||||||
wsort[useds].weight = weight[i];
|
wsort[useds].weight = weight[i];
|
||||||
wsort[useds].index = i;
|
wsort[useds].index = i;
|
||||||
|
@ -1104,7 +1158,7 @@ static void printTable(char *num)
|
||||||
|
|
||||||
for (i = 0; i < useds; i++) {
|
for (i = 0; i < useds; i++) {
|
||||||
printf("%s %d times, %d hours, weight = %d\n",
|
printf("%s %d times, %d hours, weight = %d\n",
|
||||||
Provider(wsort[i].index), used[wsort[i].index], hours[wsort[i].index], weight[wsort[i].index]);
|
Provider(wsort[i].index), used[wsort[i].index], hours[wsort[i].index], weight[wsort[i].index]);
|
||||||
|
|
||||||
if (i == best - 1)
|
if (i == best - 1)
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
@ -1137,90 +1191,63 @@ static void clean_up()
|
||||||
free(comment);
|
free(comment);
|
||||||
comment = 0;
|
comment = 0;
|
||||||
sortby = 0;
|
sortby = 0;
|
||||||
need_dest=1;
|
need_dest = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void viacode(char *target, TELNUM *destnum)
|
|
||||||
{
|
|
||||||
register char *p, *p1;
|
|
||||||
auto FILE *fi = fopen("/usr/lib/isdn/code-de.dat", "r");
|
|
||||||
auto char s[BUFSIZ];
|
|
||||||
|
|
||||||
|
|
||||||
if (fi != (FILE *)NULL) {
|
|
||||||
while (fgets(s, BUFSIZ, fi)) {
|
|
||||||
if ((p = strchr(s, '\n'))) {
|
|
||||||
|
|
||||||
*p-- = 0;
|
|
||||||
|
|
||||||
while ((p > s) && !isblank(*p))
|
|
||||||
p--;
|
|
||||||
|
|
||||||
if (p > s) {
|
|
||||||
if (!strcasecmp(p + 1, target)) {
|
|
||||||
p1 = s;
|
|
||||||
|
|
||||||
while (!isblank(*p1))
|
|
||||||
p1++;
|
|
||||||
|
|
||||||
*p1 = 0;
|
|
||||||
|
|
||||||
sprintf(destnum->msn, "0%s", s);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} /* if */
|
|
||||||
} /* if */
|
|
||||||
} /* while */
|
|
||||||
|
|
||||||
fclose(fi);
|
|
||||||
} /* if */
|
|
||||||
} /* viacode */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
static void doit(int i, int argc, char *argv[])
|
static void doit(int i, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
int prefix;
|
int prefix;
|
||||||
|
char *num;
|
||||||
|
|
||||||
post_init();
|
post_init();
|
||||||
memset(ignore, 0, sizeof(ignore));
|
memset(ignore, 0, sizeof(ignore));
|
||||||
if (!need_dest && i==0) {
|
if (!need_dest && i == 0) {
|
||||||
i=0; argc=1;
|
i = 0;
|
||||||
argv[0]="2345";
|
argc = 1;
|
||||||
}
|
argv[0] = "2345";
|
||||||
|
}
|
||||||
while (i < argc) {
|
while (i < argc) {
|
||||||
|
num = argv[i];
|
||||||
if (explain == 55) {
|
if (explain == 55) {
|
||||||
if(n_providers) {
|
if (n_providers) {
|
||||||
destnum.nprovider=pnum2prefix_variant(providers[0], 0);
|
destnum.nprovider = pnum2prefix_variant(providers[0], 0);
|
||||||
Strncpy(destnum.provider,getProvider(destnum.nprovider),TN_MAX_PROVIDER_LEN);
|
Strncpy(destnum.provider, getProvider(destnum.nprovider), TN_MAX_PROVIDER_LEN);
|
||||||
normalizeNumber(argv[i], &destnum, TN_NO_PROVIDER);
|
normalizeNumber(num, &destnum, TN_NO_PROVIDER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
normalizeNumber(argv[i], &destnum, TN_ALL);
|
normalizeNumber(num, &destnum, TN_ALL);
|
||||||
printf("%s => %s \n",argv[i],formatNumber("%l - %p",&destnum));
|
printf("%s => %s \n", num, formatNumber("%l - %p", &destnum));
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
destnum.nprovider = UNKNOWN;
|
|
||||||
if(provider2prefix(argv[i], &prefix)) /* set provider if it is in number */
|
|
||||||
normalizeNumber(argv[i], &destnum, TN_PROVIDER);
|
|
||||||
#if 0
|
|
||||||
if (isalpha(*destnum.msn))
|
|
||||||
viacode(argv[i], &destnum);
|
|
||||||
#endif
|
|
||||||
if (table)
|
|
||||||
printTable(argv[i]);
|
|
||||||
else {
|
|
||||||
n = compute(argv[i]);
|
|
||||||
if (list)
|
|
||||||
printList(n);
|
|
||||||
else if (explain < 10)
|
|
||||||
result(n);
|
|
||||||
purge(n);
|
|
||||||
}
|
}
|
||||||
|
if (service) {
|
||||||
|
num = getServiceNum(num);
|
||||||
|
if (!num || !*num) {
|
||||||
|
i++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
do {
|
||||||
|
destnum.nprovider = UNKNOWN;
|
||||||
|
if (provider2prefix(num, &prefix)) /* set provider if it
|
||||||
|
is in number */
|
||||||
|
normalizeNumber(num, &destnum, TN_PROVIDER);
|
||||||
|
if (table)
|
||||||
|
printTable(num);
|
||||||
|
else {
|
||||||
|
n = compute(num);
|
||||||
|
if (list)
|
||||||
|
printList(n);
|
||||||
|
else if (explain < 10)
|
||||||
|
result(n);
|
||||||
|
purge(n);
|
||||||
|
}
|
||||||
|
if (service)
|
||||||
|
num = getServiceNum(0);
|
||||||
|
else
|
||||||
|
num = 0;
|
||||||
|
} while (num && *num);
|
||||||
i++;
|
i++;
|
||||||
} /* while */
|
} /* while */
|
||||||
clean_up();
|
clean_up();
|
||||||
|
@ -1261,7 +1288,7 @@ static int handle_client(int fd)
|
||||||
time(&start); /* set time of call */
|
time(&start); /* set time of call */
|
||||||
splittime(); /* date time my be overridden by opts */
|
splittime(); /* date time my be overridden by opts */
|
||||||
we_are_daemon = 1;
|
we_are_daemon = 1;
|
||||||
if ((i = opts(argc, argv))||need_dest==0) {
|
if ((i = opts(argc, argv)) || need_dest == 0) {
|
||||||
if (shutdown(fd, 0) < 0) /* no read any more */
|
if (shutdown(fd, 0) < 0) /* no read any more */
|
||||||
err("shutdown");
|
err("shutdown");
|
||||||
if (dup2(fd, STDOUT_FILENO) < 0) /* stdout to sock */
|
if (dup2(fd, STDOUT_FILENO) < 0) /* stdout to sock */
|
||||||
|
@ -1284,19 +1311,19 @@ void catch_sig(int sig)
|
||||||
err("Sig");
|
err("Sig");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void del_sock(void)
|
static void del_sock(void)
|
||||||
{
|
{
|
||||||
if (getppid() > 0)
|
if (getppid() > 0)
|
||||||
unlink(SOCKNAME);
|
unlink(SOCKNAME);
|
||||||
}
|
}
|
||||||
static volatile sig_atomic_t stopped = 0, reinit = 0;
|
static volatile sig_atomic_t stopped = 0, reinit = 0;
|
||||||
|
|
||||||
static void catch_term(int sig)
|
static void catch_term(int sig)
|
||||||
{
|
{
|
||||||
stopped = 1;
|
stopped = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void catch_hup(int sig)
|
static void catch_hup(int sig)
|
||||||
{
|
{
|
||||||
reinit = 1;
|
reinit = 1;
|
||||||
}
|
}
|
||||||
|
@ -1305,12 +1332,12 @@ static void do_reinit(void)
|
||||||
{
|
{
|
||||||
deinit();
|
deinit();
|
||||||
init();
|
init();
|
||||||
reinit=0;
|
reinit = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* thank's to Jochen Erwied for this: */
|
/* thank's to Jochen Erwied for this: */
|
||||||
#ifndef TEMP_FAILURE_RETRY
|
#ifndef TEMP_FAILURE_RETRY
|
||||||
# define TEMP_FAILURE_RETRY(expression) \
|
#define TEMP_FAILURE_RETRY(expression) \
|
||||||
(__extension__ \
|
(__extension__ \
|
||||||
({ long int __result; \
|
({ long int __result; \
|
||||||
do __result = (long int) (expression); \
|
do __result = (long int) (expression); \
|
||||||
|
@ -1347,7 +1374,7 @@ static void setup_daemon()
|
||||||
else if (pid > 0)
|
else if (pid > 0)
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0)
|
if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0)
|
||||||
err("Can't open socket");
|
err("Can't open socket");
|
||||||
sa.sun_family = AF_UNIX;
|
sa.sun_family = AF_UNIX;
|
||||||
strcpy(sa.sun_path, sock_name);
|
strcpy(sa.sun_path, sock_name);
|
||||||
|
@ -1435,8 +1462,7 @@ static int connect_2_daemon(int argc, char *argv[])
|
||||||
case 'C':
|
case 'C':
|
||||||
break;
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
if (optarg && atoi(optarg) == 3) ; /* goon, kill a running
|
if (optarg && atoi(optarg) == 3) ; /* goon, kill a running
|
||||||
|
|
||||||
daemon */
|
daemon */
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
@ -1478,7 +1504,7 @@ int main(int argc, char *argv[], char *envp[])
|
||||||
time(&start);
|
time(&start);
|
||||||
splittime();
|
splittime();
|
||||||
|
|
||||||
if ((i = opts(argc, argv)) || need_dest==0) {
|
if ((i = opts(argc, argv)) || need_dest == 0) {
|
||||||
if (is_client)
|
if (is_client)
|
||||||
exit(connect_2_daemon(argc, argv));
|
exit(connect_2_daemon(argc, argv));
|
||||||
else
|
else
|
||||||
|
@ -1499,7 +1525,9 @@ int main(int argc, char *argv[], char *envp[])
|
||||||
print_msg(PRT_A, "\t-f areacode\tyou are calling from <areacode>\n");
|
print_msg(PRT_A, "\t-f areacode\tyou are calling from <areacode>\n");
|
||||||
print_msg(PRT_A, "\t-h h[:m[:s]]\tstart time of call (default now)\n");
|
print_msg(PRT_A, "\t-h h[:m[:s]]\tstart time of call (default now)\n");
|
||||||
print_msg(PRT_A, "\t-l duration\tduration of call in seconds (default %d seconds)\n", LCR_DURATION);
|
print_msg(PRT_A, "\t-l duration\tduration of call in seconds (default %d seconds)\n", LCR_DURATION);
|
||||||
|
print_msg(PRT_A, "\t-o \t show only booked providers\n");
|
||||||
print_msg(PRT_A, "\t-p prov|B[,prov...]\t show only these providers\n");
|
print_msg(PRT_A, "\t-p prov|B[,prov...]\t show only these providers\n");
|
||||||
|
print_msg(PRT_A, "\t-s \t consider 'Destination' as a service name\n");
|
||||||
print_msg(PRT_A, "\t-t takt\t\tshow providers if chargeduration<=takt\n");
|
print_msg(PRT_A, "\t-t takt\t\tshow providers if chargeduration<=takt\n");
|
||||||
print_msg(PRT_A, "\t-v [level]\tverbose\n");
|
print_msg(PRT_A, "\t-v [level]\tverbose\n");
|
||||||
print_msg(PRT_A, "\t-x prov|B[,prov...]\t exclude these providers\n");
|
print_msg(PRT_A, "\t-x prov|B[,prov...]\t exclude these providers\n");
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: rate.c,v 1.64 1999/11/28 19:32:42 akool Exp $
|
/* $Id: rate.c,v 1.65 1999/12/01 21:47:25 akool Exp $
|
||||||
*
|
*
|
||||||
* Tarifdatenbank
|
* Tarifdatenbank
|
||||||
*
|
*
|
||||||
|
@ -19,6 +19,31 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Log: rate.c,v $
|
* $Log: rate.c,v $
|
||||||
|
* Revision 1.65 1999/12/01 21:47:25 akool
|
||||||
|
* isdnlog-3.72
|
||||||
|
* - new rates for 01051
|
||||||
|
* - next version of isdnbill
|
||||||
|
*
|
||||||
|
* - isdnlog/tools/telnum.c ... cleanup
|
||||||
|
* - isdnlog/tools/isdnrate.c ... -s Service
|
||||||
|
* - isdnlog/tools/rate.{c,h} ... -s
|
||||||
|
* - isdnlog/tools/NEWS ... -s
|
||||||
|
* - doc/isdnrate.man .. updated -o, -s
|
||||||
|
* - doc/rate-files.man ... updated
|
||||||
|
* - isdnlog/tools/dest/README.makedest ... updt.
|
||||||
|
* - isdnlog/isdnlog/isdnlog.8.in .. updt.
|
||||||
|
*
|
||||||
|
* Telrate
|
||||||
|
* - isdnlog/tools/telrate/README-telrate
|
||||||
|
* - isdnlog/tools/telrate/config.in NEW
|
||||||
|
* - isdnlog/tools/telrate/configure NEW
|
||||||
|
* - isdnlog/tools/telrate/Makefile.in NEW
|
||||||
|
* - isdnlog/tools/telrate/index.html.in was index.html
|
||||||
|
* - isdnlog/tools/telrate/info.html.in was info.html
|
||||||
|
* - isdnlog/tools/telrate/telrate.cgi.in was telrate.cgi
|
||||||
|
* - isdnlog/tools/telrate/leo.sample NEW sample config
|
||||||
|
* - isdnlog/tools/telrate/alex.sample NEW sample config
|
||||||
|
*
|
||||||
* Revision 1.64 1999/11/28 19:32:42 akool
|
* Revision 1.64 1999/11/28 19:32:42 akool
|
||||||
* isdnlog-3.71
|
* isdnlog-3.71
|
||||||
*
|
*
|
||||||
|
@ -398,6 +423,11 @@
|
||||||
* char *getSpecialName(char *number)
|
* char *getSpecialName(char *number)
|
||||||
* get the Service Name of a special number
|
* get the Service Name of a special number
|
||||||
*
|
*
|
||||||
|
* char *getServiceNum(char *name)
|
||||||
|
* returns the first Tel-Number for Service 'name',
|
||||||
|
* call it with name=NULL to get the next number
|
||||||
|
* returns NULL if no mor numbers
|
||||||
|
*
|
||||||
* void clearRate (RATE *Rate)
|
* void clearRate (RATE *Rate)
|
||||||
* setzt alle Felder von *Rate zurück
|
* setzt alle Felder von *Rate zurück
|
||||||
*
|
*
|
||||||
|
@ -440,6 +470,9 @@
|
||||||
* int isProviderValid(int prefix, time_t when)
|
* int isProviderValid(int prefix, time_t when)
|
||||||
* returns true, if the G:tag entries match when
|
* returns true, if the G:tag entries match when
|
||||||
*
|
*
|
||||||
|
* inline int isProviderBooked( int prefix)
|
||||||
|
* returns true if Provider is booked (i.e. listed int rate.conf)
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _RATE_C_
|
#define _RATE_C_
|
||||||
|
@ -788,6 +821,10 @@ inline int getNProvider( void ) {
|
||||||
return nProvider;
|
return nProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline int isProviderBooked( int i) {
|
||||||
|
return Provider[i].booked;
|
||||||
|
}
|
||||||
|
|
||||||
int isProviderValid(int i, time_t when)
|
int isProviderValid(int i, time_t when)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
|
@ -1592,6 +1629,24 @@ char *getSpecialName(char *number) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *getServiceNum(char *name) {
|
||||||
|
static int serv, cod;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if(name && *name) {
|
||||||
|
for (i=0; i<nService; i++)
|
||||||
|
if(strcmp(name, Service[i].Name) == 0) {
|
||||||
|
serv=i;
|
||||||
|
cod=0;
|
||||||
|
return Service[i].Codes[0];
|
||||||
|
}
|
||||||
|
return NULL; /* Unknown Service */
|
||||||
|
}
|
||||||
|
if(++cod < Service[serv].nCode)
|
||||||
|
return Service[serv].Codes[cod];
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void clearRate (RATE *Rate)
|
void clearRate (RATE *Rate)
|
||||||
{
|
{
|
||||||
memset (Rate, 0, sizeof(RATE));
|
memset (Rate, 0, sizeof(RATE));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: rate.h,v 1.16 1999/11/25 22:58:40 akool Exp $
|
/* $Id: rate.h,v 1.17 1999/12/01 21:47:25 akool Exp $
|
||||||
*
|
*
|
||||||
* Tarifdatenbank
|
* Tarifdatenbank
|
||||||
*
|
*
|
||||||
|
@ -19,6 +19,31 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Log: rate.h,v $
|
* $Log: rate.h,v $
|
||||||
|
* Revision 1.17 1999/12/01 21:47:25 akool
|
||||||
|
* isdnlog-3.72
|
||||||
|
* - new rates for 01051
|
||||||
|
* - next version of isdnbill
|
||||||
|
*
|
||||||
|
* - isdnlog/tools/telnum.c ... cleanup
|
||||||
|
* - isdnlog/tools/isdnrate.c ... -s Service
|
||||||
|
* - isdnlog/tools/rate.{c,h} ... -s
|
||||||
|
* - isdnlog/tools/NEWS ... -s
|
||||||
|
* - doc/isdnrate.man .. updated -o, -s
|
||||||
|
* - doc/rate-files.man ... updated
|
||||||
|
* - isdnlog/tools/dest/README.makedest ... updt.
|
||||||
|
* - isdnlog/isdnlog/isdnlog.8.in .. updt.
|
||||||
|
*
|
||||||
|
* Telrate
|
||||||
|
* - isdnlog/tools/telrate/README-telrate
|
||||||
|
* - isdnlog/tools/telrate/config.in NEW
|
||||||
|
* - isdnlog/tools/telrate/configure NEW
|
||||||
|
* - isdnlog/tools/telrate/Makefile.in NEW
|
||||||
|
* - isdnlog/tools/telrate/index.html.in was index.html
|
||||||
|
* - isdnlog/tools/telrate/info.html.in was info.html
|
||||||
|
* - isdnlog/tools/telrate/telrate.cgi.in was telrate.cgi
|
||||||
|
* - isdnlog/tools/telrate/leo.sample NEW sample config
|
||||||
|
* - isdnlog/tools/telrate/alex.sample NEW sample config
|
||||||
|
*
|
||||||
* Revision 1.16 1999/11/25 22:58:40 akool
|
* Revision 1.16 1999/11/25 22:58:40 akool
|
||||||
* isdnlog-3.68
|
* isdnlog-3.68
|
||||||
* - new utility "isdnbill" added
|
* - new utility "isdnbill" added
|
||||||
|
@ -187,6 +212,7 @@ int initRate(char *conf, char *dat, char *dom, char **msg);
|
||||||
char *getProvider(int prefix);
|
char *getProvider(int prefix);
|
||||||
int getSpecial(char *number);
|
int getSpecial(char *number);
|
||||||
char* getSpecialName(char *number);
|
char* getSpecialName(char *number);
|
||||||
|
char *getServiceNum(char *name);
|
||||||
char *getComment(int prefix, char *key);
|
char *getComment(int prefix, char *key);
|
||||||
void clearRate (RATE *Rate);
|
void clearRate (RATE *Rate);
|
||||||
int getRate(RATE *Rate, char **msg);
|
int getRate(RATE *Rate, char **msg);
|
||||||
|
@ -202,4 +228,5 @@ inline int getNProvider( void );
|
||||||
/* char *prefix2provider(int prefix, char *s) is defined in telnum.h */
|
/* char *prefix2provider(int prefix, char *s) is defined in telnum.h */
|
||||||
char *prefix2provider_variant(int prefix, char *s);
|
char *prefix2provider_variant(int prefix, char *s);
|
||||||
int isProviderValid(int prefix, time_t when);
|
int isProviderValid(int prefix, time_t when);
|
||||||
|
inline int isProviderBooked( int i);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Interface
|
* Interface
|
||||||
*
|
*
|
||||||
* void initTelNum(void)
|
* void initTelNum(void)
|
||||||
* ---------------------
|
* ---------------------
|
||||||
* init the package, call this once on startup
|
* init the package, call this once on startup
|
||||||
|
@ -131,13 +131,6 @@ void initTelNum(void)
|
||||||
_init();
|
_init();
|
||||||
} /* pre_init */
|
} /* pre_init */
|
||||||
|
|
||||||
#ifndef STANDALONE
|
|
||||||
static inline int Isspace(c)
|
|
||||||
{
|
|
||||||
return isspace(c) || c == '_';
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int split_vbn(char **p, TELNUM * num)
|
static int split_vbn(char **p, TELNUM * num)
|
||||||
{
|
{
|
||||||
int l;
|
int l;
|
||||||
|
@ -177,8 +170,8 @@ int normalizeNumber(char *target, TELNUM * num, int flag)
|
||||||
#endif
|
#endif
|
||||||
if (flag & TN_PROVIDER)
|
if (flag & TN_PROVIDER)
|
||||||
if (!split_vbn(&p, num)) {
|
if (!split_vbn(&p, num)) {
|
||||||
num->nprovider = preselect;
|
num->nprovider = pnum2prefix(preselect,0);
|
||||||
Strncpy(num->provider, getProvider(preselect), TN_MAX_PROVIDER_LEN);
|
Strncpy(num->provider, getProvider(num->nprovider), TN_MAX_PROVIDER_LEN);
|
||||||
}
|
}
|
||||||
if (flag & TN_COUNTRY) {
|
if (flag & TN_COUNTRY) {
|
||||||
/* subst '00' => '+' */
|
/* subst '00' => '+' */
|
||||||
|
@ -288,23 +281,20 @@ static void _init(void)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
clearNum(&defnum);
|
//clearNum(&defnum);
|
||||||
Strncpy(defnum.area, myarea, TN_MAX_AREA_LEN);
|
Strncpy(defnum.area, myarea, TN_MAX_AREA_LEN);
|
||||||
s = malloc(strlen(mycountry) + strlen(myarea) + 1);
|
s = malloc(strlen(mycountry) + strlen(myarea) + 1);
|
||||||
strcpy(s, mycountry);
|
strcpy(s, mycountry);
|
||||||
strcat(s, myarea);
|
strcat(s, myarea);
|
||||||
getDest(s, &defnum);
|
getDest(s, &defnum);
|
||||||
Strncpy(defnum.vbn, vbn, TN_MAX_VBN_LEN);
|
Strncpy(defnum.vbn, vbn, TN_MAX_VBN_LEN);
|
||||||
|
defnum.nprovider=pnum2prefix(preselect,0);
|
||||||
|
Strncpy(defnum.provider, getProvider(defnum.nprovider), TN_MAX_PROVIDER_LEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearNum(TELNUM * num)
|
void clearNum(TELNUM * num)
|
||||||
{
|
{
|
||||||
/* num->nprovider=UNKNOWN;
|
memcpy(num, &defnum, sizeof(TELNUM));
|
||||||
strcpy(num->provider,""); */
|
|
||||||
strcpy(num->area, "");
|
|
||||||
initNum(num);
|
|
||||||
strcpy(num->msn, "");
|
|
||||||
Strncpy(num->vbn, vbn, TN_MAX_VBN_LEN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* %Np .. Provider
|
/* %Np .. Provider
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Telrate CGI
|
Telrate CGI
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Telrate.cgi is a web interface to isdnrate for displaying tables & graphics of
|
Telrate.cgi is a web interface to isdnrate for displaying tables & graphics of
|
||||||
|
@ -11,8 +11,11 @@ Installation
|
||||||
|
|
||||||
$ ./configure
|
$ ./configure
|
||||||
# make install
|
# make install
|
||||||
(Sorry n/y)
|
|
||||||
|
run ./configure to get a list of default options, you may override them, as
|
||||||
|
./configure --cc ch --gifpng png ...
|
||||||
|
or look at the sample config's alex & leo.
|
||||||
|
|
||||||
|
|
||||||
- Manually
|
- Manually
|
||||||
|
|
||||||
|
@ -23,7 +26,7 @@ extract index.html,info.html,pics to /usr/local/httpd/htdocs/somedir
|
||||||
# tar -xzf telrate.tgz
|
# tar -xzf telrate.tgz
|
||||||
|
|
||||||
make it readable for your webserver
|
make it readable for your webserver
|
||||||
|
|
||||||
|
|
||||||
edit telrate.cgi:
|
edit telrate.cgi:
|
||||||
--------------
|
--------------
|
||||||
|
@ -32,12 +35,12 @@ edit telrate.cgi:
|
||||||
( this file is actually ./tools/zone/CC/code )
|
( this file is actually ./tools/zone/CC/code )
|
||||||
location of isdnrate (only if pipe's are used not sockets)
|
location of isdnrate (only if pipe's are used not sockets)
|
||||||
location of mktemp (should be ok)
|
location of mktemp (should be ok)
|
||||||
|
|
||||||
location of index.html, info.html, pic, (default /telrate/ under htdocs)
|
location of index.html, info.html, pic, (default /telrate/ under htdocs)
|
||||||
|
|
||||||
if your /tmp ist not writable by all users, turn of $use_sockets
|
if your /tmp ist not writable by all users, turn off $use_sockets
|
||||||
or change the location of the unix socket in both isdnrate.c and telrate.cgi.
|
or change the location of the unix socket in both isdnrate.c and telrate.cgi.
|
||||||
|
|
||||||
make a tmp dir below htdocs
|
make a tmp dir below htdocs
|
||||||
# mkdir /usr/local/httpd/htdocs/tmp
|
# mkdir /usr/local/httpd/htdocs/tmp
|
||||||
# chmod 700 /usr/local/httpd/htdocs/tmp
|
# chmod 700 /usr/local/httpd/htdocs/tmp
|
||||||
|
@ -76,24 +79,24 @@ Options +ExecCGI
|
||||||
-----------------
|
-----------------
|
||||||
End Apache config
|
End Apache config
|
||||||
|
|
||||||
|
|
||||||
# cp telrate.cgi /usr/local/httpd/cgi-bin
|
# cp telrate.cgi /usr/local/httpd/cgi-bin
|
||||||
# chmod 755 /usr/local/httpd/cgi-bin/telrate.cgi
|
# chmod 755 /usr/local/httpd/cgi-bin/telrate.cgi
|
||||||
# chmod 644 /etc/isdn/isdn.conf
|
# chmod 644 /etc/isdn/isdn.conf
|
||||||
|
|
||||||
|
|
||||||
NB: telrate.cgi uses the following perl modules:
|
NB: telrate.cgi uses the following perl modules:
|
||||||
CGI, GD, IO::Handle und Socket
|
CGI, GD, IO::Handle und Socket
|
||||||
if you don't have these, point your browser to www.perl.com,
|
if you don't have these, point your browser to www.perl.com,
|
||||||
and look for CPAN mirrors near your location.
|
and look for CPAN mirrors near your location.
|
||||||
|
|
||||||
|
|
||||||
index.html, info.html
|
index.html, info.html
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
If your script-url ist not /perl/ change it to /cgi-bin in both files or
|
If your script-url ist not /perl/ change it to /cgi-bin in both files or
|
||||||
configure apache to use /perl for your /cgi-bin.
|
configure apache to use /perl for your /cgi-bin.
|
||||||
If you expanded to a different dir then /telrate/ you have to adjust
|
If you expanded to a different dir then /telrate/ you have to adjust
|
||||||
IMG tags too.
|
IMG tags too.
|
||||||
|
|
||||||
|
|
||||||
|
@ -102,9 +105,9 @@ Running the Program
|
||||||
|
|
||||||
if $use_sockets is on, start the server instance of isdnlog/bin/isdnrate with
|
if $use_sockets is on, start the server instance of isdnlog/bin/isdnrate with
|
||||||
options -D2 [-v]
|
options -D2 [-v]
|
||||||
as soon as you see "Setup sockets" and "Going background" you can point
|
as soon as you see "Setup sockets" and "Going background" you can point
|
||||||
your browser to
|
your browser to
|
||||||
|
|
||||||
/telrate/index.html
|
/telrate/index.html
|
||||||
|
|
||||||
Enjoy
|
Enjoy
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//SoftQuad Software//DTD HoTMetaL PRO 5.0::19981217::extensions to HTML 4.0//EN" "hmpro5.dtd">
|
<!DOCTYPE HTML PUBLIC "-//SoftQuad Software//DTD HoTMetaL PRO 5.0::19981217::extensions to HTML 4.0//EN" "hmpro5.dtd">
|
||||||
|
|
||||||
<HTML>
|
<HTML>
|
||||||
|
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<TITLE>Tel-R.at - Telefonkosten</TITLE>
|
<TITLE>@TITLE@ - Telefonkosten</TITLE>
|
||||||
<SCRIPT LANGUAGE="JavaScript">
|
<SCRIPT LANGUAGE="JavaScript">
|
||||||
<!--
|
<!--
|
||||||
NS4 = document.layers ? 1 : 0;
|
NS4 = document.layers ? 1 : 0;
|
||||||
|
@ -42,7 +42,7 @@ p,td,th,body { font-family:Sans Serif,Arial }
|
||||||
</HEAD>
|
</HEAD>
|
||||||
|
|
||||||
<BODY BGCOLOR="#ffffe0">
|
<BODY BGCOLOR="#ffffe0">
|
||||||
<H1 ALIGN="center">Tel-R.at - Telefonkosten</H1>
|
<H1 ALIGN="center">@TITLE@ - Telefonkosten</H1>
|
||||||
<P><I>Wieviel</I> kostet ein <I>wie</I> langes Telefongespräch von <I>wo</I> <I>wohin</I> um <I>welche</I> Zeit mit
|
<P><I>Wieviel</I> kostet ein <I>wie</I> langes Telefongespräch von <I>wo</I> <I>wohin</I> um <I>welche</I> Zeit mit
|
||||||
<I>welchem</I> Telefonprovider und <I>warum</I> eigentlich? <I>Wie</I> teuer kommt mir ein bestimmter Gesprächsmix
|
<I>welchem</I> Telefonprovider und <I>warum</I> eigentlich? <I>Wie</I> teuer kommt mir ein bestimmter Gesprächsmix
|
||||||
zu verschiedenen Zielen? Und <I>wenn</I> man die Gebühren dazurechnet, <I>was</I> kostet es dann?</P>
|
zu verschiedenen Zielen? Und <I>wenn</I> man die Gebühren dazurechnet, <I>was</I> kostet es dann?</P>
|
||||||
|
@ -50,11 +50,11 @@ zu verschiedenen Zielen? Und <I>wenn</I> man die Gebühren dazurechnet, <I>w
|
||||||
Das und vieles mehr erfahren Sie hier, übersichtlich aufbereitet in Tabellen und Grafiken.</P>
|
Das und vieles mehr erfahren Sie hier, übersichtlich aufbereitet in Tabellen und Grafiken.</P>
|
||||||
<BLOCKQUOTE><TABLE>
|
<BLOCKQUOTE><TABLE>
|
||||||
<TR>
|
<TR>
|
||||||
<TD ALIGN="right"> <A HREF="/perl/telrate.cgi" ONMOUSEOVER="swap('eg',1)"
|
<TD ALIGN="right"> <A HREF="/@CGIBIN@/telrate.cgi" ONMOUSEOVER="swap('eg',1)"
|
||||||
ONMOUSEOUT="swap('eg',0)"><B>Einzelgespräche</B></A><A HREF="/perl/telrate.cgi"
|
ONMOUSEOUT="swap('eg',0)"><B>Einzelgespräche</B></A><A HREF="/@CGIBIN@/telrate.cgi"
|
||||||
ONMOUSEOVER="swap('eg',1)" ONMOUSEOUT="swap('eg',0)"><IMG SRC="eg0.jpg" ALT="Einzelgespräch" BORDER="0" WIDTH="80"
|
ONMOUSEOVER="swap('eg',1)" ONMOUSEOUT="swap('eg',0)"><IMG SRC="eg0.jpg" ALT="Einzelgespräch" BORDER="0" WIDTH="80"
|
||||||
HEIGHT="40" NAME="eg" HSPACE="10"></A></TD>
|
HEIGHT="40" NAME="eg" HSPACE="10"></A></TD>
|
||||||
<TD ROWSPAN="2"><A HREF="/perl/telrate.cgi" ONMOUSEOVER="swap('eg',1)" ONMOUSEOUT="swap('eg',0)"><IMG SRC="graf.gif"
|
<TD ROWSPAN="2"><A HREF="/@CGIBIN@/telrate.cgi" ONMOUSEOVER="swap('eg',1)" ONMOUSEOUT="swap('eg',0)"><IMG SRC="graf.gif"
|
||||||
BORDER="0" HSPACE="40" ALT="Grafik Einzelgesprächskosten" WIDTH="226" HEIGHT="110"></A> </TD>
|
BORDER="0" HSPACE="40" ALT="Grafik Einzelgesprächskosten" WIDTH="226" HEIGHT="110"></A> </TD>
|
||||||
<TD ALIGN="left"> <A HREF="info.html" ONMOUSEOVER="swap('info',1)" ONMOUSEOUT="swap('info',0)"><IMG
|
<TD ALIGN="left"> <A HREF="info.html" ONMOUSEOVER="swap('info',1)" ONMOUSEOUT="swap('info',0)"><IMG
|
||||||
SRC="info0.jpg" ALT="Info" BORDER="0" WIDTH="80" HEIGHT="40" NAME="info" HSPACE="10"></A><A HREF="info.html"
|
SRC="info0.jpg" ALT="Info" BORDER="0" WIDTH="80" HEIGHT="40" NAME="info" HSPACE="10"></A><A HREF="info.html"
|
||||||
|
@ -62,12 +62,12 @@ ONMOUSEOVER="swap('info',1)" ONMOUSEOUT="swap('info',0)"><B>Info / Hilfe</B></A>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
<TD ALIGN="right" VALIGN="MIDDLE">
|
<TD ALIGN="right" VALIGN="MIDDLE">
|
||||||
<A HREF="/perl/telrate.cgi?mix=10" ONMOUSEOUT="swap('gm',false)"
|
<A HREF="/@CGIBIN@/telrate.cgi?mix=10" ONMOUSEOUT="swap('gm',false)"
|
||||||
ONMOUSEOVER="swap('gm',true)"><B>Gesprächsmix</B></A><A HREF="/perl/telrate.cgi?mix=10" ONMOUSEOUT="swap('gm',false)"
|
ONMOUSEOVER="swap('gm',true)"><B>Gesprächsmix</B></A><A HREF="/@CGIBIN@/telrate.cgi?mix=10" ONMOUSEOUT="swap('gm',false)"
|
||||||
ONMOUSEOVER="swap('gm',true)"><IMG SRC="gm0.jpg" ALT="Gesprächsmix" BORDER="0" WIDTH="80" HEIGHT="40" NAME="gm"
|
ONMOUSEOVER="swap('gm',true)"><IMG SRC="gm0.jpg" ALT="Gesprächsmix" BORDER="0" WIDTH="80" HEIGHT="40" NAME="gm"
|
||||||
HSPACE="10"></A> </TD>
|
HSPACE="10"></A> </TD>
|
||||||
<TD ALIGN="left"> <A HREF="/perl/telrate.cgi?list=1" ONMOUSEOVER="swap('list',1)" ONMOUSEOUT="swap('list',0)"><IMG
|
<TD ALIGN="left"> <A HREF="/@CGIBIN@/telrate.cgi?list=1" ONMOUSEOVER="swap('list',1)" ONMOUSEOUT="swap('list',0)"><IMG
|
||||||
SRC="list0.jpg" ALT="Providerliste" BORDER="0" WIDTH="80" HEIGHT="40" NAME="list" HSPACE="10"></A><A HREF="/perl/telrate.cgi?list=1"
|
SRC="list0.jpg" ALT="Providerliste" BORDER="0" WIDTH="80" HEIGHT="40" NAME="list" HSPACE="10"></A><A HREF="/@CGIBIN@/telrate.cgi?list=1"
|
||||||
ONMOUSEOVER="swap('list',1)" ONMOUSEOUT="swap('list',0)"><B>Providerliste</B></A> </TD></TR>
|
ONMOUSEOVER="swap('list',1)" ONMOUSEOUT="swap('list',0)"><B>Providerliste</B></A> </TD></TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
</BLOCKQUOTE>
|
</BLOCKQUOTE>
|
|
@ -1,10 +1,10 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//SoftQuad Software//DTD HoTMetaL PRO 5.0::19981217::extensions to HTML 4.0//EN" "hmpro5.dtd">
|
<!DOCTYPE HTML PUBLIC "-//SoftQuad Software//DTD HoTMetaL PRO 5.0::19981217::extensions to HTML 4.0//EN" "hmpro5.dtd">
|
||||||
|
|
||||||
<HTML>
|
<HTML>
|
||||||
<!-- -*-html_mode-*- -->
|
<!-- -*-html_mode-*- -->
|
||||||
|
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<TITLE>Tel-R.at - Info</TITLE>
|
<TITLE>@TITLE@ - Info</TITLE>
|
||||||
<script language="JavaScript">
|
<script language="JavaScript">
|
||||||
<!--
|
<!--
|
||||||
NS4 = document.layers ? 1 : 0;
|
NS4 = document.layers ? 1 : 0;
|
||||||
|
@ -43,7 +43,7 @@ h2,h3,h4,p,td,th,body { font-family:Sans Serif,Arial }
|
||||||
</HEAD>
|
</HEAD>
|
||||||
|
|
||||||
<BODY BGCOLOR="#ffffe0">
|
<BODY BGCOLOR="#ffffe0">
|
||||||
<H1 ALIGN="center">Tel-R.at - Info</H1>
|
<H1 ALIGN="center">@TITLE@ - Info</H1>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A HREF="#allg">Allgemein</A> </LI>
|
<LI><A HREF="#allg">Allgemein</A> </LI>
|
||||||
<LI><A HREF="#help">Hilfe</A> </LI>
|
<LI><A HREF="#help">Hilfe</A> </LI>
|
||||||
|
@ -76,7 +76,7 @@ gewünschten Zieles, alle anderen Felder haben eine Standardeinstellung.<BR>
|
||||||
Sollten Sie weitere Information benötigen, klicken Sie einfach auf das<IMG SRC="help.gif" HSPACE="4"
|
Sollten Sie weitere Information benötigen, klicken Sie einfach auf das<IMG SRC="help.gif" HSPACE="4"
|
||||||
ALIGN="middle" ALT="Fragezeichen" WIDTH="24" HEIGHT="24"> neben dem fraglichen Feld.</P>
|
ALIGN="middle" ALT="Fragezeichen" WIDTH="24" HEIGHT="24"> neben dem fraglichen Feld.</P>
|
||||||
<P><span class="in">E</span>ine Übersicht über alle Eingabemöglichkeiten erhalten Sie <A
|
<P><span class="in">E</span>ine Übersicht über alle Eingabemöglichkeiten erhalten Sie <A
|
||||||
HREF="/perl/telrate.cgi?help=3">hier</A>. <IMG SRC="hr.gif" WIDTH="600" HEIGHT="4" ALT="-----"> </P>
|
HREF="/@CGIBIN@/telrate.cgi?help=3">hier</A>. <center><IMG SRC="hr.gif" WIDTH="600" HEIGHT="4" ALT="-----"></center> </P>
|
||||||
|
|
||||||
<H2><A NAME="calc">Berechnungsmethode</A></H2>
|
<H2><A NAME="calc">Berechnungsmethode</A></H2>
|
||||||
<P><span class="in">D</span>ie Berechnung der gewünschten Verbindung erfolgt nach dem selben Takt- und Zonenmodell, wie es der jeweilige
|
<P><span class="in">D</span>ie Berechnung der gewünschten Verbindung erfolgt nach dem selben Takt- und Zonenmodell, wie es der jeweilige
|
||||||
|
@ -89,7 +89,7 @@ besonders die Zonentabellen sind häufig ein Geheimnis der Firmen.
|
||||||
<BR>Wenn Sie also eine Ungenauigkeit feststellen sollten, teilen Sie <A HREF="#autor">uns</A> das bitte mit. Wir sind
|
<BR>Wenn Sie also eine Ungenauigkeit feststellen sollten, teilen Sie <A HREF="#autor">uns</A> das bitte mit. Wir sind
|
||||||
bemüht, die Daten immer auf dem letzten Stand zu halten, was nebenbei bemerkt durch die Dynamik des Marktes nicht
|
bemüht, die Daten immer auf dem letzten Stand zu halten, was nebenbei bemerkt durch die Dynamik des Marktes nicht
|
||||||
ganz einfach ist.</P>
|
ganz einfach ist.</P>
|
||||||
<P> <IMG SRC="hr.gif" WIDTH="600" HEIGHT="4" ALT="-----"> </P>
|
<P> <center><IMG SRC="hr.gif" WIDTH="600" HEIGHT="4" ALT="-----"></center> </P>
|
||||||
<H2><A NAME="gloss">Glossar</A></H2>
|
<H2><A NAME="gloss">Glossar</A></H2>
|
||||||
<DL>
|
<DL>
|
||||||
<DT><span class="in">D</span>urchschnittlicher Minutenpreis</DT>
|
<DT><span class="in">D</span>urchschnittlicher Minutenpreis</DT>
|
||||||
|
@ -104,7 +104,7 @@ Gesprächslänge. </DD>
|
||||||
wirklichen Kosten überein, wenn 60 durch den Takt ohne Rest teilbar ist. </DD>
|
wirklichen Kosten überein, wenn 60 durch den Takt ohne Rest teilbar ist. </DD>
|
||||||
<DT><span class="in">S</span>chwund</DT>
|
<DT><span class="in">S</span>chwund</DT>
|
||||||
<DD>Die durch die Taktung oder Mindestentgelte verursachte Gesprächsgebühr.
|
<DD>Die durch die Taktung oder Mindestentgelte verursachte Gesprächsgebühr.
|
||||||
<br>Tip: versuchen Sie mal eine <a href ="/perl/telrate.cgi?tel=usa&len=5&now=on&tab=GO&_3D=on">5 Sekunden lange Verbindung in die USA</a> (z.B. es
|
<br>Tip: versuchen Sie mal eine <a href ="/@CGIBIN@/telrate.cgi?tel=usa&len=5&now=on&tab=GO&_3D=on">5 Sekunden lange Verbindung in die USA</a> (z.B. es
|
||||||
meldet sich der Anrufbeantworter und Sie legen auf), ob Sie 30g oder 4 Schilling zahlen,
|
meldet sich der Anrufbeantworter und Sie legen auf), ob Sie 30g oder 4 Schilling zahlen,
|
||||||
ist ein schöner Unterschied, besonders wenn das häufiger passiert.
|
ist ein schöner Unterschied, besonders wenn das häufiger passiert.
|
||||||
<DT><span class="in">T</span>ag / Zeit</DT>
|
<DT><span class="in">T</span>ag / Zeit</DT>
|
||||||
|
@ -114,12 +114,12 @@ ist ein schöner Unterschied, besonders wenn das häufiger passiert.
|
||||||
umso genauer die Abrechnung. <BR>
|
umso genauer die Abrechnung. <BR>
|
||||||
Bei einem Takt von 60 Sekunden und einer durchschnittlichen Gesprächszeit von einer Minute sind die
|
Bei einem Takt von 60 Sekunden und einer durchschnittlichen Gesprächszeit von einer Minute sind die
|
||||||
Gesprächskosten im Schnitt um 50 % höher, als bei sekundengenauer Abrechnung. </DD>
|
Gesprächskosten im Schnitt um 50 % höher, als bei sekundengenauer Abrechnung. </DD>
|
||||||
<br>Tip: versuchen Sie folgenden <a href ="/perl/telrate.cgi?from=01&tel0=01&len0=72&oft0=50&dday0=W&tel1=01&len1=%7E72&oft1=50&dday1=W&tab=Tabelle&mix=10&best=30&takt=9999&_3D=on">Gesprächsmix</a>.
|
<br>Tip: versuchen Sie folgenden <a href ="/@CGIBIN@/telrate.cgi?from=01&tel0=01&len0=72&oft0=50&dday0=W&tel1=01&len1=%7E72&oft1=50&dday1=W&tab=Tabelle&mix=10&best=30&takt=9999&_3D=on">Gesprächsmix</a>.
|
||||||
<DT>Takt 60/1</DT>
|
<DT>Takt 60/1</DT>
|
||||||
<DD>Sie zahlen auf jeden Fall die erste Minute, auch wenn sie kürzer telefonieren, nach der ersten Minute wird
|
<DD>Sie zahlen auf jeden Fall die erste Minute, auch wenn sie kürzer telefonieren, nach der ersten Minute wird
|
||||||
sekundengenau abgerechnet. </DD>
|
sekundengenau abgerechnet. </DD>
|
||||||
<DT>Takt <I>n</I>/<I>m</I></DT>
|
<DT>Takt <I>n</I>/<I>m</I></DT>
|
||||||
<DD>Allgemein, sie zahlen zumindest <I>n</I> Sekunden, am Ende des Gesprächs ist der Takt dann <I>m</I> Sekunden.
|
<DD>Allgemein, sie zahlen zumindest <I>n</I> Sekunden, am Ende des Gesprächs ist der Takt dann <I>m</I> Sekunden.
|
||||||
</DD>
|
</DD>
|
||||||
<DT><span class="in">V</span>ariabler Takt</DT>
|
<DT><span class="in">V</span>ariabler Takt</DT>
|
||||||
<DD>Die Taktlänge ist nicht konstant, sondern ändert sich mit der Tageszeit. </DD>
|
<DD>Die Taktlänge ist nicht konstant, sondern ändert sich mit der Tageszeit. </DD>
|
||||||
|
@ -127,7 +127,7 @@ sekundengenau abgerechnet. </DD>
|
||||||
<DD>Gebiet mit gleichen Gebühren, von Provider zu Provider unterschiedlich. Im Inland verzichten immer mehr
|
<DD>Gebiet mit gleichen Gebühren, von Provider zu Provider unterschiedlich. Im Inland verzichten immer mehr
|
||||||
Provider auf eine Unterteilung in Zonen. </DD>
|
Provider auf eine Unterteilung in Zonen. </DD>
|
||||||
</DL>
|
</DL>
|
||||||
<IMG SRC="hr.gif" WIDTH="600" HEIGHT="4" ALT="-----"> <H2><A NAME="autor">Pfleger der Tarifdaten</A></H2>
|
<center><IMG SRC="hr.gif" WIDTH="600" HEIGHT="4" ALT="-----"></center> <H2><A NAME="autor">Pfleger der Tarifdaten</A></H2>
|
||||||
<H3>Österreich</H3>
|
<H3>Österreich</H3>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A HREF="mailto:reinelt@eurnet.at">Michael Reinelt</A> </LI>
|
<LI><A HREF="mailto:reinelt@eurnet.at">Michael Reinelt</A> </LI>
|
||||||
|
@ -138,7 +138,7 @@ Provider auf eine Unterteilung in Zonen. </DD>
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A HREF="mailto:joe@mbs.gtn.com">Jochen Erwied</A> </LI>
|
<LI><A HREF="mailto:joe@mbs.gtn.com">Jochen Erwied</A> </LI>
|
||||||
<LI><A HREF="mailto:akool@isdn4linux.de">Andreas Kool</A> </LI>
|
<LI><A HREF="mailto:akool@isdn4linux.de">Andreas Kool</A> </LI>
|
||||||
<LI><A HREF="mailto:awkwar@digitalprojects.com">Alexander Skwar</A> </LI>
|
<LI><A HREF="mailto:ASkwar@DigitalProjects.com">Alexander Skwar</A> </LI>
|
||||||
</UL>
|
</UL>
|
||||||
<H3>Niederlande</H3>
|
<H3>Niederlande</H3>
|
||||||
<UL>
|
<UL>
|
||||||
|
@ -150,16 +150,37 @@ Provider auf eine Unterteilung in Zonen. </DD>
|
||||||
<LI><A HREF="mailto:reinelt@eurnet.at">Michael Reinelt</A> </LI>
|
<LI><A HREF="mailto:reinelt@eurnet.at">Michael Reinelt</A> </LI>
|
||||||
<LI><A HREF="mailto:lt@toetsch.at">Leopold Tötsch</A> </LI>
|
<LI><A HREF="mailto:lt@toetsch.at">Leopold Tötsch</A> </LI>
|
||||||
</UL>
|
</UL>
|
||||||
<IMG SRC="hr.gif" WIDTH="600" HEIGHT="4" ALT="-----">
|
<center><IMG SRC="hr.gif" WIDTH="600" HEIGHT="4" ALT="-----"> </center>
|
||||||
<P>
|
<P>
|
||||||
<A HREF="/telrate/index.html" onmouseover="swap('start',1)" onmouseout="swap('start',0)">Startseite
|
<table width="100%" border=0>
|
||||||
<IMG WIDTH="80" HSPACE="4" HEIGHT="40" BORDER="0" NAME="start" SRC="/telrate/start0.jpg" ALT="Startseite"></A>
|
<tr align="center">
|
||||||
<A HREF="/perl/telrate.cgi" onmouseover="swap('eg',1)" onmouseout="swap('eg',0)">Einzelgespräch
|
<td>
|
||||||
<IMG WIDTH="80" HSPACE="4" HEIGHT="40" BORDER="0" NAME="eg" SRC="/telrate/eg0.jpg" ALT="Einzelgespräch"></A>
|
<A HREF="/telrate/index.html" onmouseover="swap('start',1)" onmouseout="swap('start',0)">
|
||||||
<A HREF="/perl/telrate.cgi?mix=10" onmouseover="swap('gm',1)" onmouseout="swap('gm',0)">Gesprächsmix
|
<IMG WIDTH="80" HSPACE="4" HEIGHT="40" BORDER="0" NAME="start" SRC="/telrate/start0.jpg" ALT="Startseite"><br>
|
||||||
<IMG WIDTH="80" HSPACE="4" HEIGHT="40" BORDER="0" NAME="gm" SRC="/telrate/gm0.jpg" ALT="Gesprächsmix"></A>
|
<font size="-2">Startseite</font>
|
||||||
<A HREF="/perl/telrate.cgi?list=1" onmouseover="swap('list',1)" onmouseout="swap('list',0)">Providerliste
|
</A>
|
||||||
<IMG WIDTH="80" HSPACE="4" HEIGHT="40" BORDER="0" NAME="list" SRC="/telrate/list0.jpg" ALT="Providerliste"></A> </P>
|
</td>
|
||||||
|
<td>
|
||||||
|
<A HREF="/@CGIBIN@/telrate.cgi" onmouseover="swap('eg',1)" onmouseout="swap('eg',0)">
|
||||||
|
<IMG WIDTH="80" HSPACE="4" HEIGHT="40" BORDER="0" NAME="eg" SRC="/telrate/eg0.jpg" ALT="Einzelgespräch"><br>
|
||||||
|
<font size="-2">Einzelgespräch</font>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<A HREF="/@CGIBIN@/telrate.cgi?mix=10" onmouseover="swap('gm',1)" onmouseout="swap('gm',0)">
|
||||||
|
<IMG WIDTH="80" HSPACE="4" HEIGHT="40" BORDER="0" NAME="gm" SRC="/telrate/gm0.jpg" ALT="Gesprächsmix"><br>
|
||||||
|
<font size="-2">Gesprächsmix</font>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<A HREF="/@CGIBIN@/telrate.cgi?list=1" onmouseover="swap('list',1)" onmouseout="swap('list',0)">
|
||||||
|
<IMG WIDTH="80" HSPACE="4" HEIGHT="40" BORDER="0" NAME="list" SRC="/telrate/list0.jpg" ALT="Providerliste"><br>
|
||||||
|
<font size="-2">Providerliste</font>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</P>
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,10 @@
|
||||||
130 FreeCall
|
130 FreeCall
|
||||||
170 Mobilfunknetz D1
|
170 Mobilfunknetz D1
|
||||||
171 Mobilfunknetz D1
|
171 Mobilfunknetz D1
|
||||||
|
175 Mobilfunknetz D1
|
||||||
172 Mobilfunknetz D2
|
172 Mobilfunknetz D2
|
||||||
173 Mobilfunknetz D2
|
173 Mobilfunknetz D2
|
||||||
|
174 Mobilfunknetz D2
|
||||||
177 Mobilfunknetz Eplus
|
177 Mobilfunknetz Eplus
|
||||||
178 Mobilfunknetz Eplus
|
178 Mobilfunknetz Eplus
|
||||||
176 Mobilfunknetz E2
|
176 Mobilfunknetz E2
|
||||||
|
@ -3420,7 +3422,7 @@
|
||||||
6405 Laubach
|
6405 Laubach
|
||||||
6406 Lollar
|
6406 Lollar
|
||||||
6407 Rabenbach
|
6407 Rabenbach
|
||||||
6408 Busek
|
6408 Buseck
|
||||||
6409 Biebertal
|
6409 Biebertal
|
||||||
641 Gießen
|
641 Gießen
|
||||||
6420 Lahntal
|
6420 Lahntal
|
||||||
|
@ -3732,7 +3734,7 @@
|
||||||
6897 Sulzbach
|
6897 Sulzbach
|
||||||
6898 Völklingen
|
6898 Völklingen
|
||||||
69 Frankfurt am Main
|
69 Frankfurt am Main
|
||||||
700 persönliche Rufnummer
|
700 persönliche Rufnummer
|
||||||
7021 Kirchheim
|
7021 Kirchheim
|
||||||
7022 Nürtlingen
|
7022 Nürtlingen
|
||||||
7023 Weilheim
|
7023 Weilheim
|
||||||
|
@ -4243,7 +4245,7 @@
|
||||||
7975 Untergröningen
|
7975 Untergröningen
|
||||||
7976 Sulzbach-Laufen
|
7976 Sulzbach-Laufen
|
||||||
7977 Oberrot
|
7977 Oberrot
|
||||||
800 FreeCall
|
800 FreeCall
|
||||||
8020 Weyarn
|
8020 Weyarn
|
||||||
8021 Waakirchen
|
8021 Waakirchen
|
||||||
8022 Tegernsee
|
8022 Tegernsee
|
||||||
|
|
Loading…
Reference in New Issue