Troubleshoot a call
Summary
This guide starts from what you saw on a call and points to the record that explains it. It reads the call, its tool calls, its results, the phone number and agent that answered it, and the webhook deliveries for it. It does not list every end reason; see Call end reasons.
Facts
Find your symptom, then check the field in the second column first.
Steps
Set CALL_ID to the id of the call, from listCalls, searchCalls, the call_id of
createCall or a webhook event.
1. Read the call and why it ended
Read end_reason with the routing table in Facts. dial_outcome and dial_sip_code have a value only
for a call that a carrier dial placed. They are null for inbound, browser, and test calls. An
aborted call never started. Keep an end_reason, state or dial_outcome value you do not know,
and never read it as success.
2. Read the call’s tool calls
Each item is one tool call, oldest first. kind is webhook, mcp, end_call or transfer.
timing: pre_call marks the before-call tool, which ran before the call was answered. Read
reason of each item that is not succeeded:
To read the arguments, result and HTTP status of one run, see Read tool call logs.
If next_cursor is not null, send it as cursor with the same limit to read the next page.
3. Read the transcript and summary readiness
Results and the call state are independent: a complete call can still have a pending
transcript. While a result is pending, wait poll_after_seconds and read it again. absent means
the call has no transcript. not_requested means nothing asked for this result on this call. unavailable
means Rasen does not produce this result for this call. A call in evidence_pending for 900 seconds
becomes incomplete.
4. Check the phone number’s routing
Set NUMBER_ID to from_number_id of the call in step 1. For an inbound call that left no call,
use the id from listPhoneNumbers.
An inbound call reaches an agent only when inbound_agent_id has a value and inbound_setup is ready.
A stored assignment does not prove that the carrier routes the number. needs_provisioning and
failed need provisionPhoneNumber. manual_action_required needs the step in next_action. For
an outbound call, the agent MUST be in outbound_agent_ids.
5. Check that the agent is live
Set AGENT_ID to inbound_agent_id from step 4, or to agent_id of the call in step 1.
A paused or archived agent refuses every call. A draft agent was never published and has no
version to run. Publish a draft agent, and unarchive an archived one. The inbound caller of a refused call hears the
call end, and no call record exists.
6. Check the webhook deliveries for the call
Set ENDPOINT_ID to the id of your endpoint, from listWebhookEndpoints. This step reads one page
of the endpoint’s call-event deliveries and keeps those of the call.
The list is newest first. If the call is not on this page and next_cursor is not null, send it as
cursor with the same filters and limit. What you find:
Rules
- MUST read
end_reason,stateand the result states as open lists. Keep an unknown value and never read it as success. - MUST NOT run an
indeterminatetool call again automatically. Check its effect first. - MUST wait
poll_after_secondsbetween reads of apendingresult. When it isnull, stop polling the call. Anincompletecall can still becomecomplete, with no webhook event; a changes scan withlistCallsandupdated_sincefinds it. - MUST read the call with
getCallwhen no webhook arrived. Webhook delivery is at least once, but Rasen creates no end event more than 24 hours after the call end. - MUST quote the
request_idof an error answer when you contact support. - MUST NOT expect a call record for an inbound call that routing or the agent state refused.
Verify
Expected output for a call whose results are final: terminal is true and
poll_after_seconds is null.