WebSocket Service Failing - All Outbound Calls Fai...
# support
b
All outbound calls are failing immediately with "Twilio Connection Failed" status. The issue appears to be with VAPI's WebSocket infrastructure, not configuration. What's Happening: ✅ API call succeeds - call created with status "queued" ✅ Twilio initiates call successfully ❌ VAPI's WebSocket service fails to accept Twilio's stream connection ❌ Twilio receives SIP 500 error and terminates call (0 seconds duration) ❌ VAPI dashboard shows "Twilio Connection Failed" with NO WebSocket logs Evidence of Infrastructure Issue: WebSocket logs are completely empty (no connection established at all) Consistent SIP 500 errors across multiple call attempts Same failure pattern on different call IDs API and Twilio initiation work fine - failure is at WebSocket transport layer Technical Details: Failed Call IDs: e1013eb3-0fc5-4a94-b3a0-7d4b92273023 48184c19-2a76-451f-82ee-d85b7785bf98 Assistant ID: 60241850-4871-4ce5-8162-7813b230b1c3 Phone Number: +19783062142 → +263783966561 Timestamps: 2025-09-19 around 13:31 UTC and 13:59 UTC WebSocket Endpoint Failing: wss://phone-call-websocket.aws-us-west-2-backend-production1.vapi.ai/ https://cdn.discordapp.com/attachments/1418603462878302449/1418603463247659193/image.png?ex=68ceb8ee&is=68cd676e&hm=8f7227ebd6a80390ce35c98f43457c8b9a22be4f8d2202269bee515c78747e63& https://cdn.discordapp.com/attachments/1418603462878302449/1418603464623263756/image.png?ex=68ceb8ee&is=68cd676e&hm=2f9d09a483356539ac4df5e19fa69573a607163535ed98eb60822b59c76d0fc8&
c
Same issue we are seeing
c
Hi Blessed, It seems you're encountering issues with call setups, particularly when using Twilio. To better handle such scenarios, you might want to consider the new ended reason values and error enums introduced by Vapi. - For SIP-related inbound errors, check specific endedReason codes like
call.ringing.sip-inbound-caller-hungup-before-call-connect
or
call.ringing.error-sip-inbound-call-failed-to-connect
. These can help you manage call failures more precisely. - To handle errors during active calls, use enums such as
call.in-progress.error-vapifault-chat-pipeline-failed-to-start
to detect and address specific provider issues. - Enhanced error handling for call start errors includes
call.start.error-subscription-insufficient-credits
. For more detailed assistance, refer to the [Vapi call ended reasons documentation](https://docs.vapi.ai/calls/call-ended-reason) and [the API changelog](https://docs.vapi.ai/changelog/2025/6/13). These resources will give you insights into handling connection issues with Twilio and managing call ends effectively. Can you also try some troubleshooting steps: 1. Check Twilio IP Whitelisting: Ensure you've whitelisted Vapi's SIP server static IPs - 44.229.228.186 - 44.238.177.138 2. Verify SIP Trunk Configuration: - Confirm your Termination SIP URI is correctly configured in Twilio - Check that the IP range whitelisting includes the full range 3. Verify Vapi Credential Setup: Make sure your SIP trunk credential is properly configured with:
Copy code
{
  "provider": "byo-sip-trunk",
  "gateways": [
    {
      "ip": "YOUR_TWILIO_GATEWAY_ID",
      "inboundEnabled": false
    }
  ],
  "outboundLeadingPlusEnabled": true
}
Since you're seeing successful API calls but WebSocket connection failures, double-check that your Twilio Elastic SIP Trunk settings match Vapi's requirements exactly. If the issue persists after verifying these please contact us again and let us know
2 Views