Dial a phone number from your backend. calls.originate({ to, from, trunkId }) returns immediately with a sid. The control plane is request/response, so you re-fetch with calls.get({ sid }) to watch the call progress. You can also pass agent. The engine then attaches a server-side voice agent on answer, with no audio bridge in your process.

Client

Every snippet below assumes a configured Voice client.

Place the call

Originate over a SIP trunk and read the returned sid. The sid is the universal key that addresses the call for status, transfer, hangup, and audio.
trunkId names a SIP trunk that you already provisioned. Create one in the console or via the admin API before you call originate. See SIP trunking.

Attach an AI agent on answer

Pass agent. The engine then connects the audio bridge automatically when the callee answers. The server-side agent drives both legs of the conversation, so you do not open an AudioBridge yourself.

Cap the ring time

This example stops the attempt after 15 seconds instead of the default 30 seconds. The server clamps this value to 5..120.

Poll the call’s status

The control plane is request/response. Re-fetch to read the latest status. Status is one of dialing, ringing, in_progress, completed, failed, or no_answer.

Wait for the call to connect

Poll until the call leaves the ringing states. Then act on the outcome.
For high-volume outbound (thousands of numbers at a paced dials-per-second), do not loop originate yourself. Use the built-in paced campaign dialer. It owns the pacing and concurrency caps on the engine side. See Outbound & dialer.

Hang up

End the call when you are done. If you attached an AudioBridge yourself instead of passing agent, close the bridge first so that both tracks close cleanly.

Bring your own ASR

Skip the agent and bridge caller audio into your own recognizer.

Transfer to a human

Hand a live call off to a person or a different agent.

Outbound & dialer

Paced campaigns, concurrency caps, and the originate app modes.

Calls API

Full request/response shape for originate, get, transfer, and hangup.