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.
Reference repos
Section titled “Reference repos”Prerequisites
Section titled “Prerequisites”- An ElevenLabs account with a Conversational AI agent created
- A Teler account with an active API key
- One Teler phone number on your account
- An ngrok auth token (for local development)
- Docker and Docker Compose
Configuration
Section titled “Configuration”| Variable | Required | Default | Description |
|---|---|---|---|
ELEVENLABS_WEBSOCKET_URL | yes | none | The agent’s WebSocket URL, e.g. wss://api.elevenlabs.io/v1/convai/conversation?agent_id=<id> |
ELEVENLABS_SAMPLE_RATE | no | 16k | Audio sample rate. 8k or 16k. |
TELER_API_KEY | yes | none | Your Teler API key from the dashboard. |
NGROK_AUTHTOKEN | yes (local) | none | ngrok auth token for the public tunnel. |
5-minute setup
Section titled “5-minute setup”git clone https://github.com/frejun-tech/teler-elevenlabs-bridgecd teler-elevenlabs-bridgecp .env.example .env# fill ELEVENLABS_WEBSOCKET_URL, TELER_API_KEY, NGROK_AUTHTOKENdocker compose up --buildgit clone https://github.com/frejun-tech/teler-elevenlabs-node-bridgecd teler-elevenlabs-node-bridgecp .env.example .envdocker compose up --buildInitiate a call
Section titled “Initiate a call”curl -X POST http://localhost:8000/api/v1/calls/initiate-call \ -H "Content-Type: application/json" \ -d '{ "from_number": "+91XXXXXXXXXX", "to_number": "+91XXXXXXXXXX" }'Architecture
Section titled “Architecture”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.
Production deployment
Section titled “Production deployment”- Replace ngrok with a real public host (Fly.io, Railway, ECS, your own).
- Pin the Docker image rather than
:latest. - Move
ELEVENLABS_WEBSOCKET_URLto your secrets manager (it embeds youragent_id). - Forward webhooks to your backend rather than the bridge for durability.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | Fix |
|---|---|---|
| Agent answers but voice is wrong | Wrong agent_id in WebSocket URL | Verify the URL; agent must exist in your account |
| Phone rings then drops | Bridge unreachable from public internet | Check ngrok; verify SERVER_DOMAIN |
| Choppy audio | Sample rate mismatch | Try ELEVENLABS_SAMPLE_RATE=8k |
| Agent doesn’t recognize speech | Background noise, low input volume | Test with a clean audio source first |
Next steps
Section titled “Next steps” Other recipes OpenAI Realtime, Gemini, Vapi, and more.
Bridge architecture The conceptual model behind every recipe.
ElevenLabs Conversational AI Configure your agent on the ElevenLabs side.