[{"data":1,"prerenderedAt":72},["ShallowReactive",2],{"content:en:blog\u002Fvoip-number-lookup":3},{"path":4,"locale":5,"section":6,"title":7,"description":8,"html":9,"headings":10,"faq":46,"updated":68,"order":69,"words":70,"meta":71},"blog\u002Fvoip-number-lookup","en","blog","Mobile, landline or VoIP: line types, number portability and carrier lookup","How a VoIP number lookup works: line types from numbering plans, why North America cannot tell mobile from landline, porting, and live carrier lookups.","\u003Cp>A line type lookup tells you whether a phone number comes from a range opened for mobile, landline, VoIP or another service, as defined by its country's numbering plan, and a live carrier lookup adds which operator serves the number today and whether it was ported. VoIP shows up clearly only where the plan reserves ranges for it, such as 056 in the UK or 09 in France. Everywhere else, and in all of North America, a VoIP number can look like any landline or mobile, so the current carrier is the better clue.\u003C\u002Fp>\n\u003Ch2 id=\"the-line-types-a-numbering-plan-defines\">The line types a numbering plan defines\u003C\u002Fh2>\n\u003Cp>Every national plan reserves ranges for each kind of service. Google's libphonenumber turns those plans into one pattern per type and per country, and the phone API returns the matching type in \u003Ccode>line_type\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>\u003Ccode>line_type\u003C\u002Fcode>\u003C\u002Fth>\n\u003Cth>What it is\u003C\u002Fth>\n\u003Cth>Example\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>mobile\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>A number on a cellular network\u003C\u002Ftd>\n\u003Ctd>+33 6 12 34 56 78\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>landline\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>A fixed line tied to an exchange area\u003C\u002Ftd>\n\u003Ctd>+49 30 123456\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>fixed_line_or_mobile\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>A range the plan does not split\u003C\u002Ftd>\n\u003Ctd>+1 201-555-0123\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>voip\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>A range reserved for internet telephony\u003C\u002Ftd>\n\u003Ctd>+33 9 12 34 56 78\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>toll_free\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Free for the caller, paid by the receiver\u003C\u002Ftd>\n\u003Ctd>+1 800-234-5678\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>premium_rate\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>The caller pays extra, part of it to the service\u003C\u002Ftd>\n\u003Ctd>+1 900-234-5678\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>shared_cost\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Caller and receiver share the cost\u003C\u002Ftd>\n\u003Ctd>+34 901 12 34 56\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>personal_number\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>A number that forwards to the owner's chosen phone\u003C\u002Ftd>\n\u003Ctd>+44 70 1234 5678\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>pager\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>A paging service\u003C\u002Ftd>\n\u003Ctd>+44 76 4012 3456\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>uan\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Universal access number: one number for an organization's sites\u003C\u002Ftd>\n\u003Ctd>+44 55 1234 5678\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>voicemail\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Direct access to a voicemail box\u003C\u002Ftd>\n\u003Ctd>+49 177 99 1234567\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>unknown\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>No type matched, usually because the number is invalid\u003C\u002Ftd>\n\u003Ctd>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>The examples are sample numbers published in libphonenumber's metadata or in fictional ranges. They show formats; nobody answers them.\u003C\u002Fp>\n\u003Ch3 id=\"one-country-many-ranges\">One country, many ranges\u003C\u002Fh3>\n\u003Cp>The UK shows how much the first digits carry:\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>UK prefix\u003C\u002Fth>\n\u003Cth>Line type\u003C\u002Fth>\n\u003Cth>Example\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>01, 02\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>landline\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>+44 121 234 5678\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>03, 055\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>uan\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>+44 55 1234 5678\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>056\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>voip\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>+44 56 1234 5678\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>070\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>personal_number\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>+44 70 1234 5678\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>076, most ranges\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>pager\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>+44 76 4012 3456\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Other 07 ranges\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>mobile\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>+44 7400 123456\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>0800, 0808\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>toll_free\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>+44 800 123 4567\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>084, 087, 09\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>premium_rate\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>+44 901 234 5678\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>Both 070 and 076 start like a mobile number to a human reader. The plan says otherwise. That is why a rule like &quot;07 means mobile&quot; in your own code goes wrong, and why the check should read the whole number against the plan.\u003C\u002Fp>\n\u003Ch2 id=\"north-america-one-pattern-for-landline-and-mobile\">North America: one pattern for landline and mobile\u003C\u002Fh2>\n\u003Cp>In the North American Numbering Plan, behind \u003Ccode>+1\u003C\u002Fcode>, fixed and mobile numbers are assigned from the same area codes and the same exchanges. libphonenumber describes both with one pattern, so every geographic number in the United States, Canada and the other members of the plan comes back \u003Ccode>fixed_line_or_mobile\u003C\u002Fcode>. The same happens for some ranges elsewhere, such as libphonenumber's sample numbers for Mexico and India.\u003C\u002Fp>\n\u003Cp>This is not a gap in the data. The digits genuinely do not say. To learn whether a North American number is wireless today, you need the network, which means a live lookup.\u003C\u002Fp>\n\u003Ch2 id=\"voip-numbers-what-can-and-cannot-be-detected\">VoIP numbers: what can and cannot be detected\u003C\u002Fh2>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Situation\u003C\u002Fth>\n\u003Cth>What a plan-based lookup shows\u003C\u002Fth>\n\u003Cth>What a live lookup adds\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>A number from a reserved VoIP range: 056 in the UK, 09 in France, 050 in Japan, 55 in Italy\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>voip\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>The current operator\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>A VoIP service that hands out geographic numbers\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>landline\u003C\u002Fcode>, or \u003Ccode>fixed_line_or_mobile\u003C\u002Fcode> under \u003Ccode>+1\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>The current operator, which may be an internet telephony provider\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>A VoIP service that hands out numbers from mobile ranges\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>mobile\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>The current operator\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>A mobile or landline number ported to a VoIP provider\u003C\u002Ftd>\n\u003Ctd>The type of the original range\u003C\u002Ftd>\n\u003Ctd>The new operator, and \u003Ccode>ported: true\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>So &quot;is this number VoIP?&quot; has a precise answer only in countries with reserved ranges. Elsewhere, the plan describes where the number came from, and the live lookup tells you who serves it now. At the live level, the provider's line type replaces the plan's when the provider reports one, as when a \u003Ccode>fixed_line_or_mobile\u003C\u002Fcode> US number comes back \u003Ccode>mobile\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>Some carrier data sources go further and split VoIP into fixed services, tied to a physical address like a cable phone line, and non-fixed services, which anyone can obtain online. In the United States, the FCC defines interconnected VoIP in its rules at 47 CFR 9.3. The Qelka API reports a single \u003Ccode>voip\u003C\u002Fcode> value and does not make that split.\u003C\u002Fp>\n\u003Cp>Whether VoIP matters to you depends on the flow. Many real customers use internet telephony at work or at home. VoIP numbers that can be obtained in minutes are also easy to multiply, which matters for one-trial-per-number rules. Decide per flow rather than banning VoIP everywhere.\u003C\u002Fp>\n\u003Ch2 id=\"number-portability-why-the-range-type-goes-stale\">Number portability: why the range type goes stale\u003C\u002Fh2>\n\u003Cp>Number portability lets a subscriber change operator and keep the number. In the United States, wireless number portability took effect in November 2003, including ports between landline and wireless carriers. In the European Union, Article 106 of the European Electronic Communications Code guarantees it. Many other countries run similar schemes.\u003C\u002Fp>\n\u003Cp>Two consequences follow for lookups:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>The range type describes the origin.\u003C\u002Fstrong> A landline ported to a mobile operator keeps the type of its original range in plan data.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The prefix stops pointing to the network.\u003C\u002Fstrong> Calls and messages need another way to find the right operator. 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 identifying the switch that now serves it. Other countries use central databases or let operators query each other.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>A live lookup reads from sources of this kind at the time of the request, which is why it sees ports and a plan-based check cannot.\u003C\u002Fp>\n\u003Ch2 id=\"range-holder-versus-current-carrier\">Range holder versus current carrier\u003C\u002Fh2>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>\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>Question answered\u003C\u002Ftd>\n\u003Ctd>Which operator received this block of numbers?\u003C\u002Ftd>\n\u003Ctd>Which operator serves this number now?\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Source\u003C\u002Ftd>\n\u003Ctd>libphonenumber's carrier prefix table\u003C\u002Ftd>\n\u003Ctd>An upstream number-lookup provider\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>\u003Ccode>ported\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>null\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>true\u003C\u002Fcode> or \u003Ccode>false\u003C\u002Fcode>\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>Returned for mobile networks\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Landlines\u003C\u002Ftd>\n\u003Ctd>No carrier name\u003C\u002Ftd>\n\u003Ctd>The serving operator\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>\n\u003Cp>The prefix table names range holders for mobile, pager and landline-or-mobile ranges, and coverage varies by country. Under \u003Ccode>+1\u003C\u002Fcode>, it covers Caribbean countries and US territories but holds no entries for numbers in the US states or Canada. A difference in names between the two levels is not always a port: operators merge and rebrand, and virtual operators run on host networks. Only \u003Ccode>ported\u003C\u002Fcode> says whether the number changed hands.\u003C\u002Fp>\n\u003Ch3 id=\"mcc-and-mnc\">MCC and MNC\u003C\u002Fh3>\n\u003Cp>ITU-T E.212 defines the mobile country code (MCC, three digits) and the mobile network code (MNC, two or three digits). Together they identify a mobile network for roaming partners and SMS hubs, and they open the IMSI on every SIM card. MCCs are not calling codes: the United States uses MCCs 310 to 316 while its calling code is 1. They describe mobile networks only, so they stay empty for fixed lines.\u003C\u002Fp>\n\u003Ch2 id=\"look-up-line-type-and-carrier-with-the-api\">Look up line type and carrier with the API\u003C\u002Fh2>\n\u003Cp>A basic check returns the line type and the range holder from the plan:\u003C\u002Fp>\n\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-bash\">\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">curl\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> https:\u002F\u002Fapi.qelka.com\u002Fv1\u002Fphone\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  -H\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> \"Authorization: Bearer \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">$API_KEY\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  -H\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> \"Content-Type: application\u002Fjson\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  -d\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> '{\"phone\": \"+14155550123\"}'\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The response has \u003Ccode>line_type: &quot;fixed_line_or_mobile&quot;\u003C\u002Fcode> and \u003Ccode>carrier.source: &quot;numbering_plan&quot;\u003C\u002Fcode>. Ask for the network with \u003Ccode>&quot;level&quot;: &quot;live&quot;\u003C\u002Fcode>:\u003C\u002Fp>\n\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-bash\">\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">curl\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> https:\u002F\u002Fapi.qelka.com\u002Fv1\u002Fphone\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  -H\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> \"Authorization: Bearer \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">$API_KEY\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  -H\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> \"Content-Type: application\u002Fjson\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  -d\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> '{\"phone\": \"+14155550123\", \"level\": \"live\"}'\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\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\">  \"id\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"lkp_01M84BPZ037KMC9XHB5N9T5H0K\"\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\">  \"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\">  \"national\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"(415) 555-0123\"\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\">  \"country\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: { \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">\"code\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"US\"\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\">\"United States\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">\"calling_code\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"1\"\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\">  \"region\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"California\"\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\">  \"timezones\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: [\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"America\u002FLos_Angeles\"\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\">false\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\u003Cp>Values are illustrative. The live answer replaced \u003Ccode>fixed_line_or_mobile\u003C\u002Fcode> with \u003Ccode>mobile\u003C\u002Fcode> and named the serving network.\u003C\u002Fp>\n\u003Cp>In JavaScript, a function that runs the cheap check first and pays for the live one only when the plan cannot decide:\u003C\u002Fp>\n\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\"> API\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> 'https:\u002F\u002Fapi.qelka.com\u002Fv1'\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">async\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> function\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> lookup\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">phone\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">level\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\"> 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\">`${\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">API\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">}\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, level }),\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\">8000\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:#D73A49;--shiki-dark:#F97583\">  if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">!\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">response.ok) \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> null\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  return\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:#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\">export\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> async\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> function\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> smsChannel\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">phone\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\"> basic\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\"> lookup\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(phone, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'basic'\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\">  if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">!\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">basic \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">||\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> !\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">basic.valid) \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { send: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">false\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, reason: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'invalid'\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\">  if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (basic.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>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">) \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { send: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">true\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, lineType: \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:#D73A49;--shiki-dark:#F97583\">  if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (basic.line_type \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">===\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> 'voip'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">) \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { send: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">true\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, lineType: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'voip'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, unconfirmed: \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:#D73A49;--shiki-dark:#F97583\">  if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (basic.line_type \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">!==\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> 'fixed_line_or_mobile'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">) \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { send: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">false\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, reason: basic.line_type }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\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\"> live\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\"> lookup\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(phone, \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:#D73A49;--shiki-dark:#F97583\">  if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">!\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">live) \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { send: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">true\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, lineType: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'fixed_line_or_mobile'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, unconfirmed: \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:#D73A49;--shiki-dark:#F97583\">  return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { send: live.line_type \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">!==\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> 'landline'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, lineType: live.line_type, carrier: live.carrier.name, ported: live.ported }\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\u003Cp>A failed live lookup returns \u003Ccode>502 upstream_unavailable\u003C\u002Fcode> and is not billed, so the function falls back to sending and watching delivery reports. A live lookup sends the number to the lookup provider; the basic level never sends it outside. Results are cached for 7 days; send \u003Ccode>&quot;fresh&quot;: true\u003C\u002Fcode> when a routing or fraud decision depends on today's network.\u003C\u002Fp>\n\u003Ch2 id=\"what-to-do-with-each-line-type\">What to do with each line type\u003C\u002Fh2>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>\u003Ccode>line_type\u003C\u002Fcode>\u003C\u002Fth>\n\u003Cth>SMS or one-time code\u003C\u002Fth>\n\u003Cth>Signup form\u003C\u002Fth>\n\u003Cth>Calls\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>mobile\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Send\u003C\u002Ftd>\n\u003Ctd>Accept\u003C\u002Ftd>\n\u003Ctd>Call\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>fixed_line_or_mobile\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Send and watch delivery, or run a live lookup first\u003C\u002Ftd>\n\u003Ctd>Accept\u003C\u002Ftd>\n\u003Ctd>Call\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>landline\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Do not text\u003C\u002Ftd>\n\u003Ctd>Accept if calls work for you\u003C\u002Ftd>\n\u003Ctd>Call\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>voip\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Decide per flow: fine for notices, weigh abuse risk for codes\u003C\u002Ftd>\n\u003Ctd>Accept or flag\u003C\u002Ftd>\n\u003Ctd>Call\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>toll_free\u003C\u002Fcode>, \u003Ccode>shared_cost\u003C\u002Fcode>, \u003Ccode>uan\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Do not send\u003C\u002Ftd>\n\u003Ctd>Flag: a business line, not a person\u003C\u002Ftd>\n\u003Ctd>Call\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>premium_rate\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Never send\u003C\u002Ftd>\n\u003Ctd>Refuse\u003C\u002Ftd>\n\u003Ctd>Never call back unprompted\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>personal_number\u003C\u002Fcode>, \u003Ccode>pager\u003C\u002Fcode>, \u003Ccode>voicemail\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Do not send\u003C\u002Ftd>\n\u003Ctd>Ask for another number\u003C\u002Ftd>\n\u003Ctd>Usually not useful\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>unknown\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Do not send\u003C\u002Ftd>\n\u003Ctd>Ask for a correction\u003C\u002Ftd>\n\u003Ctd>Fix the number first\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>Refusing premium-rate, shared-cost and unknown numbers before any code goes out is one of the cheapest defenses against SMS pumping, where bots trigger codes to expensive routes and the attacker earns a share. \u003Ca href=\"\u002Fblog\u002Fprevent-fake-signups\">Stopping fake signups\u003C\u002Fa> combines it with email and IP checks.\u003C\u002Fp>\n\u003Ch2 id=\"a-note-for-us-callers\">A note for US callers\u003C\u002Fh2>\n\u003Cp>In the United States, the Telephone Consumer Protection Act (47 U.S.C. 227) puts stricter consent rules on autodialed or prerecorded calls and texts to wireless numbers. That is one reason US teams want to know whether a number is wireless, and porting is why the range type is not enough for that question. Numbers also get reassigned to new subscribers after disconnection; the FCC's Reassigned Numbers Database, available since 2021, lets callers check whether a number was permanently disconnected after a given date. This is context, not legal advice.\u003C\u002Fp>\n\u003Ch2 id=\"where-to-go-next\">Where to go next\u003C\u002Fh2>\n\u003Cp>The free \u003Ca href=\"\u002Ftools\u002Fline-type-lookup\">line type lookup\u003C\u002Fa> and \u003Ca href=\"\u002Ftools\u002Fcarrier-lookup\">carrier lookup\u003C\u002Fa> show both levels for any number, and the \u003Ca href=\"\u002Ftools\u002Fphone-number-lookup\">phone number lookup\u003C\u002Fa> shows everything at once. Every value of \u003Ccode>line_type\u003C\u002Fcode> is in the \u003Ca href=\"\u002Fdocs\u002Fapi-reference\u002Fphone\">phone API reference\u003C\u002Fa>, and the \u003Ca href=\"\u002Fphone-validation-api\">phone validation API\u003C\u002Fa> page covers pricing. To check numbers before you look at their type, read \u003Ca href=\"\u002Fblog\u002Fphone-number-validation\">phone number validation\u003C\u002Fa>, and to store them, \u003Ca href=\"\u002Fblog\u002Fe164-format\">E.164 format\u003C\u002Fa>.\u003C\u002Fp>\n",[11,15,19,22,25,28,31,34,37,40,43],{"id":12,"text":13,"depth":14},"the-line-types-a-numbering-plan-defines","The line types a numbering plan defines",2,{"id":16,"text":17,"depth":18},"one-country-many-ranges","One country, many ranges",3,{"id":20,"text":21,"depth":14},"north-america-one-pattern-for-landline-and-mobile","North America: one pattern for landline and mobile",{"id":23,"text":24,"depth":14},"voip-numbers-what-can-and-cannot-be-detected","VoIP numbers: what can and cannot be detected",{"id":26,"text":27,"depth":14},"number-portability-why-the-range-type-goes-stale","Number portability: why the range type goes stale",{"id":29,"text":30,"depth":14},"range-holder-versus-current-carrier","Range holder versus current carrier",{"id":32,"text":33,"depth":18},"mcc-and-mnc","MCC and MNC",{"id":35,"text":36,"depth":14},"look-up-line-type-and-carrier-with-the-api","Look up line type and carrier with the API",{"id":38,"text":39,"depth":14},"what-to-do-with-each-line-type","What to do with each line type",{"id":41,"text":42,"depth":14},"a-note-for-us-callers","A note for US callers",{"id":44,"text":45,"depth":14},"where-to-go-next","Where to go next",[47,50,53,56,59,62,65],{"q":48,"a":49},"How can I tell if a phone number is VoIP?","Look up its line type. Where a country reserves ranges for internet telephony, such as 056 in the UK, 09 in France, 050 in Japan or 55 in Italy, the numbering plan labels the number VoIP. Elsewhere, VoIP services hand out ordinary geographic or mobile numbers that look like any other. A live carrier lookup then tells you which operator serves the number today, which can point to an internet telephony provider.",{"q":51,"a":52},"Can you detect VoIP numbers in the United States?","Not from the number alone. The North American Numbering Plan has no ranges reserved for VoIP, and landline and mobile numbers share the same area codes, so a plan-based check returns landline or mobile for every geographic US number. A live lookup adds the operator currently serving the number. When that operator is an internet telephony provider, you have your answer; the digits never tell you.",{"q":54,"a":55},"Why does a US number show landline or mobile?","Because the US plan does not separate them. In the North American Numbering Plan, fixed and mobile numbers come from the same area codes and exchanges, so libphonenumber describes both with one pattern and reports fixed line or mobile. The same is true for Canada and the other members of the plan. A live lookup at the current carrier usually settles whether a given number is wireless.",{"q":57,"a":58},"What does ported mean in a phone number lookup?","It means the number has moved away from the operator its range was originally assigned to. Number portability lets subscribers change operator and keep their number, so the first digits stop pointing at the right network. A live lookup compares the serving operator with the range holder and reports ported as true or false. A plan-based lookup cannot see porting, so it returns null for that field.",{"q":60,"a":61},"Does a carrier lookup show the owner's name?","No. A carrier lookup tells you which network serves a number, and at the live level whether it was ported and its mobile network codes. It does not return the name or address of the subscriber. The Qelka API never returns the person or company behind a number, at either level. Caller name services are a separate kind of data with their own rules.",{"q":63,"a":64},"Can VoIP numbers receive SMS verification codes?","Some can and some cannot: it depends on the service behind the number. Many internet telephony services support text messages, others are voice only. VoIP numbers that can be obtained online in minutes are also easy to multiply, which is why some products refuse them for verification while others accept them. Decide per flow, and watch delivery reports rather than assuming either way.",{"q":66,"a":67},"How much does a live carrier lookup cost?","With Qelka, a live lookup costs 3 credits and a basic numbering plan check 1 credit. The basic check already returns the line type and the original carrier of the range; the live level adds the current carrier, mobile network codes and porting status. A live lookup whose provider fails returns HTTP 502 and is not billed. Results are cached for 7 days.","2026-11-23",12,2027,{},1795474029069]