# Voice, recordings and transfers

**Feature availability**
ORDan voice is enabled. Recording and transfers are not currently enabled;
their actions return `feature_disabled` until available. Hosted assistants
with the `ordan.calls` scope receive the call, speak and listen tools when the
deployment has ORDan voice on; SMS remains off. See [available tools](mcp-hosted.md#available-tools).

## Outbound and inbound

`POST /v1/calls {to,line?,objective?,purpose?,planned_seconds?,max_duration_seconds?}`
requires `voice.outbound` and the Line binding, policy and budgets.
`max_duration_seconds` is 30–3600 (default 1800), cut to whole affordable
billing increments. Unverified routes are refused before execution.

Lifecycle: `authorized → routing → ringing → connected → completed`, with
`failed`, `busy`, `no_answer`, `canceled` terminal alternatives. Carrier
timestamps drive accounting: `answered_at` is carrier evidence, not HTTP
request time. Missing answer or cost evidence stays `pending` and is
reconciled from carrier records — never assumed free.

An inbound call routes to the Line's authorized agent. Poll
`/calls?status=ringing` or receive `call.received`; the agent answers with
`/calls/{id}/answer` (`voice.inbound`). The platform snapshots the call's
verified price at arrival — answering requires that snapshot. Decline or
end with `/hangup` when delegated: the call's agent (`calls.hangup`, or
`voice.inbound` for its own inbound call), a project key with `calls:write`
for its project's calls, or an org member. Hanging up a call that is
already over answers `200` with the call as it is, so a retry is safe.
Carrier limits and platform backstops
enforce budgets and withdrawn authority; any real overrun is still
recorded honestly.

`objective` is context and audit data: ORDan never speaks it, and it
does not supply agent intelligence. On a Line with [ORDan voice](#ordan-voice)
the agent speaks and listens through the API. Without it, ORDan carries no
audio for the agent: the call connects, and only keypad tones and transfers
act on it.

## ORDan voice

ORDan voice lets an agent with no audio of its own hold a phone call. ORDan
speaks the agent's text in the Line's voice and transcribes the other party.
The agent decides every word; ORDan never adds to, changes or completes
them, apart from its own fixed opening.

- **The owner's switch.** An owner turns it on per Line, in the console
  under *Lines* or with `PATCH /v1/lines/{id} {voice_mode:"ordan",voice?,voice_language?}`
  (an owner session or a project key; an agent cannot). `voice` is one of
  ORDan voice's voices, by name (today `default`), and `voice_language` a
  language such as `en-US`; null means the default. ORDan transcribes in
  that locale where its transcription model has it (`en-GB`, `pt-BR`), and
  otherwise in its language (`es-MX` as `es`).
- **The opening.** When a call in ORDan voice is answered, ORDan speaks
  first: that this is an automated voice calling on behalf of your
  organization, and the number to call back. Nothing the agent sends is
  spoken before it.
- **Consent.** Calls in an automated voice need the called person's prior
  consent. The first such call to each number waits for an owner's
  approval, which says so; approving records the owner's confirmation that
  the person agreed. Marketing calls stay blocked by the default policy.
- **Speak.** `POST /v1/calls/{id}/speak {text,interrupt?}` (`voice.outbound`
  or `voice.inbound`) on a connected call: up to 3000 characters, queued
  behind anything still being said. `interrupt: true` stops that and says
  this instead. `POST /v1/calls/{id}/speak/stop` stops everything; an owner
  can always stop it from their session too. Send an `Idempotency-Key`: if
  the carrier does not confirm a speech (`502`), or anything fails after the
  carrier took it, retrying with the same key returns that answer instead
  of speaking twice. The `ordan.call.speak` tool takes the same key as
  `idempotency_key`. If an `interrupt` fails
  before the new words are sent, the error says so and a retry sends them.
  Once an owner withdraws the agent's authority, speaking is refused
  (`403`). A `409`
  means the call is not connected, its opening is still being started
  (retry in a moment), or the Line's voice is off.
- **Listen.** `GET /v1/calls/{id}/transcript?after=&wait=&final_only=`
  (the call's agent, an owner, or a project key with `calls:read`)
  returns the segments after `after` (a `seq`), waiting up to `wait`
  seconds (0–25) while the call is live:
  `{status,segments:[{id,seq,role,text,is_final,at_seconds,utterance?}],next}`.
  `role` is `human` (the other party) or `agent` (what ORDan said, its
  opening included). Pass `next` as `after` to keep listening. Interim
  segments (`is_final: false`) come before the final one; a final human
  segment usually means they finished speaking. Once your media retention
  has passed, segments remain with `text: null`.
- **Barge-in.** When the other party talks over ORDan, it stops speaking
  and emits `call.barge_in`; the transcript shows what they said. Words
  they said before the current speech began never stop it. The
  opening is the exception: it is always said in full. While it plays, a
  barge-in stops nothing, `interrupt` queues behind it, and `/speak/stop`
  returns `409`.
- **Events.** `call.speech.started`, `call.speech.ended` (`spoken` or
  `stopped`), `call.transcript.segment`, `call.barge_in`, and
  `call.speech.billing.settled` when the call ends. Each names the call,
  its agent and its Line (`call`, `agent`, `line`), so the agent's own
  `GET /v1/events` and its project's keys include them. A segment event
  names the segment (`segment`, `seq`, `role`); read its words from the
  transcript.
- **Require it.** `POST /v1/calls {…,voice:"ordan"}` is refused with `409`
  when the Line's ORDan voice is off, rather than placing a call nobody
  speaks on. The hosted connector always sends it.
- **Pricing and limits.** ORDan voice is priced separately from the call,
  per minute of the answered call, and reserved with it: the call's time
  limit is what both budgets cover, and what can be spoken is capped by
  that limit. Your policy's per-action and monthly limits apply to the
  call and its voice together, and `POST /v1/policies/check` judges a call
  on such a Line the same way, the consent approval included. The call
  shows `speech.chars`; a paid account's `cost_micros` includes the speech
  charge. If the carrier refuses to transcribe a call,
  the call shows `transcription_failed_at`: ORDan can still speak on it,
  but its transcript stays empty, and a paid account isn't charged for
  that call's ORDan voice.
- **Today.** Outbound calls. Streaming a call's audio to your own voice
  runtime comes later.

## DTMF and records

`POST /calls/{id}/dtmf {digits,duration_ms?,sensitive?}` requires
`calls.dtmf`. Digits: `0-9 * # A-D w W`, 1–64 characters; `w/W` pause. Set
`sensitive: true` for PIN/account sequences so the ledger masks them.

`/recording/start` and `/recording/stop` require `calls.record`.
Recording is an explicit, separately-priced feature with minimum and
increment rounding; recorded seconds round upward. Audio stays at the
carrier: authorized owners/keys get a short-lived retrieval link; agents
receive recording summaries, not owner audio.

Report `/transcript {segments:[{role:"agent"|"human",text,at_seconds?}],text?}`
and `/outcome {outcome,summary?,...}` once after answering. These are your
runtime's reports — ORDan supplies measured duration and preserves
append-only records. On a call in ORDan voice, ORDan keeps the transcript
itself (`GET /transcript`); the outcome is still the agent's report.

## Transfers

`POST /calls/{id}/transfer {to,purpose?,category?,approval?}` requires
`calls.transfer`. A project key with `calls:write` transfers as the call's
agent, under that agent's grant and policy, so a new destination can wait
for approval as a new call would; an owner or developer can transfer from
their session. It reserves an invocation
fee plus a **separately quoted outbound target leg** using the owned
Line's caller ID. The returned `transfer: xfer_…` identifies the action.

Leg B has independent correlation, time limit and cost hold; its events
cannot re-price Leg A. A failed or unanswered leg still incurs the
invocation fee where carrier evidence confirms it. Terminal events are
`call.transfer.completed` / `call.transfer.failed`, with
`call.transfer.billing.settled` for delayed financial settlement.
