endCall - Cognigy Documentation
Ends the current active call.
Signature
await client.endCall();
Parameters
None.
Returns
Promise<void>
Throws
An error if there is no active session to terminate or if the termination fails.
Example
await client.endCall();
console.log('Call ended');
With Error Handling
try {
await client.endCall();
} catch (error) {
console.error('Failed to end call:', error.message);
}
More Information
- startCall
- disconnect
- ended event
- failed event
Last modified on April 21, 2026.