AI Phone Assistant — Twilio + OpenAI Realtime + Cloudflare Workers

Template for deploying an AI voice assistant with Twilio, OpenAI Realtime API, and Cloudflare Workers

View the Project on GitHub jmoore2333/twilio-openai-voice-assistant-cloudflare-template

Outbound Starter Endpoint

The template includes a small optional outbound route so you can trigger a Twilio call from your own app without building a bigger campaign system first.

What It Does

Required Variables

If any of those are missing, the outbound starter route returns a configuration error and stays inactive.

Example Request

curl -X POST https://<your-worker-subdomain>.workers.dev/voice/outbound \
  -H "Authorization: Bearer <OUTBOUND_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+15551234567",
    "machineDetection": true,
    "timeoutSeconds": 30
  }'

Request Body

Notes