# The CallAttempt object

This represent a single call attempt. A call attempt is a single call made to the phone number.

## Fields

- `id` (string, required): The ID of the call attempt.
- `phone_number` (string, required): The phone number that was called. Formatted in E.164 format. Example: +1234567890
- `status` (enum (string), required): The status of the call attempt. One of: `queued`, `ringing`, `ongoing`, `completed`, `error`.
- `dial_error` (enum (string), required, nullable): The SIP error that occurred. One of: `number_non_attributed`, `too_many_calls`, `busy`, `temporarily_unavailable`, `no_answer`, `rejected`, `blocked`, `no_international_permission`, `precondition_failed`, `non_classified_error`.
- `result` (enum (string), required, nullable): One of: `IVR`, `voicemail`, `human`, `unknown`, `screening-filter`.
- `recording_url` (string, required, nullable): The URL of the audio recording of the call.
- `started_at` (any, required): The time the call started.
- `answered_at` (any, required): The time the call was answered.
- `ended_at` (any, required): The time the call ended.
- `transcript` (array of object, optional, nullable): The live transcript of the call, built in real time.
  - `role` (enum (string), required): One of: `user`, `assistant`, `human_agent`, `tool`.
  - `content` (string, required)
  - `tool_name` (string, optional)
  - `tool_arguments` (one of, optional)
    - One of, **Option 1** (map of any)
    - One of, **string** (string)
  - `tool_output` (string, optional)
  - `tool_is_error` (boolean, optional)
- `post_call_transcript` (array of object, optional, nullable): Higher-quality transcript generated after the call via Soniox async STT. Null until generated or when no recording is available.
  - `role` (enum (string), required): One of: `user`, `assistant`, `human_agent`, `tool`.
  - `content` (string, required)
  - `tool_name` (string, optional)
  - `tool_arguments` (one of, optional)
    - One of, **Option 1** (map of any)
    - One of, **string** (string)
  - `tool_output` (string, optional)
  - `tool_is_error` (boolean, optional)
- `structured_output` (map of any, optional, nullable): The data extracted from the call, using the structured output config from the parent call object.
- `assistants_used` (array of string, optional, nullable): Assistant node ids entered during this attempt, in traversal order.
- `assistant_names` (map of string, optional): Names of the assistants in `assistants_used`, keyed by id. Only set when the attempt went through several assistants (a multi-step call).
- `ended_by` (enum (string), optional, nullable): Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or 'system' (e.g. max duration limit). One of: `agent`, `user`, `system`.
- `end_reason` (enum (string), optional, nullable): Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call', 'voicemail', 'transfer', 'ivr_no_navigate'. One of: `client_initiated`, `connection_timeout`, `human_takeover`, `ivr_no_navigate`, `max_duration`, `participant_removed`, `sip_trunk_failure`, `tool_end_call`, `transfer`, `user_inactive`, `user_rejected`, `user_unavailable`, `voicemail`, `speed_dial_abandoned`, `speed_dial_operator_missed`, `speed_dial_timeout`, `speed_dial_hangup`.
- `transferred_to` (string, optional, nullable): The number the call was transferred to, in E.164 format (e.g. +33123456789). Recorded by the agent from the destination it actually dialled, so it is the destination itself and not a name read off the transcript. Null when the call was not transferred, and on transfers placed before this was tracked.
- `handled_by_human` (boolean, required): Whether a human conducted (part of) this attempt — a jump-in / speed-dial takeover, or a transfer to a rep.
- `handled_by_ai` (boolean, required): Whether the AI agent conducted the conversation on this attempt. False for a silent speed-dial probe (whose agent only detects a human) and for attempts that were never answered.
- `handled_by_user` (object, required, nullable): The human operator (sales rep) who took over this attempt — jump-in takeover or speed-dial operator connection. Null for AI-only attempts and for takeovers recorded before this was tracked (fall back to a generic 'human' label).
  - `id` (string, required): The database user id of the assignee.
  - `email` (string, required)
  - `first_name` (string, required, nullable)
  - `last_name` (string, required, nullable)
- `sms_log` (array of object, optional, nullable): Automatic SMS sent after the call (voicemail and after-call), ordered oldest first. The in-call `send_sms` is excluded — it already appears in the transcript as a tool call.
  - `id` (string, required)
  - `type` (enum (string), required): One of: `in_call`, `voicemail`, `after_call`.
  - `to_phone_number` (string, required)
  - `message_body` (string, required)
  - `provider` (enum (string), required): One of: `twilio`, `vonage`.
  - `provider_message_id` (string, required, nullable)
  - `provider_status` (string, required, nullable): Delivery status in the provider's own vocabulary (Twilio queued/sent/delivered/failed/undelivered), so only interpretable alongside `provider`. Null when the provider hasn't reported one — always the case for Vonage, whose receipts we don't yet parse.
  - `provider_error_code` (string, required, nullable): The provider's numeric reason for a terminal failure (e.g. Twilio 30034). Null unless the message failed.
  - `created_at` (any, required): When the SMS was sent.
- `actions` (array of object, optional, nullable): Tools the agent ran for this attempt, in call and after it, ordered oldest first. This is the decision trail — the delivery trail lives in `sms_log` / `email_log`.
  - `id` (string, required)
  - `phase` (enum (string), required): One of: `in_call`, `post_call`.
  - `tool_name` (string, required)
  - `arguments` (map of any, required)
  - `status` (enum (string), required): One of: `succeeded`, `failed`.
  - `error` (string, required, nullable)
  - `created_at` (any, required): When the tool ran.
- `email_log` (array of object, optional, nullable): Notification emails sent in connection with the call, ordered oldest first (from/to addresses, subject, sent time).
  - `id` (string, required)
  - `from_address` (string, required)
  - `to_emails` (array of string, required)
  - `subject` (string, required)
  - `resend_message_id` (string, required, nullable)
  - `calendar_invite_at` (any, required, nullable): Start of the callback or meeting the attached calendar invitation (`invite.ics`) was for. Null when the email carried no invitation.
  - `created_at` (any, required): When the email was sent.
- `speech_events` (array of [CallSpeechEvent](https://www.getrevox.com/docs/api/objects/call-speech-event.md), optional, nullable): Per-turn speech segments (VAD-derived) with timing and pipeline latencies, ordered by started_speaking_at_ms. Empty for calls recorded before this was tracked or for realtime sessions that don't emit them.