Ending a Call

The following method is used to remove the current user from the call:

This method triggers the call:ended event for all call members and the call:closed event for the current user.

Example

const endCall = async () => {
try {
await client.calls.end(this.currentCall);
console.log('Ended call');
} catch (e) {
console.error('Failed to end call');
}
};