← Migrate hub

Twilio + DIY → toolkit-voice

You glued together Twilio media streams + Deepgram STT + GPT-4 + ElevenLabs. It works. It's brittle. The on-call rotation is depressing. We replace all of it with one API.

What you delete

twilio.Device + Media Streams WebSocket pump
Deepgram WebSocket session lifecycle
VAD + endpointing logic
OpenAI streaming → audio chunking
ElevenLabs TTS streaming pipe
μ-law / PCMU sample-rate conversion
Barge-in detection + interrupt handling
Recording / transcript storage
Custom retry + reconnect on dropped streams

What you keep

  • Your Twilio numbers (we port them — see below)
  • Your CRM hooks + business logic (it's all on your side)
  • Your existing webhook handler (just point it at the new endpoint)
  • Your prompts + system messages (paste them in)
  • Your tool/function definitions (same JSON schema)

The replacement (one API call)

JavaScript
import { Toolkit } from "@toolkit-llm/voice";

const client = new Toolkit();

// Bind a Twilio-ported number to a persona, point webhooks at your handler.
await client.numbers.bind({
  phone_number: "+14155551234",
  persona: "tony",
  system_prompt: "You are Tony at DC Motorcars...",
  webhook_url: "https://yourapp.com/voice/event",
  tools: [
    {
      name: "book_test_drive",
      description: "Schedule a test drive for the caller",
      parameters: { /* JSON schema */ },
    },
  ],
});

// That's it. Inbound calls now hit the persona.

Phone number port-in (yours stays yours)

  1. Email port@toolkit-llm.com with your Twilio numbers + Twilio account SID
  2. We send the LOA via DocuSign. Sign it (<5 min)
  3. We submit to Twilio (the losing carrier). FCC requires 5–7 business days
  4. Cutover at 11pm PT on the porting date. <30s downtime
  5. Keep your Twilio account warm for 30 days as fallback

Cost comparison (real numbers)

Typical Twilio + DIY stack at 10K min/month:

Twilio inbound$0.014/min × 10K$140/mo
Deepgram STT (nova-2)$0.0058/min × 10K$58/mo
GPT-4-turbo (avg)~$0.04/min × 10K$400/mo
ElevenLabs Flash v2~$0.04/min × 10K$400/mo
Engineering on-call~10 hrs/mo × $150$1,500/mo
Total monthly~$2,498/mo

Same volume on toolkit-voice:

Voice API (10K min × $0.04)$400/mo
Phone number (1 DID)$1/mo
STT + TTSbundled
Carrierbundled
Engineering on-call~0 hrs (it just works)$0/mo
Total monthly~$401/mo

$2,097/mo saved. 12.4 weeks of engineering time recovered per quarter.

Status: full codemod coming Day 30

Twilio + DIY migrations are bespoke — we work with you 1:1. The codemod replaces ~80% of typical patterns; the last 20% is founder-pair-programmed via Slack.

Sick of maintaining the pipeline?

Founding-beta customers migrating from Twilio + DIY get a senior engineer (one of the founders) doing the migration alongside you on Slack. We've done it 12 times. We know the gotchas.

Apply for founding beta →