An example template for Telephone cost accounting.

The kppp Handbook
Prev |  |

# Appendix C. An example template for Telephone cost accounting.

If you can't find a rule for your region you will have to write one by following the following template. Don't be afraid though it is really easy.

Don't forget to submit your newly created rules file to kppp's maintainer. The newly created rules file can be checked for valid syntax with the ``-r` `rule_file`` command line option to 6kppp; and must be installed in `${KDEDIR}/share/apps/kppp/Rules` or in `${HOME}/.kde/share/apps/kppp/Rules` before you will be able to select it in this dialog.

       1 ################################################################
       2 #
       3 # Disclaimer/License
       4 # This Template ist (c) by Mario Weilguni <mweilguni@kde.org>
       5 # It ist licenced under the same terms as the kppp package,
       6 # which it is part of
       7 #
       8 ################################################################
       9 #
      10 # This is a sample rule set for kppp. You can use it as a
      11 # template when you have to create your own ruleset. If you do
      12 # so, remove all comments and add your own. This will allow
      13 # other users to check your ruleset more easily.
      14 #
      15 # Please sign the the tarif file with your name an email address
      16 # so that I can contact you if necessary.
      17 #
      18 # NOTE: the rules in this rule set do not make much sense and
      19 #       are only for demonstration purposes
      20 #
      21 # NOTE ON FILENAMES:
      22 #	when you create your own ruleset, use "_" in filename
      23 #	instead of spaces and use ".rst  as extension
      24 #	   i.e. "Austria city calls"
      25 #          --> file should be saved as "Austria_city_calls.rst"
      26 #
      27 # Thanks, Bernd Wuebben
      28 # wuebben@math.cornell.edu / wuebben@kde.org
      29 ################################################################
      30
      31
      32 ################################################################
      33 #
      34 # NAME OF THE RULESET. This is NEEDED for accounting purposes.
      35 #
      36 ################################################################
      37 name=default
      38
      39 ################################################################
      40 # currency settings
      41 ################################################################
      42
      43 # defines ATS (Austrian Schilling) to be used as currency
      44 # symbol (not absolutely needed, default = "$")
      45 currency_symbol=ATS
      46
      47 # Define the position of the currency symbol.
      48 # (not absolutely needed, default is "right")
      49 currency_position=right
      50
      51 # Define the number of significant digits.
      52 # (not absolutely needed, default is "2"
      53 currency_digits=2
      54
      55
      56
      57 ################################################################
      58 # connection settings
      59 ################################################################
      60
      61 # NOTE: rules are applied from top to bottom - the
      62 #       LAST matching rule is the one used for the
      63 #       cost computations.
      64
      65 # This is charged whenever you connect. If you don't have to
      66 # pay per-connection, use "0" here or comment it out.
      67 per_connection=0.0
      68
      69
      70 # minimum costs per per connection. If the costs of a phone
      71 # call are less than this value, this value is used instead
      72 minimum_costs=0.0
      73
      74
      75 # You pay .74 for the first 180 seconds ( 3 minutes) no matter
      76 # whether you are connected for 1 second or 180 seconds.
      77 # This rule will take priority during the first 180 seconds
      78 # over any other rule, in particular the 'default' rule.
      79 # have a look at costgraphs.gif in the docs directory
      80 # of the kppp distribution for a graphic illustration.
      81 flat_init_costs=(0.74,180)
      82
      83 # This is the default rule which is used when no other rule
      84 # applies. The first component "0.1" is the price of one
      85 # "unit", while "72" is the duration in seconds.
      86 # Therefore the following rule means: "Every 72 seconds 0.1
      87 # ATS are added to the bill"
      88 default=(0.1, 72)
      89
      90 #
      91 # more complicated rules:
      92 #
      93
      94 # "on monday until sunday from 12:00 am until 11:59 pm the costs
      95 # are 0.2 each 72 seconds"
      96 on () between () use (0.2, 2)
      97
      98 # same as above
      99 on (monday..sunday) between () use (0.2, 2)
     100
     101 # same as above. You must use 24 hour notation, or the accounting
     102 # will not work correctly. (Example: write 15:00 for 3 pm)
     103 on (monday..sunday) between (0:00..23:59) use (0.2, 2)
     104
     105 # applies on friday, saturday, sunday and monday 8am until 1pm
     106 on (friday..monday) between (8:00..13:00) use(0.3,72)
     107
     108 # ATTENTION:
     109 on(monday..friday) between (21:00..5:00) use (0.4,2)
     110 # does NOT include saturday 0:00-5:00, just monday..friday, as it says.
     111
     112 # applies on a given date (christmas)
     113 on (12/25) between () use (0.3,72)
     114
     115 # a range of dates and one weekday
     116 on (12/25..12/27, 12/31, 07/04, monday) between () use (0.4, 72)
     117
     118 # use this for easter
     119 on (easter) between () use (0.3,72)
     120
     121 # easter + 50 days (Pfingstmontag/ Pentecost Monday )
     122 on (easter+50) between () use (0.3,72)
     123
     124 on (thursday) between (20:00..21:52) use (8.2, 1)
     125
     126
     127 # The "on()" rules above all relates to current time only. You can also
     128 # make a rule depend on the number of seconds you have been connected
     129 # by specifying this time as a third argument to "use()".
     130 # For instance, let's say normal rate in the evening is 0.20 per minute,
     131 # and it drops by 20% after one hour of connect time. This can be modelled
     132 # like:
     133
     134 on () between (19:30..08:00) use (0.20, 60)
     135 on () between (19:30..08:00) use (0.16, 60, 3600)
     136
     137 # Note that these rules, just like other rules, are sensitive to the
     138 # order in which they appear.

Prev | Home |
S-Registers |  |