[{"data":1,"prerenderedAt":75},["ShallowReactive",2],{"content:en:blog\u002Fmobile-number-portability":3},{"path":4,"locale":5,"section":6,"title":7,"description":8,"html":9,"headings":10,"faq":52,"updated":71,"order":72,"words":73,"meta":74},"blog\u002Fmobile-number-portability","en","blog","Mobile number portability: why a prefix no longer tells you the carrier","How number portability works, how networks route ported numbers, why plan data goes stale, and how to read the ported flag in a live phone lookup.","\u003Cp>Mobile number portability (MNP) lets people keep their number when they switch operator. The consequence for software is simple and often forgotten: a prefix used to point to a network, and it no longer does. A number from a block that was opened for one operator can be served today by another. If your code reads the carrier from the digits, it will be wrong for exactly the customers who changed their mind about their provider.\u003C\u002Fp>\n\u003Ch2 id=\"what-portability-changed\">\u003Ca class=\"heading-link\" href=\"#what-portability-changed\">\u003Cspan>What portability changed\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Telephone numbers are handed out in blocks. Before portability, a block meant an operator, so the first digits of a mobile number told you who carried the call. Portability broke that link on purpose. A subscriber who ports out keeps the number, and the number stays inside its original block while the network that serves it changes.\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Term\u003C\u002Fth>\n\u003Cth>Meaning\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>Donor operator\u003C\u002Ftd>\n\u003Ctd>The operator the number leaves\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Recipient operator\u003C\u002Ftd>\n\u003Ctd>The operator the number joins\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Range holder\u003C\u002Ftd>\n\u003Ctd>The operator the number block was first assigned to\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Serving operator\u003C\u002Ftd>\n\u003Ctd>The operator that carries the number today\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Plan data knows the range holder. Only the network knows the serving operator. Everything else in this article follows from that gap.\u003C\u002Fp>\n\u003Ch2 id=\"the-rules-behind-it\">\u003Ca class=\"heading-link\" href=\"#the-rules-behind-it\">\u003Cspan>The rules behind it\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Portability is a regulatory right in many countries, and the details differ.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>European Union.\u003C\u002Fstrong> Article 106 of the European Electronic Communications Code, Directive (EU) 2018\u002F1972, gives end users the right to keep their number when they change provider, and obliges providers to support it.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>United States.\u003C\u002Fstrong> The FCC's local number portability rules, in 47 CFR Part 52, require carriers to support portability. Wireless number portability took effect in November 2003, including ports between wireless and landline carriers.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Elsewhere.\u003C\u002Fstrong> Many other countries run comparable schemes. Some limit porting to the same country, and a few have extra rules for moving between fixed and mobile service.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>A ported number never changes country. Its country calling code and its E.164 form stay exactly the same.\u003C\u002Fp>\n\u003Ch2 id=\"how-networks-route-a-ported-number\">\u003Ca class=\"heading-link\" href=\"#how-networks-route-a-ported-number\">\u003Cspan>How networks route a ported number\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>When a call or message comes in for a number, the sending network needs to know which network owns it today. Two approaches exist, and countries use one or the other, sometimes both.\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Central database.\u003C\u002Fstrong> A shared record lists ported numbers. In the United States and Canada, the Number Portability Administration Center (NPAC) records each ported number against a Location Routing Number (LRN), a ten-digit number that identifies the switch now serving it. Operators query the data, or receive copies, before routing.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Routing through the old network.\u003C\u002Fstrong> The donor or range-holder network receives the call and passes it on. The industry names for the variants are onward routing, call drop back, query on release and all-call query. They differ in who asks for the information and when.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>For the sender, the result is the same: the call arrives at the right network. For a developer reading a number's digits, none of it is visible, because it happens in the routing layer below the number.\u003C\u002Fp>\n\u003Ch2 id=\"why-plan-data-goes-stale\">\u003Ca class=\"heading-link\" href=\"#why-plan-data-goes-stale\">\u003Cspan>Why plan data goes stale\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Numbering plan data is compiled from what regulators publish, and Google's libphonenumber carries it. For many countries it also carries a table that maps number prefixes to the operator that first received them. That table is useful and honest about its limits: it describes the origin.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>The carrier is the range holder.\u003C\u002Fstrong> At the basic level of the Qelka phone API, \u003Ccode>carrier.name\u003C\u002Fcode> is the operator the range was originally assigned to, when the plan data names one. \u003Ccode>carrier.source\u003C\u002Fcode> is \u003Ccode>numbering_plan\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Some numbers have no carrier at all.\u003C\u002Fstrong> In the United States, libphonenumber's data names no range holder for numbers in the states, so \u003Ccode>carrier.name\u003C\u002Fcode> is \u003Ccode>null\u003C\u002Fcode> there.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The line type describes the range.\u003C\u002Fstrong> A landline number ported to a mobile operator keeps the type of its original range in plan data.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Porting is invisible.\u003C\u002Fstrong> \u003Ccode>ported\u003C\u002Fcode> is \u003Ccode>null\u003C\u002Fcode> at the basic level, because a static dataset cannot detect a move that happened after the range was assigned.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>None of this is a defect. It is the right answer to the question &quot;what was this range for?&quot;. It is the wrong answer to &quot;who serves it now?&quot;.\u003C\u002Fp>\n\u003Ch2 id=\"how-a-live-lookup-sees-porting\">\u003Ca class=\"heading-link\" href=\"#how-a-live-lookup-sees-porting\">\u003Cspan>How a live lookup sees porting\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>A live lookup asks an upstream number-lookup provider about the number at the time of the call. The provider reads current network and porting data, so it can report the serving operator.\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Field\u003C\u002Fth>\n\u003Cth>Basic level\u003C\u002Fth>\n\u003Cth>Live level\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>carrier.name\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Original range holder, if named\u003C\u002Ftd>\n\u003Ctd>Operator serving the number now\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>carrier.mcc\u003C\u002Fcode>, \u003Ccode>carrier.mnc\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>null\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Mobile country and network codes (ITU-T E.212)\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>ported\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>null\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>true\u003C\u002Fcode> when the number left the operator its range was assigned to, \u003Ccode>false\u003C\u002Fcode> otherwise\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>carrier.source\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>numbering_plan\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>live\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Credits\u003C\u002Ftd>\n\u003Ctd>1\u003C\u002Ftd>\n\u003Ctd>3\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>An example response for a ported number looks like this. The values are illustrative:\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-code-block>\u003Cdiv class=\"code-head\">\u003Cspan class=\"code-label\">json\u003C\u002Fspan>\u003C\u002Fdiv>\u003Cpre class=\"shiki shiki-themes github-light github-dark\" style=\"--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode class=\"language-json\">\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  \"object\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"phone\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  \"input\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"+14155550123\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  \"valid\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">true\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  \"status\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"valid\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  \"e164\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"+14155550123\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  \"line_type\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"mobile\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  \"carrier\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: { \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">\"name\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"Example Wireless\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">\"mcc\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"310\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">\"mnc\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"000\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">\"source\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"live\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  \"ported\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">true\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  \"credits_used\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">3\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  \"cached\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">false\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>ported: true\u003C\u002Fcode> means the number has moved away from the operator its range was assigned to. It says nothing about when, or why. A live lookup sends the number to the lookup provider, so reserve it for decisions where the serving network matters. See \u003Ca href=\"\u002Fblog\u002Fhlr-lookup-explained\">HLR lookup explained\u003C\u002Fa> for how network queries work.\u003C\u002Fp>\n\u003Ch2 id=\"where-it-changes-a-decision\">\u003Ca class=\"heading-link\" href=\"#where-it-changes-a-decision\">\u003Cspan>Where it changes a decision\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Ch3 id=\"sending-sms\">\u003Ca class=\"heading-link\" href=\"#sending-sms\">\u003Cspan>Sending SMS\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Operators price terminations differently, and a message platform chooses its route from the serving network. A route picked from the prefix can miss for ported numbers: it costs more, or it fails. Run a live lookup before bulk SMS campaigns to route and price by the real carrier.\u003C\u002Fp>\n\u003Ch3 id=\"reviewing-risky-account-changes\">\u003Ca class=\"heading-link\" href=\"#reviewing-risky-account-changes\">\u003Cspan>Reviewing risky account changes\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>A number added to an account moments before a recovery request is a classic step in takeover attempts. A number ported in the last day, with a new device and a new location, adds weight to the review. Treat it as one signal: millions of people change operator for ordinary reasons. Portability does not describe a SIM replacement either, so it does not replace a \u003Ca href=\"\u002Fglossary\u002Fsim-swap\">SIM swap\u003C\u002Fa> check with the operator.\u003C\u002Fp>\n\u003Ch3 id=\"cleaning-lists\">\u003Ca class=\"heading-link\" href=\"#cleaning-lists\">\u003Cspan>Cleaning lists\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Group a list by serving carrier to see where deliverability problems concentrate. Basic checks catch impossible numbers cheaply, and the live level adds the carrier for the rest. \u003Ca href=\"\u002Fhelp\u002Fclean-a-phone-number-list\">Clean a phone number list\u003C\u002Fa> shows the order of steps.\u003C\u002Fp>\n\u003Ch2 id=\"do-not-confuse-porting-with-recycling\">\u003Ca class=\"heading-link\" href=\"#do-not-confuse-porting-with-recycling\">\u003Cspan>Do not confuse porting with recycling\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Porting moves a live subscription between operators. The person stays the same. Recycling is different: when a number is disconnected, an operator can assign it again after a period, and a new subscriber then holds a number your records link to the old one. A lookup that shows a carrier cannot tell you whether the person changed. In the United States, the FCC established a Reassigned Numbers Database so callers can check whether a number changed hands. For consent and for account security, a recent one-time code is the evidence that counts.\u003C\u002Fp>\n\u003Ch2 id=\"what-to-store-and-what-to-read-live\">\u003Ca class=\"heading-link\" href=\"#what-to-store-and-what-to-read-live\">\u003Cspan>What to store and what to read live\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Keep in your database\u003C\u002Fth>\n\u003Cth>Look up when needed\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>The E.164 number\u003C\u002Ftd>\n\u003Ctd>The serving carrier and \u003Ccode>ported\u003C\u002Fcode> flag\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>The country, from the lookup\u003C\u002Ftd>\n\u003Ctd>The line type, when it affects delivery\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>When the number was last verified by code\u003C\u002Ftd>\n\u003Ctd>A new live lookup, with \u003Ccode>&quot;fresh&quot;: true\u003C\u002Fcode> to skip the 7-day cache\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Store the carrier only with the date you read it. It is a fact that expires, like a location. \u003Ca href=\"\u002Fblog\u002Fe164-format\">E.164 explained\u003C\u002Fa> covers how to store the number itself.\u003C\u002Fp>\n\u003Ch2 id=\"a-minimal-check\">\u003Ca class=\"heading-link\" href=\"#a-minimal-check\">\u003Cspan>A minimal check\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"code-block\" data-code-block>\u003Cdiv class=\"code-head\">\u003Cspan class=\"code-label\">javascript\u003C\u002Fspan>\u003C\u002Fdiv>\u003Cpre class=\"shiki shiki-themes github-light github-dark\" style=\"--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode class=\"language-javascript\">\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> response\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> await\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> fetch\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'https:\u002F\u002Fapi.qelka.com\u002Fv1\u002Fphone'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  method: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'POST'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  headers: {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">    Authorization: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">`Bearer ${\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">process\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">env\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">API_KEY\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">}`\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">    'Content-Type'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'application\u002Fjson'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  body: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">JSON\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">stringify\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">({ phone: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'+14155550123'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, level: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'live'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, fresh: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">true\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> }),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  signal: AbortSignal.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">timeout\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">10000\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">})\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (response.ok) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> result\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> await\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> response.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">json\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> reviewNeeded\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> result.ported \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">===\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> true\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> &#x26;&#x26;\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> result.line_type \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">===\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> 'mobile'\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  console.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">log\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(result.carrier.name, reviewNeeded)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdiv>\n\u003Cp>If the provider fails the API answers \u003Ccode>502 upstream_unavailable\u003C\u002Fcode> and does not bill the call, so fall back to the basic result. The free \u003Ca href=\"\u002Ftools\u002Fcarrier-lookup\">carrier lookup\u003C\u002Fa> shows the carrier for any number, and \u003Ca href=\"\u002Fhelp\u002Ffind-carrier-of-a-phone-number\">find the carrier of a phone number\u003C\u002Fa> explains the difference between the two levels. For the field-by-field reference, see the \u003Ca href=\"\u002Fdocs\u002Fapi-reference\u002Fphone\">phone API reference\u003C\u002Fa> and the glossary entry on \u003Ca href=\"\u002Fglossary\u002Fmobile-number-portability\">mobile number portability\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"where-to-go-next\">\u003Ca class=\"heading-link\" href=\"#where-to-go-next\">\u003Cspan>Where to go next\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fblog\u002Fphone-number-validation\">Phone number validation\u003C\u002Fa> for the layers that come before a live lookup.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fblog\u002Fvoip-number-lookup\">Mobile, landline or VoIP\u003C\u002Fa> for line types and why they go stale.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fblog\u002Fus-phone-prefixes-who-holds-them\">US phone prefixes: who holds them\u003C\u002Fa> for what NANPA's public file shows about range holders.\u003C\u002Fli>\n\u003C\u002Ful>\n",[11,15,18,21,24,27,30,34,37,40,43,46,49],{"id":12,"text":13,"depth":14},"what-portability-changed","What portability changed",2,{"id":16,"text":17,"depth":14},"the-rules-behind-it","The rules behind it",{"id":19,"text":20,"depth":14},"how-networks-route-a-ported-number","How networks route a ported number",{"id":22,"text":23,"depth":14},"why-plan-data-goes-stale","Why plan data goes stale",{"id":25,"text":26,"depth":14},"how-a-live-lookup-sees-porting","How a live lookup sees porting",{"id":28,"text":29,"depth":14},"where-it-changes-a-decision","Where it changes a decision",{"id":31,"text":32,"depth":33},"sending-sms","Sending SMS",3,{"id":35,"text":36,"depth":33},"reviewing-risky-account-changes","Reviewing risky account changes",{"id":38,"text":39,"depth":33},"cleaning-lists","Cleaning lists",{"id":41,"text":42,"depth":14},"do-not-confuse-porting-with-recycling","Do not confuse porting with recycling",{"id":44,"text":45,"depth":14},"what-to-store-and-what-to-read-live","What to store and what to read live",{"id":47,"text":48,"depth":14},"a-minimal-check","A minimal check",{"id":50,"text":51,"depth":14},"where-to-go-next","Where to go next",[53,56,59,62,65,68],{"q":54,"a":55},"What is mobile number portability?","Mobile number portability, or MNP, lets a subscriber keep their phone number when they change operator. The digits and the country calling code stay the same, and only the network serving the number changes. Many regulators require operators to support it. The side effect for developers is that the first digits of a number can no longer be trusted to name its current carrier.",{"q":57,"a":58},"How do I know if a phone number was ported?","Ask the network. The numbering plan records which operator a number range was first assigned to, so it cannot show a later move. A live lookup returns the operator serving the number now and a \u003Ccode>ported\u003C\u002Fcode> flag. With Qelka, \u003Ccode>ported\u003C\u002Fcode> is \u003Ccode>true\u003C\u002Fcode> or \u003Ccode>false\u003C\u002Fcode> at the live level and \u003Ccode>null\u003C\u002Fcode> at the basic level, which cannot see porting.",{"q":60,"a":61},"Does porting change a phone number's country or format?","No. A ported number keeps its digits, its country calling code and its E.164 form. Only the serving operator, and with it the routing, changes. That is why you should store the E.164 number and read the carrier from a lookup when you need it, instead of deriving the carrier from the prefix.",{"q":63,"a":64},"Is a ported number suspicious?","Not by itself. People change operator all the time, and a ported number is normal. It becomes a signal when it lines up with others, for example a number ported within the last day that is also tied to an account recovery request from a new device. Use \u003Ccode>ported\u003C\u002Fcode> as one input to a review, never as a reason to refuse on its own.",{"q":66,"a":67},"Does the carrier in a basic lookup show who serves the number today?","No. At the basic level \u003Ccode>carrier.name\u003C\u002Fcode> is the operator that originally received the number range, and it is null when the numbering plan data names none. For the operator serving the number now, use the live level, which returns it with \u003Ccode>carrier.mcc\u003C\u002Fcode>, \u003Ccode>carrier.mnc\u003C\u002Fcode> and \u003Ccode>ported\u003C\u002Fcode>. The field \u003Ccode>carrier.source\u003C\u002Fcode> tells you which of the two you are reading.",{"q":69,"a":70},"Is a ported number the same as a recycled number?","No. Porting moves a live number between operators and the subscriber stays the same. Recycling happens when a number is disconnected and later assigned to someone new. A lookup that shows a carrier does not tell you whether the person changed. In the US the FCC set up a Reassigned Numbers Database for callers who need to check that.","2026-11-24",16,1459,{},1795559739301]