Daily Flux Report

Make Outbound calls with Node.js, the OpenAI Realtime API, and Twilio Voice

By Paul Kamp

Make Outbound calls with Node.js, the OpenAI Realtime API, and Twilio Voice

Our friends at OpenAI recently launched their Realtime API, which exposed the multimodal capabilities of their GPT-4o model. At launch, we shared how you could build a voice AI assistant in Node.js you could call from your phone.

Since the launch, we've had many requests to show the opposite scenario - how do you call a phone number using OpenAI's Realtime API and Node.js using Twilio?In this tutorial, I'll show you some demo code which can dial a phone number using Twilio Voice and Media Streams, and the OpenAI Realtime API. I'll show a function which demonstrates how to check if a phone number you provided is allowed to be called, then begin a phone call. Finally, after a user picks up, we'll trigger the OpenAI API to have the AI talk first.

Start by creating and navigating to your project directory, then setting up a new Node.js project.

Previous articleNext article

POPULAR CATEGORY

corporate

4636

tech

4993

entertainment

5707

research

2578

misc

5890

wellness

4476

athletics

6012