It appears that Baldur Norddahl <baldur.norddahl@gmail.com> said: According to Baldur Norddahl <baldur.norddahl@gmail.com>:
Number portability database is looked up after the call reaches the destination country, which will be used for further intra-national routing, which do not affect country-wise aggregation of international routing table.
Actually the GSM system will query the HLR to find out where to really route the call. Much like LISP actually.
With a century and a half of history, the phone system has a lot of different numbering hacks. In the US, the country is divided into several hundred regions within which you can port phone numbers. They do this with an overlay database; on each call the number is looked up to get a routing number which is used to route the call. If the number hasn't been ported the routing number is the number itself, otherwise it's a number assigned to the switch that handles the call. The routing numbers are assigned in the familar hierarchical way and the first seven digits of the number (three digit area code, three digit prefix, one digit subprefix) to route the call. Mobile carriers have their own system underneath that so if you, say, get an AT&T number in New York, port it to Verizon, and then move to California, calls to your number get routed to New York, looked up in the porting database, delivered to a Verizon switch in NY, then routed within the Verizon network to your phone in California. Dunno whether Verizon uses the same HLR to do international roaming or separate for domestic and international. There is a proposal to provide national number portability in the US which would in effect merge all of the regions together and get rid of all long distance charges within the US that has a reasonably good chance of happening. This has nothing to do with IPv6, of course, other than that modern phones use VoLTE so within a mobile carrier's network your voice call is probably handled using IPv6 transport.