How to connect Asterisk with OpenAI Realtime.

Make and receive calls from Asterisk PBX to OpenAI Agents with low latency.


Boost your phone calls with Real-Time AI Agents

Picture the peace of having a voice assistant that answers live questions with care, making real connections with your customers while handling queries about products or support for your business 24/7. 

At InfinitoCloud, we've created a free, auto-install script that connects Asterisk 20+ with OpenAI Realtime models in a simple, low-latency way. This gives you full control over configuring your agent's knowledge, ability to speak, and in what language, enabling rapid and cost-effective iteration of new ideas. This Community Edition is perfect for testing the Asterisk and OpenAI Realtime integration at no cost.

For those who need more features, the PRO version offers full transcripts sent by email, transfers to IVR or extensions for human agents, and smooth scaling, all for a one-time payment of $249 in our web store. This tool turns daily problems into chances for true interaction, lowering churn and building stronger emotional ties with what really matters, ideal for global customers looking for scalable VoIP-AI solutions.

Asterisk to OpenAI Realtime PRO


The Problem: Slow and Rigid Phone Interactions

In today's quick business world, calls often lag or feel robotic: old IVRs don't understand natural speech, force long waits for a human, or fail to resolve any query, frustrating customers and slowing your team. For example, high latency causes delayed responses in support calls, leading to customer drop-offs; rigid menus ignore context, leaving basic questions unanswered. Without proper tools, these talks feel disconnected, hurting trust and efficiency. 

InfinitoCloud's Community Edition for integrating Asterisk with OpenAI Realtime fixes these basics with low-latency interactions, smooth voice activity detection (VAD), and custom prompts that can specify multi-language support, making it much more useful for users worldwide. For advanced needs like full audits and agent transfers, the PRO steps in, restoring calm, enhancing satisfaction, and reducing churn by up to 30%.


Community Version (Free): Quick access for tests and basic use of Asterisk to OpenAI Realtime Integration


The Solution: Free Auto-Install Script to Integrate Asterisk with OpenAI Realtime on Ubuntu 24 LTS

This script sets up Asterisk ARI, Node.js, and the OpenAI Realtime connection smoothly, handling RTP streams, voice detection, and auto cleanups with tech accuracy. It is ideal for custom prompts in the community edition, like a warm greeting that invites caring talks in your prefered language, perfect for testing the Asterisk to OpenAI Realtime integration.

  • Quick Benefits: Install in minutes, works with common systems worldwide, available on GitHub. Try how a simple "Hi" turns into a meaningful interaction that strengthens customer ties.
  • Download Here: Clone the repository: 

https://github.com/infinitocloud/asterisk_to_openai_rt_community

​and run: sudo ./autoinstall_asterisk_to_openai.sh

Start with this base and feel the difference in your first tests, gaining an edge with real-time AI Agents without issues and low latency.


Step-by-Step Tutorial: Setup your AI Agent easily using Asterisk to OpenAI Realtime Community Edition

Follow these steps to install Asterisk with OpenAI Realtime in your setup, with full control and scaling in mind. I'm using Azure because it's also the cloud where the OpenAI Inference servers are located, to achieve the lowest possible latency.

You can get $200 of free credits from Azure here (Credit Card required by registration):

https://azure.microsoft.com/en-us/pricing/purchase-options/azure-account


1.- Setup and login to Azure Instance

- Create a Virtual Machine, Ubuntu Server 24.04 LTS - x64, 1vCPU and 2 Gb RAM on there, with SSH public Key, Download and save your .pem keyfile.




- Download your .pem key file.



- Download puttygen for convert pem to ppk key. Clic on Load, change to All Files and locate your .pem key.




- Clic on Save private key, without password, pick a name for the new ppk file.




- Connect to your Azure instance with putty using the new .ppk key file generated.




- Connection, SSH, Auth, Credentials, Browse your .ppk key file.





2.- Run the auto-install script

On putty, copy and run this command:


curl -sL https://raw.githubusercontent.com/infinitocloud/asterisk_to_openai_rt_community/main/autoinstall_asterisk_to_openai.sh | sudo bash -s





Success! 

Take note of the Server, Username and Password fields, to configure your softphone for making test calls.


3.- Set your OpenAI API Key

Edit your config.conf file, to set your OpenAI API Key, you can find the Prompt in the same file:


sudo nano /opt/asterisk_to_openai_rt_community/config.conf


Restart the service


sudo systemctl restart asterisk-openai.service



4.- Open Ports on your Azure Instance

- Go to your Virtual Machine, Nic, Attached to, clic on (Network security group):




- Go to Inbound Rules, Add 2 rules:


5060 UDP, to my local net.


10000-20000 UDP, to my local net.



- Your Network security group must looks like:



5.- Configure your softphone and make a test call

- Download microsip and Add an account. You can get the account details from the auto-install script and from /etc/asterisk/pjsip.conf in any case.




- Open asterisk console to check logs and make a test call to 9999.




Talk to your OpenAI Realtime Agent!


- ShopEZ Demo:



Benefits of the Community Version (Free):

  • Quick and Easy Access: Fast setup for tests, ideal for individual developers or small trials, saving time on manual setups and allowing simple 24/7 interactions at no starting cost.
  • Basic Efficient Features: Real-time call handling with VAD and custom prompts, cutting basic work load and improving starting satisfaction without losing care.
  • Community and Learning: Open-source code for trying things out, encouraging careful new ideas with community help for basic fixes, giving peace of mind in low-volume setups.


PRO Version: Advanced Features for Professional Efficiency in Asterisk to OpenAI Realtime Integration


Benefits of the PRO Version ($249 one-time):

  • Emotional and Practical Depth: Full transcripts sent by email for easy audits, easing the stress of lost details and building true customer relationships, while cutting churn by 30%.
  • Advanced Efficiency with Care: Smooth transfers to IVR or human agents, making sure customers feel heard in hard cases, improving loyalty and cutting operating costs by up to 50% with caring interactions.
  • Premium Support and Extras: Multi-language and extendend prompts with priority support, offering full control to create new Agents with trust in high-volume global setups.
  • Update, new voices supported from config.conf:

​Fem:

​marin 

​alloy 

​coral

​Man:

​cedar

​echo

​shimmer

​verse

​ash

​ballad

FeatureCommunity (Free)PRO ($249 one-time)
TranscriptsNoYes, full and emailed
Functions SupportNoYes (transfer to IVR/extension for agents)
SupportCommunityPriority and personalized
ExtrasMulti-language
Transcriptions to Email. *Google Calendar schedule soon.



Conclusion: Take the Step Toward More Meaningful Interactions

Start with the free community edition to integrate Asterisk with OpenAI Realtime and, if it fits you, explore the PRO for a full experience that eases loads and connects truly. Download today and, if you want, schedule a chat to find out how InfinitoCloud can fit this to your global vision, offering full control and clear ROI.

  • Buy PRO Version ($249 one-time):

PRO Version

How to connect your Yeastar IP PBX hardware appliance or cloud to OpenAI Realtime Agents.
Modernize your Yeastar IP PBX phone system. Connect it to OpenAI's real-time agents and turn it into a AI receptionist.