31904: Stream - WebSocket - Host Unreachable
VOICE
ERROR
Twilio returns this error when it cannot create the Media Streams WebSocket connection because the host in your Stream url is unreachable. Twilio connects to Media Streams over wss, and your WebSocket endpoint must be reachable from the public internet.
- The Stream
urlpoints to the wrong hostname or IP address. - The hostname resolves to a private or otherwise non-routable IP address.
- Your WebSocket server is down or no longer connected to the internet.
- A firewall rule blocks secure WebSocket traffic on TCP port 443 between Twilio and your WebSocket server.
- Confirm that the Stream
urlis correct and useswss. Update the hostname or IP address if it does not resolve to the server that should receive the stream. - Replace private, internal, or non-routable addresses with a publicly reachable endpoint.
- Verify that your WebSocket server is running and reachable from the public internet.
- Update your firewall rules to allow secure WebSocket connections on TCP port 443 from Twilio to your WebSocket server.