Guides
Bring your own agent
Want to connect your own voice platform - ElevenLabs Conversational AI on your own workspace, Vapi, Retell, or even a plain Asterisk/FreeSWITCH IVR - to a volai number instead of the built-in agent? This page covers both directions: inbound and outbound calls. For outbound, you also skip the agent surcharge of 2.50 CZK/min (~EUR 0.10) - you run (and pay for) the agent yourself on your own platform.
1Own agent vs. the built-in one
Both paths run on the same number and the same credit - they only differ in WHO runs the conversation logic and how much that costs on top:
| Criterion | Built-in agent | Your own agent |
|---|---|---|
| Who drives the conversation | We do - one systemPrompt, our voice and our ElevenLabs workspace. | You do - any platform, your own prompt, your own voice, your own tools. |
| Setup | One POST /v1/agents call. | The number's SIP credentials + your platform's configuration (this page). |
| Call price | 0.92 CZK/min (~EUR 0.04) outbound, 0.50 CZK/min (~EUR 0.02) inbound | same - 0.92 CZK/min (~EUR 0.04) outbound, 0.50 CZK/min (~EUR 0.02) inbound |
| Agent surcharge | + 2.50 CZK/min (~EUR 0.10) | none (0 CZK) - you only pay for call minutes |
| Transcript, summary, voicemail detection | Yes, automatically. | No - your own platform handles it (or doesn't). |
You skip the agent surcharge, but you don't get anything extra from us for free either - you pay for your own platform (ElevenLabs, Vapi...) directly, at its own rates. We only bill call minutes on the volai line, same as with a SIP client or the built-in agent. Rates exclude VAT, like the whole price list.
2Inbound calls to your own agent
No new mechanics - just the existing mode: "sip" routing (same as for your own softphone, see SIP) with your platform's sipUri address. For an ElevenLabs SIP-trunk number registered on YOUR OWN workspace, that's one with the same number as your volai line:
curl -X PATCH "https://volai.cz/v1/numbers/+420601234567" \
-H "Authorization: Bearer vk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"routing": {"mode": "sip", "sipUri": "sip:+420601234567@sip.rtc.elevenlabs.io"}}'And on your ElevenLabs account (Settings → Phone Numbers → Import → SIP trunk) you register this number with inbound_trunk_config:
{
"provider": "sip_trunk",
"phone_number": "+420601234567",
"label": "My own agent",
"inbound_trunk_config": {
"allowed_addresses": ["0.0.0.0/0"],
"media_encryption": "allowed"
}
}Using a different platform than ElevenLabs? Same principle - find out the SIP address it expects calls for your number on, and put that into sipUri.
3Outbound calls from your own agent (relay)
This is the reverse direction - your platform dials out on its own. Most voice AI platforms (ElevenLabs included) can't permanently register a phone line as a SIP client - they only send a single authenticated call using your line's credentials. The phone network won't let such a call straight through to the destination number, so you route it through a short-lived relay connection instead:
1. Point your platform at your line
Fetch your line's SIP credentials:
curl "https://volai.cz/v1/numbers/+420601234567/sip" \
-H "Authorization: Bearer vk_YOUR_KEY"{
"server": "sip.volai.cz",
"username": "123456",
"password": "a1b2c3d4e5f6"
}And set them as your platform's outbound trunk. For ElevenLabs, that's the outbound_trunk_config of the phone number in question (Settings → Phone Numbers → your number → Outbound calling), in exactly this shape:
{
"outbound_trunk_config": {
"address": "sip.volai.cz",
"transport": "udp",
"media_encryption": "allowed",
"credentials": {
"username": "123456",
"password": "a1b2c3d4e5f6"
}
}
}2. Create a relay connection
Right before the call (the connection has a short lifetime, see the limits below), call:
curl -X POST https://volai.cz/v1/relay \
-H "Authorization: Bearer vk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "+420777123456", "from": "+420601234567"}'{
"id": "rl_4f2a91cd",
"sipName": "volai_relay_2",
"sipUri": "sip:volai_relay_2@sip.volai.cz",
"expiresAt": 1756111760000,
"callId": "c_9d4e2b7f"
}3. Tell your platform to call the sipName
The bare name, not the full SIP URI
ElevenLabs to_number rejects a full SIP URI with "SipCallTo should be a phone number or SIP user, not a full SIP URI" - that's why the response above returns sipName (the bare volai_relay_2) and sipUri (the full sip:volai_relay_2@sip.volai.cz) SEPARATELY. Only the former belongs in to_number - never the full URI.
For ElevenLabs, this means calling /v1/convai/sip-trunk/outbound-call with to_number set directly to the sipName:
{
"agent_id": "agent_...",
"agent_phone_number_id": "phnum_...",
"to_number": "volai_relay_2"
}Using your own SIP client or PBX instead of ElevenLabs? Dial the full sipUri directly, like an ordinary SIP call - that restriction only applies to platforms that want a bare name without the sip: prefix.
4. What happens next
The phone network accepts the call under the name volai_relay_2, transfers it to your to and sets the visible caller ID to your from - the callee sees your volai line on their display, not the relay slot's internal name. Once the call ends, the lease is released and the minutes are billed exactly like a regular outbound call - 0.92 CZK/min (~EUR 0.04), no agent surcharge.
4Limits, quotas and security
| What | Value |
|---|---|
| Lease waiting for the first call (pending) | 120 s default, ttlSecs 15 to 300 s |
| Call in progress (active) | 15 minutes |
| Active leases per one of your numbers | at most 1 |
| Active leases per account | at most 2 |
| Lease usage | one-time - a second call on the same lease is rejected |
- from must be your own volai number - otherwise
from_number_not_owned. Without this check, you could spoof someone else's line as your caller ID. - Same gates as a regular call - do-not-call list (calls only, not SMS), automatic 30-day block after 3 failed attempts to the same number within 24 hours, premium-rate lines, protection against loops between volai numbers, the callee-number lock, and the general call rate limit. None of this can be bypassed through the relay.
- Pool full → 503 capacity_busy - relay slots are a shared concurrency cap for the WHOLE platform, not just your account. On
capacity_busynothing is billed, try again shortly. - The full REST reference (error codes,
GET/DELETEon leases) is in the REST API reference.
Related
MCP server
Connect Claude Code, Cursor and other AI editors.
REST API
Complete reference for every endpoint, incl. agent tools and recordings.
Voice agent
System prompt, tools, handoff to a human, recordings and structured call data.
SIP
Your own softphone, SIP credentials, outbound calls through a SIP client.