A reference integration between Teler and VAPI, based on Media Streaming over WebSockets.
-
Clone and configure:
git clone https://github.com/frejun-tech/teler-vapi-bridge.git cd teler-vapi-bridge cp env.example .env # Edit .env with your actual values
-
Run with Docker:
docker compose up -d --build
| Variable | Description | Default |
|---|---|---|
VAPI_API_KEY |
Your VAPI API key | Required |
VAPI_ASSISTANT_ID |
Your VAPI assistant ID | Required |
VAPI_SAMPLE_RATE |
Audio sample rate | 16000 |
VAPI_MESSAGE_BUFFER_SIZE |
Messages to buffer before relay | 50 |
SERVER_DOMAIN |
Your ngrok domain (auto-detected) | Required |
TELER_API_KEY |
Your Teler API key | Required |
NGROK_AUTHTOKEN |
Your ngrok auth token | Required |
GET /- Health check with server domainGET /health- Service statusGET /ngrok-status- Current ngrok status and URLPOST /api/v1/calls/initiate-call- Start a new call with dynamic phone numbersPOST /api/v1/calls/flow- Get call flow configurationWebSocket /api/v1/calls/media-stream- Audio streamingPOST /api/v1/webhooks/receiver- Teler webhook receiver
curl -X POST "http://localhost:8000/api/v1/calls/initiate-call" \
-H "Content-Type: application/json" \
-d '{
"from_number": "+1234567890",
"to_number": "+0987654321"
}'- Dynamic ngrok URL detection - Automatically detects current ngrok domain
- Audio buffering - Buffers VAPI messages before relaying to Teler
- Sample rate conversion - Converts VAPI 16kHz audio to Teler 8kHz
- Real-time streaming - WebSocket-based audio streaming between systems