You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### <ahref="#what_is_valid"/>What does it mean for a phone number to be valid?
109
+
### <ahref="#what_is_valid">What does it mean for a phone number to be valid?</a>
110
110
111
111
Our phone number library can tell that a number range is valid when there is
112
112
sufficient official documentation, with some latency after this fact is brought
@@ -122,7 +122,7 @@ phone call with a verification code). This is not technically feasible without
122
122
such a verification step given the complicated international world we live in,
123
123
with varying standardization practices in different regions.
124
124
125
-
#### <ahref="#why_not_valid"/>But my dialled number connected, so isn't it valid?
125
+
#### <ahref="#why_not_valid">But my dialled number connected, so isn't it valid?</a>
126
126
127
127
Not necessarily.
128
128
@@ -135,7 +135,7 @@ Not necessarily.
135
135
US are not valid, because without the rest of the number it is impossible
136
136
for the library to canonicalize this.
137
137
138
-
### <ahref="#isvalidnumberforregion"/>When should I use isValidNumberForRegion?
138
+
### <ahref="#isvalidnumberforregion">When should I use isValidNumberForRegion?</a>
139
139
140
140
Rarely! Many people have phone numbers that do not belong to the country they
141
141
live in. This applies particularly to mobile numbers, but may also be true
@@ -149,7 +149,7 @@ One use-case where this method may be useful is if you want to see if a
149
149
`FIXED_LINE` number for a business matches the country it is in, to try and spot
150
150
data errors.
151
151
152
-
### <ahref="#incorrect_formatting"/>Some "valid" numbers are not formatting correctly.
152
+
### <ahref="#incorrect_formatting">Some "valid" numbers are not formatting correctly.</a>
153
153
154
154
This could be due to number simplification. In order to keep the size of the XML
155
155
files to a reasonable level, it's necessary in some regions (e.g. "DE" or "AT")
@@ -167,27 +167,27 @@ information to cover these numbers as well, it's a rather non-trivial task
167
167
valid ranges with different formats). Note that this also applies to attributes
168
168
like "national only" or geocoding information.
169
169
170
-
### <ahref="#sms_sending"/>What types of phone numbers can SMSs be sent to?
170
+
### <ahref="#sms_sending">What types of phone numbers can SMSs be sent to?</a>
171
171
172
172
SMSs can be sent to `MOBILE` or `FIXED_LINE_OR_MOBILE` numbers. However,
173
173
in some countries it is possible to configure other types, such as normal
174
174
land-lines, to receive SMSs.
175
175
176
-
### <aname="#fixed_line_or_mobile"/>Why did I get `FIXED_LINE_OR_MOBILE` as the type of my phone number?
176
+
### <aname="#fixed_line_or_mobile">Why did I get `FIXED_LINE_OR_MOBILE` as the type of my phone number?</a>
177
177
178
178
Some number ranges are explicitly defined as being for fixed-line or mobile
179
179
phones. We even represent ranges defined as being "Mostly land-line" in this
180
180
way.
181
181
182
-
### <aname="#portability"/>What is mobile number portability?
182
+
### <aname="#portability">What is mobile number portability?</a>
183
183
184
184
The ability to keep your mobile phone number when changing carriers. To see whether a region supports mobile number portability use [isMobileNumberPortableRegion](https://github.com/google/libphonenumber/blob/58247207903f917839001bc62525a5b48a475b7e/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L3524).
185
185
186
-
### <aname="#carrier_changes"/>Since it's possible to change the carrier for a phone number, how is the data kept up-to-date?
186
+
### <aname="#carrier_changes">Since it's possible to change the carrier for a phone number, how is the data kept up-to-date?</a>
187
187
188
188
Not all regions support mobile number portability. For those that don't, we return the carrier when available. For those that do, we return the original carrier for the supplied number.
189
189
190
-
### <aname="#m2m"/>What about M2M (machine to machine) numbers?
190
+
### <aname="#m2m">What about M2M (machine to machine) numbers?</a>
191
191
192
192
libphonenumber does not support M2M numbers in general, but only in one exception case where in Netherlands 097X M2M numbers are used as regular mobile phone numbers.
193
193
@@ -201,14 +201,14 @@ Many people use this library for formatting the numbers of their contacts, for a
201
201
202
202
At the moment Libphonenumber can only support phone numbers that can be dialled by us, not by machines. If you found any humanly diallable M2M numbers that library is not supporting, please raise an [issue here](http://issuetracker.google.com/issues/new?component=192347) with all authoritative and specific documentation such as government sources, which have varied definitions.
203
203
204
-
### <ahref="#why_only_nl_m2m"/>Why supporting only NL M2M numbers?; Are we sure all 097X numbers are MOBILE?
204
+
### <ahref="#why_only_nl_m2m">Why supporting only NL M2M numbers?; Are we sure all 097X numbers are MOBILE?</a>
205
205
206
206
Official authority has [explicitly stated](https://www.acm.nl/en/publications/information-about-dutch-097-numbers-non-dutch-providers) that this range “should be made accessible, just like other, regular number series from the Netherlands” and that “you can set up a voice and SMS connection towards prefix +31-97 in the same way as you have done already with the +31-6 series.[...] you should enable your systems for voice telephony for the numbers
207
207
in the +31-97 series”. This means, however, that there might be cases where the library would categorise a number as a valid mobile number, but in reality, the particular number is used as pure M2M, is not SMS or voice-enabled. There is not much we can do from our side about this, since we always follow official guidelines.
208
208
209
209
Therefore, clients should be aware that there is possibility of false positives in NL MOBILE category. The library will continue to not support M2M numbers in general.
210
210
211
-
### <ahref="#operator_specific_numbers"/>What about numbers that are only valid for a set of subscribers?
211
+
### <ahref="#operator_specific_numbers">What about numbers that are only valid for a set of subscribers?</a>
212
212
213
213
There are some numbers that only work for the subcribers of certain operators
214
214
for special operator-specific services. These differ from carrierSpecific since
@@ -223,19 +223,19 @@ similar to our prerequisites for supporting M2M.
223
223
Please see [this issue](https://issuetracker.google.com/issues/65238929) for more
224
224
context, and file a new issue if you're able to provide more information than this.
225
225
226
-
## <aname="#representation"/>Representation
226
+
## <aname="#representation">Representation</a>
227
227
228
-
### <aname="#max_length"/>What is the maximum and minimum length of a phone number?
228
+
### <aname="#max_length">What is the maximum and minimum length of a phone number?</a>
229
229
230
230
We support parsing and storing numbers from a minimum length of two digits to a
231
231
maximum length of 17 digits currently (excluding country calling code). The ITU
232
232
standard says the national significant number should not be longer than
233
233
fifteen digits, but empirically this has been proven not to be followed by all
234
234
countries.
235
235
236
-
## <aname="#formatting"/>Formatting
236
+
## <aname="#formatting">Formatting</a>
237
237
238
-
### <aname="#language_specific_format"/>Can / should we format phone numbers in a language-specific way?
238
+
### <aname="#language_specific_format">Can / should we format phone numbers in a language-specific way?</a>
239
239
240
240
No, phone number formatting is country-specific and language-independent. E.g.
241
241
formatting a US number in a French way (e.g. the way a France number is
@@ -245,7 +245,7 @@ It is true that in some countries phone numbers are typically written using
245
245
native, not ASCII, digits; our phone number library supports parsing these but
246
246
doesn't support it at formatting time at the moment.
247
247
248
-
### <ahref="#changes_in_formatting"/>When does formatting in a country change?
248
+
### <ahref="#changes_in_formatting">When does formatting in a country change?</a>
249
249
250
250
The formatting within a country changes sparingly, but may be announced explicitly
251
251
or noted implicitly in a national numbering plan update that introduces a new number
@@ -268,7 +268,7 @@ parentheses persists and both methods are acceptable.
268
268
See [issue #1996](https://github.com/google/libphonenumber/issues/1996)
269
269
for some additional discussion.
270
270
271
-
### <aname="#empty_format_result"/>Why does formatNumberForMobileDialing return an empty string for my number?
271
+
### <aname="#empty_format_result">Why does formatNumberForMobileDialing return an empty string for my number?</a>
272
272
273
273
If we don't think we can guarantee that the number is diallable from the user's
274
274
mobile phone, we won't return anything. This means that for numbers that we
@@ -279,17 +279,17 @@ time then we will return an empty string. If you get an empty string and are
279
279
okay providing a number that may not be diallable, you can call another of our
280
280
formatting numbers instead.
281
281
282
-
## <aname="#metadata"/>Metadata
282
+
## <aname="#metadata">Metadata</a>
283
283
284
-
### <aname="#metadata_definition"/>What do we mean by "metadata"?
284
+
### <aname="#metadata_definition">What do we mean by "metadata"?</a>
285
285
286
286
We use the word "metadata" to refer to all information about phone numbering in
287
287
a particular country - what the country code, international and national
288
288
dialling prefixes are, what carrier codes are operational, which phone numbers
289
289
are possible or valid for a particular country, how to optimally format them,
290
290
which prefixes represent a particular geographical area, etc.
291
291
292
-
### <aname="#metadata_sources"/>Where do we get information from to determine if a number range is valid?
292
+
### <aname="#metadata_sources">Where do we get information from to determine if a number range is valid?</a>
293
293
294
294
In theory, phone numbering plans are all supposed to be administered through the
295
295
ITU. Many countries' phone numbering plans may be found on the [ITU website](
@@ -316,7 +316,7 @@ We'd love to consume machine-readable numbering plan data (assigned ranges,
316
316
carrier & geo mappings). If you can connect us with partners in the industry
317
317
to achieve this, please do so. Thanks!
318
318
319
-
### <aname="#mx_and_ar"/>Why is this number from Argentina (AR) or Mexico (MX) not identified as the right number type?
319
+
### <aname="#mx_and_ar">Why is this number from Argentina (AR) or Mexico (MX) not identified as the right number type?</a>
320
320
321
321
Certain countries' mobile and/or fixed line ranges may overlap or too granular,
322
322
which may make accurate identification impossible. Eg: Argentina and Mexico.
@@ -371,7 +371,7 @@ mobile numbers internatioanlly, fixed-line to mobile nationally.. As these
371
371
dialling patterns were deprecated, we have continued to maintain mobile and
372
372
fixed-line ranges at higher level, returning type as [`FIXED_LINE_OR_MOBILE`](#fixed_line_or_mobile)
373
373
374
-
### <ahref="#mx_legacy_formats"/>Why Mexico (MX) numbers in older dialling formats are accepted as valid ones?
374
+
### <ahref="#mx_legacy_formats">Why Mexico (MX) numbers in older dialling formats are accepted as valid ones?</a>
375
375
Though library has stopped supporting below older dialling codes in the canonical
376
376
form and formatting results, we are lenient in parsing the number, i.e removing
377
377
all older codes.
@@ -382,7 +382,7 @@ This is because we found the older dialling codes supported even after deprecati
382
382
period, so we decided to support them for longer time. However, we will stop this as
383
383
part of [this issue](https://issuetracker.google.com/issues/205606725). More details there.
384
384
385
-
### <aname="#unsupported_regions"/>Why are Bouvet Island (BV), Pitcairn Island (PN), Antarctica (AQ) etc. not supported?
385
+
### <aname="#unsupported_regions">Why are Bouvet Island (BV), Pitcairn Island (PN), Antarctica (AQ) etc. not supported?</a>
386
386
387
387
We only support a country if:
388
388
@@ -417,7 +417,7 @@ calling codes that are only "reserved", or that no data is available for (namely
417
417
a proposed new international telecommunication public correspondence service,
418
418
shared code".)
419
419
420
-
### <aname="#indonesia_tollfree"/>Why are Indonesian toll-free numbers beginning with "00x 803" not supported?
420
+
### <aname="#indonesia_tollfree">Why are Indonesian toll-free numbers beginning with "00x 803" not supported?</a>
421
421
422
422
Although some numbers beginning with "001 803" or "007 803" do work in Indonesia
423
423
to reach toll-free endpoints, these numbers are hard to support because they
@@ -435,9 +435,9 @@ section, and it is likely some changes in the parsing code would have to be
435
435
made to interpret the "00x" as something other than an IDD: this could have
436
436
undesirable side-effects when parsing other numbers.
437
437
438
-
## <aname="#misc"/>Misc
438
+
## <aname="#misc">Misc</a>
439
439
440
-
### <aname="#reduced_metadata"/>What is the metadatalite.js/METADATA_LITE option?
440
+
### <aname="#reduced_metadata">What is the metadatalite.js/METADATA_LITE option?</a>
441
441
442
442
For JavaScript, Java and C++ there is the option to use a stripped-down version
443
443
of the metadata. Currently this only removes the example number metadata, so the
@@ -462,7 +462,7 @@ The metadata binary files can be generated using the ant build rules
0 commit comments