LegacyCore + Twilio Integration
The problem
Voice AI is only useful if the actual phone call connects, the recording survives, and the conversation can hand off to a licensed human in the seconds where that is required. Most voice-AI platforms ship the brain but not the dial tone — you still need a real telephony provider underneath that owns numbers, manages SIP trunks, handles the warm-transfer mechanics, and stores the recording in a way auditors and carriers will accept.
How the integration works
Twilio Voice is the dial tone for the entire LegacyCore platform. Inbound CS leads land on Twilio numbers tied to specific marketing channels — every number has its own answering flow and its own attribution. Outbound calls from the AI Closer dial through Twilio with caller ID matching the lead’s state to maximize answer rate. Every call is recorded, the recording URL is written back to the application record in Supabase, and the audio is transcribed for the agent draft loop.
The warm-transfer rail is the moment that matters most. When the Retell-driven AI Closer needs to bring in a licensed human — for a Tier 1 carrier requirement, a jurisdiction edge case, or an explicit client request — the transfer happens via Twilio’s conference primitives so the AI can stay on the line during the handshake. We track every transfer attempt in the warm_transfer_requests table for auditability, including state code, available agents at the time, and outcome.
Twilio webhook signatures are verified per request via crypto.timingSafeEqual in our webhook-security middleware, with a hard requirement that production refuses unsigned payloads. The Twilio call-status webhook drives our live-call dashboard, the recording-status webhook triggers the transcription pipeline, and the SMS webhook routes inbound text from clients into the GHL conversation thread for the human-approval CS workflow.
Why Twilio specifically
Twilio is the only telephony provider that ships every primitive we need with production-grade reliability — number provisioning across all 50 states, SIP trunking, recording storage, conference for warm transfer, programmable voice for mid-call event handling, and a webhook signature scheme good enough to bet compliance against. Smaller providers cost less per minute on paper but make up for it in dropped recordings and undocumented edge cases.
Read the docs
Full Twilio Voice and SMS documentation lives at twilio.com/docs. The webhook signature scheme and conference primitives we depend on are both documented there.
Ready to host a submission node?
Every issued policy you participate in goes through the same telephony rail. Apply to operate a submission node and start collecting flat fees.
Apply Now