% phonenumbers package: phonenumbers-US.def
% Module for North American telephone numbers
% Author: K. Wehr
% Version: 2.5
% Date: 2022-07-01
\clist_const:Nn \c_phone_US_ortsvorwahlen_clist {201,
202,
203,
204,
205,
206,
207,
208,
209,
210,
212,
213,
214,
215,
216,
217,
218,
219,
220,
223,
224,
225,
226,
227,
228,
229,
231,
234,
235,
236,
239,
240,
242,
246,
248,
249,
250,
251,
252,
253,
254,
256,
260,
262,
263,
264,
267,
268,
269,
270,
272,
274,
276,
279,
281,
283,
284,
289,
301,
302,
303,
304,
305,
306,
307,
308,
309,
310,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
323,
324,
325,
326,
327,
329,
330,
331,
332,
334,
336,
337,
339,
340,
341,
343,
345,
346,
347,
350,
351,
352,
354,
360,
361,
363,
364,
365,
367,
368,
380,
382,
385,
386,
401,
402,
403,
404,
405,
406,
407,
408,
409,
410,
412,
413,
414,
415,
416,
417,
418,
419,
423,
424,
425,
428,
430,
431,
432,
434,
435,
437,
438,
440,
441,
442,
443,
445,
447,
448,
450,
458,
463,
464,
468,
469,
470,
472,
473,
474,
475,
478,
479,
480,
484,
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
512,
513,
514,
515,
516,
517,
518,
519,
520,
530,
531,
534,
539,
540,
541,
548,
551,
557,
559,
561,
562,
563,
564,
567,
570,
571,
572,
573,
574,
575,
579,
580,
581,
582,
584,
585,
586,
587,
601,
602,
603,
604,
605,
606,
607,
608,
609,
610,
612,
613,
614,
615,
616,
617,
618,
619,
620,
623,
626,
628,
629,
630,
631,
636,
639,
640,
641,
645,
646,
647,
649,
650,
651,
656,
657,
658,
659,
660,
661,
662,
664,
667,
669,
670,
671,
672,
678,
680,
681,
682,
683,
684,
689,
701,
702,
703,
704,
705,
706,
707,
708,
709,
712,
713,
714,
715,
716,
717,
718,
719,
720,
721,
724,
725,
726,
727,
728,
730,
731,
732,
734,
737,
740,
742,
743,
747,
753,
754,
757,
758,
760,
762,
763,
765,
767,
769,
770,
771,
772,
773,
774,
775,
778,
779,
780,
781,
782,
784,
785,
786,
787,
801,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
815,
816,
817,
818,
819,
820,
825,
826,
828,
829,
830,
831,
832,
835,
838,
839,
840,
843,
845,
847,
848,
849,
850,
854,
856,
857,
858,
859,
860,
861,
862,
863,
864,
865,
867,
868,
869,
870,
872,
873,
876,
878,
901,
902,
903,
904,
905,
906,
907,
908,
909,
910,
912,
913,
914,
915,
916,
917,
918,
919,
920,
925,
928,
929,
930,
931,
934,
936,
937,
938,
939,
940,
941,
943,
945,
947,
948,
949,
951,
952,
954,
956,
959,
970,
971,
972,
973,
975,
978,
979,
980,
983,
984,
985,
986,
989}
\clist_const:Nn \c_phone_US_obligatorische_ortsvorwahlen_clist {201,
202,
203,
204,
205,
206,
208,
209,
210,
212,
213,
214,
215,
217,
218,
219,
220,
223,
224,
226,
227,
234,
235,
236,
240,
248,
249,
250,
251,
253,
254,
256,
262,
267,
270,
272,
274,
276,
279,
281,
283,
289,
301,
302,
303,
304,
305,
309,
310,
312,
314,
315,
317,
319,
321,
323,
324,
326,
327,
329,
330,
331,
332,
336,
337,
339,
341,
343,
346,
347,
350,
351,
352,
354,
360,
361,
363,
364,
365,
367,
368,
380,
382,
385,
402,
403,
404,
405,
406,
407,
408,
409,
410,
412,
414,
415,
416,
417,
418,
419,
424,
425,
428,
430,
431,
437,
438,
440,
442,
443,
445,
447,
448,
450,
458,
463,
464,
468,
469,
470,
472,
474,
475,
478,
480,
484,
501,
503,
504,
505,
508,
509,
510,
512,
513,
514,
515,
516,
518,
519,
520,
530,
531,
534,
539,
540,
541,
548,
551,
557,
561,
562,
564,
567,
570,
571,
572,
574,
575,
579,
581,
582,
584,
587,
601,
603,
604,
605,
607,
608,
609,
610,
613,
614,
615,
616,
617,
618,
619,
620,
626,
628,
629,
630,
631,
639,
640,
645,
646,
647,
650,
656,
657,
658,
659,
660,
662,
667,
669,
671,
672,
678,
680,
681,
682,
683,
689,
702,
703,
704,
705,
706,
707,
708,
713,
714,
715,
716,
717,
718,
719,
720,
724,
725,
726,
728,
730,
731,
732,
737,
740,
742,
743,
747,
753,
754,
757,
760,
762,
769,
770,
771,
773,
774,
775,
778,
779,
780,
781,
782,
785,
786,
787,
801,
802,
803,
804,
805,
806,
808,
809,
810,
812,
813,
814,
815,
816,
817,
818,
819,
820,
825,
826,
829,
830,
832,
835,
838,
839,
840,
843,
845,
847,
848,
849,
850,
854,
856,
857,
858,
859,
860,
861,
862,
865,
872,
873,
878,
902,
903,
905,
906,
907,
908,
909,
910,
912,
914,
915,
916,
917,
918,
919,
920,
925,
928,
929,
930,
934,
937,
938,
939,
940,
941,
943,
945,
947,
948,
949,
951,
952,
954,
959,
970,
971,
972,
973,
975,
978,
980,
983,
984,
986,
989}
\clist_const:Nn \c_phone_US_sondervorwahlen_clist {500,
521,
522,
523,
524,
525,
526,
527,
528,
533,
544,
566,
577,
588,
600,
622,
700,
710,
800,
833,
844,
855,
866,
877,
888,
900}
\tl_const:cn {c_phone_US_ortsname_201_tl} {New~Jersey}
\tl_const:cn {c_phone_US_ortsname_202_tl} {Washington,~D.\,C.}
\tl_const:cn {c_phone_US_ortsname_203_tl} {Connecticut}
\tl_const:cn {c_phone_US_ortsname_204_tl} {Manitoba}
\tl_const:cn {c_phone_US_ortsname_205_tl} {Alabama}
\tl_const:cn {c_phone_US_ortsname_206_tl} {Washington}
\tl_const:cn {c_phone_US_ortsname_207_tl} {Maine}
\tl_const:cn {c_phone_US_ortsname_208_tl} {Idaho}
\tl_const:cn {c_phone_US_ortsname_209_tl} {California}
\tl_const:cn {c_phone_US_ortsname_210_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_212_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_213_tl} {California}
\tl_const:cn {c_phone_US_ortsname_214_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_215_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_216_tl} {Ohio}
\tl_const:cn {c_phone_US_ortsname_217_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_218_tl} {Minnesota}
\tl_const:cn {c_phone_US_ortsname_219_tl} {Indiana}
\tl_const:cn {c_phone_US_ortsname_220_tl} {Ohio}
\tl_const:cn {c_phone_US_ortsname_223_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_224_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_225_tl} {Louisiana}
\tl_const:cn {c_phone_US_ortsname_226_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_227_tl} {Maryland}
\tl_const:cn {c_phone_US_ortsname_228_tl} {Mississippi}
\tl_const:cn {c_phone_US_ortsname_229_tl} {Georgia}
\tl_const:cn {c_phone_US_ortsname_231_tl} {Michigan}
\tl_const:cn {c_phone_US_ortsname_234_tl} {Ohio}
\tl_const:cn {c_phone_US_ortsname_235_tl} {Missouri}
\tl_const:cn {c_phone_US_ortsname_236_tl} {British~Columbia}
\tl_const:cn {c_phone_US_ortsname_239_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_240_tl} {Maryland}
\tl_const:cn {c_phone_US_ortsname_242_tl} {Bahamas}
\tl_const:cn {c_phone_US_ortsname_246_tl} {Barbados}
\tl_const:cn {c_phone_US_ortsname_248_tl} {Michigan}
\tl_const:cn {c_phone_US_ortsname_249_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_250_tl} {British~Columbia}
\tl_const:cn {c_phone_US_ortsname_251_tl} {Alabama}
\tl_const:cn {c_phone_US_ortsname_252_tl} {North~Carolina}
\tl_const:cn {c_phone_US_ortsname_253_tl} {Washington}
\tl_const:cn {c_phone_US_ortsname_254_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_256_tl} {Alabama}
\tl_const:cn {c_phone_US_ortsname_260_tl} {Indiana}
\tl_const:cn {c_phone_US_ortsname_262_tl} {Wisconsin}
\tl_const:cn {c_phone_US_ortsname_263_tl} {Quebec}
\tl_const:cn {c_phone_US_ortsname_264_tl} {Anguilla}
\tl_const:cn {c_phone_US_ortsname_267_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_268_tl} {Antigua~and~Barbuda}
\tl_const:cn {c_phone_US_ortsname_269_tl} {Michigan}
\tl_const:cn {c_phone_US_ortsname_270_tl} {Kentucky}
\tl_const:cn {c_phone_US_ortsname_272_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_274_tl} {Wisconsin}
\tl_const:cn {c_phone_US_ortsname_276_tl} {Virginia}
\tl_const:cn {c_phone_US_ortsname_279_tl} {California}
\tl_const:cn {c_phone_US_ortsname_281_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_283_tl} {Ohio}
\tl_const:cn {c_phone_US_ortsname_284_tl} {British~Virgin~Islands}
\tl_const:cn {c_phone_US_ortsname_289_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_301_tl} {Maryland}
\tl_const:cn {c_phone_US_ortsname_302_tl} {Delaware}
\tl_const:cn {c_phone_US_ortsname_303_tl} {Colorado}
\tl_const:cn {c_phone_US_ortsname_304_tl} {West~Virginia}
\tl_const:cn {c_phone_US_ortsname_305_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_306_tl} {Saskatchewan}
\tl_const:cn {c_phone_US_ortsname_307_tl} {Wyoming}
\tl_const:cn {c_phone_US_ortsname_308_tl} {Nebraska}
\tl_const:cn {c_phone_US_ortsname_309_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_310_tl} {California}
\tl_const:cn {c_phone_US_ortsname_312_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_313_tl} {Michigan}
\tl_const:cn {c_phone_US_ortsname_314_tl} {Missouri}
\tl_const:cn {c_phone_US_ortsname_315_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_316_tl} {Kansas}
\tl_const:cn {c_phone_US_ortsname_317_tl} {Indiana}
\tl_const:cn {c_phone_US_ortsname_318_tl} {Louisiana}
\tl_const:cn {c_phone_US_ortsname_319_tl} {Iowa}
\tl_const:cn {c_phone_US_ortsname_320_tl} {Minnesota}
\tl_const:cn {c_phone_US_ortsname_321_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_323_tl} {California}
\tl_const:cn {c_phone_US_ortsname_324_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_325_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_326_tl} {Ohio}
\tl_const:cn {c_phone_US_ortsname_327_tl} {Arkansas}
\tl_const:cn {c_phone_US_ortsname_329_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_330_tl} {Ohio}
\tl_const:cn {c_phone_US_ortsname_331_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_332_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_334_tl} {Alabama}
\tl_const:cn {c_phone_US_ortsname_336_tl} {North~Carolina}
\tl_const:cn {c_phone_US_ortsname_337_tl} {Louisiana}
\tl_const:cn {c_phone_US_ortsname_339_tl} {Massachusetts}
\tl_const:cn {c_phone_US_ortsname_340_tl} {U.\,S.~Virgin~Islands}
\tl_const:cn {c_phone_US_ortsname_341_tl} {California}
\tl_const:cn {c_phone_US_ortsname_343_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_345_tl} {Cayman~Islands}
\tl_const:cn {c_phone_US_ortsname_346_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_347_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_350_tl} {California}
\tl_const:cn {c_phone_US_ortsname_351_tl} {Massachusetts}
\tl_const:cn {c_phone_US_ortsname_352_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_354_tl} {Quebec}
\tl_const:cn {c_phone_US_ortsname_360_tl} {Washington}
\tl_const:cn {c_phone_US_ortsname_361_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_363_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_364_tl} {Kentucky}
\tl_const:cn {c_phone_US_ortsname_365_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_367_tl} {Quebec}
\tl_const:cn {c_phone_US_ortsname_368_tl} {Alberta}
\tl_const:cn {c_phone_US_ortsname_380_tl} {Ohio}
\tl_const:cn {c_phone_US_ortsname_382_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_385_tl} {Utah}
\tl_const:cn {c_phone_US_ortsname_386_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_401_tl} {Rhode~Island}
\tl_const:cn {c_phone_US_ortsname_402_tl} {Nebraska}
\tl_const:cn {c_phone_US_ortsname_403_tl} {Alberta}
\tl_const:cn {c_phone_US_ortsname_404_tl} {Georgia}
\tl_const:cn {c_phone_US_ortsname_405_tl} {Oklahoma}
\tl_const:cn {c_phone_US_ortsname_406_tl} {Montana}
\tl_const:cn {c_phone_US_ortsname_407_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_408_tl} {California}
\tl_const:cn {c_phone_US_ortsname_409_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_410_tl} {Maryland}
\tl_const:cn {c_phone_US_ortsname_412_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_413_tl} {Massachusetts}
\tl_const:cn {c_phone_US_ortsname_414_tl} {Wisconsin}
\tl_const:cn {c_phone_US_ortsname_415_tl} {California}
\tl_const:cn {c_phone_US_ortsname_416_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_417_tl} {Missouri}
\tl_const:cn {c_phone_US_ortsname_418_tl} {Quebec}
\tl_const:cn {c_phone_US_ortsname_419_tl} {Ohio}
\tl_const:cn {c_phone_US_ortsname_423_tl} {Tennessee}
\tl_const:cn {c_phone_US_ortsname_424_tl} {California}
\tl_const:cn {c_phone_US_ortsname_425_tl} {Washington}
\tl_const:cn {c_phone_US_ortsname_428_tl} {New~Brunswick}
\tl_const:cn {c_phone_US_ortsname_430_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_431_tl} {Manitoba}
\tl_const:cn {c_phone_US_ortsname_432_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_434_tl} {Virginia}
\tl_const:cn {c_phone_US_ortsname_435_tl} {Utah}
\tl_const:cn {c_phone_US_ortsname_437_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_438_tl} {Quebec}
\tl_const:cn {c_phone_US_ortsname_440_tl} {Ohio}
\tl_const:cn {c_phone_US_ortsname_441_tl} {Bermuda}
\tl_const:cn {c_phone_US_ortsname_442_tl} {California}
\tl_const:cn {c_phone_US_ortsname_443_tl} {Maryland}
\tl_const:cn {c_phone_US_ortsname_445_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_447_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_448_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_450_tl} {Quebec}
\tl_const:cn {c_phone_US_ortsname_458_tl} {Oregon}
\tl_const:cn {c_phone_US_ortsname_463_tl} {Indiana}
\tl_const:cn {c_phone_US_ortsname_464_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_468_tl} {Quebec}
\tl_const:cn {c_phone_US_ortsname_469_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_470_tl} {Georgia}
\tl_const:cn {c_phone_US_ortsname_472_tl} {North~Carolina}
\tl_const:cn {c_phone_US_ortsname_473_tl} {Grenada}
\tl_const:cn {c_phone_US_ortsname_474_tl} {Saskatchewan}
\tl_const:cn {c_phone_US_ortsname_475_tl} {Connecticut}
\tl_const:cn {c_phone_US_ortsname_478_tl} {Georgia}
\tl_const:cn {c_phone_US_ortsname_479_tl} {Arkansas}
\tl_const:cn {c_phone_US_ortsname_480_tl} {Arizona}
\tl_const:cn {c_phone_US_ortsname_484_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_501_tl} {Arkansas}
\tl_const:cn {c_phone_US_ortsname_502_tl} {Kentucky}
\tl_const:cn {c_phone_US_ortsname_503_tl} {Oregon}
\tl_const:cn {c_phone_US_ortsname_504_tl} {Louisiana}
\tl_const:cn {c_phone_US_ortsname_505_tl} {New~Mexico}
\tl_const:cn {c_phone_US_ortsname_506_tl} {New~Brunswick}
\tl_const:cn {c_phone_US_ortsname_507_tl} {Minnesota}
\tl_const:cn {c_phone_US_ortsname_508_tl} {Massachusetts}
\tl_const:cn {c_phone_US_ortsname_509_tl} {Washington}
\tl_const:cn {c_phone_US_ortsname_510_tl} {California}
\tl_const:cn {c_phone_US_ortsname_512_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_513_tl} {Ohio}
\tl_const:cn {c_phone_US_ortsname_514_tl} {Quebec}
\tl_const:cn {c_phone_US_ortsname_515_tl} {Iowa}
\tl_const:cn {c_phone_US_ortsname_516_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_517_tl} {Michigan}
\tl_const:cn {c_phone_US_ortsname_518_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_519_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_520_tl} {Arizona}
\tl_const:cn {c_phone_US_ortsname_530_tl} {California}
\tl_const:cn {c_phone_US_ortsname_531_tl} {Nebraska}
\tl_const:cn {c_phone_US_ortsname_534_tl} {Wisconsin}
\tl_const:cn {c_phone_US_ortsname_539_tl} {Oklahoma}
\tl_const:cn {c_phone_US_ortsname_540_tl} {Virginia}
\tl_const:cn {c_phone_US_ortsname_541_tl} {Oregon}
\tl_const:cn {c_phone_US_ortsname_548_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_551_tl} {New~Jersey}
\tl_const:cn {c_phone_US_ortsname_557_tl} {Missouri}
\tl_const:cn {c_phone_US_ortsname_559_tl} {California}
\tl_const:cn {c_phone_US_ortsname_561_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_562_tl} {California}
\tl_const:cn {c_phone_US_ortsname_563_tl} {Iowa}
\tl_const:cn {c_phone_US_ortsname_564_tl} {Washington}
\tl_const:cn {c_phone_US_ortsname_567_tl} {Ohio}
\tl_const:cn {c_phone_US_ortsname_570_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_571_tl} {Virginia}
\tl_const:cn {c_phone_US_ortsname_572_tl} {Oklahoma}
\tl_const:cn {c_phone_US_ortsname_573_tl} {Missouri}
\tl_const:cn {c_phone_US_ortsname_574_tl} {Indiana}
\tl_const:cn {c_phone_US_ortsname_575_tl} {New~Mexico}
\tl_const:cn {c_phone_US_ortsname_579_tl} {Quebec}
\tl_const:cn {c_phone_US_ortsname_580_tl} {Oklahoma}
\tl_const:cn {c_phone_US_ortsname_581_tl} {Quebec}
\tl_const:cn {c_phone_US_ortsname_582_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_584_tl} {Manitoba}
\tl_const:cn {c_phone_US_ortsname_585_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_586_tl} {Michigan}
\tl_const:cn {c_phone_US_ortsname_587_tl} {Alberta}
\tl_const:cn {c_phone_US_ortsname_601_tl} {Mississippi}
\tl_const:cn {c_phone_US_ortsname_602_tl} {Arizona}
\tl_const:cn {c_phone_US_ortsname_603_tl} {New~Hampshire}
\tl_const:cn {c_phone_US_ortsname_604_tl} {British~Columbia}
\tl_const:cn {c_phone_US_ortsname_605_tl} {South~Dakota}
\tl_const:cn {c_phone_US_ortsname_606_tl} {Kentucky}
\tl_const:cn {c_phone_US_ortsname_607_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_608_tl} {Wisconsin}
\tl_const:cn {c_phone_US_ortsname_609_tl} {New~Jersey}
\tl_const:cn {c_phone_US_ortsname_610_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_612_tl} {Minnesota}
\tl_const:cn {c_phone_US_ortsname_613_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_614_tl} {Ohio}
\tl_const:cn {c_phone_US_ortsname_615_tl} {Tennessee}
\tl_const:cn {c_phone_US_ortsname_616_tl} {Michigan}
\tl_const:cn {c_phone_US_ortsname_617_tl} {Massachusetts}
\tl_const:cn {c_phone_US_ortsname_618_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_619_tl} {California}
\tl_const:cn {c_phone_US_ortsname_620_tl} {Kansas}
\tl_const:cn {c_phone_US_ortsname_623_tl} {Arizona}
\tl_const:cn {c_phone_US_ortsname_626_tl} {California}
\tl_const:cn {c_phone_US_ortsname_628_tl} {California}
\tl_const:cn {c_phone_US_ortsname_629_tl} {Tennessee}
\tl_const:cn {c_phone_US_ortsname_630_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_631_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_636_tl} {Missouri}
\tl_const:cn {c_phone_US_ortsname_639_tl} {Saskatchewan}
\tl_const:cn {c_phone_US_ortsname_640_tl} {New~Jersey}
\tl_const:cn {c_phone_US_ortsname_641_tl} {Iowa}
\tl_const:cn {c_phone_US_ortsname_645_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_646_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_647_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_649_tl} {Turks~and~Caicos~Islands}
\tl_const:cn {c_phone_US_ortsname_650_tl} {California}
\tl_const:cn {c_phone_US_ortsname_651_tl} {Minnesota}
\tl_const:cn {c_phone_US_ortsname_656_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_657_tl} {California}
\tl_const:cn {c_phone_US_ortsname_658_tl} {Jamaica}
\tl_const:cn {c_phone_US_ortsname_659_tl} {Alabama}
\tl_const:cn {c_phone_US_ortsname_660_tl} {Missouri}
\tl_const:cn {c_phone_US_ortsname_661_tl} {California}
\tl_const:cn {c_phone_US_ortsname_662_tl} {Mississippi}
\tl_const:cn {c_phone_US_ortsname_664_tl} {Montserrat}
\tl_const:cn {c_phone_US_ortsname_667_tl} {Maryland}
\tl_const:cn {c_phone_US_ortsname_669_tl} {California}
\tl_const:cn {c_phone_US_ortsname_670_tl} {Northern~Mariana~Islands}
\tl_const:cn {c_phone_US_ortsname_671_tl} {Guam}
\tl_const:cn {c_phone_US_ortsname_672_tl} {British~Columbia}
\tl_const:cn {c_phone_US_ortsname_678_tl} {Georgia}
\tl_const:cn {c_phone_US_ortsname_680_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_681_tl} {West~Virginia}
\tl_const:cn {c_phone_US_ortsname_682_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_683_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_684_tl} {American~Samoa}
\tl_const:cn {c_phone_US_ortsname_689_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_701_tl} {North~Dakota}
\tl_const:cn {c_phone_US_ortsname_702_tl} {Nevada}
\tl_const:cn {c_phone_US_ortsname_703_tl} {Virginia}
\tl_const:cn {c_phone_US_ortsname_704_tl} {North~Carolina}
\tl_const:cn {c_phone_US_ortsname_705_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_706_tl} {Georgia}
\tl_const:cn {c_phone_US_ortsname_707_tl} {California}
\tl_const:cn {c_phone_US_ortsname_708_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_709_tl} {Newfoundland~and~Labrador}
\tl_const:cn {c_phone_US_ortsname_712_tl} {Iowa}
\tl_const:cn {c_phone_US_ortsname_713_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_714_tl} {California}
\tl_const:cn {c_phone_US_ortsname_715_tl} {Wisconsin}
\tl_const:cn {c_phone_US_ortsname_716_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_717_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_718_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_719_tl} {Colorado}
\tl_const:cn {c_phone_US_ortsname_720_tl} {Colorado}
\tl_const:cn {c_phone_US_ortsname_721_tl} {Sint~Maarten}
\tl_const:cn {c_phone_US_ortsname_724_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_725_tl} {Nevada}
\tl_const:cn {c_phone_US_ortsname_726_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_727_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_728_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_730_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_731_tl} {Tennessee}
\tl_const:cn {c_phone_US_ortsname_732_tl} {New~Jersey}
\tl_const:cn {c_phone_US_ortsname_734_tl} {Michigan}
\tl_const:cn {c_phone_US_ortsname_737_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_740_tl} {Ohio}
\tl_const:cn {c_phone_US_ortsname_742_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_743_tl} {North~Carolina}
\tl_const:cn {c_phone_US_ortsname_747_tl} {California}
\tl_const:cn {c_phone_US_ortsname_753_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_754_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_757_tl} {Virginia}
\tl_const:cn {c_phone_US_ortsname_758_tl} {Saint~Lucia}
\tl_const:cn {c_phone_US_ortsname_760_tl} {California}
\tl_const:cn {c_phone_US_ortsname_762_tl} {Georgia}
\tl_const:cn {c_phone_US_ortsname_763_tl} {Minnesota}
\tl_const:cn {c_phone_US_ortsname_765_tl} {Indiana}
\tl_const:cn {c_phone_US_ortsname_767_tl} {Dominica}
\tl_const:cn {c_phone_US_ortsname_769_tl} {Mississippi}
\tl_const:cn {c_phone_US_ortsname_770_tl} {Georgia}
\tl_const:cn {c_phone_US_ortsname_771_tl} {Washington,~D.\,C.}
\tl_const:cn {c_phone_US_ortsname_772_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_773_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_774_tl} {Massachusetts}
\tl_const:cn {c_phone_US_ortsname_775_tl} {Nevada}
\tl_const:cn {c_phone_US_ortsname_778_tl} {British~Columbia}
\tl_const:cn {c_phone_US_ortsname_779_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_780_tl} {Alberta}
\tl_const:cn {c_phone_US_ortsname_781_tl} {Massachusetts}
\tl_const:cn {c_phone_US_ortsname_782_tl} {Nova~Scotia,~Prince~Edward~Island}
\tl_const:cn {c_phone_US_ortsname_784_tl} {Saint~Vincent~and~the~Grenadines}
\tl_const:cn {c_phone_US_ortsname_785_tl} {Kansas}
\tl_const:cn {c_phone_US_ortsname_786_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_787_tl} {Puerto~Rico}
\tl_const:cn {c_phone_US_ortsname_801_tl} {Utah}
\tl_const:cn {c_phone_US_ortsname_802_tl} {Vermont}
\tl_const:cn {c_phone_US_ortsname_803_tl} {South~Carolina}
\tl_const:cn {c_phone_US_ortsname_804_tl} {Virginia}
\tl_const:cn {c_phone_US_ortsname_805_tl} {California}
\tl_const:cn {c_phone_US_ortsname_806_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_807_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_808_tl} {Hawaii}
\tl_const:cn {c_phone_US_ortsname_809_tl} {Dominican~Republic}
\tl_const:cn {c_phone_US_ortsname_810_tl} {Michigan}
\tl_const:cn {c_phone_US_ortsname_812_tl} {Indiana}
\tl_const:cn {c_phone_US_ortsname_813_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_814_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_815_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_816_tl} {Missouri}
\tl_const:cn {c_phone_US_ortsname_817_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_818_tl} {California}
\tl_const:cn {c_phone_US_ortsname_819_tl} {Quebec}
\tl_const:cn {c_phone_US_ortsname_820_tl} {California}
\tl_const:cn {c_phone_US_ortsname_825_tl} {Alberta}
\tl_const:cn {c_phone_US_ortsname_826_tl} {Virginia}
\tl_const:cn {c_phone_US_ortsname_828_tl} {North~Carolina}
\tl_const:cn {c_phone_US_ortsname_829_tl} {Dominican~Republic}
\tl_const:cn {c_phone_US_ortsname_830_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_831_tl} {California}
\tl_const:cn {c_phone_US_ortsname_832_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_835_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_838_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_839_tl} {South~Carolina}
\tl_const:cn {c_phone_US_ortsname_840_tl} {California}
\tl_const:cn {c_phone_US_ortsname_843_tl} {South~Carolina}
\tl_const:cn {c_phone_US_ortsname_845_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_847_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_848_tl} {New~Jersey}
\tl_const:cn {c_phone_US_ortsname_849_tl} {Dominican~Republic}
\tl_const:cn {c_phone_US_ortsname_850_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_854_tl} {South~Carolina}
\tl_const:cn {c_phone_US_ortsname_856_tl} {New~Jersey}
\tl_const:cn {c_phone_US_ortsname_857_tl} {Massachusetts}
\tl_const:cn {c_phone_US_ortsname_858_tl} {California}
\tl_const:cn {c_phone_US_ortsname_859_tl} {Kentucky}
\tl_const:cn {c_phone_US_ortsname_860_tl} {Connecticut}
\tl_const:cn {c_phone_US_ortsname_861_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_862_tl} {New~Jersey}
\tl_const:cn {c_phone_US_ortsname_863_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_864_tl} {South~Carolina}
\tl_const:cn {c_phone_US_ortsname_865_tl} {Tennessee}
\tl_const:cn {c_phone_US_ortsname_867_tl} {Yukon,~Northwest~Territories,~Nunavut}
\tl_const:cn {c_phone_US_ortsname_868_tl} {Trinidad~and~Tobago}
\tl_const:cn {c_phone_US_ortsname_869_tl} {Saint~Kitts~and~Nevis}
\tl_const:cn {c_phone_US_ortsname_870_tl} {Arkansas}
\tl_const:cn {c_phone_US_ortsname_872_tl} {Illinois}
\tl_const:cn {c_phone_US_ortsname_873_tl} {Quebec}
\tl_const:cn {c_phone_US_ortsname_876_tl} {Jamaica}
\tl_const:cn {c_phone_US_ortsname_878_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_ortsname_901_tl} {Tennessee}
\tl_const:cn {c_phone_US_ortsname_902_tl} {Nova~Scotia,~Prince~Edward~Island}
\tl_const:cn {c_phone_US_ortsname_903_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_904_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_905_tl} {Ontario}
\tl_const:cn {c_phone_US_ortsname_906_tl} {Michigan}
\tl_const:cn {c_phone_US_ortsname_907_tl} {Alaska}
\tl_const:cn {c_phone_US_ortsname_908_tl} {New~Jersey}
\tl_const:cn {c_phone_US_ortsname_909_tl} {California}
\tl_const:cn {c_phone_US_ortsname_910_tl} {North~Carolina}
\tl_const:cn {c_phone_US_ortsname_912_tl} {Georgia}
\tl_const:cn {c_phone_US_ortsname_913_tl} {Kansas}
\tl_const:cn {c_phone_US_ortsname_914_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_915_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_916_tl} {California}
\tl_const:cn {c_phone_US_ortsname_917_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_918_tl} {Oklahoma}
\tl_const:cn {c_phone_US_ortsname_919_tl} {North~Carolina}
\tl_const:cn {c_phone_US_ortsname_920_tl} {Wisconsin}
\tl_const:cn {c_phone_US_ortsname_925_tl} {California}
\tl_const:cn {c_phone_US_ortsname_928_tl} {Arizona}
\tl_const:cn {c_phone_US_ortsname_929_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_930_tl} {Indiana}
\tl_const:cn {c_phone_US_ortsname_931_tl} {Tennessee}
\tl_const:cn {c_phone_US_ortsname_934_tl} {New~York}
\tl_const:cn {c_phone_US_ortsname_936_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_937_tl} {Ohio}
\tl_const:cn {c_phone_US_ortsname_938_tl} {Alabama}
\tl_const:cn {c_phone_US_ortsname_939_tl} {Puerto~Rico}
\tl_const:cn {c_phone_US_ortsname_940_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_941_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_943_tl} {Georgia}
\tl_const:cn {c_phone_US_ortsname_945_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_947_tl} {Michigan}
\tl_const:cn {c_phone_US_ortsname_948_tl} {Virginia}
\tl_const:cn {c_phone_US_ortsname_949_tl} {California}
\tl_const:cn {c_phone_US_ortsname_951_tl} {California}
\tl_const:cn {c_phone_US_ortsname_952_tl} {Minnesota}
\tl_const:cn {c_phone_US_ortsname_954_tl} {Florida}
\tl_const:cn {c_phone_US_ortsname_956_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_959_tl} {Connecticut}
\tl_const:cn {c_phone_US_ortsname_970_tl} {Colorado}
\tl_const:cn {c_phone_US_ortsname_971_tl} {Oregon}
\tl_const:cn {c_phone_US_ortsname_972_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_973_tl} {New~Jersey}
\tl_const:cn {c_phone_US_ortsname_975_tl} {Missouri}
\tl_const:cn {c_phone_US_ortsname_978_tl} {Massachusetts}
\tl_const:cn {c_phone_US_ortsname_979_tl} {Texas}
\tl_const:cn {c_phone_US_ortsname_980_tl} {North~Carolina}
\tl_const:cn {c_phone_US_ortsname_983_tl} {Colorado}
\tl_const:cn {c_phone_US_ortsname_984_tl} {North~Carolina}
\tl_const:cn {c_phone_US_ortsname_985_tl} {Louisiana}
\tl_const:cn {c_phone_US_ortsname_986_tl} {Idaho}
\tl_const:cn {c_phone_US_ortsname_989_tl} {Michigan}
\tl_const:cn {c_phone_US_ortsname_500_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_521_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_522_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_523_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_524_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_525_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_526_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_527_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_528_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_533_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_544_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_566_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_577_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_588_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_600_tl} {Canadian~Non-Geographic~Tariffed~Service}
\tl_const:cn {c_phone_US_ortsname_622_tl} {Canadian~Non-Geographic~Service}
\tl_const:cn {c_phone_US_ortsname_700_tl} {Interexchange~Carrier~Service}
\tl_const:cn {c_phone_US_ortsname_710_tl} {US~Government}
\tl_const:cn {c_phone_US_ortsname_800_tl} {Toll-Free}
\tl_const:cn {c_phone_US_ortsname_833_tl} {Toll-Free}
\tl_const:cn {c_phone_US_ortsname_844_tl} {Toll-Free}
\tl_const:cn {c_phone_US_ortsname_855_tl} {Toll-Free}
\tl_const:cn {c_phone_US_ortsname_866_tl} {Toll-Free}
\tl_const:cn {c_phone_US_ortsname_877_tl} {Toll-Free}
\tl_const:cn {c_phone_US_ortsname_888_tl} {Toll-Free}
\tl_const:cn {c_phone_US_ortsname_900_tl} {Premium~Service}

\tl_const:Nn \c_phone_US_landesadjektiv_tl {North~American}
\bool_const:Nn \c_phone_US_erlaubt_durchwahl_bool {\c_false_bool}

\clist_new:N \c_phone_US_vorwahlen_clist
\clist_concat:NNN \c_phone_US_vorwahlen_clist \c_phone_US_ortsvorwahlen_clist \c_phone_US_sondervorwahlen_clist

\msg_new:nnn {phonenumbers} {US/illegal home area code}
   {
      10-digit~dialling~is~required~in~\tl_use:c {c_phone_US_ortsname_#1_tl}.~#1~cannot~be~set~as~home~area~code~\msg_line_context:.
   }

\msg_new:nnn {phonenumbers} {US/invalid area code}
   {
      unknown~area~code~#1~in~North~American~phone~number~\msg_line_context:
   }

\msg_new:nnn {phonenumbers} {US/invalid central office code}
   {
      invalid~central~office~code~#1~in~North~American~phone~number~\msg_line_context:
   }

\bool_new:N \l_phone_US_ferngespraechspraefix_bool

\keys_define:nn {phonenumbers}
   {
      trunk-prefix .choices:nn = {on,off}
         {
            \str_if_eq:VnTF \l_keys_choice_tl {on}
               {
                  \bool_set_true:N \l_phone_US_ferngespraechspraefix_bool
               }
               {
                  \bool_set_false:N \l_phone_US_ferngespraechspraefix_bool
               }
         },
      trunk-prefix .initial:n = off,
      trunk-prefix .default:n = on
   }

% Prüfe, ob eine Vorwahl als Heimatvorwahl zulässig ist.
% #1: Heimatvorwahl
\prg_new_protected_conditional:Npnn \phone_US_heimatvorwahl_erlaubt:n #1 {T}
   {
      \clist_if_in:NnTF \c_phone_US_ortsvorwahlen_clist {#1}
         {
            % In Nordamerika können nur nicht obligatorische Ortsvorwahlen Heimatvorwahl sein.
            \clist_if_in:NnTF \c_phone_US_obligatorische_ortsvorwahlen_clist {#1}
               {
                  \msg_warning:onn {phonenumbers} {US/illegal home area code} {#1}
                  \prg_return_false:
               }
               {
                  \prg_return_true:
               }
         }
         {
            \msg_warning:nnn {phonenumbers} {invalid home area code} {#1}
            \prg_return_false:
         }
   }

% #1: Vorwahl, #2: Folgt eine Rufnummer?
\cs_new_protected:Npn \phone_US_vorwahl_schreiben:nN #1 #2
   {
      \bool_lazy_or:nnTF { \str_if_eq_p:Vn \l_phone_auslandsvorwahltyp_str {off} } { \str_if_eq_p:Vn \l_phone_heimatland_str {US} }
         {
            \bool_lazy_and:nnF { \str_if_eq_p:Vn \l_phone_heimatland_str {US} } { \str_if_eq_p:Vn \l_phone_heimatvorwahl_str {#1} }
               {
                  \bool_if:NTF \l_phone_US_ferngespraechspraefix_bool
                     {
                        \tl_put_right:Nx \l_phone_ausgabetext_tl
                           {
                              \str_if_eq:VnT \l_phone_vorwahldarstellung_str {place-and-number}
                                 {
                                    \tl_if_exist:cT {c_phone_US_ortsname_#1_tl}
                                       {
                                          \tl_use:c {c_phone_US_ortsname_#1_tl}
                                          \c_space_tl
                                       }
                                 }

                              \bool_if:NTF #2
                                 {
                                    \str_case:VnF \l_phone_vorwahltrennung_str
                                       {
                                          {brackets} {1 \c_space_tl (#1) \c_space_tl}
                                          {space} {1 \c_space_tl #1 \c_space_tl}
                                       }
                                       {
                                          1 \c_phone_bindestrich_tl #1 \c_phone_bindestrich_tl
                                       }
                                 }
                                 {
                                    \str_case:VnF \l_phone_vorwahltrennung_str
                                       {
                                          {brackets} {1 \c_space_tl (#1)}
                                          {space} {1 \c_space_tl #1}
                                       }
                                       {
                                          1 \c_phone_bindestrich_tl #1
                                       }
                                 }
                           }
                     }
                     {
                        \str_if_eq:VnT \l_phone_vorwahldarstellung_str {place}
                           {
                              \clist_if_in:NnT \c_phone_US_sondervorwahlen_clist {#1}
                                 {
                                    \str_set:Nn \l_phone_vorwahldarstellung_str {number}
                                 }
                           }

                        \tl_put_right:Nx \l_phone_ausgabetext_tl
                           {
                              \str_case:Vn \l_phone_vorwahldarstellung_str
                                 {
                                    {number}
                                       {
                                          \bool_if:NTF #2
                                             {
                                                \str_case:VnF \l_phone_vorwahltrennung_str
                                                   {
                                                      {brackets} {(#1) \c_space_tl}
                                                      {space} {#1 \c_space_tl}
                                                   }
                                                   {
                                                      #1 \c_phone_bindestrich_tl
                                                   }
                                             }
                                             {
                                                #1
                                             }
                                       }
                                    {place}
                                       {
                                          \bool_if:NTF #2
                                             {
                                                \str_case:VnF \l_phone_vorwahltrennung_str
                                                   {
                                                      {brackets}
                                                         {
                                                            (
                                                            \tl_if_exist:cTF {c_phone_US_ortsname_#1_tl}
                                                               {
                                                                  \tl_use:c {c_phone_US_ortsname_#1_tl}
                                                               }
                                                               {
                                                                  #1
                                                               }
                                                            )
                                                            \c_space_tl
                                                         }
                                                   }
                                                   {
                                                      \tl_if_exist:cTF {c_phone_US_ortsname_#1_tl}
                                                         {
                                                            \tl_use:c {c_phone_US_ortsname_#1_tl}
                                                            \c_space_tl
                                                         }
                                                         {
                                                            #1 \c_phone_bindestrich_tl
                                                         }
                                                   }
                                             }
                                             {
                                                \tl_if_exist:cTF {c_phone_US_ortsname_#1_tl}
                                                   {
                                                      \tl_use:c {c_phone_US_ortsname_#1_tl}
                                                   }
                                                   {
                                                      #1
                                                   }
                                             }
                                       }
                                    {place-and-number}
                                       {
                                          \tl_if_exist:cT {c_phone_US_ortsname_#1_tl}
                                             {
                                                \tl_use:c {c_phone_US_ortsname_#1_tl}
                                                \c_space_tl
                                             }

                                          \bool_if:NTF #2
                                             {
                                                \str_case:VnF \l_phone_vorwahltrennung_str
                                                   {
                                                      {brackets} {(#1) \c_space_tl}
                                                      {space} {#1 \c_space_tl}
                                                   }
                                                   {
                                                      #1 \c_phone_bindestrich_tl
                                                   }
                                             }
                                             {
                                                \str_if_eq:VnTF \l_phone_vorwahltrennung_str {brackets}
                                                   {
                                                      (#1)
                                                   }
                                                   {
                                                      #1
                                                   }
                                             }
                                       }
                                 }
                           }
                     }
               }
         }
         {
            \phone_ungruppierte_auslandsvorwahl_schreiben:n {1}

            \tl_put_right:Nn \l_phone_ausgabetext_tl {\c_space_tl}

            \str_if_eq:VnTF \l_phone_auslandsvorwahltrennung_str {brackets}
               {
                  \tl_put_right:Nn \l_phone_ausgabetext_tl {(#1)}
               }
               {
                  \tl_put_right:Nn \l_phone_ausgabetext_tl {#1}
               }

            \bool_if:NT #2
               {
                  \tl_put_right:NV \l_phone_ausgabetext_tl \c_space_tl
               }
         }

      % Linktext schreiben, falls eine Rufnummer folgt
      \bool_if:NT #2
         {
            \str_put_right:Nn \l_phone_linktext_str {+1 #1}
         }
   }

\cs_generate_variant:Nn \phone_US_vorwahl_schreiben:nN {VN}

% #1: Ortsvorwahl, #2: Vermittlungsstellennummer
\cs_new_protected:Npn \phone_US_vermittlungsstellennummer_schreiben:nn #1 #2
   {
      \str_case:xnTF { \str_head:n {#2} }
         {
            {0} { }
            {1} { }
         }
         {
            \msg_warning:nnn {phonenumbers} {US/invalid central office code} {#2}
         }
         {
            \bool_set_false:N \l_tmpa_bool % Regionalnummer?

            \tl_if_empty:nTF {#1}
               {
                  \bool_set_true:N \l_tmpa_bool
               }
               {
                  \clist_if_in:NnT \c_phone_US_ortsvorwahlen_clist {#1}
                     {
                        \bool_set_true:N \l_tmpa_bool
                     }
               }

            \bool_if:NTF \l_tmpa_bool
               {
                  \str_if_eq:xnT { \str_range:nnn {#2} {2} {3} } {11}
                     {
                        \msg_warning:nnn {phonenumbers} {US/invalid central office code} {#2}
                     }
               }
               {
                  \str_if_eq:nnT {#2} {911}
                     {
                        \msg_warning:nnn {phonenumbers} {US/invalid central office code} {#2}
                     }
               }
         }

      \tl_put_right:Nn \l_phone_ausgabetext_tl {#2}

      \bool_lazy_or:nnTF { \str_if_eq_p:Vn \l_phone_auslandsvorwahltyp_str {off} } { \str_if_eq_p:Vn \l_phone_heimatland_str {US} }
         {
            \tl_put_right:NV \l_phone_ausgabetext_tl \c_phone_bindestrich_tl
         }
         {
            \tl_if_empty:nTF {#1}
               {
                  \tl_put_right:NV \l_phone_ausgabetext_tl \c_phone_bindestrich_tl
               }
               {
                  \tl_put_right:NV \l_phone_ausgabetext_tl \c_space_tl
               }
         }

      % Linktext schreiben, falls eine Vorwahl vorangeht
      \tl_if_empty:nF {#1}
         {
            \str_put_right:Nn \l_phone_linktext_str {#2}
         }
   }

\cs_generate_variant:Nn \phone_US_vermittlungsstellennummer_schreiben:nn {Vx}

\cs_new_protected:Npn \phone_US_nummer_schreiben:
   {
      \int_case:nnF { \str_count:N \l_phone_bereinigte_nummer_str }
         {
            {3}
               {
                  \clist_if_in:NVTF \c_phone_US_vorwahlen_clist \l_phone_bereinigte_nummer_str
                     {
                        \msg_warning:nn {phonenumbers} {missing subscriber number}
                     }
                     {
                        \msg_warning:nnV {phonenumbers} {US/invalid area code} \l_phone_bereinigte_nummer_str
                     }

                  \phone_US_vorwahl_schreiben:VN \l_phone_bereinigte_nummer_str \c_false_bool
               }
            {7}
               {
                  \phone_US_vermittlungsstellennummer_schreiben:Vx \c_empty_tl { \str_range:Nnn \l_phone_bereinigte_nummer_str {1} {3} }

                  \tl_put_right:Nx \l_phone_ausgabetext_tl { \str_range:Nnn \l_phone_bereinigte_nummer_str {4} {7} }
               }
            {10}
               {
                  \str_set:Nx \l_tmpa_str { \str_range:Nnn \l_phone_bereinigte_nummer_str {1} {3} }

                  \clist_if_in:NVF \c_phone_US_vorwahlen_clist \l_tmpa_str
                     {
                        \msg_warning:nnx {phonenumbers} {US/invalid area code} {\l_tmpa_str}
                     }

                  \phone_US_vorwahl_schreiben:VN \l_tmpa_str \c_true_bool

                  \phone_US_vermittlungsstellennummer_schreiben:Vx \l_tmpa_str { \str_range:Nnn \l_phone_bereinigte_nummer_str {4} {6} }

                  \tl_put_right:Nx \l_phone_ausgabetext_tl { \str_range:Nnn \l_phone_bereinigte_nummer_str {7} {10} }
                  \str_put_right:Nx \l_phone_linktext_str { \str_range:Nnn \l_phone_bereinigte_nummer_str {7} {10} }
               }
         }
         {
            \int_compare:nNnTF { \str_count:N \l_phone_bereinigte_nummer_str } < {10}
               {
                  \msg_warning:nnnn {phonenumbers} {number too short} {phone} {10}
               }
               {
                  \msg_warning:nnnn {phonenumbers} {number too long} {phone} {10}
               }

            \tl_put_right:NV \l_phone_ausgabetext_tl \l_phone_bereinigte_nummer_str
         }
   }

\cs_new_protected:Npn \phone_US_vorwahlliste_ausgeben:n #1
   {
      \begin{tabbing}
      \hspace {3em} \= \kill

      \bool_set_false:N \l_phone_zeilenumbruch_bool

      \clist_map_inline:cn {c_phone_US_ #1 _clist}
         {
            \bool_if:NTF \l_phone_zeilenumbruch_bool
               {
                  \\
               }
               {
                  \bool_gset_true:N \l_phone_zeilenumbruch_bool
               }

            ##1
            \>
            \tl_if_exist:cT {c_phone_US_ortsname_ ##1 _tl}
               {
                  \tl_use:c {c_phone_US_ortsname_ ##1 _tl}
               }
         }
      \end{tabbing}
   }
