The server is verbose, all actions are recorded and, knowing the
tariff, the bill for every user is made.
Calling the accounting tool
It's a java program. The classes are stored in
You have to run
ds3accounting.Ds3Main with at least three parameters, in this order:
- The log file. The log file made by the ds3 server. It is
either a syslog file or the ds3 debug file.
- The tariff table. The table describing the phone tariffs. See below.
- The output file. After running the accounting tool, this file contains the bill for every user.
Optionally you can give some options. Usually, you do not
any of these options, because they are mainly introduced to cover bugs/features in former
releases of the ds3 server. Well, here they are, order does not matter:
-I. This option determines whether the
accounting tool shall treat the input file either as a syslog
file or as a ds3 debug file. If this option is not given, the
accounting tool looks at the input file and decides itself. When
you use this option, you have to give one of the following
-Isys means syslog file
-Idebug means ds3 server debug file
-S. This options describes the version of
the debug file. The current version is the default, when you omit
this option. When you use this option, you have to give one of
the following parameters:
-Sno means former version: dserv, no pid.
-Spo means former version: dserv, with pid.
-Sn3 is the current version: ds3, no pid.
-B. This option forces the accounting
tool to treat dialing markers as online markers.
- Option -V. This options controls how verbose the
accounting tool is. You have to give either
-V0 Do not chat at all.
-V1 Give some lines, this is the default.
-V2 Be verbose.
-V3 Tell really everything.
Some lines will inform you about the progress of work while running.
The Tariff Table
You have to describe the tariff in a seperate file. Every line
describes one kind of tariff. You can also insert blank lines and
lines starting with "#", which will be treated as comments.
Every crucial line consists of follwing items, devided by a slash ("/"). Do not insert any blanks.
- Start of the period when this tariff is valid, use iso date style, e.g. 1998-12-24.
- End of the period when this tariff is valid, use iso date style, e.g. 1998-12-24.
- Coding the date, when this tariff is valid:
List devided by commas (","), no blanks.
|this day, given by iso date string|
|every holiday, sunday is a holiday automatically|
|every holiday, but not sunday|
|every workday, saturday is a workday|
|every workday, saturday is not a workday|
- Time of the date, when this tariff is valid. Use 24 hour model; hour and minute
divided by colon (":"), if minute given; use minus ("-") for period; devide several periods
by comma (","), no blanks.
- Cash per minute in the described period.
And here is an example:
ATTENTION: You have to give the lines in the right order.
E.g. to count a holiyday on monday as a holiyday (HS) and
not as a workday (WX).
One more example, the current tariff table I use:
Note: By now, the holidays are badly hardcoded, whichs means: some holidays missing, no eastern, no internationalization, no config file.