BYOC SIP Trunk from VoiP Issue
# support
w
Dear VAPI Support Team, I am seeking assistance to configure both outbound and inbound calls using my own SIP trunk (BYOC) with VAPI.ai to leverage my existing Yeastar PBX and avoid additional costs associated with Twilio. Additionally, I have encountered issues with call transfers when using a Twilio SIP trunk. Issues: Outbound Calls (BYOC): • Remain in “queued” status with the error “sip gateway failed to connect.” • Routed through VAPI.ai’s PSTN instead of my SIP trunk. • No REGISTER or INVITE attempts visible on the Yeastar PBX. Call Transfers (Twilio): • Failed transfers from PSTN to SIP to PBX extensions. Current Configuration: BYOC SIP Trunk: • Credential ID: [Credential ID] • IP/Port: [IP]:[Port] (UDP/TCP) • Authentication: [Username]/[Password] • SIP Register Enabled: Yes (Domain: [Domain], Realm: [Realm]) • Associated Number: [PhoneNumber ID] (France regionality) Steps Taken: • Verified SIP and PBX settings and network connectivity (firewall open for VAPI.ai). • No SIP traffic detected on the PBX. Request: • Assistance to route outbound calls through my BYOC SIP trunk as a priority. • If BYOC is not feasible, help resolve call transfer issues with the Twilio SIP trunk. • Guidance on any specific configurations or server settings required for handling calls within Europe, specifically from France to France. Thank you for your support. Best regards
a
Heywillinabus Thank you for creating the ticket! A member of our team will reach out to you shortly.
v
message has been deleted
@willinabus Hello, Thank you for reaching out to VAPI Support Team. I'm here to assist you with configuring your outbound and inbound calls using your own SIP trunk and to address the issues you're facing with call transfers. For the outbound calls issue where they remain in "queued" status with the error "sip gateway failed to connect," it seems like there might be a misconfiguration in the SIP trunk settings or a network connectivity issue. Since you've already verified the network connectivity and firewall settings, let's ensure that the SIP trunk is correctly configured in VAPI.ai with the correct Credential ID, IP/Port, Authentication details, and that SIP Register is enabled with the proper Domain and Realm. To route outbound calls through your BYOC SIP trunk, you'll need to specify the
sipUri
attribute within the
forwardingPhoneNumbers
array to direct the calls to your SIP address. Please ensure that the
sipUri
is correctly formatted and points to your Yeastar PBX. Regarding the call transfer issues with the Twilio SIP trunk, it's important to ensure that your receiving system is configured to handle SIP REFER messages, as VAPI utilizes SIP REFER to transfer SIP calls. If the transfers are failing, there might be a compatibility issue or a misconfiguration in the handling of these messages. For guidance on specific configurations or server settings required for handling calls within Europe, specifically from France to France, you should ensure that your SIP trunk and VAPI.ai settings comply with any regional requirements and that the latency is minimized for better call quality. If you provide me with the necessary details, I can help you further configure the settings or troubleshoot the issues. Otherwise, if you need more in-depth technical assistance, please ask support for more info on this. Best regards, VAPI Support Team
You can continue this conversation by mentioning me in the message.
w
Hello @User , Thank you for your prompt assistance. I have reviewed and confirmed my SIP trunk configuration with the following details: • Credential ID: [Credential ID] • IP/Port: [IP]:[Port] (UDP/TCP) • Authentication: [Username]/[Password] • SIP Register Enabled: Yes (Domain: [Domain], Realm: [Realm]) • PhoneNumber ID: [PhoneNumber ID] I have specified the sipUri within the forwardingPhoneNumbers array to point to my Yeastar PBX as follows: sip:[Extension]@[PBX IP]:[Port] Despite these settings, outbound calls remain in the “queued” status with the error “sip gateway failed to connect,” and there are no REGISTER or INVITE attempts visible on my Yeastar PBX. Additionally, I have experienced high latency when connecting to VAPI.ai servers. Are there European servers available to ensure better connectivity and call performance for calls from France to France? My primary goal is to use my BYOC SIP trunk for both outbound and inbound calls to utilize my existing telephony infrastructure and minimize costs. However, if using the BYOC SIP trunk is not feasible, I would consider continuing with the Twilio SIP trunk but require assistance in resolving the call transfer issues I am experiencing. I would greatly appreciate your guidance on the following: 1. BYOC SIP Trunk Routing: • Are there additional configurations needed to successfully route outbound calls through my BYOC SIP trunk? 2. European Server Availability: • Do you offer servers located in Europe to reduce latency for French calls? 3. Twilio Call Transfer Issues: • If I proceed with the Twilio SIP trunk, how can I resolve the call transfer failures from PSTN to SIP to Yeastar PBX extensions? Thank you for your support. Best regards
Hello @User , Thank you for your prompt assistance. I have reviewed and confirmed my SIP trunk configuration with the following details: • Credential ID: [Credential ID] • IP/Port: [IP]:[Port] (UDP/TCP) • Authentication: [Username]/[Password] • SIP Register Enabled: Yes (Domain: [Domain], Realm: [Realm]) • PhoneNumber ID: [PhoneNumber ID] I have specified the sipUri within the forwardingPhoneNumbers array to point to my Yeastar PBX as follows: sip:[Extension]@[PBX IP]:[Port] Despite these settings, outbound calls remain in the “queued” status with the error “sip gateway failed to connect,” and there are no REGISTER or INVITE attempts visible on my Yeastar PBX. Additionally, I have experienced high latency when connecting to VAPI.ai servers. Are there European servers available to ensure better connectivity and call performance for calls from France to France? My primary goal is to use my BYOC SIP trunk for both outbound and inbound calls to utilize my existing telephony infrastructure and minimize costs. However, if using the BYOC SIP trunk is not feasible, I would consider continuing with the Twilio SIP trunk but require assistance in resolving the call transfer issues I am experiencing. I would greatly appreciate your guidance on the following: BYOC SIP Trunk Routing: • Are there additional configurations needed to successfully route outbound calls through my BYOC SIP trunk? European Server Availability: • Do you offer servers located in Europe to reduce latency for French calls? Twilio Call Transfer Issues: • If I proceed with the Twilio SIP trunk, how can I resolve the call transfer failures from PSTN to SIP to Yeastar PBX extensions? Thank you for your support. Best regards
v
@willinabus Hello, Thank you for providing the additional details regarding your SIP trunk configuration and the issues you're encountering. Let's address each of your concerns: 1. BYOC SIP Trunk Routing: - If outbound calls remain in the "queued" status, it's possible that the SIP INVITEs are not reaching your PBX. Ensure that the
sipUri
is correctly formatted and that your PBX is configured to accept connections from VAPI.ai's IP addresses. Also, check if there are any NAT traversal issues that might be preventing the SIP messages from reaching your PBX. - If you've confirmed that the
sipUri
is correct and there are no network issues, please ask support for more info on this, as we may need to look into the logs and deeper system configurations. 2. European Server Availability: - VAPI.ai does have infrastructure in various regions to help reduce latency. If you're experiencing high latency, it's important to ensure that your traffic is being routed through the closest available data center. Please ask support for more info on this to check if there are specific settings or configurations that can be adjusted to optimize your connection to European servers. 3. Twilio Call Transfer Issues: - For the call transfer issues with Twilio SIP trunk, ensure that your PBX is configured to handle SIP REFER messages. If the issue persists, it could be related to the compatibility between Twilio's SIP trunk and your PBX. You may need to check the logs for any error messages during the transfer attempts and adjust the PBX settings accordingly. If you're unable to resolve the issue, please ask support for more info on this for further assistance. Please provide any additional information or specific error messages you have, and we can continue to troubleshoot the issues together. If you need immediate technical support, don't hesitate to ask support for more info on this. Best regards, VAPI Support Team
w
Please let me know if there is any european server i can use because the one i use now is sip.vapi.ai with port 5060 in my PBX Trunk. My actual configuration is with the POST method to the url https://api.vapi.ai/credential : { "provider": "byo-sip-trunk", "name": "BYOC Trunk", "gateways": [ { "ip": "Ip static created in the PBX Trunk", "port": Static port provided by the Trunk, "netmask": 32, "inboundEnabled": true, "outboundEnabled": true, "outboundProtocol": "udp" } ] }
v
@willinabus As of my knowledge cutoff in April 2023, VAPI.ai typically operates a global network with servers in various regions, including Europe, to ensure low latency for its users. However, the specific details about regional servers and how to configure your SIP trunk to use a European server would be part of the internal documentation and support resources of VAPI.ai. For your current configuration, if you're using
sip.vapi.ai
with port
5060
and experiencing high latency, it's possible that your traffic is not being routed through the nearest data center. To address this, you should reach out to VAPI.ai's support team to inquire about the availability of a European server endpoint that you can use to minimize latency. Your current JSON configuration for the BYOC SIP trunk looks correct based on the information you've provided. If you're still experiencing issues with the "sip gateway failed to connect" error, it's essential to verify that the "ip" and "port" values in your "gateways" array are accurate and correspond to your PBX's external IP address and the port you've configured for SIP traffic. Please ask support for more info on this to get the most up-to-date and region-specific server information and to ensure that your configuration is optimized for the best performance. Best regards, VAPI Support Team
w
And if my Trunk on the PBX request a username and password how the configuration should be on the API call for creating credentials ? Please explain this step and the next ones
And if my Trunk on the PBX request a username and password how the configuration should be on the API call for creating credentials ? Please explain this step and the next ones. Please help me to configure this
Any update ?
please answer
do i need to have a username and a password or just with ip it will work ?
v
@willinabus If your PBX trunk requires a username and password for authentication, you will need to include these credentials in your API call for creating the SIP trunk configuration. The configuration might look something like this:
Copy code
json
{
  "provider": "byo-sip-trunk",
  "name": "BYOC Trunk",
  "credentials": {
    "username": "YourUsername",
    "password": "YourPassword"
  },
  "gateways": [
    {
      "ip": "YourStaticIP",
      "port": YourStaticPort,
      "netmask": 32,
      "inboundEnabled": true,
      "outboundEnabled": true,
      "outboundProtocol": "udp"
    }
  ]
}
Please replace
YourUsername
,
YourPassword
,
YourStaticIP
, and
YourStaticPort
with the actual values provided by your PBX trunk. After setting up the credentials, you should also configure your PBX to accept connections from VAPI.ai's IP addresses and ensure that the firewall is configured to allow traffic on the specified port. If you're unsure about the exact format of the API call or if additional steps are required, please ask support for more info on this. They will be able to provide you with the specific details and guidance you need to complete the configuration. Regarding your question about whether just an IP will work, it depends on the authentication method required by your PBX. If your PBX requires authentication, you will need to provide a username and password. If it supports IP-based authentication and does not require a username and password, then configuring the IP and port might be sufficient. For further assistance and step-by-step guidance, please ask support for more info on this.
w
I have this error : Error: 400 Bad Request {"message":["property credentials should not exist"],"error":"Bad Request","statusCode":400}
v
@willinabus The error message you're receiving indicates that the
credentials
property should not be included in the API request you're making. This suggests that the API endpoint you're using does not expect a
credentials
field in the JSON payload. If your SIP trunk requires a username and password for authentication, it's possible that the API endpoint or the method for providing these details is different than what you've attempted. The correct method to include SIP credentials may vary based on VAPI.ai's API specifications. To resolve this issue, you should refer to the official VAPI.ai documentation for creating SIP trunk credentials or reach out to their support team for the correct API endpoint and payload structure. In the meantime, if your PBX supports IP authentication and does not strictly require username and password authentication, you could attempt to set up the trunk using just the IP and port information. If you continue to experience difficulties or if you need the exact steps and API endpoint for including username and password authentication, please ask support for more info on this. They will be able to provide you with the correct information and help you resolve the error.
w
So technically if I have a VoiP provider who gives me a phone number and a trunk and then I connect that into my Yeastar PBX interface, then from there how do I connect that to VAPI? Do I need to create a new trunk in the PBX specific to VAPI? And how do I import the phone number as well?
v
@willinabus To connect your Yeastar PBX, which already has a trunk and phone number from a VoIP provider, to VAPI, you would typically follow these steps: 1. Create a New Trunk in Your PBX for VAPI: Yes, you would create a new trunk in your Yeastar PBX specifically for VAPI. This trunk will handle the SIP signaling and media between your PBX and VAPI's platform. 2. Configure the Trunk with VAPI's SIP Details: You will need to configure the new trunk with the SIP details provided by VAPI, such as the SIP server (domain), outbound proxy, and any required authentication details (if VAPI requires them). 3. Import the Phone Number into VAPI: To import the phone number into your VAPI account, you would use the VAPI dashboard or API. Since you mentioned that importing can be done via the dashboard, you would navigate to the appropriate section in the dashboard and follow the steps to import an external number. You will need to provide the phone number and possibly some additional details about your VoIP provider. 4. Configure VAPI to Use Your PBX Trunk: Within VAPI, you would configure your application or call handling logic to route calls to and from your PBX using the trunk you've set up. This typically involves specifying the SIP URI that points to your PBX trunk. 5. Test the Configuration: After setting up the trunk and importing the number, you should test inbound and outbound calls to ensure that everything is working correctly. This will help you identify and fix any issues with the call flow. If you need assistance with the specific steps or configurations in the VAPI dashboard or API, please ask support for more info on this. They can provide detailed instructions and support for your particular setup and ensure that your phone number is correctly imported and configured for use with VAPI.
s
issues
1. Outbound Calls (BYOC): Can you share the call ID/PCAP-file so I can take a look? 2. Call Transfers (Twilio): We don't allow or we cannot do PSTN to SIP Transfers. @willinabus let's resolve the first one first then we will get into the other, share the call ID/PCAP please.
w
Sure thank you. Here is the call id : 6663f04c-c1e8-47fc-93a6-f2226921fbd5
Here i tested with another ip. Now it should be the correct one but the call still doesn't work here is the id of the call : f76a0ad2-572c-4f67-b619-457310260a48
Can we have a call to resolve this issue ?
Can we have a call with the vapi support team to resolve this issue ?
v
@willinabus I'm glad to assist you with the issues you're facing. While I can't initiate a call myself, I can guide you on how to request a call with the VAPI support team. To request a call with the VAPI support team, you should reach out to them directly through their official support channels. You can typically do this by sending an email to the support team with your request for a call, including details about the issues you're facing and the call IDs you've provided. Here's what you can do: 1. Send an email to the VAPI support team at [support@vapi.ai](support@vapi.ai). 2. In your email, mention that you would like to have a call to resolve the ongoing issues. 3. Provide the call IDs (
6663f04c-c1e8-47fc-93a6-f2226921fbd5
and
f76a0ad2-572c-4f67-b619-457310260a48
) and any relevant details about the problems you're experiencing. 4. Request a suitable time for the call, considering your time zone and availability. The support team should be able to schedule a call with you to discuss the issues in detail and work towards a resolution. If you need further assistance or have any other questions, please let me know, and I'll do my best to help you.
w
Please give me a step by step guide for the following scenario : VoiP Provider (gives me the number starting with +33 for france) and then i connect it to my PBX from Yeastar with a specific trunk and then how can i connect it to Vapi (importing the same number from the VoiP) ?
s
@willinabus check your DM, for my calendar link.
@willinabus You have deleted your number from Vapi, because of this I cannot look into system to find your PCAP file. Kindly create the phone number again and let me know the call ID so I can look for the PCAP file.
w
Sure here is the new call id with the valid phone number : e6905710-c1b6-4b09-bc2d-60f694865517
s
@willinabus for some unknow reason SIP dashboard is down, and I can't get logged IN. I will look into this later once I can get inside the dashboard.
w
sure thank you, in the meantime i scheduled a call with you on your calendly
s
logs
🔵 12:14:12:288 Call
e6905710-c1b6-4b09-bc2d-60f694865517
Waited 300s But Transport Never Connected. @willinabus I have reviewed your recent call ID; however, it appears that your telephony did not respond or connect, which resulted in the call being dropped. Could you please attempt to make another call ?
@willinabus because of no response closing this ticket.
e
I need help setting up a SIP Trunk number. I use GoTo as my telephone provider. I have the following information: Number: +55 11 5028 0718 Username: * Password: ** Domain: reg.jiveip.net Outbound Proxy: 46022314joaopaulopereiracorrea.jive.rtcfront.net Ports: 5060, 5061 and 5080 UDP and TCP However, I am unable to set up the SIP Trunk using https://dashboard.vapi.ai/keys Can you help me with a step-by-step guide to configure it?
k
Hey, please create a new support ticket for your issue. This won't be counted under the SLA, and you won't be receiving any responses.
3 Views