> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# testWebsocketConnectivity()

> Tests whether WebSocket connections can be established with Daily signaling servers across AWS regions.

`testWebsocketConnectivity()`

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.

<Warning>
  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.
</Warning>

## Return value

Returns `Promise<DailyWebsocketConnectivityTestResults>`.

<ResponseField name="result" type="'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()`](/reference/react-native/instance-methods/abort-test-websocket-connectivity) before all regions completed
</ResponseField>

<ResponseField name="passedRegions" type="string[]">
  AWS region identifiers where the WebSocket connection succeeded.
</ResponseField>

<ResponseField name="failedRegions" type="string[]">
  AWS region identifiers where the WebSocket connection failed.
</ResponseField>

<ResponseField name="abortedRegions" type="string[]">
  AWS region identifiers where the connection attempt was aborted.
</ResponseField>

## Example

```javascript theme={null}
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

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

## See also

<CardGroup>
  <Card title="Methods" icon="code" iconType="solid">
    * [abortTestWebsocketConnectivity()](/reference/react-native/instance-methods/abort-test-websocket-connectivity)
    * [testNetworkConnectivity()](/reference/react-native/instance-methods/test-network-connectivity)
  </Card>

  <Card title="Events" icon="bolt" iconType="solid">
    * [test-completed](/reference/react-native/events/network-events#test-completed)
  </Card>
</CardGroup>
