Skip to main content
Velor

Docs / Voice

Voice integration.

Connect a Twilio number, configure your AI voice agent, and handle inbound and outbound calls — all grounded in your knowledge base. No audio pipelines to manage.

StackTwilio — telephony & SIPDeepgram — speech-to-textElevenLabs — text-to-speech

Looking for chat? Widget quickstart →

How it works

Every call — inbound or outbound — flows through the same pipeline: Twilio handles PSTN connectivity, Deepgram transcribes speech to text in real time, the Velor agent processes each turn against your knowledge base, and ElevenLabs synthesizes the reply back to audio. Transcripts are stored per call and available via webhook or API. Audio recording is opt-in per number (Record calls, off by default): when it is on, the call opens by saying it is recorded and the recording starts after that notice; when it is off, the notice says the call is transcribed, no audio is recorded, and recording_url is null. A voicemail is separate: it is the caller's own message, delivered as voice.voicemail_received with its own recording_url, and never appears as the call recording.

Inbound

A caller dials your Twilio number. Velor answers, greets using your configured persona, and handles the conversation.

Outbound

Trigger a call via API or SDK. Velor dials the number, delivers your message or conducts a full back-and-forth.

Prerequisites

  • A Twilio account with at least one purchased phone number that has voice capabilities enabled.
  • Your Twilio Account SID and Auth Token — both found on the Twilio Console home page.
  • A Velor workspace with at least one agent and a published knowledge base. The voice agent will use the same KB as your chat agent.
Step 1

Add your number with your Twilio, Deepgram and ElevenLabs keys

Go to Dashboard → Voice and fill in the add-number form: the phone number (E.164, e.g. +15551234567), your Twilio Account SID and Auth Token, a Deepgram API key (speech-to-text), an ElevenLabs API key (text-to-speech), the voice, and optionally a label, a greeting and a phone to ring on handoff. All three providers’ keys are required — calls run on your own accounts, which bill you directly.

  • Then press Configure Twilio webhooks on the number. It points the number’s Voice Configuration at Velor’s inbound handler and status callback, overwriting any webhooks already there.
  • Add each Twilio number you want answered as its own entry on the same page.
  • The Auth Token and both API keys are stored encrypted at rest and never shown in plaintext after you save them.
  • Number capabilities. Velor reads the number’s capability flags from your Twilio account when you add it. A number Twilio reports as unable to take voice calls is refused for voice (add it as messaging-only instead), and a number added as messaging-only that Twilio reports as unable to take SMS is refused. If Twilio reports no flags, the number is accepted and not checked.
  • Caller ID and STIR/SHAKEN. Whether a call shows as verified on the recipient’s phone depends on the attestation level the originating carrier signs it with, which Velor does not control. Twilio defines the levels as: A, the provider knows the caller and that they have the right to use the number as caller ID; B, the customer is known but the right to the caller ID is not; C, neither applies, including international calls. See Twilio’s trusted-calling documentation for how to raise the level on your account; we have not verified what level Twilio signs for numbers bought directly on an account, so check it there before promising customers a verified caller ID.
Step 2

Shape how the agent sounds

On each number under Dashboard → Voice, the persona settings set the AI name, a tone (Professional, Friendly or Casual), free-text style notes, the ElevenLabs voice model (Turbo v2.5 for the lowest latency, Multilingual v2 for the highest quality, Flash v2.5), endpointing (how long a pause ends the caller’s turn), hold music and the maximum hold time, and whether calls are recorded.

  • The voice is picked from a list of ElevenLabs voices when you add the number, and you can clone a voice from the same page.
  • Settings are per number, so two lines can sound different.
Step 3

Test an inbound call

Dial your connected Twilio number from any phone. The agent answers within two rings, plays your configured greeting, and responds to questions grounded in your knowledge base — exactly as the chat agent does, but over voice.

  • The greeting uses the persona name and opening line you set under Dashboard → Agent → Persona.
  • Live call transcripts appear in real time under Dashboard → Conversations — same view as chat.
  • If the agent cannot resolve the caller’s issue it will offer to transfer to a human and fire a voice.handoff_ready webhook.
  • Use Twilio’s test credentials and a SIP softphone during development to avoid per-minute charges.
Step 4

Place an outbound call via API

POST to /api/v1/calls with the destination number and a consent record. Once the checks below pass, Velor dials the number and returns a call object with a stable id you can use to poll status or correlate webhook events.

cURL
curl -X POST https://app.velorplatforms.com/api/v1/calls \
-H "Authorization: Bearer velor_live_<token>" \
-H "Content-Type: application/json" \
-d '{
"to": "+14155551234",
"consent": {
"basis": "prior_express_consent",
"reference": "crm:lead-8812 callback form",
"obtained_at": "2026-10-01T15:04:00Z"
}
}'
# Response
{
"id": "3f8c1b2a-...-uuid",
"status": "initiated",
"to": "+14155551234",
"from": "+14155550100",
"from_number_id": "9a1e...-uuid",
"twilio_call_sid": "CA..."
}

Consent and calling rules

Velor places these calls with an AI voice. In the US that needs the person’s prior express consent, and prior express written consent for marketing calls (the TCPA). Getting and keeping that consent is your responsibility under the Acceptable Use Policy. Before every call, from the API, a batch, a trigger or the dashboard, Velor checks:

  • A consent record. consent.basis is prior_express_written_consent or prior_express_consent, and consent.reference says where your record of it is kept (obtained_at is optional). Velor stores it with the call and in your audit log. It does not verify it. A call without one is refused with 400.
  • Your do-not-call list. A number on it, or one that texted STOP to your number, is refused with 403 do_not_call. A person who tells your agent on a call to stop calling them is added to the list automatically, and the call ends. See Settings → Outbound compliance.
  • Calling hours. 8am to 9pm where the person is, worked out from the number’s area code or country code (every zone it could be in must be inside the window). When the number doesn’t say, your configured calling window applies, and without one the call is refused. Refused with 422 outside_calling_hours.
  • A daily limit per number. At most your configured number of AI calls (3 at most) to one number in any 24 hours, counted across every way of placing them. Refused with 429 frequency_cap.
  • If any of these checks cannot run, the call is refused with 503 compliance_check_failed rather than placed unchecked. A refusal does not use up your Idempotency-Key.
  • Your API key is under Settings → API Keys, which issues live keys (velor_live_). Calls placed with one are real and billed, so point your first ones at a number you control.
  • Phone numbers must be in E.164 format: +14155551234.
  • Optional body fields: agent_id (defaults to your primary agent), caller_id (override the outbound number), metadata (arbitrary JSON echoed back in webhooks).
Step 5

SDK example

The @velorplatforms/sdk Node.js package wraps the REST API with typed return values and built-in retries. It is not on npm yet — the example below is the shape it will ship with, and everything it does is available today over the v1 REST API. Generate a typed client from /api/v1/openapi.json in the meantime.

TypeScript
import { VelorClient } from "@velorplatforms/sdk";
const velor = new VelorClient({ apiKey: process.env.VELOR_API_KEY! });
// Place an outbound call. The id is the conversation this call belongs to.
// consent is required: which consent the callee gave, and where you keep it.
const call = await velor.calls.create({
to: "+14155551234",
consent: { basis: "prior_express_consent", reference: "crm:lead-8812 callback form" },
});
console.log(call.id, call.status); // "3f8c…-uuid", "initiated"
// Poll or retrieve after completion
const completed = await velor.calls.get(call.id);
console.log(completed.status); // "completed"
console.log(completed.voice_minutes); // billable minutes
  • velor.calls.create() is non-blocking — the call is queued immediately and the method returns as soon as the call is initiated.
  • velor.calls.get(id) returns the latest call state. Poll it or rely on the voice.call_completed webhook instead.
  • Full SDK reference in the developer guide.
Step 6

Voice webhooks

Velor fires signed webhooks for every voice lifecycle event. Register your endpoint under Settings → Webhooks → Add endpoint and select the voice events you want. All webhook payloads are HMAC-SHA256 signed — see the webhook verification guide for verification code.

JSON
// Every delivery shares the envelope described at /docs/webhooks:
// { id, created_at, type, organization_id, data }. The voice fields below
// are what arrives in `data`.
// voice.call_completed
{
"type": "voice.call_completed",
"organization_id": "9a1e...-uuid",
"data": {
"call_sid": "CA...",
"conversation_id": "3f8c...-uuid",
"final_status": "completed",
"recording_url": "https://...",
"voice_minutes": 2.4
}
}
// voice.call_failed
{
"type": "voice.call_failed",
"data": {
"call_sid": "CA...",
"conversation_id": "3f8c...-uuid",
"call_status": "no-answer",
"answered_by": null
}
}
// voice.handoff_ready
{
"type": "voice.handoff_ready",
"data": {
"call_sid": "CA...",
"conversation_id": "3f8c...-uuid",
"caller_phone": "+14155551234",
"brief": "Customer asking about invoice #INV-0042.",
"queue_entry_id": "b4f1...-uuid",
"queue_sid": "WQ..."
}
}
// voice.voicemail_received — fires once when the recording lands, and again
// with `summary` once it has been transcribed.
{
"type": "voice.voicemail_received",
"data": {
"conversation_id": "3f8c...-uuid",
"recording_url": "https://...",
"call_sid": "CA...",
"caller_phone": "+14155551234",
"duration_seconds": 28,
"summary": "Question about renewal pricing.",
"voicemail_id": "c07a...-uuid"
}
}
EventFired when
voice.call_completedCall ended normally. Includes duration, resolution flag, and the recording URL when the number records calls (null otherwise — recording is opt-in).
voice.call_failedCall could not be connected or errored mid-call. Includes a reason code.
voice.handoff_readyAgent determined it cannot resolve the issue and a human should take over. Includes a summary and suggested queue.
voice.voicemail_receivedCaller left a voicemail (agent was configured to accept them). Includes transcript and recording URL.
Step 7

IVR / Pathways

The IVR studio at Dashboard → Voice → IVR lets you build branching call menus — press 1 for billing, press 2 for support — without writing code. Each branch can route to a different agent, a human queue, or a voicemail drop. Pathways are applied before the AI agent takes over, so the agent always has relevant context about why the caller rang.

  • Natural-language routing is also available: callers can state their intent and Velor classifies it into the correct pathway, no keypress required.
  • Pathways can be versioned and A/B tested from the dashboard.
  • Each pathway node exports a pathway_id included in all downstream webhook payloads for analytics.
Step 8

Batch calling

POST up to 50 phone numbers in a single request to /api/v1/calls/batch, each with its own consent record. Velor places them five at a time and answers once every number has been placed or refused, with one result per number: a call id, or the reason the number was refused. There is no batch identifier: each placed call’s id is its own, so track it with GET /api/v1/calls/:id and match its voice.call_completed webhook on conversation_id.

cURL
curl -X POST https://app.velorplatforms.com/api/v1/calls/batch \
-H "Authorization: Bearer velor_live_<token>" \
-H "Content-Type: application/json" \
-d '{
"calls": [
{ "to": "+14155551234", "consent": { "basis": "prior_express_written_consent", "reference": "form:8812" } },
{ "to": "+14155555678", "consent": { "basis": "prior_express_written_consent", "reference": "form:8813" } },
{ "to": "+14155559012", "consent": { "basis": "prior_express_written_consent", "reference": "form:8814" } }
]
}'
# Response — HTTP 207. Some calls may have been refused; read each result.
{
"count": 3,
"placed": 2,
"failed": 1,
"results": [
{ "to": "+14155551234", "ok": true, "id": "3f8c...-uuid", "twilio_call_sid": "CA..." },
{ "to": "+14155555678", "ok": true, "id": "7b2d...-uuid", "twilio_call_sid": "CA..." },
{ "to": "+14155559012", "ok": false, "error": "do_not_call",
"message": "This number is on your do-not-call list (or texted STOP)." }
]
}
  • Maximum 50 numbers per batch request. For larger lists, split into multiple batches and stagger them to avoid Twilio concurrency errors.
  • Each number follows the same rules as a single call: E.164 format, a consent record, the do-not-call list, calling hours and the daily limit. A batch where any call lacks a consent record, or that names one number twice, is rejected whole before anything is dialled. A number refused by the other checks gets ok: false with an error and a message, and the rest of the batch carries on.
  • There is no batch status endpoint. Track each call by its id with GET /api/v1/calls/:id or the voice webhooks. The response is the only per-batch record: keep the results array if you need to know which numbers were refused and why.

Question not answered here? caden@velorplatforms.com

Email us