Skip to content

ElevenLabs

ElevenLabs Conversational AI runs your agent (voice, persona, knowledge, tools) and exposes a WebSocket per session. The bridge proxies Teler call audio into that WebSocket and relays the agent’s response back.

VariableRequiredDefaultDescription
ELEVENLABS_WEBSOCKET_URLyesnoneThe agent’s WebSocket URL, e.g. wss://api.elevenlabs.io/v1/convai/conversation?agent_id=<id>
ELEVENLABS_SAMPLE_RATEno16kAudio sample rate. 8k or 16k.
TELER_API_KEYyesnoneYour Teler API key from the dashboard.
NGROK_AUTHTOKENyes (local)nonengrok auth token for the public tunnel.
Terminal window
git clone https://github.com/frejun-tech/teler-elevenlabs-bridge
cd teler-elevenlabs-bridge
cp .env.example .env
# fill ELEVENLABS_WEBSOCKET_URL, TELER_API_KEY, NGROK_AUTHTOKEN
docker compose up --build
Terminal window
curl -X POST http://localhost:8000/api/v1/calls/initiate-call \
-H "Content-Type: application/json" \
-d '{
"from_number": "+91XXXXXXXXXX",
"to_number": "+91XXXXXXXXXX"
}'

Same 3-endpoint shape as every Teler recipe. See Bridge for the conceptual model. The bridge holds two WebSockets: one to Teler, one to ElevenLabs, and pumps audio between them.

  • Replace ngrok with a real public host (Fly.io, Railway, ECS, your own).
  • Pin the Docker image rather than :latest.
  • Move ELEVENLABS_WEBSOCKET_URL to your secrets manager (it embeds your agent_id).
  • Forward webhooks to your backend rather than the bridge for durability.
SymptomLikely causeFix
Agent answers but voice is wrongWrong agent_id in WebSocket URLVerify the URL; agent must exist in your account
Phone rings then dropsBridge unreachable from public internetCheck ngrok; verify SERVER_DOMAIN
Choppy audioSample rate mismatchTry ELEVENLABS_SAMPLE_RATE=8k
Agent doesn’t recognize speechBackground noise, low input volumeTest with a clean audio source first