home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 1
/
crawlyvol1.bin
/
telecomm
/
conn246e
/
connect
/
num.doc
< prev
next >
Wrap
Text File
|
1993-07-24
|
7KB
|
162 lines
The `construction' of a NUM-File
--------------------------------
CoNnect can calculate your telephone charge via the number you have dialled,
the date and time of day and the online time. Since different telephone
numbers in different areas and distances cause different cost, CoNnect has to
know, which number dialled at which time on which day costs how much. This
information is given in the CONNECT.NUM file. There's described, how long a
`charge unit' lasts under several circumstances. This `charge unit' is the
basic principle of calculating the telephone charge.
One example: In Germany a unit in a long-distance call on an afternoon of a
workday lasts 21 seconds. So a call from Munich to Berlin on wednesday,
lasting from 4:15pm to 4:33pm (=18 minutes = 1080 seconds) `consists' of 52
units (1080/21), each of them for 0.23 DM, which results in a cost of 11.96 DM.
Voila!
Next Example: A unit in a regional-distance call after 6pm on workdays lasts
2 minutes. So a call from Heidelberg to Karlsruhe of the same length as above
costs 9 units = 2.07 DM.
Via the NUM file you can specify freely any periods of time for individual
lengths of charge units.
Matching:
=========
It is necessary to enter all telephone numbers which possibly can be dialled
(Don't panic! Only the area codes!). Using jokers (you know them from
filenames as * and ?, for example) abbreviates this procedure dramatically:
* stands for a arbitrary amount of characters (also none):
01* matches all numbers beginning with 01, e.g. 01300190
*01* matches all numbers containing 01, e.g. 06201123456
*01 matches all numbers ending with 01, e.g. 66743501
0*1* matches all numbers beginning with 0 and containing a 1 somewhere,
e.g. 08851663456
0*1*2*3 matches all numbers beginning with a 0, ending with a 3 and
containing a 1 and a 2 after the 1, e.g. 09986145288573 or 097712556
[] can be used to specify a certain choice of digits for ONE place in the
telephone number, the expression in the brackets replaces exactly ONE digit:
[125] matches 1, OR 2, OR 5
12[345]67 matches 12367, 12467 and 12567
12[34][56] matches 1235, 1245, 1236 and 1246
12[3-7]8 matches 1238, 1248, 1258, 1268 and 1278
1[2-57-9]0 matches 120, 130, 140, 150, 170, 180, 190
~ is the `not' operator:
123[~5]67 matches 123167, 123267, 123367, 123467, 123667, 123767,
123867, 123967, 123067
12[~3-8] matches 121, 122, 129, 120
All of this can be combined:
0[1-37-9]45* matches all numbers beginning with 0145, 0245, 0345, 0745,
0845, 0945
and so on...
These jokers are a powerful tool to encode all the area codes in a simple
way. Now to the NUM file itself. Start an ASCII editor with a file
CONNECT.NUM. You begin with the specification of the charge unit and its cost
with the `+e' command giving the price for one unit in your currency:
+e 0.23 for 0.23 DM (=23 Pfennig) in Germany
+e 0.80 for 0.80 Schilling (=80 Groschen) in Austria
+e 0.10 for 0.10 Franken (=10 Rappen) in Switzerland
Now you can specify a `waiting time' for CoNnect for starting the charge
counter. If you give no time, CoNnect counts already during the dialling
procedure, even if there's no connect. If you know the average period of time
from dialling start until the CONNECT announcement from the modem, you can
give it with the `+t' command. Maybe this time is about 15 seconds:
+t 15s
Now follows the `big part' with specifying the periods of time, in which this
and that telephone number causes this and that length of the charge unit. It
has the following structure ( `+1' means time zone 1 and so on):
[distance information / matchstrings for telephone numbers]
+1
[time information]
+2
[time information]
+3
[time information]
...
+n
[time information]
# <unit length for +1> <unit length for +2> ... <unit length for +n> <Zone name>
The different time informations don't have to be at least 3 - just an
example, e.g. in Germany there are only two time zones in telephoning... The
[time information] consists of the day and the time period, in which this time
zone is valid:
1.1. 8.00 18.00 means "January 1st, from 8am to 6pm"
w 0.00 23.59 means "every Sunday, all time"
w(1) 10.00 15.00 means "every Monday, from 10am to 3pm"
E 17.00 19.00 means "Easter Sunday, from 5pm to 7pm
A short example (The ; introduces comments):
---------------------------------------
; distance information, i.e. telephone numbers belonging to
; one distance zone
01* ; all numbers beginning with 01
+1 ; time zone 1
w 0.00 23.59 ; valid on sunday the whole day (w means `nullth' day of
; week)
w(6) 0.00 23.59 ; valid on saturday the whole day (w(6) means sixth day
; of week
+2 ; time zone 2
w(4) 8.00 18.00 ; valid on thursday between 8am and 6pm
w(5) 10.00 13.00 ; valid on friday between 10am and 1pm
3.10. ; valid on October 3rd
+3 ; time zone 3
E 12:00 20:00 ; valid on Easter Sunday between 12am and 8pm
+4 ; time zone 4
a ; everything else
# 20s 50s 5M 8M Zone 01 ; one unit of time zone 1 for this distance zone lasts
; 20 seconds, one unit of time zone 2 lasts 50
; seconds, one unit of time zone 3 lasts two minutes
; and one unit of time zone 4 lasts eight minutes; the
; name of the zone is "Zone 01", referring to the
; numbers belonging to it
You have already seen, that Easter is implemented for use of Christian holidays.
The Easter date is computed automatically. There are some `fix implemented'
expressions to refer to:
a all days
w start of week (the nullth day = sunday)
m start of month (only positive increment allowed)
E Easter sunday
A First Advent
These implemented days can be increased and decreased by adding an number in
braces (m only increasing!). So you get to hold the other weekdays and most of
the Christian holidays:
w(3) wednesday
E(1) Easter Monday
E(49) Whitsun Sunday
A(-13) Day of prayer and repentance
A(7) Second Advent
In the # line (the delimiter for the time zone declaration, there have to be
specified as many unit lenghts as time zones given before. the first length
given after the # refers to the time zone `+1', the second to the time zone
`+2' and so on. The name (here `Zone 01') needn't to be given, but it's
useful. For a long, detailled example NUM file, look into the ZUERICH.NUM in
the NUM folder.