Open-source infrastructure for AI voice agents
TurnCall runs real-time AI agents on phone calls, WhatsApp, SMS and the web. Choose your own speech, language and voice providers, deploy on your own infrastructure, and keep full control of your call data.
- Self-hosted
- MIT licensed
- No per-minute platform fees
Call e7a654a6
Inbound on Twilio+1 415 555 0142 to +1 415 555 01001:54completedLive events latest call e7a654a6
The Agent Builder, an optional app on top of TurnCall. Everything it does is an API call you can make from your own code.
Works with the carriers and AI providers you already use
Choose them per agent, and switch without changing your code.
- TwilioPhone and SMS
TelnyxPhone
- AsteriskYour own PBX
- WhatsAppVoice and messages
- WebRTCBrowser calls
- OpenAILanguage model
- AnthropicLanguage model
- Google GeminiLanguage model
- AWS BedrockLanguage model
- OpenRouterLanguage model
- OllamaModels on your hardware
- DeepgramSpeech and voice
- AssemblyAISpeech-to-text
- CartesiaSpeech and voice
- ElevenLabsSpeech and voice
- OpenAI RealtimeSpeech-to-speech
- Gemini LiveSpeech-to-speech
- Amazon Nova SonicSpeech-to-speech
HeyGenVideo avatar
TavusVideo avatar
- MCP serversTools
Everything between the phone line and your code
TurnCall answers the call, listens, thinks and speaks. Your team writes only what is specific to your business: the prompt, the tools and the data.
Calls come in
- Phone numbersTwilio and Telnyx
- Your own PBXAsterisk
- WhatsAppVoice and messages
- Your websiteBrowser calls and chat
- ListenTurns speech into text and knows when the caller has finishedDeepgram, AssemblyAI, Cartesia, ElevenLabs, OpenAI
- ThinkA language model with your prompt, tools and documentsClaude, GPT, Gemini, Bedrock, Llama on Ollama
- SpeakAnswers out loud, in about a second and a halfCartesia, ElevenLabs, Deepgram, OpenAI
Your systems
- Your APIsCalled as tools during the call
- Your documentsSearched for answers
- Your webhookTranscript and results
- Your storageRecordings and call data
Phone, WhatsApp and web
Inbound and outbound calls on Twilio and Telnyx, your Asterisk PBX, WhatsApp, SMS and browser calls. One agent answers on all of them, and your server can choose the agent for each call.
Phone numbers guideYour choice of models
Pick the speech-to-text, the language model and the voice for each agent, hosted or on your own hardware. If one provider fails mid-call, a backup takes over.
Providers guideNatural conversation
A turn-detection model tells a pause from a finished sentence. Callers can interrupt the agent, and voicemail and long silences are handled for you.
Agents guideTools during the call
Transfer to a person, hand off to another agent or send keypad tones. Connect your own APIs as webhook tools or through MCP servers.
Tools guideAnswers from your documents
Upload PDFs, Word files and spreadsheets. The agent searches them by meaning and by keyword while it talks.
Knowledge base guideResults after every call
A summary, sentiment, a pass or fail against your rubric and the fields you define, sent to your webhook with the transcript and recording.
Post-call analysis guideDescribe an agent in plain English. Get a working one.
The Agent Builder is a web app on top of TurnCall. It asks follow-up questions until the design is clear, writes the agent's configuration, and creates it in TurnCall with a phone number attached.
- A workbench for every agent: a setup checklist, every setting, and a test pane for chat or a voice call in the browser
- Calls with transcripts and recordings, outbound campaigns and evals, in tabs beside the agent
- Workspace integrations: provider keys, Twilio, Telnyx and Asterisk accounts, MCP servers, Slack and Google Calendar
- Teams with roles, and a button that pushes an agent's code to your GitHub
Chat
A receptionist for my dental clinic that can book appointments
What are your opening hours, and what should the agent do when you're closed?
Weekdays 8 to 6. After hours, take a message.
When should a call go to a person?
Billing questions and emergencies.
Here's the agent. Check the configuration, then create it.
Configuration
Source code
Three repositories. Deploy all of them with one Helm chart, or only the engine.
Engine
The voice runtime and its API: carriers, the call pipeline, tools, knowledge bases, evals and campaigns.
kobikis/turncall-builder-apiBuilder API
The Builder's backend: the design conversation, workspaces and members, integrations and connected apps.
kobikis/turncall-builder-webBuilder console
The Builder's web app: the design chat, the agent workbench, calls, campaigns, evals and integrations.
Response time you can see, turn by turn
Every call records how long each turn took, split into speech recognition, the model and the voice, so you know which setting to change.
- ~800 msProcessing per turn with speech-to-text, a model and a voice
- ~300 msProcessing per turn with a speech-to-speech model
- p50, p95Latency summary on every completed call
One turn, default settings
Measured from the moment the caller stops speaking. End-of-turn detection is adjustable per agent, and actual times depend on your providers.
Test an agent before it takes a call
Write scenarios once and run them against the real pipeline, as text or as audio, with tools mocked. A simulated caller can play the customer, and a judge decides whether the agent did its job.
- Turn a real call into a test with one request
- Run a tagged set from CI and block the merge on a regression
- Results arrive as a webhook, with every transcript
| Scenario | Kind | Result |
|---|---|---|
| Moves a cleaning to another day | Scripted | 10 of 10 |
| Anxious caller asks about a root canal | Simulated | 9 of 10 |
| Transfers billing questions with a briefing | Scripted | Failed, 1 of 3 |
$ turncall eval run --tag pre-publish --agent-name front-desk 3 runs, 2 passed, 1 failed $ echo $? 1
An API for every part of the call
Create agents, connect numbers, place calls and receive events from your own code. The Builder is optional: everything in it is the same API.
- REST API for agents, numbers, calls, campaigns and knowledge bases
- Signed webhooks with the transcript and analysis
- Live call control: transfer, hand off, send keypad tones, end
- Agent versions with rollback, and a Claude Code plugin that knows the API
Ready for live phone lines
What teams running voice agents on real customer traffic need from the start.
Provider failover
Backup speech, model and voice providers take over mid-call, and the caller still gets an answer.
Deploys without dropped calls
A server that shuts down lets its live calls finish first. A Helm chart and readiness probes are included.
Outbound campaigns
Call a list within each contact's local hours, paced to your number's rate, with retries by outcome.
Usage limits
Cap live calls, outbound calls per second and messages per minute, enforced across every server.
Secure by default
Signed webhooks, per-call media tokens, encrypted provider keys and project-scoped API keys.
Versions and A/B tests
Publish a new version, split traffic between versions, and roll back in one step.
Runs on your infrastructure
There is no TurnCall cloud to sign up for. It's a Python service with PostgreSQL and Redis that runs wherever you run containers, and you pay your providers directly.
- Recordings and transcripts stay in your database and storage
- Each project can bring its own provider keys, encrypted at rest
- MIT-licensed code your security team can read
make docker-up && make migratePostgreSQL, Redis and the API, for local development. Quickstart
helm install turncall ./charts/turncallAPI, evaluation and campaign workers, scaling on live calls. Kubernetes guide
ghcr.io/kobikis/turncallPublished for every release and every merge to main.
Questions teams ask first
Something else? Write to hello@turncall.io.
Is there a hosted version?
Not today. You run TurnCall with Docker Compose or the Helm chart, next to PostgreSQL and Redis, on infrastructure you control.
What does it cost?
TurnCall is free and MIT licensed. You pay your phone carrier and AI providers directly, at their rates, with no per-minute platform fee on top.
Which phone carriers does it work with?
Twilio and Telnyx numbers, inbound and outbound, and your own Asterisk PBX over ARI (20.18, 22.8, 23.2 or later). WhatsApp Business voice and messages run through the WhatsApp Cloud API.
Do I need the Agent Builder?
No. The engine is an API with no required dashboard. The Builder is an optional app on top of it, in two repositories, turncall-builder-api and turncall-builder-web, source-available under FSL-1.1-ALv2. The Helm chart can deploy it next to the engine.
Where does my call data go?
Recordings, transcripts and call records stay in your own database and storage. Audio and text go only to the providers you configure.
Take your first call today
The quickstart takes you from an empty server to an agent answering a phone number.