1<!-- Copyright (C) 2009 The Libphonenumber Authors 2 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 15 @author: Shaopeng Jia 16 17 Metadata on Phone Number Plan and formatting rules. This file is used 18 solely for the purpose of unittesting, so data in this file is not 19 necessarily consistent with that of PhoneNumberMetadata.xml. 20--> 21 22<phoneNumberMetadata> 23 <territories> 24 <!-- Andorra --> 25 <territory id="AD" countryCode="376" internationalPrefix="00"> 26 <generalDesc> 27 <nationalNumberPattern>\d{6}</nationalNumberPattern> 28 </generalDesc> 29 <fixedLine> 30 <nationalNumberPattern>\d{6}</nationalNumberPattern> 31 <possibleLengths national="6"/> 32 <exampleNumber>123456</exampleNumber> 33 </fixedLine> 34 </territory> 35 36 <!-- United Arab Emirates --> 37 <!-- Added since when formatting the number for mobile dialling we have special rules to handle 38 it. --> 39 <territory id="AE" countryCode="971" internationalPrefix="00"> 40 <generalDesc> 41 <nationalNumberPattern>[1-9]\d{8}</nationalNumberPattern> 42 </generalDesc> 43 <uan> 44 <nationalNumberPattern>600\d{6}</nationalNumberPattern> 45 <possibleLengths national="9"/> 46 <exampleNumber>600123456</exampleNumber> 47 </uan> 48 </territory> 49 50 <!-- Armenia --> 51 <!-- Added to test same mobile and fixed-line in custom builds. --> 52 <territory id="AM" countryCode="374" internationalPrefix="00" 53 nationalPrefix="0"> 54 <generalDesc> 55 <nationalNumberPattern>[1-9]\d{7}</nationalNumberPattern> 56 </generalDesc> 57 <fixedLine> 58 <nationalNumberPattern>[1-9]\d{7}</nationalNumberPattern> 59 <possibleLengths national="8" localOnly="5,6"/> 60 <exampleNumber>10123456</exampleNumber> 61 </fixedLine> 62 <mobile> 63 <nationalNumberPattern>[1-9]\d{7}</nationalNumberPattern> 64 <possibleLengths national="8" localOnly="5,6"/> 65 <exampleNumber>10123456</exampleNumber> 66 </mobile> 67 </territory> 68 69 <!-- Angola --> 70 <!-- This country has been coopted to test the case of a national prefix with a non-numeric 71 symbol in it. It is also useful since it has no national prefix formatting rule. --> 72 <territory id="AO" countryCode="244" internationalPrefix="00" nationalPrefix="0~0"> 73 <availableFormats> 74 <numberFormat pattern="(\d{3})(\d{3})(\d{3})"> 75 <format>$1 $2 $3</format> 76 </numberFormat> 77 </availableFormats> 78 <generalDesc> 79 <nationalNumberPattern>[29]\d{8}</nationalNumberPattern> 80 </generalDesc> 81 <fixedLine> 82 <nationalNumberPattern>2\d(?:[26-9]\d|\d[26-9])\d{5}</nationalNumberPattern> 83 <possibleLengths national="9"/> 84 <exampleNumber>222123456</exampleNumber> 85 </fixedLine> 86 <mobile> 87 <!-- Expanded the 92 prefix possibilities to match numbers found online. --> 88 <nationalNumberPattern>9[1-3]\d{7}</nationalNumberPattern> 89 <possibleLengths national="9"/> 90 <exampleNumber>923123456</exampleNumber> 91 </mobile> 92 </territory> 93 94 <!-- Argentina --> 95 <territory id="AR" countryCode="54" internationalPrefix="00" 96 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG" 97 nationalPrefixForParsing="0(?:(11|343|3715)15)?" 98 nationalPrefixTransformRule="9$1"> 99 <!-- Note in nationalPrefixForParsing, the areacode (such as 11, 343, etc.), when present in 100 front of carrier selection code 15, is captured to replace $1 in 101 nationalPrefixTransformRule --> 102 <availableFormats> 103 <numberFormat pattern="(\d{2})(\d{4})(\d{4})"> 104 <leadingDigits>11</leadingDigits> 105 <format>$1 $2-$3</format> 106 </numberFormat> 107 <numberFormat pattern="(\d{4})(\d{2})(\d{4})"> 108 <leadingDigits>1[02-9]|[23]</leadingDigits> 109 <format>$1 $2-$3</format> 110 </numberFormat> 111 <numberFormat pattern="(\d)(\d{2})(\d{4})(\d{4})"> 112 <leadingDigits>911</leadingDigits> 113 <format>$2 15 $3-$4</format> 114 <intlFormat>$1 $2 $3 $4</intlFormat> 115 </numberFormat> 116 <numberFormat pattern="(\d)(\d{4})(\d{2})(\d{4})" 117 carrierCodeFormattingRule="$NP$FG $CC"> 118 <leadingDigits>9(?:1[02-9]|[23])</leadingDigits> 119 <format>$2 $3-$4</format> 120 <intlFormat>$1 $2 $3 $4</intlFormat> 121 </numberFormat> 122 <numberFormat pattern="(\d{3})(\d{3})(\d{4})"> 123 <leadingDigits>[68]</leadingDigits> 124 <format>$1-$2-$3</format> 125 </numberFormat> 126 </availableFormats> 127 <generalDesc> 128 <nationalNumberPattern>[1-3689]\d{9,10}</nationalNumberPattern> 129 </generalDesc> 130 <fixedLine> 131 <nationalNumberPattern>[1-3]\d{5,9}</nationalNumberPattern> 132 <possibleLengths national="[6-10]"/> 133 <exampleNumber>1234567890</exampleNumber> 134 </fixedLine> 135 <mobile> 136 <nationalNumberPattern>9\d{10}|[1-3]\d{9}</nationalNumberPattern> 137 <possibleLengths national="10,11"/> 138 <exampleNumber>9234567890</exampleNumber> 139 </mobile> 140 <tollFree> 141 <nationalNumberPattern>80\d{8}</nationalNumberPattern> 142 <possibleLengths national="10"/> 143 <exampleNumber>8034567890</exampleNumber> 144 </tollFree> 145 <premiumRate> 146 <nationalNumberPattern>6(0\d|10)\d{7}</nationalNumberPattern> 147 <possibleLengths national="10"/> 148 <exampleNumber>6234567890</exampleNumber> 149 </premiumRate> 150 </territory> 151 152 <!-- Australia --> 153 <!-- Country calling code shared with Cocos Islands (CC) and Christmas Islands (CX) --> 154 <territory id="AU" countryCode="61" internationalPrefix="001[12]" 155 nationalPrefix="0" preferredInternationalPrefix="0011" 156 nationalPrefixFormattingRule="$NP$FG"> 157 <availableFormats> 158 <numberFormat nationalPrefixFormattingRule="$FG" 159 pattern="(\d{4})(\d{3})(\d{3})" > 160 <leadingDigits>1</leadingDigits> 161 <format>$1 $2 $3</format> 162 </numberFormat> 163 <numberFormat pattern="(\d)(\d{4})(\d{4})"> 164 <leadingDigits>[2-478]</leadingDigits> 165 <format>$1 $2 $3</format> 166 </numberFormat> 167 </availableFormats> 168 <generalDesc > 169 <nationalNumberPattern>[1-578]\d{4,14}</nationalNumberPattern> 170 </generalDesc> 171 <fixedLine> 172 <nationalNumberPattern>[2378]\d{8}</nationalNumberPattern> 173 <possibleLengths national="9"/> 174 <exampleNumber>212345678</exampleNumber> 175 </fixedLine> 176 <mobile> 177 <nationalNumberPattern>4\d{8}</nationalNumberPattern> 178 <possibleLengths national="9"/> 179 <exampleNumber>412345678</exampleNumber> 180 </mobile> 181 <tollFree> 182 <nationalNumberPattern>1800\d{6}</nationalNumberPattern> 183 <possibleLengths national="10"/> 184 <exampleNumber>1800123456</exampleNumber> 185 </tollFree> 186 <premiumRate> 187 <nationalNumberPattern>190[0126]\d{6}</nationalNumberPattern> 188 <possibleLengths national="10"/> 189 <exampleNumber>1900123456</exampleNumber> 190 </premiumRate> 191 </territory> 192 193 <!-- Barbados --> 194 <territory id="BB" countryCode="1" internationalPrefix="011"> 195 <generalDesc> 196 <nationalNumberPattern>246\d{7}</nationalNumberPattern> 197 </generalDesc> 198 <fixedLine> 199 <possibleLengths national="10" localOnly="7"/> 200 <exampleNumber>2464567890</exampleNumber> 201 </fixedLine> 202 </territory> 203 204 <!-- Brazil --> 205 <!-- This country is used to test ShortNumberInfo, so at least the country calling code must be 206 recognised by the library. It is also used for formatInOriginalFormat tests, so some length 207 metadata is needed. --> 208 <territory id="BR" countryCode="55" internationalPrefix="00"> 209 <generalDesc> 210 <nationalNumberPattern>\d{8,10}</nationalNumberPattern> 211 </generalDesc> 212 <fixedLine> 213 <nationalNumberPattern>\d{8,10}</nationalNumberPattern> 214 <possibleLengths national="10" localOnly="8"/> 215 <exampleNumber>12345678</exampleNumber> 216 </fixedLine> 217 </territory> 218 219 <!-- Bahamas --> 220 <territory id="BS" countryCode="1" internationalPrefix="011" 221 nationalPrefix="1"> 222 <generalDesc> 223 <nationalNumberPattern>(242|8(00|66|77|88)|900)\d{7}</nationalNumberPattern> 224 </generalDesc> 225 <fixedLine> 226 <nationalNumberPattern> 227 242(?: 228 3(?: 229 02| 230 [236][1-9]| 231 4[0-24-9]| 232 5[0-68]| 233 7[3-57]| 234 9[2-5] 235 )| 236 4(?: 237 2[237]| 238 51| 239 64| 240 77 241 )| 242 502| 243 636| 244 702 245 )\d{4} 246 </nationalNumberPattern> 247 <possibleLengths national="10" localOnly="7"/> 248 <exampleNumber>2425027890</exampleNumber> 249 </fixedLine> 250 <mobile> 251 <nationalNumberPattern>242(357|359|457|557)\d{4}</nationalNumberPattern> 252 <possibleLengths national="10"/> 253 <exampleNumber>2423577890</exampleNumber> 254 </mobile> 255 <tollFree> 256 <nationalNumberPattern>8(00|66|77|88)\d{7}</nationalNumberPattern> 257 <possibleLengths national="10"/> 258 <exampleNumber>8001234567</exampleNumber> 259 </tollFree> 260 <premiumRate> 261 <nationalNumberPattern>900\d{7}</nationalNumberPattern> 262 <possibleLengths national="10"/> 263 <exampleNumber>9001234567</exampleNumber> 264 </premiumRate> 265 </territory> 266 267 <!-- Belarus --> 268 <!-- This country has been coopted to test the case of a national prefix formatting rule with a 269 space in it and the case where a number happens to begin with the national prefix, but 270 would become too short if the prefix is stripped. --> 271 <territory id="BY" countryCode="375" internationalPrefix="810" nationalPrefix="8" 272 nationalPrefixForParsing="80?|99999" nationalPrefixFormattingRule="$NP $FG"> 273 <availableFormats> 274 <!-- We make some bogus formatting templates that differ only in length to check that 275 switching formatting patterns works as expected.--> 276 <numberFormat pattern="(\d{4})"> 277 <leadingDigits>[1-8]</leadingDigits> 278 <format>$1</format> 279 </numberFormat> 280 <!-- This pattern has an override to remove the space after the national prefix. --> 281 <numberFormat pattern="(\d{2})(\d{3})" nationalPrefixFormattingRule="$NP$FG"> 282 <leadingDigits>[1-8]</leadingDigits> 283 <format>$1 $2</format> 284 </numberFormat> 285 <numberFormat pattern="(\d{3})(\d{3})"> 286 <leadingDigits>[1-8]</leadingDigits> 287 <format>$1 $2</format> 288 </numberFormat> 289 </availableFormats> 290 <generalDesc> 291 <!-- This numbering plan is completely bogus, but is used to test the AYTF logic. For that 292 reason, it is kept very simple. --> 293 <nationalNumberPattern>[1-9]\d{5}</nationalNumberPattern> 294 </generalDesc> 295 <fixedLine> 296 <nationalNumberPattern>[1-9]\d{5}</nationalNumberPattern> 297 <possibleLengths national="6"/> 298 <exampleNumber>112345</exampleNumber> 299 </fixedLine> 300 </territory> 301 302 <!-- Canada --> 303 <territory id="CA" countryCode="1" internationalPrefix="011"> 304 <generalDesc> 305 <nationalNumberPattern>226\d{7}</nationalNumberPattern> 306 </generalDesc> 307 <fixedLine> 308 <nationalNumberPattern>226\d{7}</nationalNumberPattern> 309 <possibleLengths national="10" localOnly="7"/> 310 <exampleNumber>2261234567</exampleNumber> 311 </fixedLine> 312 </territory> 313 314 <!-- Cocos Islands --> 315 <!-- Country calling code shared with Australia. --> 316 <!-- This country is used to test ShortNumberInfo, so at least the country calling code must be 317 recognised by the library, and some length information is needed for parsing. --> 318 <territory id="CC" countryCode="61" internationalPrefix="00"> 319 <generalDesc> 320 <nationalNumberPattern>\d{6,10}</nationalNumberPattern> 321 </generalDesc> 322 <fixedLine> 323 <nationalNumberPattern>\d{6,10}</nationalNumberPattern> 324 <possibleLengths national="10" localOnly="6"/> 325 <exampleNumber>2261234567</exampleNumber> 326 </fixedLine> 327 </territory> 328 329 <!-- China --> 330 <!-- Used to test as-you-type-formatter with complicated number format patterns. Also used to 331 test that not all geographical mobile numbers have an area code. --> 332 <territory id="CN" countryCode="86" internationalPrefix="00" nationalPrefix="0"> 333 <availableFormats> 334 <numberFormat nationalPrefixFormattingRule="$NP$FG" pattern="(\d{3})(\d{5,6})" 335 carrierCodeFormattingRule="$CC $FG"> 336 <leadingDigits>[3-9]</leadingDigits> 337 <leadingDigits>[3-9]\d{2}[19]</leadingDigits> 338 <leadingDigits> 339 [3-9]\d{2}(?: 340 10| 341 95 342 ) 343 </leadingDigits> 344 <format>$1 $2</format> 345 </numberFormat> 346 <!-- Note that mobile numbers do not get formatted with the national prefix. --> 347 <numberFormat nationalPrefixFormattingRule="$FG" pattern="(\d{3})(\d{8})"> 348 <leadingDigits>1</leadingDigits> 349 <format>$1 $2</format> 350 </numberFormat> 351 </availableFormats> 352 <generalDesc> 353 <nationalNumberPattern> 354 [1-7]\d{6,11}| 355 8[0-357-9]\d{6,9}| 356 9\d{7,10} 357 </nationalNumberPattern> 358 </generalDesc> 359 <fixedLine> 360 <nationalNumberPattern>[2-9]\d{10}</nationalNumberPattern> 361 <possibleLengths national="11"/> 362 <exampleNumber>91234567</exampleNumber> 363 </fixedLine> 364 <mobile> 365 <nationalNumberPattern> 366 1(?: 367 [38]\d| 368 4[57]| 369 5[0-35-9]| 370 7[0136-8] 371 )\d{8} 372 </nationalNumberPattern> 373 <possibleLengths national="11"/> 374 <exampleNumber>13123456789</exampleNumber> 375 </mobile> 376 </territory> 377 378 <!-- Colombia (CO) --> 379 <!-- Data is here to check formatForMobileDialling() API is no more considering CO as special 380 i.e it returns regular E.164 format rather than using the 03 carrier code. --> 381 <territory id="CO" countryCode="57" nationalPrefix="0" 382 nationalPrefixForParsing="0(4(?:[14]4|56)|[579])?" mobileNumberPortableRegion="true"> 383 <availableFormats> 384 <numberFormat pattern="(\d{3})(\d{7})" nationalPrefixFormattingRule="($FG)" 385 carrierCodeFormattingRule="$NP$CC $FG"> 386 <leadingDigits>6</leadingDigits> 387 <format>$1 $2</format> 388 </numberFormat> 389 <numberFormat pattern="(\d{3})(\d{7})" carrierCodeFormattingRule="$NP$CC $FG"> 390 <leadingDigits>3</leadingDigits> 391 <format>$1 $2</format> 392 </numberFormat> 393 </availableFormats> 394 <generalDesc> 395 <nationalNumberPattern> 396 (?: 397 60| 398 3\d 399 )\d{8} 400 </nationalNumberPattern> 401 </generalDesc> 402 <fixedLine> 403 <possibleLengths national="10"/> 404 <exampleNumber>6012345678</exampleNumber> 405 <nationalNumberPattern>60\d{8}</nationalNumberPattern> 406 </fixedLine> 407 <mobile> 408 <possibleLengths national="10"/> 409 <exampleNumber>3211234567</exampleNumber> 410 <nationalNumberPattern> 411 3(?: 412 0[0-5]| 413 1\d| 414 2[0-3]| 415 5[01]| 416 70 417 )\d{7} 418 </nationalNumberPattern> 419 </mobile> 420 </territory> 421 422 <!-- Christmas Islands --> 423 <!-- Country calling code shared with Australia. --> 424 <!-- This country is used to test ShortNumberInfo, so at least the country calling code must be 425 recognised by the library, and some length information is needed for parsing. --> 426 <territory id="CX" countryCode="61" internationalPrefix="00"> 427 <generalDesc> 428 <nationalNumberPattern>\d{8,10}</nationalNumberPattern> 429 </generalDesc> 430 <fixedLine> 431 <nationalNumberPattern>\d{8,10}</nationalNumberPattern> 432 <possibleLengths national="10" localOnly="8"/> 433 <exampleNumber>2261234567</exampleNumber> 434 </fixedLine> 435 </territory> 436 437 <!-- Germany --> 438 <territory id="DE" countryCode="49" internationalPrefix="00" 439 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"> 440 <availableFormats> 441 <numberFormat pattern="(\d{3})(\d{3,8})"> 442 <leadingDigits>2|3[3-9]|906|[4-9][1-9]1</leadingDigits> 443 <format>$1 $2</format> 444 </numberFormat> 445 <numberFormat pattern="(\d{2})(\d{4,11})"> 446 <leadingDigits>[34]0|[68]9</leadingDigits> 447 <format>$1/$2</format> 448 </numberFormat> 449 <!-- Extra fictional pattern for shorter numbers with the same prefixes as the following 450 pattern, to illustrate the problem the AYTF has with real patterns that share this 451 property. --> 452 <numberFormat pattern="(\d{2})(\d{2})"> 453 <leadingDigits>[4-9]</leadingDigits> 454 <leadingDigits>[4-6]|[7-9](?:\d[1-9]|[1-9]\d)</leadingDigits> 455 <format>$1 $2</format> 456 </numberFormat> 457 <numberFormat pattern="(\d{4})(\d{2,7})"> 458 <leadingDigits>[4-9]</leadingDigits> 459 <leadingDigits>[4-6]|[7-9](?:\d[1-9]|[1-9]\d)</leadingDigits> 460 <format>$1 $2</format> 461 </numberFormat> 462 <numberFormat pattern="(\d{3})(\d{1})(\d{6})"> 463 <leadingDigits>800</leadingDigits> 464 <format>$1 $2 $3</format> 465 </numberFormat> 466 <numberFormat pattern="(\d{3})(\d{3,4})(\d{4})"> 467 <leadingDigits>900</leadingDigits> 468 <format>$1 $2 $3</format> 469 </numberFormat> 470 </availableFormats> 471 <generalDesc> 472 <nationalNumberPattern>\d{4,14}</nationalNumberPattern> 473 </generalDesc> 474 <fixedLine> 475 <nationalNumberPattern> 476 (?: 477 [24-6]\d{2}| 478 3[03-9]\d| 479 [789](?: 480 0[2-9]| 481 [1-9]\d 482 ) 483 )\d{1,8} 484 </nationalNumberPattern> 485 <possibleLengths national="[4-11]" localOnly="2,3"/> 486 <exampleNumber>30123456</exampleNumber> 487 </fixedLine> 488 <mobile> 489 <nationalNumberPattern>1(5\d{9}|7\d{8}|6[02]\d{8}|63\d{7})</nationalNumberPattern> 490 <possibleLengths national="10,11"/> 491 <exampleNumber>15123456789</exampleNumber> 492 </mobile> 493 <tollFree> 494 <nationalNumberPattern>800\d{7}</nationalNumberPattern> 495 <possibleLengths national="10"/> 496 <exampleNumber>8001234567</exampleNumber> 497 </tollFree> 498 <premiumRate> 499 <nationalNumberPattern>900([135]\d{6}|9\d{7})</nationalNumberPattern> 500 <possibleLengths national="10,11"/> 501 <exampleNumber>9001234567</exampleNumber> 502 </premiumRate> 503 </territory> 504 505 <!-- France --> 506 <territory id="FR" countryCode="33" nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG" 507 internationalPrefix="00"> 508 <availableFormats> 509 <!-- We use this to test the phone number matcher. For our test-case, the formatting 510 pattern must have as the first group a sub-part of the country calling code, 511 and have a national prefix. This corresponds to the test number +33 3 34 2312. --> 512 <numberFormat pattern="(\d)(\d{2})(\d{2})(\d{2})"> 513 <leadingDigits>3</leadingDigits> 514 <format>$1 $2 $3 $4</format> 515 </numberFormat> 516 </availableFormats> 517 <generalDesc> 518 <nationalNumberPattern>3\d{6}</nationalNumberPattern> 519 </generalDesc> 520 <fixedLine> 521 <nationalNumberPattern>3\d{6}</nationalNumberPattern> 522 <possibleLengths national="7"/> 523 <exampleNumber>3123456</exampleNumber> 524 </fixedLine> 525 </territory> 526 527 <!-- United Kingdom --> 528 <territory id="GB" countryCode="44" internationalPrefix="00" 529 nationalPrefix="0" nationalPrefixFormattingRule="($NP$FG)" 530 mobileNumberPortableRegion="true"> 531 <availableFormats> 532 <numberFormat pattern="(\d{2})(\d{4})(\d{4})"> 533 <leadingDigits>[1-59]|[78]0</leadingDigits> 534 <format>$1 $2 $3</format> 535 </numberFormat> 536 <numberFormat pattern="(\d)(\d{3})(\d{3})(\d{3})"> 537 <leadingDigits>6</leadingDigits> 538 <format>$1 $2 $3 $4</format> 539 </numberFormat> 540 <numberFormat pattern="(\d{4})(\d{3})(\d{3})"> 541 <leadingDigits>7[1-57-9]</leadingDigits> 542 <format>$1 $2 $3</format> 543 </numberFormat> 544 <numberFormat pattern="(\d{3})(\d{3})(\d{4})"> 545 <leadingDigits>8[47]</leadingDigits> 546 <format>$1 $2 $3</format> 547 </numberFormat> 548 </availableFormats> 549 <generalDesc> 550 <nationalNumberPattern>\d{10}</nationalNumberPattern> 551 </generalDesc> 552 <fixedLine> 553 <nationalNumberPattern>[1-6]\d{9}</nationalNumberPattern> 554 <possibleLengths national="9,10" localOnly="6,7,8"/> 555 <exampleNumber>3123456789</exampleNumber> 556 </fixedLine> 557 <mobile> 558 <nationalNumberPattern>7[1-57-9]\d{8}</nationalNumberPattern> 559 <possibleLengths national="10"/> 560 <exampleNumber>7123456789</exampleNumber> 561 </mobile> 562 <pager> 563 <nationalNumberPattern>76\d{8}</nationalNumberPattern> 564 <possibleLengths national="10"/> 565 <exampleNumber>7623456789</exampleNumber> 566 </pager> 567 <tollFree> 568 <nationalNumberPattern>80\d{8}</nationalNumberPattern> 569 <possibleLengths national="10"/> 570 <exampleNumber>8023456789</exampleNumber> 571 </tollFree> 572 <premiumRate> 573 <nationalNumberPattern>9[018]\d{8}</nationalNumberPattern> 574 <possibleLengths national="10"/> 575 <exampleNumber>9023456789</exampleNumber> 576 </premiumRate> 577 <sharedCost> 578 <nationalNumberPattern>8(?:4[3-5]|7[0-2])\d{7}</nationalNumberPattern> 579 <possibleLengths national="10"/> 580 <exampleNumber>8433456789</exampleNumber> 581 </sharedCost> 582 <voip> 583 <nationalNumberPattern>56\d{8}</nationalNumberPattern> 584 <possibleLengths national="10"/> 585 <exampleNumber>5633456789</exampleNumber> 586 </voip> 587 <personalNumber> 588 <nationalNumberPattern>70\d{8}</nationalNumberPattern> 589 <possibleLengths national="10"/> 590 <exampleNumber>7033456789</exampleNumber> 591 </personalNumber> 592 </territory> 593 594 <!-- Guernsey --> 595 <!-- This country is used to test ShortNumberInfo, so at least the country calling code must be 596 recognised by the library, and it must be the same as that of the United Kingdom. --> 597 <territory id="GG" countryCode="44" internationalPrefix="00"> 598 <generalDesc> 599 <nationalNumberPattern>\d{6,10}</nationalNumberPattern> 600 </generalDesc> 601 <fixedLine> 602 <nationalNumberPattern>\d{6,10}</nationalNumberPattern> 603 <possibleLengths national="10" localOnly="6"/> 604 <exampleNumber>7033456789</exampleNumber> 605 </fixedLine> 606 </territory> 607 608 <!-- Italy --> 609 <!-- http://en.wikipedia.org/wiki/%2B39 --> 610 <territory id="IT" countryCode="39" internationalPrefix="00"> 611 <availableFormats> 612 <numberFormat pattern="(\d{2})(\d{4})(\d{4})"> 613 <leadingDigits>0[26]</leadingDigits> 614 <format>$1 $2 $3</format> 615 </numberFormat> 616 <numberFormat pattern="(\d{3})(\d{4})(\d{3,4})"> 617 <leadingDigits>0[13-57-9]</leadingDigits> 618 <format>$1 $2 $3</format> 619 </numberFormat> 620 <numberFormat pattern="(\d{3})(\d{3})(\d{3,4})"> 621 <leadingDigits>3</leadingDigits> 622 <format>$1 $2 $3</format> 623 </numberFormat> 624 <numberFormat pattern="(\d{3})(\d{3,6})"> 625 <leadingDigits>8</leadingDigits> 626 <format>$1 $2</format> 627 </numberFormat> 628 </availableFormats> 629 <generalDesc> 630 <nationalNumberPattern>[0389]\d{5,10}</nationalNumberPattern> 631 </generalDesc> 632 <fixedLine> 633 <nationalNumberPattern>0\d{9,10}</nationalNumberPattern> 634 <possibleLengths national="10,11"/> 635 <exampleNumber>0123456789</exampleNumber> 636 </fixedLine> 637 <mobile> 638 <nationalNumberPattern>3\d{8,9}</nationalNumberPattern> 639 <possibleLengths national="9,10"/> 640 <exampleNumber>3123456789</exampleNumber> 641 </mobile> 642 <tollFree> 643 <nationalNumberPattern>80(?:0\d{6}|3\d{3})</nationalNumberPattern> 644 <possibleLengths national="6,9"/> 645 <exampleNumber>800123456</exampleNumber> 646 </tollFree> 647 <premiumRate> 648 <nationalNumberPattern>89(?:2\d{3}|9\d{6})</nationalNumberPattern> 649 <possibleLengths national="6,9"/> 650 <exampleNumber>892123</exampleNumber> 651 </premiumRate> 652 </territory> 653 654 <!-- Japan --> 655 <!-- The metadata here is added to unit test AsYouTypeFormatter for JP, which requires switching 656 patterns as digits beyond the third one are entered. As a result, only a few fake 657 formatting rules are added. --> 658 <territory id="JP" countryCode="81" internationalPrefix="010" 659 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"> 660 <availableFormats> 661 <numberFormat pattern="(\d{2})(\d{4})(\d{4})"> 662 <leadingDigits>[57-9]0</leadingDigits> 663 <format>$1 $2 $3</format> 664 </numberFormat> 665 <numberFormat pattern="(\d{2})(\d{2})(\d{3})(\d{4})"> 666 <leadingDigits>[57-9]0</leadingDigits> 667 <format>$1 $2 $3 $4</format> 668 </numberFormat> 669 <numberFormat pattern="(\d{2})(\d{3})(\d{4})"> 670 <leadingDigits>111|222|333</leadingDigits> 671 <leadingDigits>(?:111|222|333)1</leadingDigits> 672 <leadingDigits>(?:111|222|333)11</leadingDigits> 673 <format>$1 $2 $3</format> 674 </numberFormat> 675 <numberFormat pattern="(\d{4})(\d)(\d{4})"> 676 <leadingDigits>222|333</leadingDigits> 677 <leadingDigits>2221|3332</leadingDigits> 678 <leadingDigits>22212|3332</leadingDigits> 679 <leadingDigits>222120|3332</leadingDigits> 680 <format>$1 $2 $3</format> 681 </numberFormat> 682 <numberFormat pattern="(\d{3})(\d{2})(\d{4})"> 683 <leadingDigits>[23]</leadingDigits> 684 <format>$1 $2 $3</format> 685 </numberFormat> 686 <numberFormat pattern="(\d{3})(\d{4})"> 687 <leadingDigits>077</leadingDigits> 688 <format>$1-$2</format> 689 </numberFormat> 690 <!-- The following numberFormat is added to test that the format containing the star sign is 691 not used by the AYTF. --> 692 <numberFormat nationalPrefixFormattingRule="$FG" pattern="(\d{4})"> 693 <leadingDigits>[23]</leadingDigits> 694 <format>*$1</format> 695 </numberFormat> 696 </availableFormats> 697 <noInternationalDialling> 698 <nationalNumberPattern>[23]\d{3}</nationalNumberPattern> 699 <possibleLengths national="4"/> 700 <exampleNumber>2123</exampleNumber> 701 </noInternationalDialling> 702 <generalDesc> 703 <nationalNumberPattern>07\d{5}|[1-357-9]\d{3,10}</nationalNumberPattern> 704 </generalDesc> 705 <fixedLine> 706 <nationalNumberPattern>07\d{5}|[1-357-9]\d{3,10}</nationalNumberPattern> 707 <possibleLengths national="[4-11]"/> 708 <exampleNumber>0712345</exampleNumber> 709 </fixedLine> 710 <tollFree> 711 <nationalNumberPattern>0777[01]\d{2}</nationalNumberPattern> 712 <possibleLengths national="7"/> 713 <exampleNumber>0777012</exampleNumber> 714 </tollFree> 715 </territory> 716 717 <!-- Korea (Rep. of) --> 718 <!-- http://www.itu.int/oth/T0202000072/en --> 719 <!-- http://en.wikipedia.org/wiki/%2B82 --> 720 <!-- http://www.kcc.go.kr/user.do?mode=view&page=P02030300&dc=K02030300&boardId=1074&boardSeq=2349 --> 721 <!-- http://www.kcc.go.kr/user.do?mode=view&page=P02030300&dc=K02030300&boardId=1074&boardSeq=2240 --> 722 <!-- http://www.telecentro.co.kr/sub/index.php?job=detail&ebcf_id=faq&page=1&mid=0503&eb_seq=36 --> 723 <!-- Exceptions : 724 internationalPrefix 725 0031, 0033, 0071, 0073 - Special services of KT and DACOM, ignorable 726 nationalPrefix 727 1[4-6]XX-YYYY - Country-wide common number services, display as it is without hyphens --> 728 <territory id="KR" countryCode="82" internationalPrefix="00(?:[124-68]|[37]\d{2})" 729 nationalPrefix="0" nationalPrefixForParsing="0(8[1-46-8]|85\d{2})?" 730 nationalPrefixFormattingRule="$NP$FG"> 731 <availableFormats> 732 <numberFormat pattern="(\d{2})(\d{4})(\d{4})"> 733 <leadingDigits>1(?:0|1[19]|[69]9|5[458])|[57]0</leadingDigits> 734 <leadingDigits>1(?:0|1[19]|[69]9|5(?:44|59|8))|[57]0</leadingDigits> 735 <format>$1-$2-$3</format> 736 </numberFormat> 737 <numberFormat pattern="(\d{2})(\d{3})(\d{4})"> 738 <leadingDigits>1(?:[169][2-8]|[78]|5[1-4])|[68]0|[3-6][1-9][2-9]</leadingDigits> 739 <leadingDigits>1(?:[169][2-8]|[78]|5(?:[1-3]|4[56]))|[68]0|[3-6][1-9][2-9]</leadingDigits> 740 <format>$1-$2-$3</format> 741 </numberFormat> 742 <numberFormat pattern="(\d{3})(\d)(\d{4})"> 743 <leadingDigits>131</leadingDigits> 744 <leadingDigits>1312</leadingDigits> 745 <format>$1-$2-$3</format> 746 </numberFormat> 747 <numberFormat pattern="(\d{3})(\d{2})(\d{4})"> 748 <leadingDigits>131</leadingDigits> 749 <leadingDigits>131[13-9]</leadingDigits> 750 <format>$1-$2-$3</format> 751 </numberFormat> 752 <numberFormat pattern="(\d{3})(\d{3})(\d{4})"> 753 <leadingDigits>13[2-9]</leadingDigits> 754 <format>$1-$2-$3</format> 755 </numberFormat> 756 <numberFormat pattern="(\d{2})(\d{2})(\d{3})(\d{4})"> 757 <leadingDigits>30</leadingDigits> 758 <format>$1-$2-$3-$4</format> 759 </numberFormat> 760 <numberFormat pattern="(\d)(\d{4})(\d{4})"> 761 <leadingDigits>2(?:[26]|3[0-467])</leadingDigits> 762 <leadingDigits>2(?:[26]|3(?:01|1[45]|2[17-9]|39|4|6[67]|7[078]))</leadingDigits> 763 <format>$1-$2-$3</format> 764 </numberFormat> 765 <numberFormat pattern="(\d)(\d{3})(\d{4})"> 766 <leadingDigits>2(?:3[0-35-9]|[457-9])</leadingDigits> 767 <leadingDigits>2(?:3(?:0[02-9]|1[0-36-9]|2[02-6]|3[0-8]|6[0-589]|7[1-69]|[589])|[457-9])</leadingDigits> 768 <format>$1-$2-$3</format> 769 </numberFormat> 770 <numberFormat pattern="(\d)(\d{3})"> 771 <leadingDigits>21[0-46-9]</leadingDigits> 772 <leadingDigits>21(?:[0-247-9]|3[124]|6[1269])</leadingDigits> 773 <format>$1-$2</format> 774 </numberFormat> 775 <numberFormat pattern="(\d)(\d{4})"> 776 <leadingDigits>21[36]</leadingDigits> 777 <leadingDigits>21(?:3[035-9]|6[03-578])</leadingDigits> 778 <format>$1-$2</format> 779 </numberFormat> 780 <numberFormat pattern="(\d{2})(\d{3})"> 781 <leadingDigits>[3-6][1-9]1</leadingDigits> 782 <leadingDigits>[3-6][1-9]1(?:[0-46-9])</leadingDigits> 783 <leadingDigits>[3-6][1-9]1(?:[0-247-9]|3[124]|6[1269])</leadingDigits> 784 <format>$1-$2</format> 785 </numberFormat> 786 <numberFormat pattern="(\d{2})(\d{4})"> 787 <leadingDigits>[3-6][1-9]1</leadingDigits> 788 <leadingDigits>[3-6][1-9]1[36]</leadingDigits> 789 <leadingDigits>[3-6][1-9]1(?:3[035-9]|6[03-578])</leadingDigits> 790 <format>$1-$2</format> 791 </numberFormat> 792 </availableFormats> 793 <generalDesc> 794 <nationalNumberPattern>[1-7]\d{3,9}|8\d{8}</nationalNumberPattern> 795 </generalDesc> 796 <fixedLine> 797 <nationalNumberPattern>(?:2|[34][1-3]|5[1-5]|6[1-4])(?:1\d{2,3}|[2-9]\d{6,7})</nationalNumberPattern> 798 <possibleLengths national="[4-10]"/> 799 <exampleNumber>22123456</exampleNumber> 800 </fixedLine> 801 <mobile> 802 <nationalNumberPattern>1[0-25-9]\d{7,8}</nationalNumberPattern> 803 <possibleLengths national="9,10"/> 804 <exampleNumber>1023456789</exampleNumber> 805 </mobile> 806 <tollFree> 807 <nationalNumberPattern>80\d{7}</nationalNumberPattern> 808 <possibleLengths national="9"/> 809 <exampleNumber>801234567</exampleNumber> 810 </tollFree> 811 <premiumRate> 812 <nationalNumberPattern>60[2-9]\d{6}</nationalNumberPattern> 813 <possibleLengths national="9"/> 814 <exampleNumber>602345678</exampleNumber> 815 </premiumRate> 816 <personalNumber> 817 <nationalNumberPattern>50\d{8}</nationalNumberPattern> 818 <possibleLengths national="10"/> 819 <exampleNumber>5012345678</exampleNumber> 820 </personalNumber> 821 <voip> 822 <nationalNumberPattern>70\d{8}</nationalNumberPattern> 823 <possibleLengths national="10"/> 824 <exampleNumber>7012345678</exampleNumber> 825 </voip> 826 </territory> 827 828 <!-- Mexico --> 829 <territory id="MX" countryCode="52" internationalPrefix="00" 830 nationalPrefix="01" nationalPrefixForParsing="01|04[45](\d{10})" 831 nationalPrefixTransformRule="1$1" nationalPrefixFormattingRule="$NP $FG" 832 nationalPrefixOptionalWhenFormatting="true"> 833 <availableFormats> 834 <numberFormat pattern="(\d{3})(\d{3})(\d{4})"> 835 <leadingDigits>[89]00</leadingDigits> 836 <format>$1 $2 $3</format> 837 </numberFormat> 838 <!-- This formatting pattern is added to test that the AYTF should return unformatted 839 results when the first group is dropped in the output. --> 840 <numberFormat pattern="(\d{3})(\d{2})(\d{5})"> 841 <leadingDigits>901</leadingDigits> 842 <format>$2 $3</format> 843 <intlFormat>$2 $3</intlFormat> 844 </numberFormat> 845 <numberFormat pattern="(\d{2})(\d{4})(\d{4})"> 846 <leadingDigits>33|55|81</leadingDigits> 847 <format>$1 $2 $3</format> 848 </numberFormat> 849 <numberFormat pattern="(\d{3})(\d{3})(\d{4})"> 850 <leadingDigits>[2467]|3[0-24-9]|5[0-46-9]|8[2-9]|9[1-9]</leadingDigits> 851 <format>$1 $2 $3</format> 852 </numberFormat> 853 <numberFormat nationalPrefixFormattingRule="$FG" pattern="(\d)(\d{2})(\d{4})(\d{4})"> 854 <leadingDigits>1(?:33|55|81)</leadingDigits> 855 <format>045 $2 $3 $4</format> 856 <intlFormat>$1 $2 $3 $4</intlFormat> 857 </numberFormat> 858 <numberFormat nationalPrefixFormattingRule="$FG" pattern="(\d)(\d{3})(\d{3})(\d{4})"> 859 <leadingDigits>1(?:[124579]|3[0-24-9]|5[0-46-9]|8[02-9])</leadingDigits> 860 <format>045 $2 $3 $4</format> 861 <intlFormat>$1 $2 $3 $4</intlFormat> 862 </numberFormat> 863 </availableFormats> 864 <generalDesc> 865 <nationalNumberPattern>[1-9]\d{9,10}</nationalNumberPattern> 866 </generalDesc> 867 <fixedLine> 868 <nationalNumberPattern>[2-9]\d{9}</nationalNumberPattern> 869 <possibleLengths national="10" localOnly="7"/> 870 <exampleNumber>2123456789</exampleNumber> 871 </fixedLine> 872 <mobile> 873 <nationalNumberPattern>1\d{10}</nationalNumberPattern> 874 <possibleLengths national="11"/> 875 <exampleNumber>11234567890</exampleNumber> 876 </mobile> 877 <tollFree> 878 <nationalNumberPattern>800\d{7}</nationalNumberPattern> 879 <possibleLengths national="10"/> 880 <exampleNumber>8001234567</exampleNumber> 881 </tollFree> 882 <premiumRate> 883 <nationalNumberPattern>900\d{7}</nationalNumberPattern> 884 <possibleLengths national="10"/> 885 <exampleNumber>9001234567</exampleNumber> 886 </premiumRate> 887 </territory> 888 889 <!-- New Zealand --> 890 <territory id="NZ" countryCode="64" internationalPrefix="00" 891 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"> 892 <availableFormats> 893 <numberFormat pattern="(\d)(\d{3})(\d{4})"> 894 <leadingDigits>24|[34679]</leadingDigits> 895 <format>$1-$2 $3</format> 896 </numberFormat> 897 <numberFormat pattern="(\d)(\d{3})(\d{3,5})"> 898 <leadingDigits>2[179]</leadingDigits> 899 <format>$1-$2 $3</format> 900 </numberFormat> 901 <numberFormat pattern="(\d{3})(\d{3})(\d{3,4})"> 902 <leadingDigits>[89]</leadingDigits> 903 <format>$1 $2 $3</format> 904 </numberFormat> 905 </availableFormats> 906 <generalDesc> 907 <nationalNumberPattern> 908 [289]\d{7,9}| 909 [3-7]\d{7} 910 </nationalNumberPattern> 911 </generalDesc> 912 <fixedLine> 913 <nationalNumberPattern>24099\d{3}|(?:3[2-79]|[479][2-689]|6[235-9])\d{6}</nationalNumberPattern> 914 <possibleLengths national="7,8"/> 915 <exampleNumber>24099123</exampleNumber> 916 </fixedLine> 917 <mobile> 918 <nationalNumberPattern>2(?:[027]\d{7}|9\d{6,7}|1(?:0\d{5,7}|[12]\d{5,6}|[3-9]\d{5})|4[1-9]\d{6}|8\d{7,8})</nationalNumberPattern> 919 <possibleLengths national="[8-10]"/> 920 <exampleNumber>201234567</exampleNumber> 921 </mobile> 922 <tollFree> 923 <nationalNumberPattern>800\d{6,7}</nationalNumberPattern> 924 <possibleLengths national="9,10"/> 925 <exampleNumber>8001234567</exampleNumber> 926 </tollFree> 927 <premiumRate> 928 <nationalNumberPattern>900\d{6,7}</nationalNumberPattern> 929 <possibleLengths national="9,10"/> 930 <exampleNumber>9001234567</exampleNumber> 931 </premiumRate> 932 </territory> 933 934 <!-- Poland --> 935 <!-- http://en.wikipedia.org/wiki/%2B48 --> 936 <territory id="PL" countryCode="48" internationalPrefix="00" 937 nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"> 938 <availableFormats> 939 <numberFormat pattern="(\d{2})(\d{3})(\d{2})(\d{2})"> 940 <format>$1 $2 $3 $4</format> 941 </numberFormat> 942 </availableFormats> 943 <generalDesc> 944 <nationalNumberPattern>[1-9]\d{8}</nationalNumberPattern> 945 </generalDesc> 946 <mobile> 947 <nationalNumberPattern>(?:5[01]|6[069]|7[289]|88)\d{7}</nationalNumberPattern> 948 <possibleLengths national="9"/> 949 <exampleNumber>501234567</exampleNumber> 950 </mobile> 951 <tollFree> 952 <nationalNumberPattern>800\d{6}</nationalNumberPattern> 953 <possibleLengths national="9"/> 954 <exampleNumber>800123456</exampleNumber> 955 </tollFree> 956 <premiumRate> 957 <nationalNumberPattern>70\d{7}</nationalNumberPattern> 958 <possibleLengths national="9"/> 959 <exampleNumber>701234567</exampleNumber> 960 </premiumRate> 961 </territory> 962 963 <!-- Réunion (French Departments and Territories in the Indian Ocean) --> 964 <!-- Note this shares the same country code as La Mayotte and French 965 Southern Territories, and the formatting patterns here are used by all of 966 them. This is present to test leadingDigits. --> 967 <territory id="RE" countryCode="262" leadingDigits="262|6(?:9[23]|47)|8" 968 internationalPrefix="00" nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"> 969 <availableFormats> 970 <numberFormat pattern="(\d{3})(\d{2})(\d{2})(\d{2})"> 971 <format>$1 $2 $3 $4</format> 972 </numberFormat> 973 </availableFormats> 974 <generalDesc> 975 <nationalNumberPattern>[268]\d{8}</nationalNumberPattern> 976 </generalDesc> 977 <fixedLine> 978 <!-- 0876 numbers are mentioned in the plan, but none in use can be 979 found. --> 980 <nationalNumberPattern>262\d{6}</nationalNumberPattern> 981 <possibleLengths national="9"/> 982 <exampleNumber>262161234</exampleNumber> 983 </fixedLine> 984 <mobile> 985 <nationalNumberPattern>6(?:9[23]|47)\d{6}</nationalNumberPattern> 986 <possibleLengths national="9"/> 987 <exampleNumber>692123456</exampleNumber> 988 </mobile> 989 <!-- 08* Numbers in Réunion are the same as those valid in France. --> 990 <tollFree> 991 <nationalNumberPattern>80\d{7}</nationalNumberPattern> 992 <possibleLengths national="9"/> 993 <exampleNumber>801234567</exampleNumber> 994 </tollFree> 995 <premiumRate> 996 <nationalNumberPattern>8(?:1[01]|2[0156]|84|9[0-37-9])\d{6}</nationalNumberPattern> 997 <possibleLengths national="9"/> 998 <exampleNumber>810123456</exampleNumber> 999 </premiumRate> 1000 </territory> 1001 1002 <!-- Russian Federation --> 1003 <territory id="RU" countryCode="7" internationalPrefix="810" nationalPrefix="8" 1004 nationalPrefixFormattingRule="$NP ($FG)" nationalPrefixOptionalWhenFormatting="true"> 1005 <generalDesc> 1006 <nationalNumberPattern>[347-9]\d{9}</nationalNumberPattern> 1007 </generalDesc> 1008 <fixedLine> 1009 <possibleLengths national="10"/> 1010 <exampleNumber>3011234567</exampleNumber> 1011 <nationalNumberPattern>[348]\d{9}</nationalNumberPattern> 1012 </fixedLine> 1013 <mobile> 1014 <possibleLengths national="10"/> 1015 <exampleNumber>9123456789</exampleNumber> 1016 <nationalNumberPattern>9\d{9}</nationalNumberPattern> 1017 </mobile> 1018 </territory> 1019 1020 <!-- Sweden --> 1021 <territory id="SE" countryCode="46" internationalPrefix="00"> 1022 <generalDesc> 1023 <nationalNumberPattern>\d{9}</nationalNumberPattern> 1024 </generalDesc> 1025 <fixedLine> 1026 <possibleLengths national="9"/> 1027 <exampleNumber>123456789</exampleNumber> 1028 </fixedLine> 1029 </territory> 1030 1031 <!-- Singapore --> 1032 <!-- http://www.ida.gov.sg/policies%20and%20regulation/20060508120124.aspx --> 1033 <!-- For testing the AYTF with long NDDs, "777777" is added as a possible national prefix. --> 1034 <territory id="SG" countryCode="65" internationalPrefix="0[0-3][0-9]" 1035 nationalPrefixForParsing="777777"> 1036 <availableFormats> 1037 <numberFormat pattern="(\d{4})(\d{4})"> 1038 <leadingDigits>[369]|8[1-9]</leadingDigits> 1039 <format>$1 $2</format> 1040 </numberFormat> 1041 <numberFormat pattern="(\d{4})(\d{3})(\d{4})"> 1042 <leadingDigits>1[89]</leadingDigits> 1043 <format>$1 $2 $3</format> 1044 </numberFormat> 1045 <numberFormat pattern="(\d{3})(\d{3})(\d{4})"> 1046 <leadingDigits>800</leadingDigits> 1047 <format>$1 $2 $3</format> 1048 </numberFormat> 1049 </availableFormats> 1050 <generalDesc> 1051 <nationalNumberPattern>[13689]\d{7,10}</nationalNumberPattern> 1052 </generalDesc> 1053 <fixedLine> 1054 <nationalNumberPattern>[36]\d{7}</nationalNumberPattern> 1055 <possibleLengths national="8"/> 1056 <exampleNumber>31234567</exampleNumber> 1057 </fixedLine> 1058 <mobile> 1059 <nationalNumberPattern>[89]\d{7}</nationalNumberPattern> 1060 <possibleLengths national="8"/> 1061 <exampleNumber>81234567</exampleNumber> 1062 </mobile> 1063 <tollFree> 1064 <nationalNumberPattern>1?800\d{7}</nationalNumberPattern> 1065 <possibleLengths national="10,11"/> 1066 <exampleNumber>8001234567</exampleNumber> 1067 </tollFree> 1068 <premiumRate> 1069 <nationalNumberPattern>1900\d{7}</nationalNumberPattern> 1070 <possibleLengths national="11"/> 1071 <exampleNumber>19001234567</exampleNumber> 1072 </premiumRate> 1073 </territory> 1074 1075 <!-- Tristan da Cunha --> 1076 <!-- Added this country, which in real life has no mobile numbers, to test 1077 isPossibleNumberForType for the case where the fixed-line and mobile lengths are different, 1078 there is a hole in the middle, and the type FIXED_LINE_OR_MOBILE is passed in. Also added 1079 tollFree to test that this doesn't influence things. --> 1080 <territory id="TA" countryCode="290" internationalPrefix="00"> 1081 <generalDesc> 1082 <nationalNumberPattern>8\d{3,7}</nationalNumberPattern> 1083 </generalDesc> 1084 <fixedLine> 1085 <nationalNumberPattern>8\d{5}</nationalNumberPattern> 1086 <possibleLengths national="6"/> 1087 <exampleNumber>812345</exampleNumber> 1088 </fixedLine> 1089 <mobile> 1090 <nationalNumberPattern>8\d{3}</nationalNumberPattern> 1091 <possibleLengths national="4"/> 1092 <exampleNumber>8123</exampleNumber> 1093 </mobile> 1094 <tollFree> 1095 <nationalNumberPattern>8\d{7}</nationalNumberPattern> 1096 <possibleLengths national="8"/> 1097 <exampleNumber>81234567</exampleNumber> 1098 </tollFree> 1099 </territory> 1100 1101 <!-- United States --> 1102 <!-- http://www.nanpa.com/reports/reports_npa.html --> 1103 <!-- For testing purposes, numbers starting with 24 are not considered US numbers.--> 1104 <territory id="US" countryCode="1" internationalPrefix="011" 1105 preferredExtnPrefix=" extn. " nationalPrefix="1" 1106 mainCountryForCode="true" mobileNumberPortableRegion="true"> 1107 <availableFormats> 1108 <numberFormat pattern="(\d{3})(\d{4})"> 1109 <format>$1 $2</format> 1110 <intlFormat>NA</intlFormat> 1111 </numberFormat> 1112 <numberFormat pattern="(\d{3})(\d{3})(\d{4})" nationalPrefixOptionalWhenFormatting="true"> 1113 <format>$1 $2 $3</format> 1114 </numberFormat> 1115 </availableFormats> 1116 <generalDesc> 1117 <!-- Numbers beginning with 7 are excluded for testing purposes only. --> 1118 <nationalNumberPattern>[13-689]\d{9}|2[0-35-9]\d{8}</nationalNumberPattern> 1119 </generalDesc> 1120 <fixedLine> 1121 <nationalNumberPattern>[13-689]\d{9}|2[0-35-9]\d{8}</nationalNumberPattern> 1122 <possibleLengths national="10" localOnly="7"/> 1123 <exampleNumber>1234567890</exampleNumber> 1124 </fixedLine> 1125 <mobile> 1126 <nationalNumberPattern>[13-689]\d{9}|2[0-35-9]\d{8}</nationalNumberPattern> 1127 <possibleLengths national="10" localOnly="7"/> 1128 <exampleNumber>1234567890</exampleNumber> 1129 </mobile> 1130 <noInternationalDialling> 1131 <!-- This range is added for testing purposes only. --> 1132 <nationalNumberPattern>800\d{7}</nationalNumberPattern> 1133 <possibleLengths national="10"/> 1134 <exampleNumber>8004567890</exampleNumber> 1135 </noInternationalDialling> 1136 <tollFree> 1137 <nationalNumberPattern>8(?:00|66|77|88)\d{7}</nationalNumberPattern> 1138 <possibleLengths national="10"/> 1139 <exampleNumber>8004567890</exampleNumber> 1140 </tollFree> 1141 <premiumRate> 1142 <nationalNumberPattern>900\d{7}</nationalNumberPattern> 1143 <possibleLengths national="10"/> 1144 <exampleNumber>9004567890</exampleNumber> 1145 </premiumRate> 1146 </territory> 1147 1148 <!-- Uzbekistan --> 1149 <territory id="UZ" countryCode="998" preferredInternationalPrefix="8~10" 1150 internationalPrefix="810" nationalPrefix="8" nationalPrefixFormattingRule="$NP $FG"> 1151 <availableFormats> 1152 <numberFormat pattern="(\d{2})(\d{3})(\d{2})(\d{2})"> 1153 <leadingDigits>[679]</leadingDigits> 1154 <format>$1 $2 $3 $4</format> 1155 </numberFormat> 1156 </availableFormats> 1157 <generalDesc> 1158 <nationalNumberPattern>[69]\d{8}</nationalNumberPattern> 1159 </generalDesc> 1160 <fixedLine> 1161 <possibleLengths national="9" localOnly="7"/> 1162 <exampleNumber>662345678</exampleNumber> 1163 <nationalNumberPattern>6122\d{5}</nationalNumberPattern> 1164 </fixedLine> 1165 <mobile> 1166 <possibleLengths national="9"/> 1167 <exampleNumber>912345678</exampleNumber> 1168 <nationalNumberPattern>9[0-57-9]\d{7}</nationalNumberPattern> 1169 </mobile> 1170 </territory> 1171 1172 <!-- Mayotte --> 1173 <territory id="YT" countryCode="262" leadingDigits="269|639" 1174 internationalPrefix="00" nationalPrefix="0" nationalPrefixFormattingRule="$NP$FG"> 1175 <!-- Formatting as per La Réunion. --> 1176 <generalDesc> 1177 <nationalNumberPattern>[268]\d{8}</nationalNumberPattern> 1178 </generalDesc> 1179 <fixedLine> 1180 <nationalNumberPattern>2696[0-4]\d{4}</nationalNumberPattern> 1181 <possibleLengths national="9"/> 1182 <exampleNumber>269601234</exampleNumber> 1183 </fixedLine> 1184 <mobile> 1185 <nationalNumberPattern>639\d{6}</nationalNumberPattern> 1186 <possibleLengths national="9"/> 1187 <exampleNumber>639123456</exampleNumber> 1188 </mobile> 1189 <!-- Same as in France. --> 1190 <tollFree> 1191 <nationalNumberPattern>80\d{7}</nationalNumberPattern> 1192 <possibleLengths national="9"/> 1193 <exampleNumber>801234567</exampleNumber> 1194 </tollFree> 1195 </territory> 1196 1197 <!-- International Toll Free numbers --> 1198 <territory id="001" countryCode="800"> 1199 <availableFormats> 1200 <numberFormat pattern="(\d{4})(\d{4})"> 1201 <format>$1 $2</format> 1202 </numberFormat> 1203 </availableFormats> 1204 <generalDesc> 1205 <nationalNumberPattern>\d{8}</nationalNumberPattern> 1206 </generalDesc> 1207 <tollFree> 1208 <nationalNumberPattern>\d{8}</nationalNumberPattern> 1209 <possibleLengths national="8"/> 1210 <exampleNumber>12345678</exampleNumber> 1211 </tollFree> 1212 </territory> 1213 1214 <!-- A non-geographical entity which we declare as having no fixed-line, but some mobile 1215 numbers. --> 1216 <territory id="001" countryCode="882"> 1217 <availableFormats> 1218 <numberFormat pattern="(\d)(\d{4})(\d{4})"> 1219 <format>$1 $2 $3</format> 1220 </numberFormat> 1221 </availableFormats> 1222 <generalDesc> 1223 <nationalNumberPattern>\d{9}</nationalNumberPattern> 1224 </generalDesc> 1225 <mobile> 1226 <nationalNumberPattern>\d{9}</nationalNumberPattern> 1227 <possibleLengths national="9"/> 1228 <exampleNumber>123456789</exampleNumber> 1229 </mobile> 1230 </territory> 1231 1232 <!-- Universal International Preium Rate Number --> 1233 <territory id="001" countryCode="979"> 1234 <availableFormats> 1235 <numberFormat pattern="(\d)(\d{4})(\d{4})"> 1236 <format>$1 $2 $3</format> 1237 </numberFormat> 1238 </availableFormats> 1239 <generalDesc> 1240 <nationalNumberPattern>\d{9}</nationalNumberPattern> 1241 </generalDesc> 1242 <premiumRate> 1243 <nationalNumberPattern>\d{9}</nationalNumberPattern> 1244 <possibleLengths national="9"/> 1245 <exampleNumber>123456789</exampleNumber> 1246 </premiumRate> 1247 </territory> 1248 </territories> 1249</phoneNumberMetadata> 1250