LiveKit guide
Connect a self-hosted LiveKit agent to a TryVox phone number.
LiveKit guide
End-to-end setup for LiveKit + TryVox numbers.
LiveKit works differently from Vapi, ElevenLabs and Retell. Those host your agent for you, so TryVox can read a list of agents and you pick one. LiveKit is infrastructure: you write and run the agent yourself, and it registers with LiveKit under a name. There is no agent directory to read, so TryVox asks you to type that name instead of offering a dropdown.
Everything else — trunk provisioning, inbound routing, recording, CDRs and billing — works exactly as it does for the hosted providers.
Prerequisites
- TryVox account with at least one Active phone number.
- LiveKit Cloud project (cloud.livekit.io).
- A LiveKit agent you can run, built with the Agents SDK. Note the
agent_nameit registers with — you will need it verbatim.
Your agent must set an explicit agent_name. An agent started without one is only dispatched to rooms automatically and will not be picked up by the dispatch rule TryVox creates, so callers would hear silence.
1. Collect four values from LiveKit
| Value | Where |
|---|---|
API key (APIxxxx…) | Settings → API Keys |
| API secret | Settings → API Keys |
Project URL (wss://…livekit.cloud) | Settings → General |
SIP host (…sip.livekit.cloud) | Settings → Project → SIP URI |
The SIP URI is displayed as sip:abc123.sip.livekit.cloud. Enter it without the leading sip: — TryVox strips it for you if you leave it on, but the field expects a bare host.
2. Connect LiveKit
- TryVox dashboard → AI Agents → Connect provider.
- Provider: LiveKit.
- Display name: any label.
- Fill in API secret, API key, Project URL and SIP host.
- Connect.
TryVox signs a short-lived token with your secret and lists your SIP trunks to confirm the credentials carry the permissions binding needs. If that fails you'll see the error immediately rather than at first call.
3. Bind a number
- Connect number → pick a TryVox number → type your agent name → Connect.
Binding creates three resources in your LiveKit project:
| Resource | Purpose |
|---|---|
| Inbound trunk | Accepts calls TryVox sends for this number. Locked to TryVox's SBC IP. |
| Outbound trunk | Lets the agent dial out through TryVox, with this number as caller ID. |
| Dispatch rule | Puts each caller in their own room and dispatches your agent into it. |
All three are scoped to the one number, so two bindings never interfere. Inbound calls arrive at sip:<E.164>@<your-sip-host>.
Don't delete these in the LiveKit console. Disconnect the number in TryVox and we clean up all three; deleting by hand leaves a binding pointing at resources that no longer exist.
4. Outbound calls
Agent-initiated outbound works through the same binding. TryVox dispatches your agent into a fresh room first, then dials the callee into it — LiveKit cannot attach an agent as part of the dial itself, so the order matters. Call context (your client_ref and any dynamic variables) arrives as JSON on the dispatch metadata, which your agent reads off the job.
Security note
TryVox pins the inbound trunk's allowed_addresses to its SBC egress IP. Guides that tell you to set 0.0.0.0/0 are telling you to accept SIP from the entire internet — anyone who learns your project's SIP URI could then place calls into your agent on your bill. TryVox refuses to create a binding if no allowlist is configured rather than fall back to an open one.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Credentials rejected on connect | Secret and key swapped | The long random value is the secret; APIxxxx… is the key. |
| Call connects, caller hears silence | No worker registered under that name | Confirm your agent is running and its agent_name matches the binding exactly — it's case-sensitive. |
LiveKit returns 404 does not match Trunks or Dispatch Rules | Number format mismatch | The number on the trunk, the dispatch rule and the INVITE must match byte for byte in E.164. Re-bind from TryVox rather than editing in the LiveKit console. |
| Inbound calls rejected | Allowlist drift | TryVox pins the trunk to its SBC IP at bind time. If that IP changed, disconnect and reconnect the number. |
| Outbound fails, agent waits in an empty room | Dial failed after dispatch | TryVox tears the dispatch down automatically; check the destination number is E.164 and the account has balance. |