Skip to navigation

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.

SymptomCheck firstLikely end_reason or codePage
The phone never ranggetCall: dial_outcome and dial_sip_codenever_connected, with dial_outcome no_answer, busy, rejected, invalid_number or failedPlace calls and read results
Rasen refused the callThe error answer of createCall. A refused call start dials nothingworkspace_concurrency_full (429), at_capacity (503; details.reason workspace_limit when the workspace is full), rate_limited (429), quota_exceeded (429), workspace_concurrency_unallotted (403), agent_not_live (409)Limits and quotas, Rate limits, Retry after a refusal
The agent did not answer an inbound callgetPhoneNumber: inbound_agent_id, inbound_setup, next_action. getAgent: stateNo call when the number has no inbound agent or the agent is not live. A slow before-call tool shows timing: pre_call with reason pre_call_timeoutRoute phone numbers to agents, Add a before-call tool
The caller heard silence, then the call endedAgent setting inactivity_timeout_secondstimeout. A platform failure ends with pipeline_error or worker_crashedCall lifecycle
The call ended at 30 minutesAgent setting max_call_duration_secondstimeoutLimits and quotas
A tool failed or timed outlistCallToolOutcomes: state and reasontool_deadline_exceeded, tool_effect_uncertain, tool_response_too_large, tool_call_failed, outbound_destination_refusedRead tool call logs, Add tools and MCP servers
A transfer failedgetCall: end_reason, transfer_destination_label. listCallToolOutcomes: items with kind: transfertransfer_failed, or a refused transfer request after the attempt limitConfigure call transfers
Voicemail or an IVR ended the callgetCall: end_reason. Agent settings voicemail_detection, voicemail_action, ivr_hangupvoicemail_detected, ivr_detectedBuild and publish an agent
No webhook arrivedlistWebhookDeliveries: state, last_status_code, last_error_class. getWebhookEndpoint: stateDelivery held, failed or retrying. Endpoint disabled or disabled_failingReceive call events with webhooks
Results stay pendinggetCall: state, transcript_state, extraction_state, summary_state, poll_after_secondsevidence_pending, which becomes incomplete after 900 secondsCall lifecycle
ItemValue
OperationsgetCall, listCallToolOutcomes, getCallTranscript, getCallSummary, getPhoneNumber, getAgent, listWebhookDeliveries
PathsGET /calls/{call_id}, GET /calls/{call_id}/tool-outcomes, GET /calls/{call_id}/transcript, GET /calls/{call_id}/summary, GET /phone-numbers/{number_id}, GET /agents/{agent_id}, GET /webhook-endpoints/{endpoint_id}/deliveries
Capabilitycalls.read for call reads; config.read for getPhoneNumber and getAgent; webhooks.manage for listWebhookDeliveries
Required headersAuthorization on every request
Call stateadmitted, active, evidence_pending, then the terminal complete, incomplete or aborted. The list is open
Result statestranscript_state: pending, ready, absent, failed, unavailable. extraction_state and summary_state: not_requested, pending, ready, failed, unavailable
evidence_pendingThe call ended and Rasen waits for its final records. After 900 seconds the call becomes incomplete
Inactivity timeoutinactivity_timeout_seconds, 1 to 3600, default 30. The timer runs while nobody speaks and no tool call is pending. There is no reprompt: the call ends with timeout
Call durationmax_call_duration_seconds accepts 60 to 14400 (default 1800). A call ends after 30 minutes at most, whatever the setting. A lower setting ends it sooner, with timeout
Tool limitsdeadline_ms 100 to 30000 (default 8000). max_response_bytes 256 to 65536 (default 32768). A larger response fails; Rasen never cuts it. Redirects are never followed
Tool timeout outcomeindeterminate with tool_effect_uncertain when the request was sent; failed with tool_deadline_exceeded when it was not
Before-call tool waitdeadline_ms, capped by carrier: twilio and plivo 10 seconds; exotel, smartflo and vobiz 3 seconds; sip_trunk 2 seconds. The caller hears ringing meanwhile
TransfersBlind transfer only. At most 2 attempts for each call (1 on Exotel); the second only after the first did not connect. A busy or unanswered destination returns the caller to the agent, except on Smartflo
Webhook attempt10 seconds for each attempt; up to 8 attempts. Waits between attempts: 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 10 hours, each ±10%
Webhook call eventsRasen creates a call’s end event only within 24 hours of the call end. call.analyzed comes at most 6 hours after the call ended
Webhook delivery history30 days
Page sizelimit 1 to 200, 50 by default
EnvironmentRASEN_API_BASE (the base URL, ending in /v1), RASEN_API_KEY, CALL_ID, NUMBER_ID, AGENT_ID, ENDPOINT_ID
Python3.10 or later, with the httpx package
TypeScriptNode.js 22 or later (built-in fetch)

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

curl -sS "$RASEN_API_BASE/calls/$CALL_ID" \
-H "Authorization: Bearer $RASEN_API_KEY"

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

curl -sS -G "$RASEN_API_BASE/calls/$CALL_ID/tool-outcomes" \
-H "Authorization: Bearer $RASEN_API_KEY" \
--data-urlencode "limit=200"

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:

state and reasonCauseFix
indeterminate, tool_effect_uncertainRasen sent the request and got no complete answer before deadline_ms. The effect is unknownMake the endpoint answer sooner, or raise deadline_ms. Check the effect in your system before you run it again
failed, tool_deadline_exceededThe deadline passed before Rasen sent the requestRaise deadline_ms, or make the endpoint reachable sooner
failed, tool_response_too_largeThe response body was larger than max_response_bytesReturn a smaller body, or raise max_response_bytes (at most 65536)
failed, tool_call_failedThe endpoint answered 400 or higher, or the request failedRead the run’s http_status with listAgentToolRuns
failed, outbound_destination_refusedThe endpoint answered a redirect, or its address is not public httpsPoint the tool at the final https URL
failed, pre_call_timeoutThe before-call tool did not answer within its capped deadline. The agent answered without its dataMake the lookup answer within the carrier cap in Facts

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

curl -sS -G "$RASEN_API_BASE/calls/$CALL_ID/transcript" \
-H "Authorization: Bearer $RASEN_API_KEY" \
--data-urlencode "limit=1"
curl -sS "$RASEN_API_BASE/calls/$CALL_ID/summary" \
-H "Authorization: Bearer $RASEN_API_KEY"

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.

curl -sS "$RASEN_API_BASE/phone-numbers/$NUMBER_ID" \
-H "Authorization: Bearer $RASEN_API_KEY"

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.

curl -sS "$RASEN_API_BASE/agents/$AGENT_ID" \
-H "Authorization: Bearer $RASEN_API_KEY"

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.

curl -sS -G "$RASEN_API_BASE/webhook-endpoints/$ENDPOINT_ID/deliveries" \
-H "Authorization: Bearer $RASEN_API_KEY" \
--data-urlencode "event_type=call.completed" \
--data-urlencode "event_type=call.failed" \
--data-urlencode "event_type=call.analyzed" \
--data-urlencode "limit=200"

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:

FindingCauseFix
No delivery for the callThe endpoint does not list the event type in events, or you created it after the event. Rasen creates no end event more than 24 hours after the call endAdd the event type with replaceWebhookEndpoint. Read the call with getCall
heldThe endpoint is disabled or disabled_failing. Held deliveries make no attemptEnable the endpoint with replaceWebhookEndpoint and "enabled": true
retryingAn attempt failed. next_attempt_at gives the next oneFix your receiver. last_error_class and last_status_code give the cause
failedAll 8 attempts of the chain failedFix your receiver, then resend with resendWebhookDelivery within 30 days
succeededYour receiver answered 2xxCheck your own processing of the event, by its event_id
call.failed instead of call.completedThe call ended without connecting. It gets no call.analyzedRead dial_outcome and end_reason in step 1

Rules

  • MUST read end_reason, state and the result states as open lists. Keep an unknown value and never read it as success.
  • MUST NOT run an indeterminate tool call again automatically. Check its effect first.
  • MUST wait poll_after_seconds between reads of a pending result. When it is null, stop polling the call. An incomplete call can still become complete, with no webhook event; a changes scan with listCalls and updated_since finds it.
  • MUST read the call with getCall when 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_id of 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

curl -sS "$RASEN_API_BASE/calls/$CALL_ID" \
-H "Authorization: Bearer $RASEN_API_KEY"

Expected output for a call whose results are final: terminal is true and poll_after_seconds is null.

{"id": "call_01j00000000000000000000000", "state": "complete", "terminal": true, "end_reason": "caller_hangup", "transcript_state": "ready", "extraction_state": "ready", "summary_state": "ready", "poll_after_seconds": null}

Errors

CodeCauseFix
not_foundThe call, number, agent or endpoint does not exist, or belongs to another workspace. A deleted endpoint answers not_found tooCheck the ID with listCalls, listPhoneNumbers, listAgents or listWebhookEndpoints
forbiddenThe key lacks calls.read, config.read or webhooks.manageUse a key with the capability in details.required_capabilities
invalid_requestA filter value or limit is invalid, or the cursor expired after 24 hoursFix the field in details.field. Start again without cursor
rate_limitedThe key or workspace sent more reads than its rate class allowsWait Retry-After seconds, then send the read again
workspace_archivedThe workspace is archivedAsk the organization owner to restore the workspace
unauthenticatedThe key is missing, expired or revokedSend a valid key in Authorization