line_classification
line_classification tells you what kind of line is behind a
phone number, for example a mobile or a fixed line, with a finer
classification next to it.
Use it before sending an SMS or a one-time code: a code sent to a fixed line will not arrive.
Request
Send the number and line_classification in
commands. No other input is needed.
{
"number": "+447808226974",
"commands": ["line_classification"]
}
Response
The result is in two string fields at the top level of the response:
{
"status": 0,
"status_message": "Response from one supplier",
"type": "mobile",
"etype": "10",
"version": "..."
}
| Field | Type | Meaning |
|---|---|---|
type |
string | The kind of line: mobile or fixed. |
etype |
string | A finer classification of the number, as a code from
1 to 33 sent as a string (for example
"10"). See the table below. |
Compare type without regard to case, and treat any value
not listed here as unknown rather than as an error.
etype values
etype comes from the numbering plan of the number's
country, as set by that country's regulator. Not every value exists in
every country.
| etype | Number range |
|---|---|
1 | Audiotext: automated voice information services. |
2 | Calling cards: prepaid calling card providers. |
3 | Electronic services: used in few countries, with a meaning that varies by country. |
4 | Freephone: the called party pays for the call. |
5 | Geographic: ordinary fixed lines with an area code. |
6 | Intermodal: ranges for fixed numbers ported to mobile. |
7 | Internet service provider numbers. |
8 | Local rate: non-geographic, charged as a local call. |
9 | Machine to machine: IoT devices, not people. |
10 | Mobile: standard mobile numbers. |
11 | Mobile (CDMA): equivalent to 10 for the subscriber. |
12 | Mobile to mobile: automated applications, like 9. |
13 | National geographic: geographic codes by region. |
14 | National rate: non-geographic, charged as a national call. |
15 | Non-intermodal: fixed or mobile, no porting between the two. |
16 | Paging devices. |
17 | Payphones. |
18 | Personal numbering services. |
19 | Mobile station roaming number: a temporary number used to route calls to a roaming phone. |
20 | Premium rate. |
21 | Routing code: defined, but no ranges currently allocated. |
22 | Satellite phones. |
23 | Shared cost: the caller and the called party share the cost. |
24 | Commercial short codes. |
25 | Specialized mobile radio. |
26 | Telegram network: almost unused today. |
27 | Universal access initiatives. |
28 | Videotex. |
29 | Virtual private network services. |
30 | Voicemail, geographic. |
31 | Voicemail, mobile. |
32 | VoIP. |
33 | Wireless geographic: regional mobile ranges, such as wireless local loop. |
For fraud checks, 9 and 12 (machines, not
people), 32 (VoIP) and 22 (satellite) are the
values most often worth an extra look.
When there is no type or etype
If the source could not classify the number or could not be reached,
the response has neither field. The status is
4, and the status_message names
line_classification among the commands that returned no
data. If the number's country is not covered, the status
is 2, or 4 when other commands were served.
Billing
A response with type or etype is charged. A
response with neither is not charged.