dialup service 3



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 ds3/ds3accounting. You have to run ds3accounting.Ds3Main with at least three parameters, in this order:

  1. The log file. The log file made by the ds3 server. It is either a syslog file or the ds3 debug file.
  2. The tariff table. The table describing the phone tariffs. See below.
  3. 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 need 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:
  • Option -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 parameters:
    • -Isys means syslog file
    • -Idebug means ds3 server debug file
  • Option -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.
  • Option -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.

  1. Start of the period when this tariff is valid, use iso date style, e.g. 1998-12-24.
  2. End of the period when this tariff is valid, use iso date style, e.g. 1998-12-24.
  3. Coding the date, when this tariff is valid:
    Tjjjj-mm-ttthis day, given by iso date string
    HSevery holiday, sunday is a holiday automatically
    HNevery holiday, but not sunday
    7every sunday
    6every saturday
    WXevery workday, saturday is a workday
    WYevery workday, saturday is not a workday
    List devided by commas (","), no blanks.
  4. 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.
  5. 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.