Skip to main content
Checks whether the client is connected and registered with the SIP server.

Signature

const connected = client.isConnected();

Parameters

None.

Returns

booleantrue if the client is connected and registered, false otherwise.

Example

if (client.isConnected()) {
  console.log('Client is ready to make calls');
  await client.startCall();
} else {
  console.log('Client is not connected');
  await client.connect();
}

More Information

  • connect — connect to the SIP server
  • registered event — fires when the client becomes registered