Calls

List call sessions and dispatch outbound calls with the SDK.

List calls

Retrieve current and historical call sessions, including transcript snippets.

const calls = await voice.calls.get();
calls = client.calls()

Dispatch a call

Trigger an outbound call connecting a phone number to one of your agents.

const dispatch = await voice.calls.start("agt_8skd92ja", {
  phone: "+919876543210",
  name: "Priya Sharma",
});
dispatch = client.start_call(
    agent_id="agt_8skd92ja",
    phone="+919876543210",
    name="Priya Sharma",
)

Parameters

FieldTypeRequiredDescription
agentId / agent_idstringYesIdentifier of the agent that will run the call.
phonestringYesTarget phone number in E.164 format.
namestringYesCustomer name for personalized context.

Dispatch response

Dispatching returns { callId, roomName, status }. Track the call afterwards via the calls list using callId.

Call statuses

A call moves through a queued/dispatching state while it is being connected, then ends in one of two terminal statuses:

StatusMeaning
completedThe call ended normally (endReason: "call_ended").
failedThe call could not be completed or ended abnormally.

Completed calls in the list include durationSeconds, costPaise (what the call debited from your wallet), endReason, transcriptPreview, and the full transcriptRaw array of { role: "agent" | "user", text } turns.

Dispatch errors

Dispatch fails with HTTP 429 when the wallet can't cover the call (INSUFFICIENT_WALLET_BALANCE) or the workspace's concurrent-call limit is reached (CONCURRENCY_LIMIT_EXCEEDED) — see Pricing & Billing. It fails with HTTP 400 when no phone number is connected for the calling route — add one first on the Phone Numbers page.

On this page