Skip to main content
testWebsocketConnectivity() Prebuilt Custom Tests whether WebSocket connections can be established with Daily’s signaling servers across AWS regions. Useful for precall checks to detect firewall or VPN issues before a room is joined.
A passing result does not indicate that the user is authorized to join a call — only that WebSocket connections are possible. A warning result does not guarantee calls will fail.

Return value

Returns Promise<DailyWebsocketConnectivityTestResults>.
result
'passed' | 'warning' | 'failed' | 'aborted'
  • 'passed' — WebSocket connections succeeded in all regions
  • 'warning' — at least one region failed; calls may still work but issues are possible
  • 'failed' — no region could be connected to
  • 'aborted' — test was stopped via abortTestWebsocketConnectivity() before all regions completed
passedRegions
string[]
AWS region identifiers where the WebSocket connection succeeded.
failedRegions
string[]
AWS region identifiers where the WebSocket connection failed.
abortedRegions
string[]
AWS region identifiers where the connection attempt was aborted.

Example

const results = await call.testWebsocketConnectivity();

switch (results.result) {
  case 'failed':
    console.warn('Cannot connect via WebSockets. Contact your network admin.');
    break;
  case 'warning':
    console.warn('Some regions unreachable:', results.failedRegions);
    break;
  case 'aborted':
    console.log('Test aborted.');
    break;
  case 'passed':
  default:
    console.log('WebSocket connectivity confirmed in all regions.');
}

Example response

{
  "result": "warning",
  "passedRegions": ["eu-west-2", "us-east-1", "us-west-2"],
  "failedRegions": ["eu-central-1"],
  "abortedRegions": []
}

See also