faster regexp processing
[platform/upstream/libphonenumber.git] / resources / PhoneNumberMetadata.xml
index 6a737ff..4e757f8 100644 (file)
         <!-- Formatting based primarily on ITU document. -->
         <numberFormat pattern="([2-7]\d)(\d{3})(\d{4})">
           <leadingDigits>
-            [2-6]|
-            7[013-9]
+            [2-7]
           </leadingDigits>
           <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Formatting 729 numbers differently based on numbers seen online. -->
-        <numberFormat pattern="(729)(\d{3})(\d{3})">
-          <leadingDigits>729</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
+         </numberFormat>
       </availableFormats>
       <generalDesc>
         <nationalNumberPattern>[2-7]\d{8}</nationalNumberPattern>
       <mobile>
         <nationalNumberPattern>
           7(?:
-            [05-9]\d{7}|
-            29\d{6}
+            [014-9]\d{7}|
+            2[89]\d{6}
           )
         </nationalNumberPattern>
         <possibleNumberPattern>\d{9}</possibleNumberPattern>
          -->
     <territory id="AR" countryCode="54" internationalPrefix="00" nationalPrefix="0"
        nationalPrefixForParsing="
-         0?(?:
-           (11|
+         0?(?:(
+            11|
             2(?:
               2(?:
                 02?|
                8[2578]
              )|
              4(?:
-               0[124-9]|
+               0[0-24-9]|
                [12]|
                3[5-8]?|
                4[24-7]|
              )|
              6[24]|
              7(?:
+               [069]|
                1[1568]|
                2[15]|
                3[145]|
                4[13]|
                5[14-8]|
-               [069]|
                7[2-57]|
                8[126]
              )|
                9[124]
              )
            )
-         )?15
-       )?"
+         )?15)?"
        nationalPrefixTransformRule="9$1" nationalPrefixFormattingRule="$NP$FG"
        mobileNumberPortableRegion="true">
       <references>
         <!-- On the following link, click on Indicativos Interurbanos to access detailed
              information. -->
         <sourceUrl>http://www.cnc.gov.ar/infotecnica/numeracion/Index.asp</sourceUrl>
+        <!-- Download XLS spreadsheet from "Númeración Geográfica" link on following page: -->
+        <sourceUrl>http://www.cnc.gob.ar/asignaciones-a-la-fecha_p445</sourceUrl>
         <sourceUrl>http://en.wikipedia.org/wiki/+54</sourceUrl>
       </references>
       <availableFormats>
           <intlFormat>$1 $2 $3-$4</intlFormat>
         </numberFormat>
         <numberFormat pattern="(9)(\d{3})(\d{3})(\d{4})">
-          <!-- Some 4-digit area codes actually are caught by this rule. Preference is given however
-               to the 3-digit area codes, since they are considerably larger communities. -->
+          <!-- The regular expressions below were generated semi-automatically from data extracted
+               from the XLS spreadsheet downloaded from the "Númeración Geográfica" link cited
+               above. Each pattern captures all 3-3-4 prefixes for its length, but may also capture
+               some 4-2-4 cases.
+
+               In cases where a range contains both 3-3-4 and 4-2-4 prefixes, the most commonly used
+               one should be considered the default.
+               * If there are more distinct 4-2-4 prefixes, then the regular expression should
+                 INCLUDE only the explicitly mentioned 3-3-4 prefixes.
+               * If there are more distinct 3-3-4 prefixes, then the regular expression should
+                 EXCLUDE only the explicitly mentioned 4-2-4 prefixes.
+               This should help maximize the chances of new ranges automatically being assigned to
+               the right form.
+
+               In the final (most specific) regular expression, the few remaining ambiguous cases
+               are decided by comparing usage counts. Any manual edits to these expressions not
+               reflected in the XLS spreadsheet must be clearly called out below:
+
+               Added Manually as 3-3-4 format:
+               * 2981 (General Roca, Río Negro) : Numbers found online suggest 3-3-4
+
+               See also:
+               https://github.com/googlei18n/libphonenumber/issues/611
+               https://github.com/googlei18n/libphonenumber/issues/559
+               -->
+          <!-- Do NOT copy this into the section below. Removing the leading '9' will make it match
+               only 2 digits and the first <leadingDigits> section must always match 3 digits. -->
           <leadingDigits>
             9(?:
               2[234689]|
               3[3-8]
             )
           </leadingDigits>
+          <!-- If modified, copy this expression into the section below, minus the leading '9' -->
           <leadingDigits>
             9(?:
               2(?:
               )|
               3(?:
                 36|
-                4[12358]|
+                4[1-358]|
                 5[138]|
                 6[24]|
                 7[069]|
               )
             )
           </leadingDigits>
-          <!-- We exclude here several 294X four-digit area codes: 2940, 2942, 2945, 2946 and 2948,
-               298[23], and several 38[3578]X four-digit area codes. -->
+          <!-- Note that some patterns appear as both 3 and 4 digit area codes. In these cases
+               (to avoid going to 6 digits of discrimination) we simply pick the one with the
+               most uses. Patterns excluded from this expression will be treated as 4-2-4:
+               - XXXX (usage count as 3-digit code:usage count as 4-digit code)
+               - 2646 (7:15)   - excluded
+               - 3435 (39:63)  - excluded
+               - 3436 (16:54)  - excluded
+               - 3454 (90:48)
+               - 3455 (13:94)  - excluded
+               - 3456 (3:93)   - excluded
+               - 3584 (143:65)
+               - 3585 (21:42)  - excluded
+               - 3854 (115:73)
+               - 3855 (76:40)
+               - 3856 (19:44)  - excluded
+               - 3876 (56:99)  - excluded
+               - 3885 (120:45)
+               - 3886 (3:137)  - excluded
+               -->
+          <!-- If modified, copy this expression into the section below, minus the leading '9' -->
           <leadingDigits>
             9(?:
               2(?:
-                2[013]|
-                3[067]|
+                2(?:
+                  0[013-9]|
+                  [13]
+                )|
+                3(?:
+                  0[013-9]|
+                  [67]
+                )|
                 49|
-                6[01346]|
-                80|
+                6(?:
+                  [0136]|
+                  4[0-59]
+                )|
+                8|
                 9(?:
-                  [179]|
-                  4[13479]|
-                  8[014-9]
+                  [19]|
+                  44|
+                  7[013-9]|
+                  8[14]
                 )
               )|
               3(?:
                 36|
-                4[12358]|
+                4(?:
+                  [12]|
+                  [358]4
+                )|
                 5(?:
-                  [18]|
-                  3[014-689]
+                  1|
+                  3[0-24-689]|
+                  8[46]
                 )|
-                6[24]|
+                6|
                 7[069]|
                 8(?:
                   [01]|
-                  3[013469]|
-                  5[0-39]|
-                  7[0-2459]|
-                  8[0-49]
+                  34|
+                  [578][45]
                 )
               )
             )
         </numberFormat>
         <!-- These patterns are a copy of the mobile patterns with the leading 9 removed. -->
         <numberFormat pattern="(\d{3})(\d{3})(\d{4})" nationalPrefixOptionalWhenFormatting="true">
+          <!-- Never modify this manually, always copy from above and remove leading '9' -->
           <leadingDigits>
             2(?:
               2[013]|
             )|
             3(?:
               36|
-              4[12358]|
+              4[1-358]|
               5[138]|
               6[24]|
               7[069]|
               8[013578]
             )
           </leadingDigits>
-          <!-- We exclude here several 294X four-digit area codes: 2940, 2942, 2945, 2946 and 2948,
-               298[23], and several 38[3578]X four-digit area codes. -->
+          <!-- Never modify this manually, always copy from above and remove leading '9' -->
           <leadingDigits>
             2(?:
-              2[013]|
-              3[067]|
+              2(?:
+                0[013-9]|
+                [13]
+              )|
+              3(?:
+                0[013-9]|
+                [67]
+              )|
               49|
-              6[01346]|
-              80|
+              6(?:
+                [0136]|
+                4[0-59]
+              )|
+              8|
               9(?:
-                [179]|
-                4[13479]|
-                8[014-9]
+                [19]|
+                44|
+                7[013-9]|
+                8[14]
               )
             )|
             3(?:
               36|
-              4[12358]|
+              4(?:
+                [12]|
+                [358]4
+              )|
               5(?:
-                [18]|
-                3[0-689]
+                1|
+                3[0-24-689]|
+                8[46]
               )|
-              6[24]|
+              6|
               7[069]|
               8(?:
                 [01]|
-                3[013469]|
-                5[0-39]|
-                7[0-2459]|
-                8[0-49]
+                34|
+                [578][45]
               )
             )
           </leadingDigits>
         <exampleNumber>6846221234</exampleNumber>
       </fixedLine>
       <mobile>
-        <!-- Added 25[246], operated from Blue Sky. Added 731, 770, operated by ASTCA. -->
+        <!-- Added 25[246] and 272, operated by Blue Sky. Added 731, 770, operated by ASTCA. -->
         <nationalNumberPattern>
           684(?:
-            25[2468]|
+            2(?:
+              5[2468]|
+              72
+            )|
             7(?:
               3[13]|
               70
     <territory id="AX" countryCode="358" internationalPrefix="00|99[049]" nationalPrefix="0"
                nationalPrefixFormattingRule="$NP$FG">
       <references>
-        <sourceUrl>http://www.ficora.fi/en/index/palvelut/palvelutaiheittain/numerointi/numerotyypitjaalueet.html</sourceUrl>
+        <sourceUrl>https://www.viestintavirasto.fi/internetpuhelin/puhelinverkonnumerointi.html</sourceUrl>
       </references>
       <!-- The general desc and fixed line are numbers different from Finland metadata. -->
       <generalDesc>
       <fixedLine>
         <!-- There was a plan to move to 10 digit fixed-line numbers, but this does not seem to have
              been realised, judging by online numbers and wikipedia. These patterns are grouped
-             first by leading digit, then within by number of digits. Several Dhaka prefixes (02 731
-             etc) are included despite not being mentioned on the wikipedia page or ITU doc due to
+             first by leading digit, then within by number of digits. Several Dhaka prefixes (02 731,
+             02 910, etc.) are included despite not being mentioned on Wikipedia / ITU due to
              online evidence. Another oddity is Chittagong - some numbers have a leading 2, others
              do not - both are allowed for now. For some area codes, the subscriber number length
              described in our source documentation doesn't match numbers online (e.g. 05222) so we
             )|
             9(?:
               0[0-2]|
-              1[1-4]|
+              1[0-4]|
               2[568]|
               3[3-6]|
               5[5-7]|
                nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"
                mobileNumberPortableRegion="true">
       <references>
-        <sourceUrl>http://www.bipt.be/en/161/ShowContent/502/Database/Databases.aspx</sourceUrl>
-        <sourceUrl>http://www.telefoonzones.be/</sourceUrl>
+        <sourceUrl>http://www.bipt.be/en/operators/telecommunication/Numbering/Database</sourceUrl>
+        <sourceUrl>http://www.bipt.be/public/files/en/474/20140829153659_Belgian_numbering_plan</sourceUrl>
+        <sourceUrl>http://en.wikipedia.org/wiki/Telephone_numbers_in_Belgium</sourceUrl>
       </references>
       <availableFormats>
-        <numberFormat pattern="(4[6-9]\d)(\d{2})(\d{2})(\d{2})">
+        <numberFormat pattern="(\d{3})(\d{2})(\d{2})(\d{2})">
           <leadingDigits>4[6-9]</leadingDigits>
           <format>$1 $2 $3 $4</format>
         </numberFormat>
-        <numberFormat pattern="([2-49])(\d{3})(\d{2})(\d{2})">
+        <numberFormat pattern="(\d)(\d{3})(\d{2})(\d{2})">
           <leadingDigits>
             [23]|
-            [49][23]
+            4[23]|
+            9[2-4]
           </leadingDigits>
           <format>$1 $2 $3 $4</format>
         </numberFormat>
-        <numberFormat pattern="([15-8]\d)(\d{2})(\d{2})(\d{2})">
+        <numberFormat pattern="(\d{2})(\d{2})(\d{2})(\d{2})">
           <leadingDigits>
             [156]|
             7[018]|
           </leadingDigits>
           <format>$1 $2 $3 $4</format>
         </numberFormat>
-        <numberFormat pattern="([89]\d{2})(\d{2})(\d{3})">
+        <numberFormat pattern="(\d{3})(\d{2})(\d{3})">
           <leadingDigits>
             (?:
               80|
         <possibleNumberPattern>\d{8,9}</possibleNumberPattern>
       </generalDesc>
       <fixedLine>
-        <!-- According to the published Excel document the third digit must be 1-9. -->
         <nationalNumberPattern>
           (?:
             1[0-69]|
-            [49][23]|
+            [23][2-8]|
+            4[23]|
             5\d|
             6[013-57-9]|
             71|
-            8[0-79]
-          )[1-9]\d{5}|
-          [23][2-8]\d{6}
+            8[1-79]|
+            9[2-4]
+          )\d{6}|
+          80[2-8]\d{5}
         </nationalNumberPattern>
         <possibleNumberPattern>\d{8}</possibleNumberPattern>
         <exampleNumber>12345678</exampleNumber>
       </fixedLine>
       <mobile>
-        <!-- Numbers beginning with 46 outside the ranges allocated by the plan have been included
-             since many were found online. -->
         <nationalNumberPattern>
           4(?:
-            [679]\d|
-            8[03-9]
+            6[0135-8]|
+            [79]\d|
+            8[3-9]
           )\d{6}
         </nationalNumberPattern>
         <possibleNumberPattern>\d{9}</possibleNumberPattern>
       <premiumRate>
         <nationalNumberPattern>
           (?:
-            70[2-7]|
-            90\d
+            70[2-467]|
+            90[0-79]
           )\d{5}
         </nationalNumberPattern>
         <possibleNumberPattern>\d{8}</possibleNumberPattern>
         <nationalNumberPattern>
           (?:
             1(?:
-              3[13-6]|
+              3[1356]|
               6[0156]|
               7\d
             )\d|
                 0\d|
                 3[12]|
                 44|
-                88
+                7[7-9]
               )|
               9[69][69]
             )|
             7(?:
-              7\d{2}|
-              178
+              1(?:
+                11|
+                78
+              )|
+              7\d{2}
             )
           )\d{4}
         </nationalNumberPattern>
         <exampleNumber>17001234</exampleNumber>
       </fixedLine>
       <!-- 31 is assigned to Royal Court, as per documents on Bahrain's own telecom site, even
-           though it is omitted from the ITU document. 356 was added based on numbers found
-           online. -->
+           though it is omitted from the ITU document. -->
       <mobile>
         <nationalNumberPattern>
           (?:
             3(?:
               [1-4679]\d|
-              5[01356]|
-              8[0-48]
+              5[013569]|
+              8[0-47-9]
             )\d|
             6(?:
               3(?:
               )|
               6(?:
                 [69]\d|
-                3[03-9]
+                3[03-9]|
+                7[0-6]
               )
             )
           )\d{4}
             5(?:
               06|
               1[49]|
+              48|
               79|
               8[17]
             )|
             6(?:
               0[04]|
               13|
+              22|
               39|
               47
             )|
             5(?:
               06|
               1[49]|
+              48|
               79|
               8[17]
             )|
             6(?:
               0[04]|
               13|
+              22|
               39|
               47
             )|
       </fixedLine>
       <mobile>
         <!-- Added the prefixes 4[0-2] (Moov), 5[5-9] & 6[15] because SMS messages have been
-             successfully delivered. Supported by numbers found on the internet. The prefix 56 was
-             assigned to MTN in July 2013:
+             successfully delivered. Supported by numbers found on the internet. Also added 43
+             (Moov) based on numbers found online. The prefix 56 was assigned to MTN in July 2013:
              http://www.atci.ci/images/stories/pdf/decisions-dg/decision_002.pdf
              The prefix 75 is from an open-source bug report.
              50 has been removed since Warid seems to have stopped operation in Côte d'Ivoire. -->
           <nationalNumberPattern>
           (?:
             0[1-9]|
-            4[0-24-9]|
+            4\d|
             5[4-9]|
             6[015-79]|
-            7[57]
+            7[578]
           )\d{6}
         </nationalNumberPattern>
         <exampleNumber>01234567</exampleNumber>
     </territory>
 
     <!-- China -->
-    <territory id="CN" countryCode="86" internationalPrefix="(1[1279]\d{3})?00"
+    <!-- The international/national prefix patterns must not collide with valid prefixes such
+         as 170, 176, 177 and 178. 179XX00 is a valid calling prefix, see: www.chahaoba.com/179 -->
+    <territory id="CN" countryCode="86" internationalPrefix="(1(?:[129]\d{3}|79\d{2}))?00"
                preferredInternationalPrefix="00" nationalPrefix="0"
-               nationalPrefixForParsing="(1[1279]\d{3})|0">
+               nationalPrefixForParsing="(1(?:[129]\d{3}|79\d{2}))|0">
       <references>
         <sourceUrl>http://www.itu.int/oth/T020200002B/en</sourceUrl>
       </references>
               91
             )|
             8(?:
-              71|
+              [57]1|
               98
             )
           </leadingDigits>
               1[236-8]|
               2[5-7]|
               3|
-              5[1-9]|
+              5[4-9]|
               7[02-9]|
               8[3678]|
               9[1-7]
           <leadingDigits>10800</leadingDigits>
           <format>$1 $2 $3</format>
         </numberFormat>
+        <numberFormat pattern="(\d{3})(\d{7,8})">
+          <leadingDigits>950</leadingDigits>
+          <format>$1 $2</format>
+        </numberFormat>
       </availableFormats>
       <generalDesc>
         <nationalNumberPattern>
           [1-7]\d{6,11}|
           8[0-357-9]\d{6,9}|
-          9\d{7,9}
+          9\d{7,10}
         </nationalNumberPattern>
         <possibleNumberPattern>\d{4,12}</possibleNumberPattern>
       </generalDesc>
             (?:
               10
             )?8
-          )00\d{7}
+          )00\d{7}|
+          950\d{7,8}
         </nationalNumberPattern>
         <possibleNumberPattern>\d{10,12}</possibleNumberPattern>
         <exampleNumber>4001234567</exampleNumber>
               91
             )|
             8(?:
-              71|
+              [57]1|
               98
             )
           )(?:
               1[236-8]|
               2[5-7]|
               3\d|
-              5[1-9]|
+              5[4-9]|
               7[02-9]|
               8[3678]|
               9[1-7]
              based on online searches. -->
         <nationalNumberPattern>
           400\d{7}|
+          950\d{7,8}|
           (?:
             10|
             2[0-57-9]|
               1[236-8]|
               2[5-7]|
               [37]\d|
-              5[1-9]|
+              5[14-9]|
               8[3678]|
               9[1-8]
             )|
             )
           )96\d{3,4}
         </nationalNumberPattern>
-        <possibleNumberPattern>\d{7,10}</possibleNumberPattern>
+        <possibleNumberPattern>\d{7,11}</possibleNumberPattern>
         <exampleNumber>4001234567</exampleNumber>
       </sharedCost>
     </territory>
                nationalPrefixFormattingRule="$NP$FG" mainCountryForCode="true"
                mobileNumberPortableRegion="true">
       <references>
-        <sourceUrl>http://www.ficora.fi/en/index/palvelut/palvelutaiheittain/numerointi/numerotyypitjaalueet.html</sourceUrl>
+        <sourceUrl>https://www.viestintavirasto.fi/internetpuhelin/puhelinverkonnumerointi.html</sourceUrl>
       </references>
       <availableFormats>
         <numberFormat pattern="(\d{3})(\d{3,7})">
             2[034678]\d|
             5(?:
               [047]\d|
-              54|
+              5[3-6]|
               6[01]
             )
           )\d{6}
         <exampleNumber>80123456</exampleNumber>
       </noInternationalDialling>
       <fixedLine>
-        <!-- Includes numbers for corporate networks. -->
+        <!-- Includes numbers for corporate networks. Note the ITU numbering plan contains a M2M
+             number in the form of 71\d{10}, which doesn't seem to agree with evidence online. We
+             keep it as 71\d{7} like before. -->
         <nationalNumberPattern>
           (?:
             1\d|
               1\d|
               [2-9]
             )|
-            3[2-7]|
+            3(?:
+              [2-7]|
+              8\d
+            )|
             4[24-9]|
             5[2-79]|
             6[23689]|
       <mobile>
         <nationalNumberPattern>
           (?:
-            [27]0|
+            [257]0|
             3[01]
           )\d{7}
         </nationalNumberPattern>
             )|
             3(?:
               1|
-              2[1-578]|
+              2[1-8]|
               3[1-68]|
               4[1-3]|
               5[1-8]|
               6[1-3568]|
-              7[0-46]|
+              7[0-469]|
               8\d
             )|
             4(?:
               1[01347-9]|
               2[0-36-8]|
               3[0-24-68]|
+              43|
               5[1-378]|
               6[1-5]|
               7[134]|
             5(?:
               1[1-35-9]|
               2[25-8]|
-              3[1246-9]|
+              3[124-9]|
               4[1-3589]|
               5[1-46]|
               6[1-8]
             6(?:
               19?|
               [25]\d|
-              3[1-469]|
+              3[1-69]|
               4[1-6]
             )|
             7(?:
+              02|
               1[1-9]|
-              2[14-9]|
+              2[1-9]|
               [36]\d|
               4[1-8]|
               5[1-9]|
       </fixedLine>
       <mobile>
         <!-- The ITU document has only some of these prefixes - wikipedia lists more. We are fairly
-             sure wikipedia is accurate based on news coverage of the launch of these numbers. -->
+             sure wikipedia is accurate based on news coverage of the launch of these numbers. Also
+             added 5570 and 5571 prefixes based on confirmation from the carrier. -->
         <nationalNumberPattern>
           5(?:
             [02347-9]\d{2}|
               4[45]|
               5[5689]|
               6[67]|
-              7[78]|
-              8[89]|
-              9[7-9]
+              7[0178]|
+              [89][7-9]
             )|
             6[2-9]\d
           )\d{5}
          <!-- Televoting numbers. Formatting information is from
               http://www.bsnl.co.in/service/telev.htm -->
          <numberFormat nationalPrefixFormattingRule="$FG"
-           pattern="(\d{4})(\d{3})(\d{4})(\d{2})">
+           pattern="(\d{4})(\d{3})(\d{3})(\d{3})">
            <leadingDigits>18[06]</leadingDigits>
            <leadingDigits>
              18(?:
-               03|
+               0[03]|
                6[12]
              )
            </leadingDigits>
             600\d{6}|
             8(?:
               0(?:
-                0\d{4,8}|
+                0\d{4,9}|
                 3\d{9}
               )|
               6(?:
           1(?:
             600\d{6}|
             80(?:
-              0\d{4,8}|
+              0\d{4,9}|
               3\d{9}
             )
           )
              be valid by sending SMSs and looking at online number lookup sites. Also added 50[3-79]
              as we have found information online that the 50[3-9] range has been assigned to Digicel.
 
-             Numbers have been found online for the following ranges 29x, 53x, 54x, 55x, 56x.
+             Numbers have been found online for the following ranges 26x, 29x, 53x, 54x, 55x, 56x.
              Most have mobile numbers online so we have put them under mobile but is possible
              they are a mixture of fixed line and mobile. -->
         <nationalNumberPattern>
           876(?:
-            2[1789]\d|
+            2[16-9]\d|
             [348]\d{2}|
             5(?:
               0[3-9]|
             55|
             7[25-9]|
             8[05-9]|
-            9[015-9]
+            9[0-25-9]
           )\d{6}
         </nationalNumberPattern>
         <possibleNumberPattern>\d{9}</possibleNumberPattern>
              Cellcard uses 0857 and 061.
              Extra prefixes found online: 088, 097.
              Allowing 9-digit 12, 31, 38 and 76 numbers based on information from Cambodia Yellow
-             Pages and online search. -->
+             Pages and online search. Allowing 71 based on open-source report and online search. -->
         <nationalNumberPattern>
           (?:
             1(?:
             6[016-9]|
             7(?:
               [07-9]|
-              6\d
+              [16]\d
             )|
             8(?:
               [013-79]|
       <mobile>
         <nationalNumberPattern>1[0-26-9]\d{7,8}</nationalNumberPattern>
         <possibleNumberPattern>\d{9,10}</possibleNumberPattern>
-        <exampleNumber>1023456789</exampleNumber>
+        <exampleNumber>1000000000</exampleNumber>
       </mobile>
       <pager>
         <nationalNumberPattern>15\d{7,8}</nationalNumberPattern>
           (?:
             5(?:
               [05]\d|
-              1[0-6]
+              1[0-7]
             )|
             6(?:
               0[034679]|
               55|
               6[069]|
               [79]\d|
-              8[089]
+              8[07-9]
             )
           )\d{5}
         </nationalNumberPattern>
     <!-- The national prefix of "0" is only used for 0800 and 0900 numbers. -->
     <territory id="LI" countryCode="423" internationalPrefix="00" nationalPrefix="0">
       <references>
-        <sourceUrl>http://www.llv.li/amtsstellen/llv-ak-nummerierung.htm</sourceUrl>
+        <sourceUrl>http://www.llv.li/#/11193</sourceUrl>
+        <sourceUrl>https://www.itu.int/oth/T020200007B/en</sourceUrl>
       </references>
       <availableFormats>
         <!-- Some different patterns for tollfree and shared cost numbers may be found by searching
              for "Mehrwertnummer" at http://www.telecom.li. -->
-        <numberFormat pattern="(\d{3})(\d{2})(\d{2})">
-          <leadingDigits>
-            [23]|
-            7[3-57-9]|
-            87
-          </leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <numberFormat pattern="(6\d)(\d{3})(\d{3})">
-          <leadingDigits>6</leadingDigits>
-          <format>$1 $2 $3</format>
+        <!-- Number format for National mobile services ,  Fixed line , Toll Free , uan and Premium rate services -->
+        <numberFormat pattern="(\d{3})(\d{4})">
+          <leadingDigits>[23789]</leadingDigits>
+          <format>$1 $2</format>
         </numberFormat>
-        <numberFormat pattern="(6[567]\d)(\d{3})(\d{3})">
-          <leadingDigits>6[567]</leadingDigits>
+        <!-- Number format for International mobile services -->
+        <numberFormat pattern="(\d{3})(\d{3})(\d{3})">
+          <leadingDigits>6[56]</leadingDigits>
           <format>$1 $2 $3</format>
         </numberFormat>
+        <!-- Number format for Voicemail services -->
         <numberFormat pattern="(69)(7\d{2})(\d{4})">
           <leadingDigits>697</leadingDigits>
           <format>$1 $2 $3</format>
         </numberFormat>
-        <numberFormat pattern="([7-9]0\d)(\d{2})(\d{2})">
-          <leadingDigits>[7-9]0</leadingDigits>
-          <format>$1 $2 $3</format>
-        </numberFormat>
-        <!-- Numbers of the form [89]00\d{6} are Swiss numbers callable from Liechtenstein. -->
-        <numberFormat pattern="([89]0\d)(\d{2})(\d{2})(\d{2})"
-          nationalPrefixFormattingRule="$NP$FG">
-          <leadingDigits>[89]0</leadingDigits>
-          <format>$1 $2 $3 $4</format>
-        </numberFormat>
       </availableFormats>
       <generalDesc>
         <nationalNumberPattern>
           6(?:
             51[01]|
             6(?:
-              [01][0-4]|
+              0[0-6]|
               2[016-9]|
-              88
-            )|
-            710
+              39
+            )
           )\d{5}|
           7(?:
-            36|
-            4[25]|
-            56|
-            [7-9]\d
+            [37-9]\d|
+            42|
+            56
           )\d{4}
         </nationalNumberPattern>
-        <exampleNumber>661234567</exampleNumber>
+        <possibleNumberPattern>\d{7,9}</possibleNumberPattern>
+        <exampleNumber>660234567</exampleNumber>
       </mobile>
       <!-- The prefix 809 seems to be used for AT&T and Verizon access lines from Liechtenstein,
            even though it doesn't appear in the plan. -->
       <tollFree>
         <nationalNumberPattern>
           80(?:
-            0(?:
-              2[238]|
-              79
-            )|
+            02[28]|
             9\d{2}
           )\d{2}
         </nationalNumberPattern>
       <premiumRate>
         <nationalNumberPattern>
           90(?:
-            0(?:
-              2[278]|
-              79
-            )|
+            02[258]|
             1(?:
               23|
-              3[012]
+              3[14]
             )|
-            6(?:
-              4\d|
-              6[0126]
-            )
+            66[136]
           )\d{2}
         </nationalNumberPattern>
         <possibleNumberPattern>\d{7}</possibleNumberPattern>
       </premiumRate>
       <uan>
         <nationalNumberPattern>
-          87(?:
-            0[128]|
-            7[0-4]
-          )\d{3}
+          870(?:
+            28|
+            87
+          )\d{2}
         </nationalNumberPattern>
         <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>8770123</exampleNumber>
+        <exampleNumber>8702812</exampleNumber>
       </uan>
       <voicemail>
         <nationalNumberPattern>
           697(?:
-            [35]6|
-            4[25]|
+            42|
+            56|
             [7-9]\d
           )\d{4}
         </nationalNumberPattern>
         <possibleNumberPattern>\d{9}</possibleNumberPattern>
-        <exampleNumber>697361234</exampleNumber>
+        <exampleNumber>697861234</exampleNumber>
       </voicemail>
-      <personalNumber>
-        <nationalNumberPattern>701\d{4}</nationalNumberPattern>
-        <possibleNumberPattern>\d{7}</possibleNumberPattern>
-        <exampleNumber>7011234</exampleNumber>
-      </personalNumber>
     </territory>
 
     <!-- Sri Lanka -->
             )|
             [3-5]|
             7[1-9]|
-            [89](?:
+            8(?:
               [1-9]|
               0[2-9]
+            )|
+            9(?:
+              [1-9]|
+              0[2-46-9]
             )
           </leadingDigits>
           <format>$1 $2 $3 $4</format>
         </numberFormat>
         <numberFormat pattern="(\d{3})(\d{2})(\d{3})">
           <leadingDigits>
-            [89]0[01]|
-            70
+            70|
+            80[01]|
+            90[015]
           </leadingDigits>
           <format>$1 $2 $3</format>
         </numberFormat>
       <fixedLine>
         <!-- Even though 20 is listed in the fixed-line plan, other documentation clarify that it is
              for VOIP. Furthermore, even though the plan says that numbers beginning with 2[346-8]
-             must be exactly 8 digits, from information found online it seems that they can actually
-             be 6 (but not 7) digits long. -->
+             by default are 8 digits, from information found online it seems that they can actually
+             be 5, 6 or 7 digits long. -->
         <nationalNumberPattern>
           (?:
             2(?:
               [259]\d{2,9}|
-              [346-8]\d{4}(?:\d{2})?
+              [346-8]\d{3,6}
             )|
             (?:
               [3457]\d{2}|
         <exampleNumber>80012345</exampleNumber>
       </tollFree>
       <premiumRate>
-        <nationalNumberPattern>90[01]\d{5}</nationalNumberPattern>
+        <nationalNumberPattern>90[015]\d{5}</nationalNumberPattern>
         <possibleNumberPattern>\d{8}</possibleNumberPattern>
         <exampleNumber>90012345</exampleNumber>
       </premiumRate>
     </territory>
 
     <!-- Montenegro -->
+    <!-- According to EKIP, the detailed phone number assignments are published on their
+         website (regulation:
+         http://www.ekip.me/download/Law%20on%20Electronic%20Communications%20(updated)%204.9.2013%20(1)nova%20verzija.pdf
+         ). Thus ITU updates always need to be combined with the information at the below ekip.me source URL. -->
     <territory id="ME" countryCode="382" internationalPrefix="00" nationalPrefix="0"
                nationalPrefixFormattingRule="$NP$FG">
       <references>
       </references>
       <availableFormats>
          <numberFormat pattern="(\d{2})(\d{3})(\d{3})">
-          <leadingDigits>[2-57-9]|6[3789]</leadingDigits>
+          <leadingDigits>[2-57-9]|6[036-9]</leadingDigits>
           <leadingDigits>
             [2-57-9]|
             6(?:
-              [389]|
+              [03689]|
               7(?:
                 [0-8]|
                 9[3-9]
             20[2-8]|
             3(?:
               0[2-7]|
-              1[35-7]|
-              2[3567]|
+              [12][35-7]|
               3[4-7]
             )|
             4(?:
-              0[237]|
-              1[27]
+              0[2367]|
+              1[267]
             )|
             5(?:
-              0[47]|
-              1[27]|
-              2[378]
+              0[467]|
+              1[267]|
+              2[367]
             )
           )\d{5}
         </nationalNumberPattern>
         <exampleNumber>30234567</exampleNumber>
       </fixedLine>
       <mobile>
-        <!-- Mobile numbers start with 632, 67, 68 or 69. -->
+        <!-- Mobile numbers start with 600, 632, 661, 67, 68 or 69. -->
         <nationalNumberPattern>
           6(?:
+            00\d|
             32\d|
             [89]\d{2}|
+            61\d|
             7(?:
               [0-8]\d|
               9(?:
         <exampleNumber>67622901</exampleNumber>
       </mobile>
       <tollFree>
-        <!-- All toll free numbers have prefix 80 followed by 02 or 08. -->
-        <nationalNumberPattern>800[28]\d{4}</nationalNumberPattern>
+        <!-- All toll free numbers have prefix 80. -->
+        <nationalNumberPattern>80\d{6}</nationalNumberPattern>
         <possibleNumberPattern>\d{8}</possibleNumberPattern>
         <exampleNumber>80080002</exampleNumber>
       </tollFree>
       <premiumRate>
-        <!-- Numbers with prefix 88, 94 or 95 are services with additional charges. -->
+        <!-- Numbers with prefix 94 or 95 are services with additional charges. -->
         <nationalNumberPattern>
           (?:
-            88\d|
             9(?:
-              4[13-8]|
-              5[16-8]
+              4[1568]|
+              5[178]
             )
           )\d{5}
         </nationalNumberPattern>
             )|
             7\d{2}|
             8(?:
-              [256]\d|
+              [2568]\d|
               7[15-8]
             )|
             9[0-8]\d
         <exampleNumber>20201234</exampleNumber>
       </fixedLine>
       <mobile>
-        <!-- Added 90, 91, 92, 95, 97, 98 & 99 from online data. Airtel have confirmed that they use the
-             89 and 97 prefixes, and Orange use 92. MOOV started using 95 in Jan 2014. -->
+        <!-- Added 88, 90, 91, 92, 95, 97, 98 & 99 from online data. Airtel have confirmed that they
+             use the 89 and 97 prefixes, and Orange use 92. MOOV started using 95 in Jan 2014. -->
         <nationalNumberPattern>
           (?:
-            89|
+            8[89]|
             9\d
           )\d{6}
         </nationalNumberPattern>
                mobileNumberPortableRegion="true">
       <references>
         <sourceUrl>http://en.wikipedia.org/wiki/%2B31</sourceUrl>
-        <sourceUrl>http://www.opta.nl/en/numbers/search-for-numbers</sourceUrl>
+        <sourceUrl>http://wetten.overheid.nl/BWBR0010198</sourceUrl>
       </references>
       <availableFormats>
         <numberFormat pattern="([1-578]\d)(\d{3})(\d{4})">
         <!-- Pattern for fixed-line formats. -->
         <numberFormat pattern="([34679])(\d{3})(\d{4})">
           <leadingDigits>
-            [3467]|
+            [346]|
+            7[2-57-9]|
             9[1-9]
           </leadingDigits>
           <format>$1-$2 $3</format>
               [69]|
               7[0-35-9]
             )|
+            70|
             86
           </leadingDigits>
           <format>$1 $2 $3</format>
         <possibleNumberPattern>\d{7,11}</possibleNumberPattern>
       </generalDesc>
       <fixedLine>
-        <!-- 07 788 was assigned to Voxbox according to
-             http://www.nad.org.nz/07GeographicalCodes.php -->
         <nationalNumberPattern>
           (?:
             3[2-79]|
-            [49][2-689]|
+            [49][2-9]|
             6[235-9]|
-            7[2-5789]
+            7[2-57-9]
           )\d{6}|
           24099\d{3}
         </nationalNumberPattern>
         <possibleNumberPattern>\d{9,11}</possibleNumberPattern>
         <exampleNumber>900123456</exampleNumber>
       </premiumRate>
+      <personalNumber>
+        <nationalNumberPattern>70\d{7}</nationalNumberPattern>
+        <possibleNumberPattern>\d{9}</possibleNumberPattern>
+        <exampleNumber>701234567</exampleNumber>
+      </personalNumber>
     </territory>
 
     <!-- Oman -->
         <sourceUrl>http://www.itu.int/oth/T02020000A8/en</sourceUrl>
         <!-- Source is in Polish. -->
         <sourceUrl>http://www.uke.gov.pl/uke/index.jsp?place=Lead24&amp;news_cat_id=277&amp;news_id=3791&amp;layout=9&amp;page=text</sourceUrl>
+        <sourceUrl>http://www.sgwp.wp.mil.pl/pl/1_1225.html</sourceUrl>
       </references>
       <availableFormats>
         <numberFormat pattern="(\d{2})(\d{3})(\d{2})(\d{2})">
           <leadingDigits>
-            [124]|
+            [14]|
+            2[0-57-9]|
             3[2-4]|
             5[24-689]|
             6[1-3578]|
              Poles that this is more usual. -->
         <numberFormat pattern="(\d{3})(\d{3})(\d{3})">
           <leadingDigits>
+            261|
             39|
             5[0137]|
             6[0469]|
       <fixedLine>
         <!-- The plan says all geographical numbers are 9 digits; but in at least Warsaw (22) and
              Krakow (12) we have found internationally diallable numbers that are 7 digits instead,
-             so we support those too. -->
+             so we support those too. Numbers which start with 261 are allocated for the militrary,
+             see: http://www.sgwp.wp.mil.pl/pl/1_1225.html. -->
         <nationalNumberPattern>
           (?:
             1[2-8]|
             8[1-79]|
             9[145]
           )\d{7}|
-          [12]2\d{5}
+          [12]2\d{5}|
+          261\d{6}
         </nationalNumberPattern>
         <exampleNumber>123456789</exampleNumber>
       </fixedLine>
         <exampleNumber>40123</exampleNumber>
       </fixedLine>
       <mobile>
+        <!-- The 795 prefix is not in the ITU plan (5.XII.2014), but was added because such a number
+             was dialed successfully. -->
         <nationalNumberPattern>
           48\d{3}|
           7(?:
+            30|
             [46-8]\d|
             5[025-9]|
-            9[0-4]
+            9[0-5]
           )\d{4}|
           8[4-8]\d{5}|
           9(?:
       <mobile>
         <nationalNumberPattern>
           (?:
-            8[1-7]|
+            8[1-8]|
             9[0-8]
           )\d{6}
         </nationalNumberPattern>
         </numberFormat>
       </availableFormats>
       <generalDesc>
-        <nationalNumberPattern>[2-578]\d{7}</nationalNumberPattern>
+        <nationalNumberPattern>[2-57-9]\d{7}</nationalNumberPattern>
         <possibleNumberPattern>\d{6,8}</possibleNumberPattern>
       </generalDesc>
       <fixedLine>
             4[04]|
             5[05]|
             7[6-9]|
-            88
+            88|
+            99
           )\d{6}
         </nationalNumberPattern>
         <exampleNumber>25123456</exampleNumber>
             2(?:
               0[1-35-9]|
               1[02-9]|
-              2[4589]|
+              2[04589]|
               3[149]|
               4[08]|
               5[1-46]|
             6(?:
               0[1-35-9]|
               1[024-9]|
-              2[036]|
+              2[03689]|
               3[016]|
               4[16]|
               5[017]|
             2(?:
               0[1-35-9]|
               1[02-9]|
-              2[4589]|
+              2[04589]|
               3[149]|
               4[08]|
               5[1-46]|
             6(?:
               0[1-35-9]|
               1[024-9]|
-              2[036]|
+              2[03689]|
               3[016]|
               4[16]|
               5[017]|
         <sourceUrl>http://www.itu.int/oth/T02020000B4/en</sourceUrl>
       </references>
       <availableFormats>
-        <!-- Should be formatted in one block, apart from the specific series below. -->
         <numberFormat pattern="(8\d{2})(\d{3,4})">
           <leadingDigits>8</leadingDigits>
           <format>$1 $2</format>
           <leadingDigits>7</leadingDigits>
           <format>$1 $2</format>
         </numberFormat>
+        <numberFormat pattern="(\d{5})">
+          <leadingDigits>[2-6]</leadingDigits>
+          <format>$1</format>
+        </numberFormat>
       </availableFormats>
       <generalDesc>
         <nationalNumberPattern>[2-8]\d{4,6}</nationalNumberPattern>