Integrations

LiveKit

Put the LiveKit agent you run on a TryVox number. It answers calls, and it can call out.

Use a TryVox number with an agent you build and run on LiveKit. Callers reach your agent, and your agent can call customers from that number.

LiveKit differs from the hosted providers in one way. You run the agent yourself, and it registers under an agent_name. TryVox has no list to pick from, so you type that name.

How the call flows

Inbound:   Caller ──▶ TryVox number ──▶ TryVox ──▶ LiveKit room ──▶ your agent (by agent_name)

Outbound:  Your app ── TryVox API ──▶ TryVox puts your agent in a room, then dials the customer into it

Before you start

  • An active TryVox number, and approved KYC.
  • A LiveKit Cloud project, and an agent built with the LiveKit Agents SDK that sets an explicit agent_name and is running.
  • Four values from LiveKit → Settings: API key (APIxxxx…), API secret, Project URL (wss://…livekit.cloud), and SIP host (…sip.livekit.cloud, without sip:).

An agent started without an agent_name won't be dispatched to TryVox calls. Callers hear silence.

Connect

  1. TryVox dashboard → AI Agents → Connect provider → LiveKit. Enter the four values, then Connect.
  2. Open the integration → Connect number. Pick your TryVox number, type your agent name exactly, then Connect.

TryVox creates three things for that number in your LiveKit project: an inbound trunk (TryVox +91… (inbound)), an outbound trunk (TryVox +91… (outbound)), and a dispatch rule (TryVox +91…).

Test inbound

Start your agent, then call your TryVox number. Your agent joins the room and answers.

Test outbound

curl -X POST https://api.tryvox.io/v1/ai/integrations/$INTEGRATION_ID/calls \
  -u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
  -H "Content-Type: application/json" \
  -d '{ "to": "+919812345678", "client_ref": "lead-1042", "dynamic_variables": { "customer_name": "Rahul" } }'

Your agent receives the job with this metadata, as a JSON string:

{ "to": "+919812345678", "client_ref": "lead-1042", "dynamic_variables": { "customer_name": "Rahul" } }

Parse it in your agent, for example json.loads(ctx.job.metadata) in Python, and use the values in your prompt.

Working example: set it up over the API

# 1. Connect LiveKit: api_key is the API *secret*; the key ID goes in settings
curl -X POST https://api.tryvox.io/v1/ai/integrations \
  -u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN -H "Content-Type: application/json" \
  -d '{
    "provider": "livekit",
    "name": "My LiveKit agent",
    "api_key": "<livekit-api-secret>",
    "settings": {
      "livekit_api_key": "APIxxxxxxxxxxxx",
      "livekit_url": "wss://your-project.livekit.cloud",
      "livekit_sip_host": "abc123.sip.livekit.cloud"
    }
  }'

# 2. Bind your number. provider_agent_id is your agent_name
curl -X POST https://api.tryvox.io/v1/ai/integrations/$INTEGRATION_ID/bindings \
  -u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN -H "Content-Type: application/json" \
  -d '{ "tryvox_e164": "+918045671234", "provider_agent_id": "my-agent" }'

To check a worker is running under that name: POST /v1/ai/integrations/{id}/agents/verify with {"agent_name": "my-agent"}.

Common problems

ProblemFix
Credentials rejectedThe API key (APIxxxx…) and the secret are swapped.
The call connects but it's silentNo worker is running under that agent_name, or the name differs. It's case-sensitive.
Inbound calls are rejectedDon't edit or delete the TryVox +91… trunks or dispatch rule in LiveKit. Disconnect and reconnect the number in TryVox.
The outbound agent waits in an empty roomThe dial failed. Check to is E.164 and your wallet has balance.

On this page