comparison doc/Number-database @ 272:c78b8d6ce885

doc/Number-database: should be complete for now
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 26 Nov 2023 19:13:52 -0800
parents ff1ed366c84d
children
comparison
equal deleted inserted replaced
271:b54fa3e4d81f 272:c78b8d6ce885
61 and you have the option of allowing abbreviations - if you wish to allow 61 and you have the option of allowing abbreviations - if you wish to allow
62 abbreviated 4-digit dialing, add 'allow-abbrev' keyword to the prefix line. 62 abbreviated 4-digit dialing, add 'allow-abbrev' keyword to the prefix line.
63 When abbreviations are enabled, each suffix line not only creates an entry in 63 When abbreviations are enabled, each suffix line not only creates an entry in
64 the owned-NANP portion of the local number database, but also adds an entry to 64 the owned-NANP portion of the local number database, but also adds an entry to
65 the list of defined 4-digit short dialing numbers, mapping to the corresponding 65 the list of defined 4-digit short dialing numbers, mapping to the corresponding
66 full number. 66 full number - see Local-short-numbers article.
67 67
68 2) If you have individual 10-digit NANP numbers that don't form a neat group 68 2) If you have individual 10-digit NANP numbers that don't form a neat group
69 under a single NPA-NXX prefix, you can enter them using this alternative 69 under a single NPA-NXX prefix, you can enter them using this alternative
70 syntax for single numbers: 70 syntax for single numbers:
71 71
172 without paying a hefty fine for an unprovisioned E911 call. 172 without paying a hefty fine for an unprovisioned E911 call.
173 173
174 sms This flag indicates that the number in question is provisioned for 174 sms This flag indicates that the number in question is provisioned for
175 outside SMS connectivity, meaning that it is possible to send SMS to 175 outside SMS connectivity, meaning that it is possible to send SMS to
176 the outside world with this number as source or "from". 176 the outside world with this number as source or "from".
177
178 Local short number entries
179 ==========================
180
181 In addition to entries that list locally owned NANP numbers, there are other
182 types of entry in the master number database source file that list ITNs
183 (internal test numbers) and test sinks. These entries are described in
184 Local-short-numbers article.
185
186 Compiled binary format and updates
187 ==================================
188
189 The human-edited ASCII source form of the just-described number database,
190 located in /var/gsm/number-db2 master file, is read only by themwi-update-numdb2
191 utility and no other programs. This utility reads the ASCII source form of the
192 number database, parses it with some basic validation, and compiles it into a
193 binary format that is designed for fast lookups and read by long-running ThemWi
194 processes. The compiled binary form of the number database resides in
195 /var/gsm/number-db2.bin, and the latter file is always updated via an atomic
196 rename mechanism: themwi-update-numdb2 first writes out a temporary file named
197 number-db2.newbin, then renames it to number-db2.bin, making the new version
198 live.
199
200 Long-running ThemWi server processes perform stat(2) checks on this file as part
201 of call setup or SMS admission processing, and if they notice that the binary
202 database file has changed, they read the new version.