## 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](https://docs.cognigy.com/click-to-call/sdk/api-reference/start-call)
- [disconnect](https://docs.cognigy.com/click-to-call/sdk/api-reference/disconnect)
- [ended](https://docs.cognigy.com/click-to-call/sdk/event-reference/ended) event
- [failed](https://docs.cognigy.com/click-to-call/sdk/event-reference/failed) event

Last modified on April 21, 2026.
