Cannot connect phone number via SIP Trunk in Vapi
# support
n
Hey. I’ve been trying to connect a phone number to Vapi using NEXION Networks as the SIP trunk provider, but I haven’t been able to get it working. I did everything as described in Vapi Docs - firstly I create a SIP trunk credential in Vapi, then I associated a phone number with the SIP trunk and then I set to forward calls to {phoneNumber}@.sip.vapi.ai inside the provider. I also allowlisted the necessary IPs. I see the Sip trunk connection in integrations, I see the connected phone number in the dashboard and I set calls to be forwarded to Vapi assistant. Still calls are not connecting. Questions from me: 1)How does Vapi register to a “byo-sip-trunk” 2)What is the format of the SIP user i.e. does it include country code and + sign? 3)Is there any way to see if Vapi has successfully registered to our trunk? Thank you in advance for your help! https://cdn.discordapp.com/attachments/1400235351020408934/1400235351255158935/Screenshot_2025-07-30_at_23.54.21.png?ex=688be64a&is=688a94ca&hm=2066645e9e5d8bcea551d504a63cbe80eff5db0e1cedfbf6c3f9c37731df317a&
c
Hi nastiushka7657, To connect your phone number via a SIP trunk in Vapi using NEXION Networks, follow these steps carefully: 1. **Create SIP Trunk Credential**: Ensure you have used the Vapi API to create a SIP trunk credential with your provider's gateway address. Reference the [SIP Trunking guide](https://docs.vapi.ai/advanced/sip/sip-trunk) for detailed instructions. 2. **Associate Phone Number**: Make sure your phone number is correctly linked to this SIP trunk credential. The phone number should be registered with Vapi using the correct credential ID. 3. **Configure Call Forwarding**: Double-check that your settings forward calls to the format
{phoneNumber}@<credential_id>.sip.vapi.ai
, replacing placeholders with your actual values. 4. **Allowlist IP Addresses**: Confirm that you have allowlisted the necessary IP addresses for SIP traffic:
44.229.228.186/32
,
44.238.177.138/32
, and
172.31.9.106/32
. 5. **Test the Setup**: - For outbound tests, initiate a call via the Vapi API to ensure calls are properly routed. - For inbound tests, call your number from an external line to verify forwarding to the SIP URI works correctly. If these steps are correctly followed and you still face issues, consider reviewing your provider configuration to ensure compatibility with Vapi settings. Check logs for any specific error messages that might give additional context to the connection issue.
n
Hi, as I mentioned I already did all of that and the phone number is not being connected. I followed Vapi documentation carefully. Could you please help me with answering those questions? Questions from me: 1)How does Vapi register to a “byo-sip-trunk” 2)What is the format of the SIP user i.e. does it include country code and + sign? 3)Is there any way to see if Vapi has successfully registered to our trunk?
c
We will check with the team for the answers to your questions, but first I would like to confirm if you are specifically using this BYO SIP trunk for accepting inbound calling? There might be a more complex configuration required for inbound calling with a BYO SIP trunk.
n
Yes we are using BYO SIP trunk. I was using instructions for BYO SIP Trunk on Vapi Docs. Will be very grateful for your help here
c
Sorry I wasn't very clear. Are you using this SIP trunk for inbound calling or outbound?
n
Yes for inbound calling
Hi Kyle! Did you have a chance to look into it?
c
Yes, and I have an example for you to follow for configuring inbound SIP trunks. You will need to define a separate gateway with a static IP address instead of the resolved name of the domain. Here is the example:
Copy code
{
  "provider": "byo-sip-trunk",
  "name": "My SIP Trunk",
  "gateways": [
    {
      "ip": "sip.provider.com",
      "port": 5060,
      "outboundEnabled": true,
      "inboundEnabled": false,
      "outboundProtocol": "udp"
    },
    {
      "ip": "203.0.113.10",
      "port": 5060,
      "outboundEnabled": false,
      "inboundEnabled": true
    }
  ]
}
n
Hi Kyle, i tried this. So firstly, I created a SIP trunk credential in Vapi (first screenshot). And then I connected phone number to this SIP trunk (second screenshot) is everything correct? If yes, I should set up inside the SIP Trunk to direct calls to SIP URI: +61892004928@.sip.vapi.ai Should I take dc7a1499-aa47-426d-9ebf-dbae1282b301 as a credential id? It was generated in first POST request. https://cdn.discordapp.com/attachments/1400235351020408934/1406927081862070363/Screenshot_2025-08-18_at_10.52.19.png?ex=68a43e73&is=68a2ecf3&hm=1ea21ef06bb252292762d6df546e844f00c367da7e9742550d058e568331544b& https://cdn.discordapp.com/attachments/1400235351020408934/1406927082390290494/Screenshot_2025-08-18_at_10.57.31.png?ex=68a43e73&is=68a2ecf3&hm=637aaae98c8203b8d7c4c132d8d3d91fdcf9bfcc067a1987152937b3033fbe9b&
c
The SIP URI should be everything except the <credential_id>, otherwise it is correct. Let us know if you encounter any issues
n
Hi Kyle, we changed the SIP URI as you said but the calls are still not coming through with this set up. There is even no "beeping" sound when we call the phone number. Is there any other workaround to fix it?
Hi Kyle, is there any other workaround to fix it? Thank you in advance
Hi! Will be very grateful for help
c
Sorry for the delayed responses! We are still looking into this and thank you for your patience
2 Views