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

# connected

> The connected event fires when the WebSocket connection to the SIP server is established.

Emitted when the WebSocket connection to the SIP server is established. If the endpoint requires SIP registration, this event is emitted before the registration. In this case, wait for the [`registered`](https://docs-classic.cognigy.com/click-to-call/sdk/event-reference/registered) event before making calls. If the endpoint doesn't require registration, you can make calls after `connect()` finishes.

## Category

Connection

## Callback Parameters

None.

## Example

```typescript theme={null}
client.on('connected', () => {
  console.log('WebSocket connection established');
});
```

## More Information

* [connecting](https://docs-classic.cognigy.com/click-to-call/sdk/event-reference/connecting.md)
* [registered](https://docs-classic.cognigy.com/click-to-call/sdk/event-reference/registered.md)
* [disconnected](https://docs-classic.cognigy.com/click-to-call/sdk/event-reference/disconnected.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.