Diagnosis Overview¶
Note
AI Context
Complexity: Medium
Cost: Scenarios
static,signalandinboundare free. Scenarioinvite_probecan be billed if the destination number exists and answers. Scenarioreal_callplaces a real call that is excluded from VoIPBin billing (no billing record, no account balance needed). The carrier can still charge the call.Async: Yes.
POST /providers/{id}/diagnosesreturns202with arunningreport. PollGET /providers/{id}/diagnoses/{diagnosis_id}untilstatusiscompletedorfailed.Permission: ProjectSuperAdmin only. Direct-access tokens are refused.
A provider that is configured but does not carry calls is hard to debug from the outside. The provider diagnosis runs a set of checks against one provider, step by step, and returns a report that names what failed and why.
The health status of a provider (see Health Status) only tells whether the provider answers SIP OPTIONS. A diagnosis goes further: it checks the configured fields, the dial string that would be sent, the network path, the inbound path, and optionally one INVITE or one real call.
Scenarios¶
A diagnosis runs one or more scenarios. If scenarios is omitted or empty, the default is static, signal and inbound, which cost nothing.
Scenario |
Billing |
What it checks |
|---|---|---|
static |
Free |
The provider fields (empty hostname, hostname with a port, characters that are
not allowed in a hostname, invalid codec names, tech headers that cannot be
sent). If |
signal |
Free |
A DNS lookup of the hostname and SIP OPTIONS requests from the platform’s external SIP edge. 401, 403, 407, 5xx and no response are failures. Any other response, 6xx included, passes. Mixed results are reported as intermittent. |
inbound |
Free |
Whether the carrier addresses are on the platform’s allow list for inbound
traffic, and whether the inbound number ( |
invite_probe |
Can be billed |
Sends one SIP INVITE to |
real_call |
Carrier cost |
Places a real call from |
Warning
invite_probe and real_call send traffic to a real number. Use a number you own and expect charges from the carrier (real_call is not billed by VoIPBin). The platform cannot prove that the number is yours. destination must be a valid E.164 number with at least 6 digits in the national part, and some premium-rate prefixes are refused. real_call also needs source in E.164 format.
Asynchronous run and polling¶
POST /providers/{id}/diagnoses answers 202 at once with a report in the running state. A background runner then fills the report step by step. A step is appended with status running when it starts and replaced with its final status when it ends. Poll the report by id, or use GET /providers/{id}/diagnoses/latest.
The whole run is limited to 7 minutes. A step starts only when enough time is left for it, otherwise it is skipped with hint_code budget_exceeded. A report that has not changed for more than 8 minutes is shown as failed with hint_code runner_lost. Reports are kept for 7 days.
The latest report is kept per provider, so another ProjectSuperAdmin of the project sees the same report, including the destination and source numbers that were typed.
Limits¶
One running diagnosis per provider. A second request answers
409with reasondiagnosis_running. A lost runner can keep a provider locked for at most 8 minutes.invite_probeandreal_callare each limited to 5 runs per provider per hour. The window is fixed, so a burst at the border of two windows can reach 10 runs within one hour. A refused request answers429with reasonrate_limit_invite_probeorrate_limit_real_calland no report is stored.A run counts against the limit when it is accepted. It is given back only when nothing was sent (for example the probe was busy or the DNS lookup failed).
The limits are per provider. Many providers can still be diagnosed at the same time.
Observing an inbound call¶
To check the inbound path end to end, send inbound_number_id (a number of your customer, from GET /numbers) with observe_inbound set to true.
The
inbound.observestep is added with statusrunningandevidence.observe_until(RFC 3339 time).For 120 seconds after the start of the step, call the number from your own phone.
If an incoming call to that number is seen, the step passes and reports whether the call flow started and whether the SIP source address is known. If none is seen, the step fails with
hint_codeno_inbound_seen.
A request with only inbound and observe_inbound starts the observation at once. Combined with other scenarios, it runs last. Any incoming call to that number after the start counts as your call. A call that the carrier edge rejects is also reported as “not seen”.
Report and hint codes¶
Each step has a status, a one line English summary, evidence with measured values and an optional hint_code. See Diagnosis structure for the fields. A hint_code is a stable machine readable name for a finding. Treat an unknown code as an opaque label, because new codes can be added.
hint_code |
Meaning |
|---|---|
intermittent |
OPTIONS answers were mixed (some good, some failed) without a hard failure. |
check_unavailable |
The signaling check could not run. The step is skipped. The evidence holds the detail. |
probe_busy |
The probe component was busy. The step is skipped. Try again later. |
allow_list_unreadable |
The allow list for inbound addresses could not be read. The step is skipped. |
inbound_ip_not_allowed |
A carrier address is not on the allow list for inbound traffic. Ask the carrier for its signaling addresses and have them allowed. |
no_inbound_seen |
No incoming call arrived during the observation window. |
source_unavailable |
The SIP source address of the incoming call is not known. |
answered_billable |
The INVITE probe was answered. The provider can bill this call. |
auth_or_ip |
The provider rejected the INVITE with 403. Check the credentials and that the platform address is allowed by the provider. |
number_or_tech_prefix |
The provider rejected the INVITE with 404 or 484. Check the number format, the
|
codec_mismatch |
The provider rejected the INVITE with 488. Check the |
destination_unavailable |
The provider answered the INVITE with 480, 486, 600 or 603. The route works, the destination is unavailable or busy. The step is a warning. |
provider_rejected |
The provider rejected the INVITE with another final code. |
no_provisional_response |
The provider sent no provisional response to the INVITE. |
no_progress |
The INVITE got a provisional response but no final answer in time. |
probe_input_refused |
The input could not be sent as a probe. No verdict on the provider. |
budget_exceeded |
Not enough time was left to start the step. The step is skipped. |
no_inbound_rtp |
A real call connected but no RTP arrived from the provider. |
no_outbound_rtp |
The platform sent RTP but this does not prove that the provider heard it. Check
the |
media_stats_unavailable |
RTP counters could not be read. The |
runner_panic |
The runner failed unexpectedly. The report is |
runner_lost |
The report was not updated for 8 minutes and is shown as |
shutdown |
The platform restarted during the run. The report is |
The INVITE probe does not send the internal codec header that a real call uses and sends no caller id override. A provider that checks the caller id or the codec header can answer differently to a real call. real_call is the reference.
Limitations¶
The SIP source address of an inbound call can be empty. The step then reports
source_unavailable.RTP direction counters come from the media server. The packet counters are cumulative and the verdict uses the last good snapshot before hangup. The counter format was not verified against every media server version.
A real call that is answered late (after about 30 seconds) leaves a short window. The
dtmfandmediasteps are then judged on that window, and the report says so. A real call is cut at 90 seconds after creation.The diagnosis shows the full request URI and header values to the ProjectSuperAdmin. Only the helper view is reduced.
LLM helper¶
POST /providers/{id}/diagnoses/{diagnosis_id}/interpret asks an LLM helper to explain a report in plain English and to suggest changes to the provider.
The helper is not available when the platform has no key configured for it.
GET /provider_helper/statusreturns{"available": false}and the interpret call answers200withavailablefalse, an emptymessageand no suggestions.Suggestions are advice only and are never applied automatically. Apply a change yourself with
PUT /providers/{id}.Each suggestion has
field(hostname,tech_prefix,tech_postfix,codecsortech_headers),current_value(read from your provider by the platform, not by the model),suggested_value,reasonandbasis.basisisrulewhen the suggestion follows ahint_codeof the report andinferencewhen it is the helper’s own estimate. Fortech_headersthecurrent_valuelists header names only.A busy helper or a reached daily limit answers
429or503with a reason code. Try again later.
Privacy of the helper¶
The helper receives a reduced copy of the report and of the provider:
Tech header values are never sent. Only the header names are sent.
Full phone numbers (
destination,source), the request URI, IP addresses and call ids are never sent.tech_prefixandtech_postfixare sent only as a shape: digits become9, letters becomea, other characters stay and the length is kept. For exampleab-4821#is sent asaa-9999#.From each step, only a fixed set of evidence values is sent: codes, counts, delays and flags.
The provider hostname, the codec list and the header names are sent, because the suggestions refer to them.