Every test run costs credits.
Testing TwiML menus, <Gather> callbacks, and HMAC webhook verification usually requires live phone numbers, ngrok tunnels, and paid carrier credits on every test run.
A self-hosted, open-source programmable SMS and Voice API that mirrors Twilio’s REST shape. Build and test messaging, TwiML voice flows, and signed webhooks locally against an offline simulator, then plug in SMTP, SIP, or a carrier later.
Built for: Developers and AI-agent builders who want a local or self-hosted Twilio-compatible control plane with zero per-message dev costs.
Testing TwiML menus, <Gather> callbacks, and HMAC webhook verification usually requires live phone numbers, ngrok tunnels, and paid carrier credits on every test run.
A single FastAPI + SQLite container gives you Basic-Auth REST endpoints, an offline TwiML interpreter with SimulatedDigits, signed callback logs, and a built-in web console.
POST / GET / DELETE Messages with segment counting and To / From filters.
Calls plus Trace.json and Recordings.json.
HTTP Basic Auth with path AccountSid enforcement.
Parsed with defusedxml (XXE blocked, max redirect depth 10). Supports <Say>, <Play>, <Gather>, <Dial>, <Record>, <Pause>, <Redirect>, <Hangup/>.
Signs status, action, and inbound callbacks, logged in SQLite WAL storage.
simulator (100% offline), smtp_gateway (Mailpit or carrier email-to-SMS), sip_stub (Asterisk ARI / FreeSWITCH ESL payloads) + optional Telnyx/Vonage passthrough. Ships with a Dockerfile and docker compose up --build.
docker compose up --build, or Python 3.11+ on your own machine or server.
Use the Twilio-shaped REST paths and SIDs; test TwiML flows against the offline simulator.
Callbacks are HMAC-signed, so your handlers can check X-Twilio-Signature.
Swap in smtp_gateway, sip_stub, or a passthrough adapter when you’re ready.
No. Relaycomm is an independent MIT-licensed project that mirrors Twilio’s REST shape.
Not out of the box. Real phone numbers require attaching and configuring a carrier or SIP trunk.
No. You run it locally or on your own server.
12 pytest tests across auth, CRUD, TwiML verbs, XXE protection, and adapters.
Free and MIT-licensed on GitHub. Need help wiring a custom SIP trunk, agent telephony workflow, or self-hosted deployment? Tell me what you’re building below.