Skip to main content
Disconnects from the SIP server. This method stops audio playback, terminates any active call sessions, and closes the SIP WebSocket connection.

Signature

await client.disconnect();

Parameters

None.

Returns

Promise<void>

Throws

An error if the disconnection process encounters an issue, such as a failure to stop the SIP connection.

Example

await client.disconnect();
console.log('Disconnected from SIP server');

More Information

  • connect โ€” connect to the SIP server
  • destroy โ€” disconnect, end calls, and release all resources
  • disconnected event โ€” fires when the connection is closed