UNPKG

node-phonenumber

Version:

Google's phone number handling library ported to Node

1,603 lines (1,560 loc) 339 kB
<!-- Copyright (C) 2013 The Libphonenumber Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. @author: David Yonge-Mallo @author: Shaopeng Jia @author: Lara Rennie Metadata on Short Number patterns, containing information for classifying short numbers by type and cost. Note that this is used in addition to the information provided by the PhoneNumberMetadata.xml file - patterns should not be duplicated between these files. Emergency numbers Wikipedia source: http://en.wikipedia.org/wiki/Emergency_telephone_number --> <!DOCTYPE phoneNumberMetadata [ <!ELEMENT phoneNumberMetadata (territories)> <!ELEMENT territories (territory+)> <!ELEMENT territory (generalDesc, shortCode, tollFree?, standardRate?, premiumRate?, carrierSpecific?, emergency?, expandedEmergency?, smsServices?, carrierSelectionCodes?)> <!ELEMENT generalDesc (nationalNumberPattern)> <!ELEMENT shortCode (nationalNumberPattern, possibleLengths, exampleNumber)> <!-- The following cost categories are mutually exclusive. Emergency numbers are implicitly considered toll free and do not need to be repeated here. Otherwise, a short number which does not fall into one of these categories is considered to have unknown cost. --> <!ELEMENT tollFree (nationalNumberPattern, possibleLengths, exampleNumber)> <!ELEMENT standardRate (nationalNumberPattern, possibleLengths, exampleNumber)> <!ELEMENT premiumRate (nationalNumberPattern, possibleLengths, exampleNumber)> <!-- The following tags are currently used to classify numbers as a particular type and need not be mutually exclusive. The names are provisionary only and may be revised in the future. --> <!-- carrierSpecific numbers are numbers for which the endpoint can vary by carrier. The number may connect to a different endpoint on another carrier, or may not work at all. --> <!ELEMENT carrierSpecific (nationalNumberPattern, possibleLengths, exampleNumber)> <!ELEMENT emergency (nationalNumberPattern?, possibleLengths, exampleNumber?)> <!-- Emergency numbers beyond the traditional fire-police-ambulance trio. This includes things like rescue helicopters and help-lines that include "emergency" in their description. --> <!ELEMENT expandedEmergency (nationalNumberPattern, possibleLengths, exampleNumber)> <!-- Used for numbers where the primary or only intended usage is to receive and/or send text messages (SMSs). --> <!ELEMENT smsServices (nationalNumberPattern, possibleLengths, exampleNumber)> <!-- Numbers dialled to select a particular carrier before making a phone call. These should be included in the generalDesc pattern if they connect by themselves. However, they should be excluded if they are dialled as a prefix only. --> <!ELEMENT carrierSelectionCodes (nationalNumberPattern, possibleLengths, exampleNumber)> <!ELEMENT nationalNumberPattern (#PCDATA)> <!ELEMENT exampleNumber (#PCDATA)> <!ELEMENT possibleLengths EMPTY> <!ATTLIST territory id CDATA #REQUIRED> <!ATTLIST possibleLengths national CDATA #REQUIRED> <!ATTLIST possibleLengths localOnly CDATA #IMPLIED> ]> <phoneNumberMetadata> <territories> <!-- Ascension Island --> <!-- www.itu.int/oth/T02020000AF --> <territory id="AC"> <generalDesc> <nationalNumberPattern>9\d{2}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern>911</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>911</exampleNumber> </shortCode> <emergency> <!-- http://studentsabroad.state.gov/content/pdfs/911_ABROAD.pdf http://www.noonsite.com/Countries/AscensionIsland/?rc=GeneralInfo Note the 4-digit emergency numbers fit the fixed-line pattern, therefore are not included. This is consistent with how we handle such numbers in other countries. --> <nationalNumberPattern>911</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>911</exampleNumber> </emergency> </territory> <!-- Andorra --> <!-- http://www.itu.int/oth/T0202000005/en --> <territory id="AD"> <generalDesc> <nationalNumberPattern>1\d{2}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern>11[0268]</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>112</exampleNumber> </shortCode> <emergency> <!-- http://www.fco.gov.uk/en/travel-and-living-abroad/travel-advice-by-country/europe/andorra --> <nationalNumberPattern>11[0268]</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>112</exampleNumber> </emergency> </territory> <!-- United Arab Emirates --> <!-- http://www.itu.int/oth/T02020000DC/en --> <territory id="AE"> <generalDesc> <nationalNumberPattern>[149]\d{2,3}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 112| 445[16]| 99[789] </nationalNumberPattern> <possibleLengths national="3,4"/> <exampleNumber>112</exampleNumber> </shortCode> <emergency> <nationalNumberPattern> 112| 99[789] </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>112</exampleNumber> </emergency> <smsServices> <!-- As per online evidences, 4451 and 4456 are SMS-able short codes. --> <nationalNumberPattern>445[16]</nationalNumberPattern> <possibleLengths national="4"/> <exampleNumber>4451</exampleNumber> </smsServices> </territory> <!-- Afghanistan --> <!-- http://www.itu.int/oth/T0202000001/en --> <territory id="AF"> <generalDesc> <nationalNumberPattern>[14]\d{2,4}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 1(?: 02| 19 )| 40404 </nationalNumberPattern> <possibleLengths national="3,5"/> <exampleNumber>119</exampleNumber> </shortCode> <carrierSpecific> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>40404</nationalNumberPattern> <possibleLengths national="5"/> <exampleNumber>40404</exampleNumber> </carrierSpecific> <emergency> <nationalNumberPattern> 1(?: 02| 19 ) </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>119</exampleNumber> </emergency> <smsServices> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>40404</nationalNumberPattern> <possibleLengths national="5"/> <exampleNumber>40404</exampleNumber> </smsServices> </territory> <!-- Antigua and Barbuda --> <!-- http://www.itu.int/oth/T0202000008/en --> <territory id="AG"> <generalDesc> <nationalNumberPattern>[19]\d{2}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 176| 9(?: 11| 99 ) </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>911</exampleNumber> </shortCode> <carrierSpecific> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>176</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>176</exampleNumber> </carrierSpecific> <emergency> <!-- http://barbados.usembassy.gov/emergency-antigua_barbuda.html --> <nationalNumberPattern> 9(?: 11| 99 ) </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>911</exampleNumber> </emergency> <smsServices> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>176</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>176</exampleNumber> </smsServices> </territory> <!-- Anguilla --> <!-- http://www.itu.int/oth/T0202000007/en --> <territory id="AI"> <generalDesc> <nationalNumberPattern>[19]\d{2}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern>911</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>911</exampleNumber> </shortCode> <carrierSpecific> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>176</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>176</exampleNumber> </carrierSpecific> <emergency> <!-- http://barbados.usembassy.gov/emergency-anguilla.html --> <nationalNumberPattern>911</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>911</exampleNumber> </emergency> <smsServices> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>176</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>176</exampleNumber> </smsServices> </territory> <!-- Albania --> <!-- http://www.itu.int/oth/T0202000002/en --> <territory id="AL"> <generalDesc> <nationalNumberPattern>[15]\d{2,5}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 1(?: 1(?: 2| 6(?: 000| 1(?: 06| 11| 23 ) ) )| 2[5-9] )| 5\d{4} </nationalNumberPattern> <possibleLengths national="3,5,6"/> <exampleNumber>129</exampleNumber> </shortCode> <emergency> <nationalNumberPattern> 1(?: 12| 2[789] ) </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>129</exampleNumber> </emergency> <expandedEmergency> <!-- According to http://www.itu.int/net/itu-t/inrdb/e129_important_numbers.aspx this is for sea emergencies. --> <nationalNumberPattern>125</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>125</exampleNumber> </expandedEmergency> <smsServices> <nationalNumberPattern>5\d{4}</nationalNumberPattern> <possibleLengths national="5"/> <exampleNumber>51234</exampleNumber> </smsServices> </territory> <!-- Armenia --> <!-- http://www.itu.int/oth/T020200000A/en --> <territory id="AM"> <generalDesc> <nationalNumberPattern>[148]\d{2,4}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 1\d{2}| 40404| 8[1-7]\d{2} </nationalNumberPattern> <possibleLengths national="[3-5]"/> <exampleNumber>8711</exampleNumber> </shortCode> <carrierSpecific> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>40404</nationalNumberPattern> <possibleLengths national="5"/> <exampleNumber>40404</exampleNumber> </carrierSpecific> <emergency> <nationalNumberPattern>10[123]</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>102</exampleNumber> </emergency> <smsServices> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>40404</nationalNumberPattern> <possibleLengths national="5"/> <exampleNumber>40404</exampleNumber> </smsServices> </territory> <!-- Angola --> <!-- http://www.itu.int/oth/T0202000006/en --> <territory id="AO"> <generalDesc> <nationalNumberPattern>1\d{2}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern>11[235]</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>113</exampleNumber> </shortCode> <emergency> <!-- http://travel.state.gov/travel/cis_pa_tw/cis/cis_1096.html --> <nationalNumberPattern>11[235]</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>113</exampleNumber> </emergency> </territory> <!-- Argentina --> <!-- http://www.itu.int/oth/T0202000009/en --> <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_Argentina#Public_utility_numbers --> <territory id="AR"> <generalDesc> <nationalNumberPattern>[01389]\d{1,4}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 000| 1(?: 0[0-35-7]| 1[02-5]| 2[15]| 9 )| 3372| 89338| 911 </nationalNumberPattern> <possibleLengths national="[2-5]"/> <exampleNumber>121</exampleNumber> </shortCode> <tollFree> <!-- According to http://wikitravel.org/en/Argentina all 2 and 3 digit numbers are free, except for 113. --> <nationalNumberPattern> [09]\d{2}| 1(?: [02-9]\d?| 1[0-24-9]? ) </nationalNumberPattern> <possibleLengths national="2,3"/> <exampleNumber>111</exampleNumber> </tollFree> <!-- 911 is only available in select cities. Since it's not available everywhere and is location specific adding this number here. --> <carrierSpecific> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern> 89338| 911 </nationalNumberPattern> <possibleLengths national="3,5"/> <exampleNumber>89338</exampleNumber> </carrierSpecific> <emergency> <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_Argentina#Public_utility_numbers --> <!-- 911 is only available in some places. --> <nationalNumberPattern> 10[017]| 911 </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>101</exampleNumber> </emergency> <expandedEmergency> <nationalNumberPattern>10[356]</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>103</exampleNumber> </expandedEmergency> <smsServices> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern> 3372| 89338 </nationalNumberPattern> <possibleLengths national="4,5"/> <exampleNumber>3372</exampleNumber> </smsServices> </territory> <!-- American Samoa --> <!-- http://www.itu.int/oth/T0202000004/en --> <territory id="AS"> <generalDesc> <nationalNumberPattern>[49]\d{2,4}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 40404| 911 </nationalNumberPattern> <possibleLengths national="3,5"/> <exampleNumber>911</exampleNumber> </shortCode> <emergency> <!-- http://studentsabroad.state.gov/content/pdfs/911_ABROAD.pdf http://www.airportairport.com/American-Samoa.html http://www.frommers.com/destinations/americansamoa/3038020157.html --> <nationalNumberPattern>911</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>911</exampleNumber> </emergency> <smsServices> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>40404</nationalNumberPattern> <possibleLengths national="5"/> <exampleNumber>40404</exampleNumber> </smsServices> </territory> <!-- Austria --> <!-- http://www.rtr.at/en/tk/E129 --> <territory id="AT"> <generalDesc> <nationalNumberPattern>1\d{2,5}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 1(?: 1(?: 2| 6(?: 00[06]| 1(?: 17| 23 ) ) )| 22| 33| 44 ) </nationalNumberPattern> <possibleLengths national="3,6"/> <exampleNumber>112</exampleNumber> </shortCode> <tollFree> <nationalNumberPattern> 116(?: 00[06]| 1(?: 17| 23 ) ) </nationalNumberPattern> <possibleLengths national="6"/> <exampleNumber>116000</exampleNumber> </tollFree> <emergency> <nationalNumberPattern> 1(?: [12]2| 33| 44 ) </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>112</exampleNumber> </emergency> <expandedEmergency> <nationalNumberPattern> 116(?: 00[06]| 1(?: 17| 23 ) ) </nationalNumberPattern> <possibleLengths national="6"/> <exampleNumber>116000</exampleNumber> </expandedEmergency> </territory> <!-- Australia --> <!-- Country calling code shared with Cocos Islands (CC) and Christmas Islands (CX) --> <!-- http://www.itu.int/oth/T020200000D/en --> <!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_Australia --> <territory id="AU"> <!-- Note 200[1-3] are ignored, despite being mentioned in the ITU document, because no evidence that these numbers really exist could be found online, and it is unclear what they actually are. --> <generalDesc> <nationalNumberPattern> [027]\d{2}| 1\d{2,7} </nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 000| 1(?: 06| 1(?: 00| 2| 9[46] )| 2(?: [23]\d| 4\d{2,3}| 5\d{3,4}| 8(?: 2| [013-9]\d ) )| 555| 9[13-5]\d{3} )| 225| 7(?: 33| 67 ) </nationalNumberPattern> <possibleLengths national="[3-8]"/> <exampleNumber>112</exampleNumber> </shortCode> <tollFree> <nationalNumberPattern> 1(?: 258885| 555 )| 733 </nationalNumberPattern> <possibleLengths national="3,4,7"/> <exampleNumber>733</exampleNumber> </tollFree> <standardRate> <nationalNumberPattern> 1(?: 1\d{2}| 24733 )| 225| 767 </nationalNumberPattern> <possibleLengths national="3,4,6"/> <exampleNumber>225</exampleNumber> </standardRate> <premiumRate> <!-- http://www.vodafone.com.au/personal/services/messaging/txt/mobilepremiumservices --> <nationalNumberPattern> 1(?: 2(?: 34| 456 )| 9\d{4} ) </nationalNumberPattern> <possibleLengths national="[4-6]"/> <exampleNumber>191123</exampleNumber> </premiumRate> <carrierSpecific> <!-- http://www.vodafone.com.au/personal/services/messaging/txt/mobilepremiumservices --> <nationalNumberPattern> 1(?: 258885| 555 ) </nationalNumberPattern> <possibleLengths national="4,7"/> <exampleNumber>1555</exampleNumber> </carrierSpecific> <emergency> <nationalNumberPattern> 000| 1(?: 06| 12 ) </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>112</exampleNumber> </emergency> <smsServices> <nationalNumberPattern>19\d{4,6}</nationalNumberPattern> <possibleLengths national="[6-8]"/> <exampleNumber>191123</exampleNumber> </smsServices> </territory> <!-- Aruba --> <!-- http://www.itu.int/oth/T020200000B/en --> <territory id="AW"> <generalDesc> <nationalNumberPattern>[19]\d{2}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 1(?: 00| 76 )| 911 </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>911</exampleNumber> </shortCode> <carrierSpecific> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>176</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>176</exampleNumber> </carrierSpecific> <emergency> <!-- http://www.yellowpages-aruba.com/home/emergency-numbers --> <nationalNumberPattern> 100| 911 </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>911</exampleNumber> </emergency> <smsServices> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>176</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>176</exampleNumber> </smsServices> </territory> <!-- Åland Islands. --> <!-- Country calling code shared with Finland. --> <territory id="AX"> <generalDesc> <nationalNumberPattern> 1\d{2}| 75[12]\d{2} </nationalNumberPattern> </generalDesc> <shortCode> <!-- Most service numbers are included under UAN in PhoneNumberMetadata.xml (and also in the no-international-dialling block) but prefixes 75[12] are always short and used for directory services, hence we consider them to be short numbers. --> <nationalNumberPattern> 112| 75[12]\d{2} </nationalNumberPattern> <possibleLengths national="3,5"/> <exampleNumber>112</exampleNumber> </shortCode> <emergency> <!-- http://www.arrivalguides.com/en/Travelguides/Europe/Finland/ALAND --> <nationalNumberPattern>112</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>112</exampleNumber> </emergency> </territory> <!-- Azerbaijan --> <!-- http://www.itu.int/oth/T020200000F/en --> <territory id="AZ"> <generalDesc> <nationalNumberPattern>[148]\d{2,3}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 1(?: 0[123]| 12 )| 4040| 8800 </nationalNumberPattern> <possibleLengths national="3,4"/> <exampleNumber>101</exampleNumber> </shortCode> <carrierSpecific> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern> 4040| 8800 </nationalNumberPattern> <possibleLengths national="4"/> <exampleNumber>4040</exampleNumber> </carrierSpecific> <emergency> <!-- http://travel.state.gov/travel/cis_pa_tw/cis/cis_978.html http://wikitravel.org/en/Azerbaijan#Emergency_contact_numbers --> <nationalNumberPattern> 1(?: 0[123]| 12 ) </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>101</exampleNumber> </emergency> <smsServices> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern> 4040| 8800 </nationalNumberPattern> <possibleLengths national="4"/> <exampleNumber>4040</exampleNumber> </smsServices> </territory> <!-- Bosnia and Herzegovina --> <!-- https://www.itu.int/dms_pub/itu-t/oth/02/02/T020200001B0001PDFE.pdf --> <!-- http://www.rak.ba/eng/index.php?uid=1272016657 (accessible from http://www.cra.ba/en/telecom/numbering/) --> <!-- http://en.wikipedia.org/wiki/+387 --> <territory id="BA"> <generalDesc> <nationalNumberPattern>1\d{2,5}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 1(?: 1(?: 6(?: 00[06]| 1(?: 1[17]| 23 ) )| 8\d{1,2} )| 2(?: 0[0-7]| [2-5]| 6[0-26]| [78]\d{1,2} )| [3-5]\d{2}| 7\d{3} ) </nationalNumberPattern> <possibleLengths national="[3-6]"/> <exampleNumber>122</exampleNumber> </shortCode> <tollFree> <!-- All 116XXX, "European harmonized services of social" value are toll-free. See: https://ec.europa.eu/digital-single-market/116-helplines.--> <nationalNumberPattern>116\d{3}</nationalNumberPattern> <possibleLengths national="6"/> <exampleNumber>116000</exampleNumber> </tollFree> <emergency> <nationalNumberPattern>12[2-4]</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>122</exampleNumber> </emergency> </territory> <!-- Barbados --> <!-- http://www.itu.int/oth/T0202000013/en --> <territory id="BB"> <generalDesc> <nationalNumberPattern>[2-689]\d{2}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern>[2-689]11</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>211</exampleNumber> </shortCode> <emergency> <nationalNumberPattern>[2359]11</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>211</exampleNumber> </emergency> </territory> <!-- Bangladesh --> <!-- http://www.itu.int/oth/T0202000012/en --> <territory id="BD"> <generalDesc> <nationalNumberPattern>[19]\d{2,4}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 1(?: 0(?: [0-39]| 5(?: 0\d| [1-4] )| 6\d{2}| 7[0-4]| 8[0-29] )| 1[6-9]| 2(?: 2[0-5]| [34] )| 3(?: 1\d?| 3\d| 6[3-6] )| 4(?: 0\d| 1\d{2} )| 5[2-9] )| 9(?: 594| 99 ) </nationalNumberPattern> <possibleLengths national="[3-5]"/> <exampleNumber>103</exampleNumber> </shortCode> <carrierSpecific> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>9594</nationalNumberPattern> <possibleLengths national="4"/> <exampleNumber>9594</exampleNumber> </carrierSpecific> <emergency> <nationalNumberPattern> 10[0-2]| 999 </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>999</exampleNumber> </emergency> <smsServices> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>9594</nationalNumberPattern> <possibleLengths national="4"/> <exampleNumber>9594</exampleNumber> </smsServices> </territory> <!-- Belgium --> <!-- http://www.bipt.be/en/161/ShowContent/502/Database/Databases.aspx --> <!-- http://www.mobileweb.be/en/mobileweb/sms-numberplan.asp --> <territory id="BE"> <generalDesc> <nationalNumberPattern> 1\d{2,5}| [2-9]\d{3} </nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 1(?: 0[0-8]| 1(?: [027]| 6(?: 000| 117 ) )| 2(?: 0[47]| 12| 3[0-24]| 99 )| 3(?: 0[47]| 13| 99 )| 4(?: 0[47]| 14| 50| 99 )| 7(?: 00| 1[27-9]| 33| 65| 7[17]| 89 )| 81[39] )| [2-9]\d{3} </nationalNumberPattern> <possibleLengths national="3,4,6"/> <exampleNumber>112</exampleNumber> </shortCode> <tollFree> <!-- Documentation from www.childfocus.be says that 110 and 116000 are both free. Other information comes from the website of each number. --> <nationalNumberPattern> 1(?: 0[25-8]| 1(?: 0| 6\d{3} )| 7(?: 12| 77 )| 813 )| 8\d{3} </nationalNumberPattern> <possibleLengths national="3,4,6"/> <exampleNumber>116000</exampleNumber> </tollFree> <premiumRate> <!-- For the numbers starting with 2-7 or 9, in practice, there is a range of rates; but the maximum is at least half a Euro, and in some cases 31 Euros (for mobile payments) so we consider them all premium rate for now. Other numbers have been assigned here because operators have listed them as being more expensive than normal numbers, e.g. http://www.voo.be/fr/telephone/tarifs-speciaux/ --> <nationalNumberPattern> 1(?: 2(?: 12| 34 )| 3(?: 07| 13 )| 414| \d04 )| [2-79]\d{3} </nationalNumberPattern> <possibleLengths national="4"/> <exampleNumber>7212</exampleNumber> </premiumRate> <emergency> <nationalNumberPattern> 1(?: 0[01]| 12 ) </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>112</exampleNumber> </emergency> <expandedEmergency> <!-- http://www.childfocus.be/fr/accueil/ lists this as being an emergency number. --> <nationalNumberPattern> 11(?: 0| 6000 ) </nationalNumberPattern> <possibleLengths national="3,6"/> <exampleNumber>116000</exampleNumber> </expandedEmergency> <smsServices> <nationalNumberPattern>[2-9]\d{3}</nationalNumberPattern> <possibleLengths national="4"/> <exampleNumber>2787</exampleNumber> </smsServices> <carrierSelectionCodes> <nationalNumberPattern> 1(?: 5(?: 1[05]| 2[25]| 5[15]| 66| 88| 9[59] )| 6(?: 02| 1[167]| 36| 6[156] ) ) </nationalNumberPattern> <possibleLengths national="4"/> <exampleNumber>1510</exampleNumber> </carrierSelectionCodes> </territory> <!-- Burkina Faso --> <!-- http://www.itu.int/oth/T0202000021/en --> <!-- http://www.onatel.bf/onatelsa/plandenumerotation_burkina.pdf --> <territory id="BF"> <generalDesc> <nationalNumberPattern>1\d</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern>1[78]</nationalNumberPattern> <possibleLengths national="2"/> <exampleNumber>17</exampleNumber> </shortCode> <emergency> <!-- http://www.diplomatie.gouv.fr/fr/conseils-aux-voyageurs_909/conseils-par-pays_12191/burkina-faso_12217/index.html --> <nationalNumberPattern>1[78]</nationalNumberPattern> <possibleLengths national="2"/> <exampleNumber>17</exampleNumber> </emergency> </territory> <!-- Bulgaria --> <!-- http://www.itu.int/oth/T0202000020/en --> <territory id="BG"> <generalDesc> <nationalNumberPattern>1\d{2,5}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 1(?: 1(?: 2| 6(?: 000| 111 ) )| 50| 6[06] ) </nationalNumberPattern> <possibleLengths national="3,6"/> <exampleNumber>112</exampleNumber> </shortCode> <tollFree> <nationalNumberPattern> 116(?: 000| 111 ) </nationalNumberPattern> <possibleLengths national="6"/> <exampleNumber>116000</exampleNumber> </tollFree> <emergency> <nationalNumberPattern> 1(?: 12| 50| 6[06] ) </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>112</exampleNumber> </emergency> <expandedEmergency> <nationalNumberPattern> 116(?: 000| 111 ) </nationalNumberPattern> <possibleLengths national="6"/> <exampleNumber>116000</exampleNumber> </expandedEmergency> </territory> <!-- Bahrain --> <!-- http://www.itu.int/oth/T0202000011/en --> <!-- http://www.tra.org.bh/media/document/National%20Numbering%20Plan.pdf --> <territory id="BH"> <generalDesc> <nationalNumberPattern>[0189]\d{2,4}</nationalNumberPattern> </generalDesc> <shortCode> <!-- As per official numbering plan, 85xxx shortcodes are shared cost numbers. As the cost details are not clear, categorized them as unknown cost numbers. --> <nationalNumberPattern> 0[167]\d{3}| 1(?: [02]\d| 12| 4[01]| 51| 8[18]| 9[169] )| 8[158]\d{3}| 9(?: [148]\d{3}| 9[02489] ) </nationalNumberPattern> <possibleLengths national="3,5"/> <exampleNumber>999</exampleNumber> </shortCode> <tollFree> <nationalNumberPattern> (?: 0[167]| 81 )\d{3} </nationalNumberPattern> <possibleLengths national="5"/> <exampleNumber>07123</exampleNumber> </tollFree> <premiumRate> <nationalNumberPattern>9[148]\d{3}</nationalNumberPattern> <possibleLengths national="5"/> <exampleNumber>94123</exampleNumber> </premiumRate> <carrierSpecific> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern> 0[67]\d{3}| 88000| 98555 </nationalNumberPattern> <possibleLengths national="5"/> <exampleNumber>88000</exampleNumber> </carrierSpecific> <emergency> <nationalNumberPattern>[19]99</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>999</exampleNumber> </emergency> <expandedEmergency> <nationalNumberPattern> 112| 99[0248] </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>992</exampleNumber> </expandedEmergency> <smsServices> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern> 88000| 98555 </nationalNumberPattern> <possibleLengths national="5"/> <exampleNumber>88000</exampleNumber> </smsServices> </territory> <!-- Burundi --> <!-- http://www.itu.int/oth/T0202000022/en --> <territory id="BI"> <generalDesc> <nationalNumberPattern>[16-9]\d{2,3}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 1(?: 1\d| 5[2-9]| 6[0-256] )| 611| 7(?: 10| 77| 979 )| 8[28]8| 900 </nationalNumberPattern> <possibleLengths national="3,4"/> <exampleNumber>117</exampleNumber> </shortCode> <tollFree> <!-- Leo call centre (marked as free on their website) --> <nationalNumberPattern>611</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>611</exampleNumber> </tollFree> <carrierSpecific> <nationalNumberPattern> 611| 7(?: 10| 77 )| 888| 900 </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>611</exampleNumber> </carrierSpecific> <emergency> <nationalNumberPattern>11[237]</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>117</exampleNumber> </emergency> <expandedEmergency> <nationalNumberPattern>11[014-689]</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>119</exampleNumber> </expandedEmergency> <smsServices> <!-- 900 is used by Leo to buy a certain package, 710 by Tempo. --> <nationalNumberPattern> 710| 900 </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>900</exampleNumber> </smsServices> </territory> <!-- Benin --> <!-- http://www.itu.int/oth/T0202000017/en --> <territory id="BJ"> <generalDesc> <nationalNumberPattern>[17]\d{2,3}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 1(?: 1[78]| 2[02-5]| 60 )| 7[0-5]\d{2} </nationalNumberPattern> <possibleLengths national="3,4"/> <exampleNumber>117</exampleNumber> </shortCode> <tollFree> <nationalNumberPattern>7[3-5]\d{2}</nationalNumberPattern> <possibleLengths national="4"/> <exampleNumber>7312</exampleNumber> </tollFree> <carrierSpecific> <nationalNumberPattern>12\d</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>122</exampleNumber> </carrierSpecific> <emergency> <nationalNumberPattern>11[78]</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>117</exampleNumber> </emergency> </territory> <!-- Saint Barthélemy, French Antilles --> <!-- http://www.itu.int/oth/T0202000058/en --> <territory id="BL"> <generalDesc> <nationalNumberPattern>1\d</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern>18</nationalNumberPattern> <possibleLengths national="2"/> <exampleNumber>18</exampleNumber> </shortCode> <emergency> <!-- http://www.comstbarth.fr/urgences.asp --> <nationalNumberPattern>18</nationalNumberPattern> <possibleLengths national="2"/> <exampleNumber>18</exampleNumber> </emergency> </territory> <!-- Bermuda --> <!-- http://www.itu.int/oth/T0202000018/en --> <territory id="BM"> <generalDesc> <nationalNumberPattern>[19]\d{2}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 176| 911 </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>911</exampleNumber> </shortCode> <carrierSpecific> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>176</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>176</exampleNumber> </carrierSpecific> <emergency> <!-- http://travel.state.gov/travel/cis_pa_tw/cis/cis_1067.html --> <nationalNumberPattern>911</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>911</exampleNumber> </emergency> <smsServices> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>176</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>176</exampleNumber> </smsServices> </territory> <!-- Brunei Darussalam --> <!-- http://www.itu.int/oth/T020200001F/en --> <territory id="BN"> <generalDesc> <nationalNumberPattern>9\d{2}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern>99[135]</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>991</exampleNumber> </shortCode> <emergency> <!-- http://www.information.gov.bn/VER2/content/view/52/62/ --> <nationalNumberPattern>99[135]</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>991</exampleNumber> </emergency> </territory> <!-- Bolivia --> <!-- http://www.itu.int/oth/T020200001A/en --> <!-- http://www.bolivia.com/Servicios/Plandenumeracion.pdf --> <territory id="BO"> <generalDesc> <nationalNumberPattern>[14]\d{2,4}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 11[089]| 40404 </nationalNumberPattern> <possibleLengths national="3,5"/> <exampleNumber>110</exampleNumber> </shortCode> <emergency> <nationalNumberPattern>11[089]</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>110</exampleNumber> </emergency> <smsServices> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>40404</nationalNumberPattern> <possibleLengths national="5"/> <exampleNumber>40404</exampleNumber> </smsServices> </territory> <!-- Bonaire, Sint Eustatius and Saba --> <!-- http://www.itu.int/oth/T02020000F8/en --> <territory id="BQ"> <generalDesc> <nationalNumberPattern>[19]\d{2}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 1(?: 12| 76 )| 911 </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>112</exampleNumber> </shortCode> <carrierSpecific> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>176</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>176</exampleNumber> </carrierSpecific> <emergency> <!-- http://www.rijksdienstcn.com/index.php?view=pagina&id=126&set_language=EN --> <nationalNumberPattern> 112| 911 </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>112</exampleNumber> </emergency> <smsServices> <!-- https://support.twitter.com/articles/20170024 --> <nationalNumberPattern>176</nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>176</exampleNumber> </smsServices> </territory> <!-- Brazil --> <!-- http://en.wikipedia.org/wiki/%2B55#Public_utility --> <!-- http://www.itu.int/net/itu-t/inrdb/e129_important_numbers.aspx?country=32 --> <!-- http://www.anatel.gov.br/Portal/exibirPortalPaginaEspecial.do?codItemCanal=746&codCanal=277 --> <territory id="BR"> <generalDesc> <nationalNumberPattern>[12469]\d{2,5}</nationalNumberPattern> </generalDesc> <shortCode> <nationalNumberPattern> 1(?: 0(?: [02]| 3(?: 1[2-579]| 2[13-9]| 3[124-9]| 4[1-3578]| 5[1-468]| 6[139]| 8[149]| 9[168] )| 5[0-35-9]| 6(?: 0| 1[0-35-8]?| 2[0145]| 3[0137]?| 4[37-9]?| 5[0-35]| 6[016]?| 7[137]?| 8[5-8]| 9[1359] ) )| 1[25-8]| 2[35789]| 3(?: [024568]| 3[12] )| 4[12568]| 5\d| 6[0-8]| 8[015]| 9[0-4789] )| 2(?: 7(?: 330| 878 )| 85959? )| 4(?: 0404?| 11[12]| 57| 828 )| 55555| 6(?: 0\d{4}| 10000 )| 911 </nationalNumberPattern> <possibleLengths national="[3-6]"/> <exampleNumber>168</exampleNumber> </shortCode> <tollFree> <!-- The plan says all numbers marked as SERVIÇOS PÚBLICOS DE EMERGÊNCIA are toll-free. The 18X and 19X ranges seem to be allocated for these kinds of numbers based on the last numbering plan. --> <nationalNumberPattern> 1(?: 00| [89]\d )| 4(?: 57| 828 ) </nationalNumberPattern> <possibleLengths national="3,4"/> <exampleNumber>181</exampleNumber> </tollFree> <standardRate> <nationalNumberPattern> 102| 27330 </nationalNumberPattern> <possibleLengths national="3,5"/> <exampleNumber>27330</exampleNumber> </standardRate> <carrierSpecific> <!-- https://support.twitter.com/articles/20170024 --> <!-- For unsubscribing to SMS short code campaigns: 457 is Vivo, 4112 is Tim, 55555 is Oi, 4040 is Claro. For example, see http://www.tim.com.br/sp/sobre-a-tim/regulatorio/mensagens-publicitarias. Note this also mentions 4111 as the TIM short-code to sign up. 151 is listed here since it isn't available throughout the country; e.g. not in Rio Grande do Sul. --> <nationalNumberPattern> 151| 27878| 4(?: 0404?| 11[12]| 57 )| 55555 </nationalNumberPattern> <possibleLengths national="[3-5]"/> <exampleNumber>27878</exampleNumber> </carrierSpecific> <emergency> <nationalNumberPattern> 1(?: 12| 28| 9[023] )| 911 </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>190</exampleNumber> </emergency> <expandedEmergency> <!-- 195 from https://www9.sabesp.com.br/agenciavirtual/ is limited to the state of São Paulo. --> <nationalNumberPattern> 1(?: 1[06]| 23| 68| 8[015]| 9[145789] ) </nationalNumberPattern> <possibleLengths national="3"/> <exampleNumber>168</exampleNumber> </expandedEmergency> <smsServices> <!-- https://support.twitter.com/articles/20170024 --> <!-- Added short codes 28595, 285959 and 4828 after a report that it is used for SMS services. We can't find range-related information, despite emailing Anatel. --> <nationalNumberPattern> 2(?: 7(?: 330| 878 )| 85959? )| 4(?: 0404| 828 )| 6(?: 0\d{4}| 10000 ) </nationalNumberPattern> <possibleLengths national="[4-6]"/> <exampleNumber>27878</exampleNumber> </sms