home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / telecomm / conn246e / connect / num.doc < prev    next >
Text File  |  1993-07-24  |  7KB  |  162 lines

  1. The `construction' of a NUM-File
  2. --------------------------------
  3.  
  4. CoNnect can calculate your telephone charge via the number you have dialled,
  5. the date and time of day and the online time. Since different telephone
  6. numbers in different areas and distances cause different cost, CoNnect has to
  7. know, which number dialled at which time on which day costs how much. This
  8. information is given in the CONNECT.NUM file. There's described, how long a
  9. `charge unit' lasts under several circumstances. This `charge unit' is the
  10. basic principle of calculating the telephone charge.
  11.  
  12. One example: In Germany a unit in a long-distance call on an afternoon of a
  13. workday lasts 21 seconds. So a call from Munich to Berlin on wednesday,
  14. lasting from 4:15pm to 4:33pm (=18 minutes = 1080 seconds) `consists' of 52
  15. units (1080/21), each of them for 0.23 DM, which results in a cost of 11.96 DM.
  16. Voila!
  17.  
  18. Next Example: A unit in a regional-distance call after 6pm on workdays lasts
  19. 2 minutes. So a call from Heidelberg to Karlsruhe of the same length as above
  20. costs 9 units = 2.07 DM.
  21.  
  22. Via the NUM file you can specify freely any periods of time for individual
  23. lengths of charge units.
  24.  
  25.  
  26. Matching:
  27. =========
  28. It is necessary to enter all telephone numbers which possibly can be dialled
  29. (Don't panic! Only the area codes!). Using jokers (you know them from
  30. filenames as * and ?, for example) abbreviates this procedure dramatically:
  31.  
  32. * stands for a arbitrary amount of characters (also none):
  33.      01* matches all numbers beginning with 01, e.g. 01300190
  34.      *01* matches all numbers containing 01, e.g. 06201123456
  35.      *01 matches all numbers ending with 01, e.g. 66743501
  36.      0*1* matches all numbers beginning with 0 and containing a 1 somewhere,
  37.           e.g. 08851663456
  38.      0*1*2*3 matches all numbers beginning with a 0, ending with a 3 and
  39.           containing a 1 and a 2 after the 1, e.g. 09986145288573 or 097712556
  40.  
  41. [] can be used to specify a certain choice of digits for ONE place in the
  42. telephone number, the expression in the brackets replaces exactly ONE digit:
  43.      [125] matches 1, OR 2, OR 5
  44.      12[345]67 matches 12367, 12467 and 12567
  45.      12[34][56] matches 1235, 1245, 1236 and 1246
  46.      12[3-7]8 matches 1238, 1248, 1258, 1268 and 1278
  47.      1[2-57-9]0 matches 120, 130, 140, 150, 170, 180, 190
  48.  
  49. ~ is the `not' operator:
  50.      123[~5]67 matches 123167, 123267, 123367, 123467, 123667, 123767,
  51.           123867, 123967, 123067
  52.      12[~3-8] matches 121, 122, 129, 120
  53.  
  54.  
  55. All of this can be combined:
  56.      0[1-37-9]45* matches all numbers beginning with 0145, 0245, 0345, 0745,
  57.      0845, 0945
  58.  
  59.      and so on...
  60.  
  61.  
  62.  
  63. These jokers are a powerful tool to encode all the area codes in a simple
  64. way. Now to the NUM file itself. Start an ASCII editor with a file
  65. CONNECT.NUM. You begin with the specification of the charge unit and its cost
  66. with the `+e' command giving the price for one unit in your currency:
  67.  
  68.      +e 0.23                  for 0.23 DM (=23 Pfennig) in Germany
  69.      +e 0.80                  for 0.80 Schilling (=80 Groschen) in Austria
  70.      +e 0.10                  for 0.10 Franken (=10 Rappen) in Switzerland
  71.  
  72. Now you can specify a `waiting time' for CoNnect for starting the charge
  73. counter. If you give no time, CoNnect counts already during the dialling
  74. procedure, even if there's no connect. If you know the average period of time
  75. from dialling start until the CONNECT announcement from the modem, you can
  76. give it with the `+t' command. Maybe this time is about 15 seconds:
  77.  
  78.      +t 15s
  79.  
  80.  
  81. Now follows the `big part' with specifying the periods of time, in which this
  82. and that telephone number causes this and that length of the charge unit. It
  83. has the following structure ( `+1' means time zone 1 and so on):
  84.  
  85. [distance information / matchstrings for telephone numbers]
  86. +1
  87. [time information]
  88. +2
  89. [time information]
  90. +3
  91. [time information]
  92. ...
  93. +n
  94. [time information]
  95. # <unit length for +1> <unit length for +2> ... <unit length for +n> <Zone name>
  96.  
  97. The different time informations don't have to be at least 3 - just an
  98. example, e.g. in Germany there are only two time zones in telephoning... The
  99. [time information] consists of the day and the time period, in which this time
  100. zone is valid:
  101.  
  102.      1.1. 8.00 18.00     means "January 1st, from 8am to 6pm"
  103.      w    0.00 23.59     means "every Sunday, all time"
  104.      w(1) 10.00 15.00    means "every Monday, from 10am to 3pm"
  105.      E    17.00 19.00    means "Easter Sunday, from 5pm to 7pm
  106.  
  107.  
  108.  
  109. A short example (The ; introduces comments):
  110. ---------------------------------------
  111.  
  112.                     ; distance information, i.e. telephone numbers belonging to
  113.                     ; one distance zone
  114. 01*                 ; all numbers beginning with 01
  115. +1                  ; time zone 1
  116. w    0.00 23.59     ; valid on sunday the whole day (w means `nullth' day of
  117.                     ; week)
  118. w(6) 0.00 23.59     ; valid on saturday the whole day (w(6) means sixth day
  119.                     ; of week
  120. +2                  ; time zone 2
  121. w(4) 8.00 18.00     ; valid on thursday between 8am and 6pm
  122. w(5) 10.00 13.00    ; valid on friday between 10am and 1pm
  123. 3.10.               ; valid on October 3rd
  124. +3                  ; time zone 3
  125. E    12:00 20:00    ; valid on Easter Sunday between 12am and 8pm
  126. +4                  ; time zone 4
  127. a                   ; everything else
  128. # 20s 50s 5M 8M Zone 01  ; one unit of time zone 1 for this distance zone lasts
  129.                          ; 20 seconds, one unit of time zone 2 lasts 50
  130.                          ; seconds, one unit of time zone 3 lasts two minutes
  131.                          ; and one unit of time zone 4 lasts eight minutes; the
  132.                          ; name of the zone is "Zone 01", referring to the
  133.                          ; numbers belonging to it
  134.  
  135. You have already seen, that Easter is implemented for use of Christian holidays.
  136. The Easter date is computed automatically. There are some `fix implemented'
  137. expressions to refer to:
  138.  
  139. a    all days
  140. w    start of week (the nullth day = sunday)
  141. m    start of month (only positive increment allowed)
  142. E    Easter sunday
  143. A    First Advent
  144.  
  145. These implemented days can be increased and decreased by adding an number in
  146. braces (m only increasing!). So you get to hold the other weekdays and most of
  147. the Christian holidays:
  148.  
  149. w(3)      wednesday
  150. E(1)      Easter Monday
  151. E(49)     Whitsun Sunday
  152. A(-13)    Day of prayer and repentance
  153. A(7)      Second Advent
  154.  
  155. In the # line (the delimiter for the time zone declaration, there have to be
  156. specified as many unit lenghts as time zones given before. the first length
  157. given after the # refers to the time zone `+1', the second to the time zone
  158. `+2' and so on. The name (here `Zone 01') needn't to be given, but it's
  159. useful. For a long, detailled example NUM file, look into the ZUERICH.NUM in
  160. the NUM folder.
  161.  
  162.