divert_detector
divert_detector tells you whether unconditional call
forwarding is active on a phone number: whether every incoming call is
sent to another destination, whatever the state of the phone (busy,
unreachable or not answering).
An active unconditional forward is a strong fraud signal. It is how a fraudster can take over the voice calls of a legitimate number, for example to receive a one-time code read out by an automated call or to answer a bank's verification call in the customer's place.
Request
Send the number and divert_detector in
commands. No other input is needed: the operator is asked
for the forwarding state of the line in real time.
{
"number": "+447808226974",
"commands": ["divert_detector"]
}
divert_detector is not available in every country. Where it
is not available, see Billing.
Response
{
"status": 0,
"status_message": "Response from one supplier",
"divert_detector": {
"unconditional_call_forward": 0
},
"version": "..."
}
| Field | Type | Meaning |
|---|---|---|
unconditional_call_forward |
integer | The state of unconditional call forwarding on the number. See the table below. |
unconditional_call_forward values
| Value | Meaning |
|---|---|
1 | Unconditional call forwarding is active. |
0 | No unconditional call forwarding is active. |
-1 | No data: the operator holds no forwarding information for this number, so the state can neither be confirmed nor denied. |
Treat -1 as "unknown", never as "no forwarding". Only
0 says that no unconditional forward is active.
When there is no divert_detector block
If the operator could not be reached, did not answer, or the check is
not enabled for that operator, the response has no
divert_detector block. The status is
4, and the status_message names
divert_detector 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 a divert_detector block is charged,
including when the value is -1: that is an answer from the
operator. A response without the block is not charged.