annotate Number-database @ 1:c7a72b7fe248 default tip

Port-numbers: initial tentative assignments
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 27 Dec 2023 20:58:19 +0000
parents 6da76097c86e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 Database of locally owned numbers
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 =================================
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 The database of locally owned phone numbers is a ThemWi-invented ad hoc data
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 structure that is absolutely required for ThemWi system sw to work. The human-
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 edited ASCII source form of this database resides in /var/gsm/number-db2 and
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 its compiled binary form resides in /var/gsm/number-db2.bin, compiled with
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 themwi-update-numdb2 utility. (The "db2" in file and utility names refers to
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 database version 2, which is the current version.) This database contains two
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 types of entries:
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 1) Locally owned 10-digit NANP numbers;
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 2) Internally defined 4-digit short numbers.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 NANP number ownership information
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 =================================
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 ThemWi system sw is written with the assumption that the local instance operator
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 obtains (rents) real NANP phone numbers from a provider such as BulkVS and
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 assigns these numbers to individual GSM subscribers in OsmoHLR. However, in
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 order for ThemWi system sw to work correctly, there is one more step needed:
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 each locally owned number (i.e., each NANP number you rent from BulkVS or
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 whoever your upstream is) needs to be entered into ThemWi local number database.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 The step of obtaining (a batch of) NANP phone numbers from your SIP trunk
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 provider and the step of assigning individual numbers to specific GSM
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 subscribers (by way of OsmoHLR subscriber database) are almost always separated
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 in time: as an operator, you will typically obtain a batch of TNs (telephone
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 numbers) in one go, and from the perspective of your upstream, all of these TNs
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 route to your server. How you then assign them to GSM subscribers (make them
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 into MSISDNs associated with IMSIs) is your own business, and you can change
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 these associations any time you like, without affecting your interconnection
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 with your PSTN upstream.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 ThemWi local number database needs to list all TNs (10-digit NANP numbers) that
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 are currently owned by your local fiefdom, irrespective of whether or not they
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 are assigned to a GSM subscriber. If a given TN belongs to your local fiefdom
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 in the sense that the global worldwide PSTN will direct any incoming calls to
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 this TN to your server, but you haven't assigned it to a GSM subscriber yet,
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 ThemWi system sw still needs to know that this number is locally owned: call
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 attempts to that TN should never be sent to the outbound gateway, in particular.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 Owned NANP number entry syntax
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 ------------------------------
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 By way of example, suppose that a set of telephone numbers in the range
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 310-555-01XX is yours - how do you enter them into /var/gsm/number-db2? You
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 have a choice of two syntax forms:
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 1) If you have many numbers in the same NPA-NXX prefix (as in the present
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 example), you can enter them using this syntax:
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 prefix 310-555 [allow-abbrev]
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 suffix 0101
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 suffix 0102
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 suffix 0103
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 ...
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 In this form, all owned TNs under the same prefix are clearly grouped together,
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 and you have the option of allowing abbreviations - if you wish to allow
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 abbreviated 4-digit dialing, add 'allow-abbrev' keyword to the prefix line.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 When abbreviations are enabled, each suffix line not only creates an entry in
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 the owned-NANP portion of the local number database, but also adds an entry to
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 the list of defined 4-digit short dialing numbers, mapping to the corresponding
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 full number - see Local-short-numbers article.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 2) If you have individual 10-digit NANP numbers that don't form a neat group
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 under a single NPA-NXX prefix, you can enter them using this alternative
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 syntax for single numbers:
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 full10 310-123-5678
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 full10 216-555-0166
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 full10 949-011-1234
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 ...
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 (The example uses invalid NANP numbers, whereas in actual usage you have to
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 enter real valid ones - but the syntax is the same.) With this number entry
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 method, there is no possibility of allow-abbrev: no 4-digit short dialing number
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 is created, and the owned NANP number in question can only be dialed in full
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 10-digit form.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 The given syntax examples for prefix and full10 lines use hyphens. These
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 hyphens are optional and can be placed anywhere in the number - but we recommend
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 following the standard notation for NANP numbers.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 NANP number usage information
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 =============================
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 The entry formats given above provide only number ownership information: they
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 tell ThemWi system sw which NANP numbers belong in the local fiefdom (all listed
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 numbers) and which ones don't (the remaining space of all other possible NANP
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 numbers outside listed ones). However, this number ownership information does
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 not include any usage or assignment information, and this additional info needs
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 to be provided via number attributes.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 If number ownership information is entered exactly as shown in the examples
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 above, without any additional attributes, ThemWi system sw will treat each of
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 its owned numbers as being unassigned: any call attempts to that number, from
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 the inside or from the outside, will return "unassigned number" error to the
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 caller in the form of GSM CC cause value or SIP error code. When locally owned
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 numbers are assigned to GSM subscribers, a 'gsm-sub' attribute needs to be added
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 to each thus-assigned number; following the already given examples, the new
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 syntax becomes:
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 prefix 310-555 [allow-abbrev]
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 suffix 0101 gsm-sub
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 suffix 0102 gsm-sub
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 suffix 0103 gsm-sub
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 full10 310-123-5678 gsm-sub
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 full10 216-555-0166 gsm-sub
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 full10 949-011-1234 gsm-sub
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 ...
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 Note the absence of indication as to which GSM subscriber each number is
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 assigned to: when ThemWi system sw sees that the called number is assigned to
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 gsm-sub usage, it sends the call to OsmoMSC, which will then look for a
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 connected subscriber whose MSISDN equals the called party number. The mapping
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 from phone numbers to specific subscribers as in IMSIs thus happens by way of
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 OsmoHLR subscriber database, just like in "bare" Osmocom CNI setups without
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 ThemWi system sw.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 Alias numbers
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 -------------
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 ThemWi system sw supports the notion of alias or redirecting numbers. Suppose
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 you have a single GSM subscriber who needs to be reachable at more than one NANP
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 number - for example, someone who got a native ThemWi number (from BulkVS etc)
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 at one point in time, but then ported their number from some national carrier
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 (of evil 2G-killing kind) to BulkVS/ThemWi - how to make the same GSM subscriber
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 reachable via both numbers? Each GSM subscriber has a primary MSISDN (phone
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 number) that is configured in OsmoHLR: this number is returned by *#100# query,
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 and appears as the "from" number on all outgoing calls. Any additional numbers
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 that should route to the same subscriber need to be handled via ThemWi alias
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 number facility, i.e., handled at ThemWi system sw level rather than at OsmoCNI
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 level.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 The syntax for entering alias numbers is as follows (using example fake numbers
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 from above):
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 prefix 310-555 [allow-abbrev]
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 suffix 0123 map-to 216-555-0166
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 or
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 full10 310-555-0123 map-to 216-555-0166
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 In this example the "native" number of the GSM subscriber is 216-555-0166, but
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 alias number 310-555-0123 is configured to route to the same subscriber. In the
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 case of full10 number lines, the map-to target number must always be entered in
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 full 10-digit notation just like the alias number; in the case of prefix and
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 suffix lines, the map-to target number can be either a full 10-digit number or
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 a 4-digit number in the same prefix.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 Irrespective of entry notation used, every map-to target number must be a
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 locally owned NANP number (cannot be an outside number) of gsm-sub usage type,
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 i.e., some local GSM subscriber's primary number.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 Additional number flags for SMS and E911
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 ========================================
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 The following additional flags can be set on each locally owned NANP number's
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 suffix or full10 line:
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 e911 This flag indicates that the number in question is provisioned for E911
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 at the level of BulkVS or whoever is the upstream provider from whom
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 the number is rented. Having a number provisioned for E911 (which costs
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 additional money every month) means that emergency 911 calls can be sent
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 to that PSTN-via-SIP provider with this number as source or "from",
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 without paying a hefty fine for an unprovisioned E911 call.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 sms This flag indicates that the number in question is provisioned for
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 outside SMS connectivity, meaning that it is possible to send SMS to
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 the outside world with this number as source or "from".
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 Local short number entries
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 ==========================
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 In addition to entries that list locally owned NANP numbers, there are other
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 types of entry in the master number database source file that list ITNs
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 (internal test numbers) and test sinks. These entries are described in
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 Local-short-numbers article.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 Compiled binary format and updates
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 ==================================
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 The human-edited ASCII source form of the just-described number database,
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 located in /var/gsm/number-db2 master file, is read only by themwi-update-numdb2
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 utility and no other programs. This utility reads the ASCII source form of the
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 number database, parses it with some basic validation, and compiles it into a
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 binary format that is designed for fast lookups and read by long-running ThemWi
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 processes. The compiled binary form of the number database resides in
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 /var/gsm/number-db2.bin, and the latter file is always updated via an atomic
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 rename mechanism: themwi-update-numdb2 first writes out a temporary file named
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 number-db2.newbin, then renames it to number-db2.bin, making the new version
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 live.
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 Long-running ThemWi server processes perform stat(2) checks on this file as part
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 of call setup or SMS admission processing, and if they notice that the binary
6da76097c86e initial import from old themwi-system-sw repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 database file has changed, they read the new version.