Voice: Phone Calls on Your Numbers
Voice is phone calls on the numbers you hold through Sent. It works differently from messaging. Messages go through one send call and Sent picks the channel. Calls are turned on one number at a time, and your own backend decides what every call does. This page explains how the pieces fit together. The guides at the end cover each piece in detail.
Before You Start
Phone calls are available on every account, with nothing to request. Everything starts with a voice number. Nothing has to be registered for calls, so a number can carry calls as soon as you turn them on.
Voice Is Per Number
Each number you turn calls on for is a voice number of its own, with:
- A callback URL, where Sent asks what to do with each call on the number.
- A signing secret (
whsec_...), which signs every question sent to that URL. It is shown when you turn calls on and when you rotate it, and nowhere else. - A status,
ACTIVEorINACTIVE.
One of your voice numbers is also the default line: calls placed from your app go out from it unless the user's voice token names another number. Your first voice number takes that role.
Getting a Number for Calls
POST /v3/channels/voice works in two ways:
- Send
numberto turn calls on for a number you already hold, for example one you send SMS from. Its SMS keeps working as before. - Leave
numberout to be given a new US number with calls on, optionally in anarea_code. This is a single request.
A number given to you by leaving number out carries calls only: it isn't on an SMS campaign and can't send messages. To call and text from the same US number, get it on one of your SMS campaigns first and turn calls on for it after. One number for SMS and calls walks through the three requests.
Your Backend Decides Every Call
When a call starts, Sent POSTs a signed question to the number's callback URL and follows the answer. There are two questions:
call.requestwhen a call starts. Your answer decides where the call goes.call.inputwhen a caller presses keys on a menu you played. Your answer decides what happens next, which is how menus chain.
Every answer ends in exactly one action:
| Action | What it does |
|---|---|
connectToUser | Rings a user of your app |
connectToNumber | Dials a phone number |
connectToConference | Puts the call into a conference room |
playMenu | Plays a menu and collects keypresses |
park | Holds the call |
hangup | Ends the call |
reject | Turns the call away without connecting it |
Before the action, an answer can run instructions: answer the call, speak text, play an audio file, send keypad tones, start or stop recording, or store a value that comes back on later questions about the call.
Answering Calls covers the questions, signatures, deadlines and retries. The Voice Callback Contract lists every field, action and instruction. Voice Recipes has worked answers you can copy.
Where Calls Come From
A call starts in one of two ways:
- Someone dials one of your voice numbers. The call is
inbound. - A user of your app places a call. Your backend mints a short-lived voice token for the signed-in user with
POST /v3/voice/tokens, and the app registers with the Voice SDK. The user can then call a phone number, another user of your app, or a conference room, and receive calls too. The call isoutbound. Your API key stays on your server: the app only ever holds the token. See Calls From Your App.
Both kinds go to your callback URL with the same questions, so one backend decides all of them, unless the number is bound to a voice agent, which answers calls to it instead (see Voice agents). A number can also be on without a callback URL, for example one added from the dashboard without one: calls placed from your app on it connect straight to whoever they dial, and calls to it are declined with callback_not_configured.
No API request starts a call on its own: every call begins with one of the two above. To reach a phone number from your backend, act on a call that is already happening: answer connectToNumber from your callback, or dial the phone into a conference room with POST /v3/voice/calls/{id}/participants.
Live Calls and Call Records
Every call is a record, app-to-app calls included. With the API you can:
- Read calls with
GET /v3/voice/callsandGET /v3/voice/calls/{id}. - Hang up a live call that has a phone on it. A call with no phone on it, such as one between users of your app or from a user of your app into a conference room, can't be hung up through the API.
- Record a call, stop the recording, and download it. A call connected to a user of your app can't be recorded.
- A call a voice agent answers can't be hung up or recorded through the API (
CONFLICT_015). - Manage conference participants: dial users or phone numbers into a room, mute and unmute them, and remove them.
The call webhooks report each call as it happens: call.initiated, call.answered, call.completed, call.failed, and call.recording_ready for each stored recording. The call id is the same on the questions, the record and the webhooks. See Calls, Recordings, and Participants and the call events.
What a Call Costs
- Only completed calls are charged, and every completed call is: calls from a phone, calls between users of your app, and calls into a conference room.
- Calls are charged by the minute. A leg to a phone number is charged at the destination's rate, and runs for as long as your balance affords.
- A forwarded call is one record with two charged legs, the caller's leg to your number and the leg to the number it was forwarded to.
- A call placed from your app, whoever it is to, needs a balance above zero, and so does an answer that connects an incoming call to a phone. Otherwise the call fails with
insufficient_balance. Adding a conference participant needs it too: without it, the request is refused with402(BUSINESS_003). - While your account's messages and calls are paused for a missing payment method (BUSINESS_032), the same calls fail with
payment_method_missing, and adding a conference participant is refused with403(BUSINESS_032).
The call record shows each leg's cost under legs, and their sum as price. See What a Call Costs.
Testing
POST /v3/channels/voice/{number}/testsends your callback URL a testcall.request, signed with the number's real secret, and reports what came back. No call is placed and nothing is charged."sandbox": trueon the voice endpoints validates a request and returns a simulated answer without buying a number, dialing anyone or writing anything. See Sandbox Mode.
Next Steps
Voice Numbers
Turn calls on for a number, get a new one, change its callback URL, rotate its secret, and test it
Answering Calls
What Sent asks your callback URL when a call arrives, and how to answer it
Calls From Your App
Mint voice tokens and place or receive calls with the Voice SDK
Calls, Recordings, and Participants
Read calls, hang up, record, and manage conference participants
Voice Recipes
A menu, a hold, a recorded call, a room per call, and routing by department
Channels
Why Sent routes SMS, MMS, RCS, and WhatsApp behind one send call: the four-channel model, channel discovery, routing factors, and content adaptation.
SMS Encoding & Message Length
How SMS character encoding (GSM-7 vs Unicode) and message concatenation determine character limits, segment counts, and cost