I’ve built a AI voice assistant using the Realtime API and connected it with a caller using an SIP connection with Twilio. The call is initiated when the caller dials my Twilio number, and Twilio creates an SIP connection with OpenAI. When the call connects, the AI is fantastic. But very frequently (at least 10% of the time) the call doesn’t connect. On these occasions, the phone doesn’t ring and my server is never sent the realtime.call.incoming webhook. After 10 seconds or so, Twilio gives up on connecting the call and sends the caller to a backup option (redirecting to a different phone number).
Because Twilio is never dropping the call, I’m lead to believe that the problem is OpenAI receiving the SIP connection, but when I’ve observed this problem there has never been an issue listed on the OpenAI Status page. Has anyone else experienced this issue? Is this a known problem? Are there improvements scheduled for the Realtime SIP connection? I didn’t have these issues when I was using my server as a middleman and connecting to Twilio and OpenAI through websocket connections.
I’m experiencing the same issue. Since I started building a demo with OpenAI SIP and Twilio, I’ve run into the same problems you described. About 30% of the calls I tested didn’t connect, and I couldn’t figure out why.
But today it got worse: my server no longer receives any webhook messages, even though I haven’t changed anything in my code. It really seems like an OpenAI-side problem, because even the test event from the OpenAI Webhooks dashboard isn’t working, and there’s no clear explanation.
I’m using the same setup as you OpenAI websockets + Twilio SIP. It had been working reasonably well for the past few weeks, but today it just stopped working completely.
No change on our side with this @Kenneth_Barrios . Really sorry to hear you are having problems.
I will start investigating this! This week we are rolling out some major infrastructure improvements here. This will reduce the latency between SIP server + webhooks firing.
Hey, last week on Friday I ran into an issue where OpenAI stopped handling SIP calls after about 30 seconds. The model just stopped responding, and it was completely reproducible. But only via SIP. I switched to WebSockets as a workaround, but the quality there is noticeably worse — and of course a major lead happened to test their demo exactly during that period. Great. I really hope this doesn’t happen again. It seems to be working again since this morning.
For the webhook issue I have gotten a few traces and seems like things are timing out after only 5 seconds (instead of 10?) I am working on debugging now!
I’ve added better logging to our stack so that we’ll have better statistics going forward on how often these failed connections happen and precise datetimes for debugging.
@juberti Pulled the numbers and our P99 for webhooks delivery is ~7s. We timeout the call at 10s
I am increasing our SIP Timeout duration to 15s (up from 10) also going to work on bringing those webhooksapi times down. Sorry this is causing disruptions, we are gonna make it better quick