Debian Codegraph @

etc/dialrules

raw
1 ! $Id$
2 !
3 ! HylaFAX (tm) Dialing String Processing Rules.
4 !
5 ! This file describes how to process user-specified dialing strings
6 ! to create two items:
7 !
8 ! CanonicalNumber: a unique string that is derived from all dialing
9 ! strings to the same destination phone number. This string is used
10 ! by the fax server for ``naming'' the destination.
11 !
12 ! DialString: the string passed to the modem for use in dialing the
13 ! telephone. This string should be void of any characters that might
14 ! confuse the modem.
15 !
16 Area=${AreaCode} ! local area code
17 Country=${CountryCode} ! local country code
18 IDPrefix=${InternationalPrefix} ! prefix for placing an international call
19 LDPrefix=${LongDistancePrefix} ! prefix for placing a long distance call
20 !
21 WS=" " ! our notion of white space
22 !
23 ! Convert a phone number to a canonical format:
24 !
25 ! +<country><areacode><rest>
26 !
27 ! by (possibly) stripping off leading dialing prefixes for
28 ! long distance and/or international dialing.
29 !
30 CanonicalNumber := [
31 %.* = ! strip calling card stuff
32 [abcABC] = 2 ! these convert alpha to numbers
33 [defDEF] = 3
34 [ghiGHI] = 4
35 [jklJKL] = 5
36 [mnoMNO] = 6
37 [prsPRS] = 7
38 [tuvTUV] = 8
39 [wxyWXY] = 9
40 [^+0-9]+ = ! strip white space etc.
41 ^${IDPrefix} = + ! replace int. dialing code
42 ^${LDPrefix} = +${Country} ! replace l.d. dialing code
43 ^[^+] = +${Country}${Area}& ! otherwise, insert canon form
44 ]
45 !
46 ! Process a dialing string according to local requirements.
47 ! These rules do only one transformation: they convert in-country
48 ! international calls to long-distance calls.
49 !
50 DialString := [
51 [-${WS}.]+ = ! strip syntactic sugar
52 [abcABC] = 2 ! these convert alpha to numbers
53 [defDEF] = 3
54 [ghiGHI] = 4
55 [jklJKL] = 5
56 [mnoMNO] = 6
57 [prsPRS] = 7
58 [tuvTUV] = 8
59 [wxyWXY] = 9
60 ^[+]${Country} = ${LDPrefix} ! long distance call
61 ^[+] = ${IDPrefix} ! international call
62 ]