How to place outbound reminder and callback calls with Twilio and OpenAI GPT-Live
Confirmed by source: Official Twilio tutorial with full code and documented call output. Checked live on 2026-10-25: tutorial and the companion inbound tutorial return 200; the code repo github.com/pkamp3/speech-assistant-openai-gpt-live-1-node exists (MIT) and both live-demo.js and outbound-demo.js pass a Node syntax check; OpenAI's model pages for gpt-live-1 and gpt-5.6-terra are live and neither is on OpenAI's deprecations page. Not run by BranoLabs (no real calls placed). (checked 2026-10-25)
The problem
Appointment reminders, delivery updates and promised callbacks are phone calls staff keep forgetting to make. You want a script that dials the customer, says who is calling and why, looks up the note for that callback in your own system and can answer follow-up questions, all in a natural voice that can be interrupted.
Tools needed
- Twilio Programmable Voice and Media Streams
- OpenAI GPT-Live API (gpt-live-1) with Responses delegation (gpt-5.6-terra)
- Node.js 22+ with Fastify, ws, dotenv and the twilio helper library
- A function tool for your callback notes or reminders (plus OpenAI hosted web search)
- ngrok or another public tunnel for testing
Step-by-step recipe
- Get a Twilio number with Voice, an OpenAI API key allowed to use gpt-live-1 and the delegation model, Node.js 22+ and a tunnel such as ngrok.
- Create a Node project (ES modules) and install fastify, @fastify/formbody, @fastify/websocket, ws, dotenv and twilio. Put OPENAI_API_KEY, TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, PHONE_NUMBER_FROM and DOMAIN in .env.
- Write two prompts: a voice prompt for the persona (it discloses it is an AI and is returning a call, and must not claim to know the reason until the lookup tool has answered) and a short backend prompt for the delegation model that says which tool to use.
- Define the tools: a function such as get_callback_reason that looks up the note for this call in your database (the tutorial uses a mock list), and optionally OpenAI's hosted web_search.
- Add a guard that only dials numbers you are allowed to call (the tutorial accepts Twilio numbers you own, verified caller IDs and an explicit allow-list), then place the call with client.calls.create and inline TwiML that connects a Media Stream to wss://DOMAIN/media-stream.
- In the /media-stream WebSocket route, open wss://api.openai.com/v1/live/sessions, wait for Twilio's streamSid, then send session.start with the model, voice prompt, audio/pcmu at 8000 Hz and Responses delegation with your tools.
- On session.started, make the agent speak your opening line verbatim; relay session.output_audio.delta to Twilio and Twilio media frames to session.input_audio.append; answer completed function_call items with your tool output and response.create; close both sockets when the call stops.
- Start the tunnel, set DOMAIN, run node outbound-demo.js --call=+E164NUMBER to your own phone, and test the greeting, the lookup, a web-search question and interruptions before wiring it to a real reminder list.
Copyable prompt
Voice prompt: You are [AGENT NAME], an AI assistant calling on behalf of [BUSINESS NAME]. Say in your first sentence that you are an AI assistant and that you are calling about [REMINDER TYPE, e.g. tomorrow's appointment]. Do not state any details of the reminder until get_reminder has returned. If the person asks to stop receiving calls, confirm politely and call mark_do_not_call. If they want to change something, offer [OPTIONS, e.g. confirm / reschedule via link / call-back from staff]. Keep it short; this is an unexpected call. Backend prompt: Use get_reminder(customer_id=[CUSTOMER ID]) for the reminder details and [OTHER TOOL] for [PURPOSE]. Answer in one or two sentences.
Original template written by our AI agent for AgentRecipes, not copied from the source. Replace the [BRACKETS] and {{variables}} with your own values and test before relying on it.
What the builder reported
Twilio's official tutorial, published alongside OpenAI's GPT-Live API, walks through the complete application and shows the expected terminal output of a working call: the outbound call SID, the GPT-Live session ID, a get_callback_reason tool call and the agent's spoken answer. The finished inbound and outbound code is published on GitHub under MIT.
These are the source author's own claims. AgentRecipes has not run this recipe itself.
Watch out for
- Outbound calling is regulated (for example the TCPA in the United States and consent rules for automated calls in the EU); the tutorial tells you to read Twilio's voice policies and get legal advice, and to replace its demo number check with real consent logic.
- On a Twilio trial account you can only call verified caller IDs or your own Twilio numbers.
- If the call connects but is silent, the DOMAIN or tunnel is usually wrong; if the stream starts but nothing is said, the API key probably lacks access to gpt-live-1 or the delegation model.
- Do not use the older Twilio tutorial built on gpt-realtime: OpenAI has deprecated that model (removal on 20 January 2027) and GPT-Live is a different API, not a drop-in swap.
- GPT-Live voice sessions cost $0.05 per minute billed per second (OpenAI's model page), plus delegation-model tokens, tools and Twilio call charges.
Source
Original write-up: Twilio blog (2026-09-10) ↗
Found via Twilio blog: “Build Voice AI Experiences with Twilio and GPT-Live-1 in the OpenAI API”. This recipe summarises the source in words written by our AI agent; read the original for the full details. Link last checked 2026-10-25.
More voice & phone agents recipes
New agent recipes in your inbox
A short email with the newest automation recipes, each linked to its real-world source. No spam. Every email has a one-click unsubscribe link.