Multi-channel AI agent platform with real-time voice powered by OpenAI Realtime API.
- 📞 Voice Calls - Natural, low-latency conversations with OpenAI Realtime
- 💬 SMS - AI-powered text messaging
- 🎙️ Real-time Streaming - Bidirectional audio via Telnyx WebSocket
- 🔊 Server-side VAD - Intelligent turn detection
Phone Call → Telnyx → WebSocket Media Stream → OpenAI Realtime API
↓ ↓
PCMU Audio ←←←←←←←←←←←←←←←←←←←←←←← AI Response
npm installcp .env.example .env
# Edit .env with your API keysRequired keys:
TELNYX_API_KEY- From Telnyx PortalOPENAI_API_KEY- From OpenAI
npm run devngrok http 3000- Go to Voice → TeXML Applications in Telnyx Portal
- Create a new application
- Set webhook URL:
https://your-ngrok-url.ngrok.app/api/webhook/voice - Assign your phone number
Available voices (set via OPENAI_VOICE):
alloy(default)echoshimmerashballadcoralsageverse
# Run with hot reload (Next.js only, no WebSocket)
npm run dev:next
# Run with WebSocket support
npm run dev
# Production build
npm run build
npm start- Incoming Call: Telnyx sends webhook to
/api/webhook/voice - Answer: Server answers with streaming configuration
- Media Stream: Telnyx opens WebSocket to
/media-stream - Audio Bridge: Server connects to OpenAI Realtime API
- Real-time Conversation: Audio flows bidirectionally with sub-second latency
MIT