Open voice infrastructure for AI agents.
Built by Rexplore Research Labs
Voxtra is a Python framework that bridges telephony infrastructure (Asterisk, FreeSWITCH, LiveKit) with AI voice agents (STT, LLM, TTS). It lets developers build AI-powered call centers without needing to understand telecom internals.
graph LR
A[Cellular Provider] -->|SIP Trunk| B[Asterisk PBX]
B -->|ARI + Media| C[Voxtra]
C --> D[STT]
C --> E[LLM]
C --> F[TTS]
D -->|transcript| E
E -->|response| F
F -->|audio| C
style A fill:#4a90d9,stroke:#333,color:#fff
style B fill:#e67e22,stroke:#333,color:#fff
style C fill:#2ecc71,stroke:#333,color:#fff
style D fill:#9b59b6,stroke:#333,color:#fff
style E fill:#e74c3c,stroke:#333,color:#fff
style F fill:#1abc9c,stroke:#333,color:#fff
| Layer | Package | Responsibility |
|---|---|---|
| Core | voxtra.app, voxtra.router, voxtra.session |
App lifecycle, routing, call sessions |
| Telephony | voxtra.telephony |
Asterisk ARI, LiveKit, FreeSWITCH adapters |
| Media | voxtra.media |
Audio frames, WebSocket/RTP transport, codecs |
| AI | voxtra.ai |
STT, TTS, LLM, VAD provider abstractions |
| Pipeline | voxtra.core.pipeline |
Real-time STT → LLM → TTS orchestration |
From PyPI:
pip install voxtraWith provider extras:
pip install voxtra[asterisk,deepgram,openai,elevenlabs]From GitHub (latest development version):
pip install git+https://github.com/rexplore-ai/voxtra.gitFrom source (for development):
git clone https://github.com/rexplore-ai/voxtra.git
cd voxtra
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"from voxtra import VoxtraApp
app = VoxtraApp.from_yaml("voxtra.yaml")
@app.route(extension="1000")
async def support_call(session):
await session.answer()
await session.say("Hello, welcome to support. How can I help you?")
text = await session.listen()
reply = await session.agent.respond(text)
await session.say(reply.text)
await session.hangup()
app.run()Create voxtra.yaml:
app_name: my-call-center
telephony:
provider: asterisk
asterisk:
base_url: http://localhost:8088
username: asterisk
password: secret
app_name: voxtra
media:
transport: websocket
codec: ulaw
sample_rate: 8000
ai:
stt:
provider: deepgram
api_key: ${DEEPGRAM_API_KEY}
model: nova-2
llm:
provider: openai
api_key: ${OPENAI_API_KEY}
model: gpt-4o
system_prompt: "You are a helpful voice assistant for a call center."
tts:
provider: elevenlabs
api_key: ${ELEVENLABS_API_KEY}
voice_id: your-voice-id
routes:
- extension: "1000"
agent: support_agentThen run:
voxtra startVoxtra connects to Asterisk via ARI (Asterisk REST Interface). Add this to your Asterisk dialplan:
[voxtra-inbound]
exten => _X.,1,Stasis(voxtra)
same => n,Hangup()- Asterisk (ARI) — Production ready
- LiveKit (SIP) — Planned
- FreeSWITCH — Planned
- Deepgram (streaming)
- More coming soon
- OpenAI (GPT-4o, streaming)
- LangGraph integration planned
- ElevenLabs (streaming)
- More coming soon
src/voxtra/
├── app.py # VoxtraApp — main entry point
├── session.py # CallSession — per-call handle
├── router.py # Decorator-based call routing
├── events.py # Event system
├── config.py # Pydantic config models
├── middleware.py # Event middleware
├── exceptions.py # Custom exceptions
├── types.py # Shared types
├── core/
│ └── pipeline.py # STT → LLM → TTS pipeline
├── telephony/
│ ├── base.py # TelephonyAdapter ABC
│ ├── asterisk/ # Asterisk ARI adapter
│ └── livekit/ # LiveKit adapter (stub)
├── media/
│ ├── audio.py # AudioFrame, codec conversion
│ ├── base.py # MediaTransport ABC
│ ├── websocket.py # WebSocket transport
│ └── buffer.py # Audio buffering
└── ai/
├── stt/ # Speech-to-Text providers
├── tts/ # Text-to-Speech providers
├── llm/ # LLM / Agent providers
└── vad/ # Voice Activity Detection
- Architecture — Deep-dive into every layer, component, data flow, and design decision
- Contributing — How to set up dev environment, add providers, submit PRs, and code standards
git clone git@github.com:rexplore-ai/voxtra.git
cd voxtra
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest- Core abstractions (VoxtraApp, Router, CallSession, Events)
- Asterisk ARI adapter
- AI provider interfaces (STT, TTS, LLM, VAD)
- WebSocket media transport
- Voice pipeline (STT → LLM → TTS)
- End-to-end Asterisk + AI demo
- LiveKit adapter
- FreeSWITCH adapter
- LangGraph agent integration
- Multi-agent handoff
- Dashboard / Admin API
- Conversation analytics
Thanks to everyone who has contributed to Voxtra!
Patrick Byamasu — Creator & Lead Maintainer
Want to contribute? Check out our Contributing Guide.
Apache 2.0 — See LICENSE
Voxtra — The LangGraph of AI Telephony Built by Rexplore Research Labs