1rate-files(5)                 File Formats Manual                rate-files(5)
2
3
4

NAME

6       rate-files - Format of rate-files
7

DESCRIPTION

9       The  rate-files  used  by  isdnlog(8)  and by isdnrate(1) are textfiles
10       defining the telephone  fees  for  different  destinations  at  certain
11       dates/times for all providers of one country.
12       The rate-files have the following overall layout:
13
14       Header entries
15
16       Provider entries
17
18       Comments starting with a hash-sign '#' and empty lines are ignored. The
19       first letter (tag) followed by a colon  separates  the  entries.  Addi‐
20       tional  white  space  may  be used after the tags to group content more
21       readably.
22
23   Special entries
24       I:includefile
25
26       i:includefile
27
28              includefile get's substituted at the current position. There are
29              two possibilities. In the rate source file (which is prepared by
30              pp_rate) a small 'i' puts the contents of the  include  file  in
31              the outputfile.  An 'I'-Tag means, for the preprocessor, write a
32              new output file (the includefile) and leave the tag in the rate-
33              files. This is for real include files.
34              Includes  may  be  nested twice. The filename should not contain
35              any paths (except for 'i' of course), they are taken relative to
36              their parent file.
37
38   Header entries
39       V:versionsstring
40
41              e.g.  V:1.0-Germany [18-Mar-1999]
42
43       S:Servicename
44
45       N:Servicenumber[,Servicenumber...]
46
47              This  defines  telephone  services with special numbers. Special
48              numbers are numbers which a) start with no '0' or b) can not  be
49              dialed  with  every  provider.  A  number with a variable length
50              should have the wildcard '*'  at  the  end,  eg.   07189*  which
51              matches all numbers starting with 07189.  Numbers with wildcards
52              should be placed after numbers which would match  the  wildcard,
53              because matching is done straight top down.  There may be multi‐
54              ple N: tags for one telephone service.
55
56              e.g.
57              S:Internet
58              N:07189*,19430
59              N:19440
60
61       U:currencyfmt currency
62
63              If the first char of currencyfmt is ^, the amount is  multiplied
64              by 100 before it is displayed without leading ^.
65
66              e.g. (one of these, ¢ = cent)
67              U:%.3f EUR
68              U:^%.3f ¢
69
70       X:num_wildcard = provider[zZone] [,...]
71
72              Define exception. If a certain number is always routed to a cer‐
73              tain provider and not to the preselected  provider,  you  should
74              use this tag.
75              e.g.  in Austria, online service numbers 194x or 07189 go always
76              via Telekom, ignoring your preselection:
77              X: 194*=1,07189*=1
78              or
79              X: 194*=1z6    # Provider 1 Zone 6
80
81   Provider entries
82       A new provider starts always with a P: tag and consists of a  Provider‐
83       header followed by Providerzones.
84
85   Providerheader
86       P:[daterange] providernumber providername
87
88              daterange is [[fromDate][-toDate]]
89              This  defines  a  time  range for the validity of rates for this
90              provider. Dates have to be numeric in format dd.mm.yyyy.   Note:
91              as time is assumed as 00:00, take for toDate the day+1. The dat‐
92              erange has to be enclosed in square brackets. Either fromDate or
93              -toDate or both may be given.
94              The  providernumber  may  be  a simple number, normally the last
95              digits  of  the  VBN-number,  or  providernumber,variant  if   a
96              provider has different connection fees.
97              e.g.
98              P:02 UTA
99              or
100              P:[01.01.1999] 1,1 Telekom Minimumfee
101
102       B:vbn
103
104       VBN-Number for provider
105
106              e.g.  B:1002
107              This  is  the number to select this provider and depends on your
108              country.
109
110       C:COMMENT: comment
111
112       COMMENT may be an arbitrary string, but the following entries are  used
113       already:
114
115              C:Name:           Providername
116              C:Maintainer:     Who did the hard work
117              C:TarifChanged:   and when
118              C:Address:        Provideraddress
119              C:Homepage:       http:URL for provider
120              C:TarifURL:       URL for tarif info
121              C:EMail:          EMail-Address
122              C:Telefon:        Telefon number
123              C:Telefax:        Fax number
124              C:Hotline:        Telefon number
125              C:Zone:           Textual info about zones
126              C:Special:        Guess
127              C:GT:             Additional charge text
128              C:GF:             Additional charge formula
129
130       If  there  are  multiple  comments with the same comment name, they get
131       appended separated by a newline char.
132
133       D:zone
134
135       Name of zone file (inserted for %s in  ZONEFILE  =  /usr/lib/isdn/zone-
136       CC-%s.dat from isdn.conf)
137
138              e.g.  D:1001 # zone file is zone-at-1001.gdbm
139
140       Note:  if  the provider has no different domestic zones, you should not
141       define a D:tag.
142
143   Providerzones
144       A Providerzone entry starts with a Z: tag followed by one  or  more  A:
145       and T: tags.
146
147       A  zone  is a region of areas, for which the same rates apply. Domestic
148       and foreign zones should not be mixed and all foreign zones should fol‐
149       low domestic zones.
150
151       R:prov, sub ; zonelist
152
153       Read  zones  from  provider prov subprovider number sub.  A zonelist is
154       defined below.  If the referenced provider doesn't have  a  subprovider
155       number,  the  sub  must  be  -1. The referenced provider may be defined
156       before  or  after  the  R:-tag.  The  referenced  zones  must  be  real
157       Z:-entries,  not  references  themself.  The zone numbers and names are
158       taken from the referenced provider. The last  to_zone  may  be  missing
159       then all zones from the start zone are used.
160       e.g.
161       R:1,1 ; 1-4,6, 10-
162
163       There some limitations:
164       The  reference  cannot be more exact than the referenced providerzones.
165       R:42,0;1 will not work as desired if P:42,0 defines Z:1-4.
166       It is not possible to reference a providerzone without areas  when  the
167       default  domestic  zone (with your countrycode as area) is not included
168       in the same range of referenced zones.  This applies  mainly  to  zones
169       for  different  distances  in the national fixed network, e.g. Z:1-3 in
170       Germany.
171
172       r:prov, sub ; start_zone-
173
174       This tag is related to the R:-tag.  It is interpreted by the  rate-pre‐
175       processor  pp_rate.   All  providerzones  with a zone number greater or
176       equal start_zone are copied from provider prov[,sub]  and  replace  the
177       r:-tag.   If  an area is already used in a previous providerzone of the
178       current provider, it will not be copied.  If all areas of  a  provider‐
179       zone  are  already  defined, the entire zone will not be copied.  Lines
180       that contain only comments are also not copied, but comments at the end
181       of other lines are.
182
183       This tag is designed for providers with a rate variant that offers dif‐
184       ferent fees for some foreign destinations.
185
186       Z:zonelist zonename
187
188       where zonelist is zone[-to_zone][,...]
189
190              e.g.  Z:1-2,4 Interior
191
192       A:area[,area...]
193
194       area may be a telephone  number  (including  +countrycode  for  numbers
195       which may be reached from everywhere, a telephone number without +coun‐
196       trycode for numbers only reachable in the own country) or an area  name
197       or  alias  as  defined in country.dat.  Country names have to be trans‐
198       lated to their code by the rate-preprocessor pp_rate.
199
200              e.g.  A:19430,07189 # Online
201
202              e.g.  A:+31,Belgium # Int 1
203
204       Note: There should always be exactly one zone with your countrycode  or
205       countryname respectively:
206
207              Z:4
208              A:+49
209              T:...
210
211       Countrynames  like  Belgium  in the above example are replaced by their
212       ISO-Code (or TLD) with the rate preprocessor pp_rate.
213
214       T:[daterange]daylist/timelist[!]=chargelist chargename
215
216       where daterange is [[fromDate][-toDate]] like the corresonding provider
217       entry.   Note  that the daterange is enclosed in sqare brackets, either
218       fromDate or -toDate are optional.
219
220       daylist is day[-day][,...]  and day is a daynumber (1=Mon, 2=Tue,  ...)
221       or W (workday, Monday to Friday), E (weekend), H (holiday) or * (every‐
222       day).  If more than one of these days match a given date, the following
223       order of priority (highest first) applies: H 7 .. 1 E W *.
224
225       timelist  is  hour[-hour][,hour]  where hour is a number 0..23 or * for
226       everytime.
227
228       After daylist/timelist follows = or != which  means,  provider  doesn't
229       adjust rates on a rate boundary e.g. at 18h00.
230
231       A chargelist consists of
232
233       [MinCharge|]Charge[(Divider)]/Duration[:Delay][/Duration...]
234
235       where  MinCharge|  is an (optional) minimum charge, Charge the rate per
236       Duration seconds or optional rate per (Divider)  seconds,  Duration  is
237       the length of one charge unit in seconds. After Delay the next duration
238       is taken. If delay is not given it equals to the  duration.   The  last
239       duration may not have a delay and may not be zero.
240
241              EXAMPLES
242              T:1-4/8-18=1.5(60)/60/1 workday
243
244              Monday  until  Thursday,  daytime the charge is 1.50 per minute,
245              first charge is for one minute after this charging is calculated
246              in seconds interval.
247
248              T:W/18-8=0.30|1.2(60)/1 night
249
250              On  workdays,  night, charge is the bigger of 1.20 per minute or
251              0.30
252
253              T:*/*=0.50/0,1(60)/1 always
254
255              Everyday, everytime there is a  connection  fee  of  0.50,  then
256              charge is 1 per minute.
257
258              T:H/*=0.5/60:600,0.5/30 holidays
259
260              On  holidays,  everytime a charge of 0.5 per minute in a minutes
261              interval, after 10 minutes 0.5 per half minute in half a minutes
262              interval.
263
264              T:*/*=1.3/0,0/1
265
266              Everyday,  everytime the charge is 1.30 independent of duration,
267              which could also be written as T:*/*=1.3|0/1.
268
269              T: [-01.02.2000] */17-19=0.79(60)/60/1 Happy Hour
270              T: [-01.02.2000] */19-17=0.90(60)/60/1 Normal
271
272              Until the first of Feb 0:00h  (i.e.  end  is  31.1.2000  24:00),
273              everyday  between  17  and  19h a charge of 0.79 per minute, the
274              first minute is always charged fully, after  this,  charging  is
275              calculated in seconds interval.
276              The  second  entry  defines a charge of 0.90 in the time outside
277              the happy hour.
278
279              T:[15.11.1999-01.02.2000]*/17-19=0.79(60)/60/1 HH
280
281              Like above, but a full date range is given.
282
283       The next two t:-tags are interpreted by pp_rate and replaced by one  or
284       more T:-lines.  Both methods can be used together.
285
286       t:[daterange]?[H]=chargelist chargename
287
288       This  line  is  replaced  by  according  T:-lines  for  not yet defined
289       day/hour pairs.
290
291       If a daterange is given, only previous T:-lines without a daterange  or
292       with  the same daterange will be considered as earlier definitions.  If
293       H is noted, definitions will also be added for holidays.
294
295              EXAMPLE
296              T:W/08-18=0.10/60 normal time
297              t:?H=0.04/60 save time
298
299              This lines will lead to the following lines after pp_rate:
300
301              T:W/08-18=0.10/60 normal time
302              T:W/18-08=0.04/60 save time
303              T:E,H/*=0.04 save time
304
305       t:daterange=srcrange [chargename]
306
307       Generates T:-lines for daterange  by  copying  previous  T:-lines  with
308       srcrange  in  the same zone.  If a chargename is given, it will replace
309       the chargename of the originating line.  srcrange can be  shortened  as
310       long as it remains definite.
311
312              EXAMPLE
313              T:[-24.12.2003]W/*=0.08/60 on workdays
314              T:[-24.12.2003]E,H/*=0.06 weekend
315              T:[24.12.2003-25.12.2003]*/*=0.04 Christmas Eve
316              t:[25.12.2003-31.12.2003]=[-24.12.2003]
317              t:[31.12.2003-01.01.2004]=[24.12.] New Year's Eve
318              t:[01.01.2004]=[-24.12.]
319
320              This will be transformed into:
321
322              T:[-24.12.2003]W/*=0.08/60 on workdays
323              T:[-24.12.2003]E,H/*=0.06/60 weekend
324              T:[24.12.2003-25.12.2003]*/*=0.04/60 Christmas Eve
325              T:[25.12.2003-31.12.2003]W/*=0.08/60 on workdays
326              T:[25.12.2003-31.12.2003]E,H/*=0.06/60 weekend
327              T:[31.12.2003-01.01.2004]=0.04/60 New Years' Eve
328              T:[01.01.2004]W/*=0.08/60 on workdays
329              T:[01.01.2004]E,H/*=0.06/60 weekend
330

SEE ALSO

332       isdnlog(8), isdnrate(1), rate.conf(5), isdnlog/README, rate-at.dat
333

AUTHOR

335       Leopold  Toetsch  <lt@toetsch.at> (of this man page of course).  Tobias
336       Becker <tobiasb@isdn4linux.de> added the tags r: and t:.
337
338
339
340-lt-                              2005/02/23                     rate-files(5)
Impressum