Real-time Asterisk + OpenAI Realtime Integration (Function Calls + External Tools)

Hi everyone! :waving_hand:

I wanted to share something useful with the community, especially for developers working with telephony, contact centers, and real-time conversational AI.

Over the past months, we’ve been working on a fully open orchestration layer called AgentVoiceResponse (AVR) that allows you to connect Asterisk directly with OpenAI Realtime using:

  • OpenAI’s Realtime WebSocket API

  • Function calling for external tools (transfer, database lookups, CRM actions, etc.)

  • Real-time audio streaming between Asterisk and GPT-4o Realtime

  • Full duplex, low-latency conversation (typically 150–300 ms)

One of the most performant integrations we’ve built so far is the combination:

Asterisk + AVR + OpenAI Realtime,

which is proving extremely effective in contact-center environments because it handles:

  • Live call conversation

  • Interruptions (barge-in)

  • Call transfers

  • Dynamic system instructions

  • External tool calls

  • Business logic orchestration

  • Outbound & inbound call flows

The low latency and naturalness of OpenAI’s Realtime model make this integration incredibly powerful for real-world voice applications such as lead qualification, customer support, appointment booking, payment reminders, and agent assist.

I want to take a moment to thank OpenAI and this amazing community — many of the ideas and improvements were inspired by discussions and experiments shared here.

It’s incredible to see how fast real-time voice AI is evolving thanks to your contributions.

If anyone in the community is experimenting with telephony + OpenAI Realtime and wants to exchange ideas, architectures, or best practices, I’d be happy to connect and collaborate.

Thanks again to all of you for the constant inspiration! :rocket:

1 Like

Where can I find the documentation? I am looking for requirements

Hi Juan, You can find all the documentation and the full list of requirements directly on the AgentVoiceResponse Wiki under the section about using OpenAI Realtime STS with AVR.

Everything you need — setup, requirements, and configuration steps — is explained there.

If you can’t find it or need guidance, just let me know and I’ll point you to the right place! :rocket: