Skip to main content
Connects to the SIP server. This method fetches the SIP configuration from the endpoint URL and validates that the widget is active. Then it initializes the SIP user agent and waits for the WebSocket connection to complete. If the endpoint requires SIP registration, it also waits for the registration. The configuration fetch has a 10-second timeout, and the connection has a 15-second timeout. This must be called before startCall().

Signature

Parameters

None.

Returns

Promise<void>

Throws

An error if the client has been destroyed, the configuration fetch fails, the Click To Call widget isn’t active, or the SIP connection or registration fails. Except for Client has been destroyed, the error messages start with Failed to connect:.

Example

If you call connect() a second time, the SDK initializes a new SIP user agent. If you don’t provide a userId, the SDK generates one.

With Error Handling

More Information

Last modified on October 23, 2026