Skip to main content
Connects to the SIP server and starts a call in one operation. This is a convenience method that combines connect() and startCall().

Signature

await client.connectAndCall();

Parameters

None.

Returns

Promise<void>

Throws

An error if the connection or call initiation fails.

Example

await client.connectAndCall();
console.log('Connected and call started');

With Error Handling

try {
  await client.connectAndCall();
} catch (error) {
  console.error('Failed to connect and call:', error.message);
}

More Information

  • connect — connect without starting a call
  • startCall — start a call after connecting separately
  • endCall — end the active call