# Asterisk to OpenAI Realtime - Auto-install Script

**URL:** <https://community.asterisk.org/t/asterisk-to-openai-realtime-auto-install-script/109893>\
**Category:** AI\
**Created:** [August 30, 2025, 5:59am UTC](https://community.asterisk.org/t/asterisk-to-openai-realtime-auto-install-script/109893 "2025-08-30T05:59:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![InfinitoCloud](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/infinitocloud/32/8806_2.png) [@InfinitoCloud](https://community.asterisk.org/u/InfinitoCloud)\
**Post date:** [August 30, 2025, 5:59am UTC](https://community.asterisk.org/t/asterisk-to-openai-realtime-auto-install-script/109893/1 "2025-08-30T05:59:22Z")

</div>

Hello Asterisk community!  
I would like to share with you a tutorial post on how to connect Asterisk 20+ with OpenAI Realtime models, in an easy and simple way, with just one command!

This time I’m using Azure to test the lowest possible latency, considering that the OpenAI inference servers run on the same cloud.

You need:  
Azure Ubuntu 24 instance, 1 vcpu, 2 Gb of Ram.  
OpenAI API Key.

Greetings!

> **[Tutorial: How to connect Asterisk with OpenAI Realtime.](https://infinitocloud.com/blog/asterisk-to-openai-realtime-2/tutorial-how-to-connect-asterisk-with-openai-realtime-1)**
>
> Make and receive calls from Asterisk PBX to OpenAI Agents with low latency.

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [August 30, 2025, 10:59am UTC](https://community.asterisk.org/t/asterisk-to-openai-realtime-auto-install-script/109893/2 "2025-08-30T10:59:46Z")

</div>

> [@InfinitoCloud](#):
>
> This time I’m using Azure to test the lowest possible latency, considering that the OpenAI inference servers run on the same cloud.

I think you are refining the definition of cloud here. I understand “cloud” to be the internet, so there is only one cloud.

I also don’t think there is any guarantee that the machines with the big GPUs are in the same data centre, as the one to which general use VMs will get allocated. The term “cloud” was came about because people didn’t need to understand the actual structure. It’s sort of “black box” applied to a distributed system.

It may be that they are in the same centre in your case, but I don’t think that will be part of the contract, may change, and may depend on the customer location.

---

<div class="post-metadata">

**Author:** ![InfinitoCloud](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/infinitocloud/32/8806_2.png) [@InfinitoCloud](https://community.asterisk.org/u/InfinitoCloud)\
**Post date:** [August 30, 2025, 7:20pm UTC](https://community.asterisk.org/t/asterisk-to-openai-realtime-auto-install-script/109893/3 "2025-08-30T19:20:43Z")

</div>

Hi, well apart from what is internet or cloud, I was curious about the latency from different public cloud providers to the OpenAI Api gateway, so I did some basic testing, nothing fine-tuned, just used simple working instances and got this data to compare:

Ping/Tracert to [api.openai.com](http://api.openai.com)

 ![imagen](https://global.discourse-cdn.com/asterisk/original/2X/f/fcae3df760e309af38bb4ef39dd9378408003212.png)

 ![imagen](https://global.discourse-cdn.com/asterisk/original/2X/0/064e735bc78d6091f6506b33156e0c981988e716.png)

From Google Cloud Instance:

 ![imagen](https://global.discourse-cdn.com/asterisk/original/2X/c/c5ea35fe3493fd76e12237bd2d47163922249365.png)

From AWS Instance:

 ![imagen](https://global.discourse-cdn.com/asterisk/original/2X/b/be3ead858fbef6711445f00fcda90a2d8a2c6594.png)

From Azure Instance, tracert doesn’t work as usual, but using nmap we can see how many hops:

 ![imagen](https://global.discourse-cdn.com/asterisk/original/2X/7/7ad4ac2b70cdcffce9a3415133cb294e197b56b8.png)

Ok, we can see that Google is a bit far away, I think it is better for the integration with Dialogflow, but that is another thing.  
AWS looks great, the current CDN for the Openai API is Cloudflare and they sure have dedicated links and fine-tuned integration.  
Azure looks solid, and fewer hops to get to the Openai API gateway.

So, as you like! The good thing about the project is that you can deploy it wherever you like, local or cloud, try it and tell us how it went.

Greetings!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [September 30, 2025, 7:21pm UTC](https://community.asterisk.org/t/asterisk-to-openai-realtime-auto-install-script/109893/4 "2025-09-30T19:21:11Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
