Voxa.Transports.Twilio
0.7.2-alpha
dotnet add package Voxa.Transports.Twilio --version 0.7.2-alpha
NuGet\Install-Package Voxa.Transports.Twilio -Version 0.7.2-alpha
<PackageReference Include="Voxa.Transports.Twilio" Version="0.7.2-alpha" />
<PackageVersion Include="Voxa.Transports.Twilio" Version="0.7.2-alpha" />
<PackageReference Include="Voxa.Transports.Twilio" />
paket add Voxa.Transports.Twilio --version 0.7.2-alpha
#r "nuget: Voxa.Transports.Twilio, 0.7.2-alpha"
#:package Voxa.Transports.Twilio@0.7.2-alpha
#addin nuget:?package=Voxa.Transports.Twilio&version=0.7.2-alpha&prerelease
#tool nuget:?package=Voxa.Transports.Twilio&version=0.7.2-alpha&prerelease
Voxa.Transports.Twilio
Phone calls in and out of a Voxa voice agent, over
Twilio Media Streams (VTL-001). A caller dials your
Twilio number, Twilio bridges the call audio to your server over a WebSocket, and Voxa runs its normal
VAD → STT → agent → TTS pipeline on it — speaking back down the call, with barge-in. No WebRTC, no SIP.
It builds on Voxa.Transports.Telephony (the
shared source/sink + μ-law codec) and composes the same pipeline as the native MapVoxaVoice(...).UseDefaults()
route — only the edge source/sink differ.
Usage
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddVoxa(builder.Configuration); // same providers/profile as any Voxa host
var app = builder.Build();
app.UseWebSockets();
app.MapVoxaTwilioVoice("/twilio"); // webhook (TwiML) + /twilio/media (WebSocket)
app.Run();
Point your Twilio number's Voice webhook at https://<your-host>/twilio. Twilio fetches TwiML, then
opens wss://<your-host>/twilio/media for the call audio.
Configuration (appsettings.json)
{
"Voxa": {
"Stt": "WhisperCpp",
"Tts": "Kokoro",
"Telephony": {
"Twilio": {
"ValidateSignature": true, // verify X-Twilio-Signature on the webhook (recommended)
"AuthToken": "", // for signature validation (prefer env/secrets over appsettings)
"PublicWssBaseUrl": "" // override the wss host in TwiML behind a proxy/tunnel, e.g. wss://abc.ngrok.io
}
}
}
}
| Key | Default | Meaning |
|---|---|---|
ValidateSignature |
true |
Verify Twilio's request signature on the webhook before returning TwiML. Disable only for local tunnels where the signed URL won't match the request URL the server sees. |
AuthToken |
— | Twilio auth token for signature validation. Required when ValidateSignature is on (the webhook fails closed if missing). |
PublicWssBaseUrl |
request host | Override the wss:// host embedded in TwiML when the public URL differs from Request.Host (reverse proxy, ngrok). |
Security
The webhook validates Twilio's X-Twilio-Signature (HMAC-SHA1 over the request URL + sorted form params) by
default — without it, anyone who learns the URL can drive your pipeline and run up cost. Keep the route on
TLS (wss), and keep the auth token out of source control. Behind a tunnel/proxy, either apply forwarded
headers so Request.Host/Scheme reflect the public URL, or disable validation for that environment.
⚠️ Live-wire caveat
Like the streaming STT providers, the Twilio wire protocol here is parser/spec-tested only until run
against the real service. The envelope shapes are from Twilio's public Media Streams docs and are stable, but
exact field presence, base64 framing, chunk cadence, and clear/mark timing must be validated on a real
call before relying on this in production. The codec parses defensively (unknown events are ignored), but a
real call (number → webhook via a public URL/tunnel → confirm two-way audio, barge-in, clean hang-up) is the
load-bearing check.
Pre-alpha; the public API still moves.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Voxa.AspNetCore (>= 0.7.2-alpha)
- Voxa.Transports.Telephony (>= 0.7.2-alpha)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Voxa.Transports.Twilio:
| Package | Downloads |
|---|---|
|
Voxa
Batteries-included Voxa package. One package reference: AddVoxa(cfg) + MapVoxaVoice("/voice").UseDefaults() gives a working voice bot with STT, TTS, VAD, and an OpenAI chat agent — no knowledge of frames required. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.2-alpha | 87 | 7/10/2026 |
| 0.7.1-alpha | 71 | 7/10/2026 |
| 0.7.0-alpha | 74 | 7/10/2026 |
| 0.6.0-alpha | 82 | 6/22/2026 |