Call listen url websocket: "failed to route call"
# support
a
Websocket connection to listen to call doesn't work. Throws error 500: " Handshake status 500 Internal Server Error -+-+- {'content-type': 'application/json', 'content-length': '20', 'date': 'Thu, 24 Apr 2025 09:56:58 GMT', 'connection': 'close'} -+-+- b'failed to route call' " Anynone experiencing the same issue?
v
To troubleshoot your "failed to route call" error, verify if the
listenUrl
is still valid as these URLs can expire. Try testing the connection directly with a tool like `wscat`:
Copy code
wscat -c wss://aws-us-west-2-production1-phone-call-websocket.vapi.ai/<your-call-id>/transport
If this fails, the URL may have expired or there could be network restrictions blocking the connection. Source: - [Discord Channel](https://discord.com/channels/1211482211119796234/1329235631855108128)
To troubleshoot your "failed to route call" error, verify if the
listenUrl
is still valid as these URLs can expire. Try testing the connection directly with a tool like `wscat`:
Copy code
wscat -c wss://aws-us-west-2-production1-phone-call-websocket.vapi.ai/<your-call-id>/transport
If this fails, the URL may have expired or there could be network restrictions blocking the connection. Source: - [Discord Channel](https://discord.com/channels/1211482211119796234/1329235631855108128)
a
I fixed it. The problem is that vapi had specific errors for when phone call wasn't picked up yet after listenUrl was created and I watched for a specific exception and then retry connection
Copy code
except (websocket.WebSocketConnectionClosedException, 
                websocket.WebSocketTimeoutException, 
                ConnectionRefusedError)
in python I put those exceptions to tell my backend to retry connection until it works But now, instead of that, it throws a generic handshake 500 error, and my backend never retried. so instead of checking for a specific exception to retry, I just retry no matter what, since it's generic 500 error now
k
Nice
15 Views