Skip to content

Vapi

Vapi runs your end-to-end voice agent: STT, LLM, TTS, conversation logic, tool calls. The bridge proxies Teler call audio into Vapi and relays the agent’s response back.

  • A Vapi account with an assistant created and deployed
  • The assistant_id of that Vapi assistant
  • 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
VariableRequiredDefaultDescription
VAPI_API_KEYyesnoneYour Vapi API key.
VAPI_ASSISTANT_IDyesnoneThe ID of the Vapi assistant to connect calls to.
VAPI_SAMPLE_RATEno16000Vapi-side sample rate in Hz.
VAPI_MESSAGE_BUFFER_SIZEno50Queue depth before relaying.
TELER_API_KEYyesnoneYour Teler API key.
NGROK_AUTHTOKENyes (local)nonengrok auth token.
Terminal window
git clone https://github.com/frejun-tech/teler-vapi-bridge
cd teler-vapi-bridge
cp .env.example .env
docker compose up -d --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"
}'

Vapi defaults to 16 kHz. The bridge converts to Teler’s 8 kHz automatically. Keep VAPI_SAMPLE_RATE=16000 unless you have a specific reason to change it.

VAPI_MESSAGE_BUFFER_SIZE controls how many in-flight messages can queue before relaying. Increase if you see message drops; decrease if latency matters more than throughput.

SymptomLikely causeFix
Silent callWrong VAPI_ASSISTANT_IDVerify in the Vapi dashboard
401 from VapiInvalid VAPI_API_KEYRotate the key in Vapi
Choppy / dropped audioBuffer too smallRaise VAPI_MESSAGE_BUFFER_SIZE
Wrong voice / languageAssistant misconfiguredEdit the assistant in Vapi