Buy a phone number from Wavix
Before placing or receiving a call, you need to have an active phone number on your Wavix account. If you already have one, you can skip this section.- Sign in to your Wavix account.
- Click on Buy under Numbers & trunks in the top menu.
- Select the country and region where you wish to purchase a number.
- Choose one or more numbers and click Buy now.
- Review the Cart and complete checkout.
Some numbers require proof of local address or other documents before activation. Upload any requested documents and wait for the Wavix Provisioning team to approve them before the numbers become active.
Receive calls with Wavix and OpenAI Realtime API
Create OpenAI webhook
- Sign in to your OpenAI account at https://platform.openai.com.
- Go to your Organization settings.
- In the left menu, select Webhooks, then choose Create.
- Enter the URL where OpenAI should send events, select
realtime.call.incoming
from the Event types dropdown, and optionally add a name.

OpenAI automatically generates a signing secret. Save this secret in a secure location, because you will not be able to view it again. OpenAI uses the signing secret to sign webhook requests. You can use it to verify that each request is from OpenAI and not from a third party.
Set up inbound call routing in Wavix
Wavix can route inbound calls to a SIP trunk on the platform, SIP URI, or forward them to a phone number. OpenAI requires calls to be routed to a SIP URI. Before setting up a Wavix number:- In your OpenAI account, go to General → Project.
- Copy the value from Project ID. You’ll need it to configure inbound call routing in Wavix.

- In Wavix, open Numbers & trunks → My numbers.
- Select your number by clicking the ⋯ menu → Edit number.
- Set the inbound call destination type to SIP URI, and enter the destination in the format of:
- Save your changes.
Managing calls using OpenAI Realtime API
You can answer, decline, monitor, refer, and hang up calls using the OpenAI API.To learn more, see the OpenAI Realtime SIP API documentation.
Answer a call
When OpenAI receives SIP traffic linked to your project, it triggers your webhook. The event type isrealtime.call.incoming
, as shown in the example below:
call_id
parameter is a unique identifier of the call in the OpentAI platform. Use it when answering the call.
To answer the call, use the OpenAI Accept call endpoint.
When answering the call, you should provide the required configuration, including instructions, voice, and other settings, for the Realtime API session.
$call_id
: unique identifier of the call in OpenAI.$OPENAI_API_KEY
: your OpenAI API Key.
The SIP INVITE request from Wavix includes the
x-number
header, which contains the dialed number from your Wavix account. You can use this value to provide different instructions based on the number that was called.Decline the call
To decline the call, use the OpenAI Reject call endpoint. You can optionally include a SIP response code to return to the caller.Transfer the call
Wavix supports using theSIP REFER
command. To transfer a call, you need two Wavix numbers, one for an active call and one to receive the transferred call. Make sure inbound call routing is set up on the second number.
To transfer an active call, use the OpenAI Refer call endpoint. In the request, the target_uri
parameter should contain the Wavix number.
Hang up the call
To hang up the call, use the OpenAI Hang up call endpoint. In the request, thetarget_uri
parameter should contain the OpenAI unique call identifier.
Monitor call events
After you answer a call, open a WebSocket connection to the session to stream events and send realtime commands.call_id
- unique identifier of the call in OpenAI. See OpenAI Webhooks and server-side controls for more information.
Troubleshooting
- If inbound calls aren’t reaching your OpenAI project, make sure Inbound call routing is set up correctly in Wavix.
- Make sure all phone numbers are present in international E.164 number, e.g.
19085594899
(US) or4408001218915
(UK). Do not dial local formats like9085594899
. Strip prefixes like0
,00
, or011
if needed.