Skip to content

LiveKit (outbound)

The LiveKit recipe is structurally different from the other recipes. Rather than using Teler’s media-streaming WebSocket bridge, it uses Teler’s SIP Trunk to dial outbound calls into LiveKit rooms where your LiveKit agent is already running.

A Node version is not currently available.

  • A LiveKit Cloud project
  • A LiveKit agent created and deployed in the LiveKit dashboard (status: Active)
  • LiveKit’s outbound SIP feature configured
  • A Teler SIP trunk created (see Configure a SIP Trunk)
  • The Teler SIP trunk ID
VariableRequiredDescription
LIVEKIT_URLyesYour LiveKit Cloud URL, e.g. wss://your-project.livekit.cloud
LIVEKIT_API_KEYyesLiveKit API key
LIVEKIT_API_SECRETyesLiveKit API secret
SIP_TRUNK_IDyesThe Teler SIP trunk ID configured in LiveKit
SIP_CALL_TOyesThe destination phone number in E.164 format
ROOM_NAMEyesLiveKit room name to dial the call into
AGENT_NAMEyesName of the deployed LiveKit agent. Must match the deployed name exactly.

The script issues a LiveKit SIP outbound dial. LiveKit places the call via your configured Teler SIP trunk, then connects the audio to the named room where your LiveKit agent is running.

Terminal window
git clone https://github.com/frejun-tech/teler-livekit-outbound
cd teler-livekit-outbound
cp .env.example .env
# fill all the LIVEKIT_*, SIP_*, ROOM_NAME, AGENT_NAME values
# follow repo README for run instructions

If your LiveKit agent shows Pending in the dashboard rather than Active, the first call may connect at the SIP layer but the agent will not respond, sometimes for ~30 seconds while it spins up.

Mitigations:

  • Verify the agent is Active in the LiveKit dashboard before testing.
  • Run a warm-up call (or a synthetic ping into the room) before customer-facing traffic.
  • For production, deploy with autoscaling minimums above zero.
SymptomLikely causeFix
First call rings but agent silentAgent in Pending stateWait for Active; warm up before live traffic
SIP call fails to dialWrong SIP_TRUNK_IDVerify the trunk ID in LiveKit’s SIP config
Agent never joins the roomAGENT_NAME mismatchMust match the deployed agent name exactly
Outbound number rejectedE.164 format errorUse full international format, e.g. +91XXXXXXXXXX