> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognigy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# endCall

Ends the current active call.

## Signature

```typescript theme={null}
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

```typescript theme={null}
await client.endCall();
console.log('Call ended');
```

### With Error Handling

```typescript theme={null}
try {
  await client.endCall();
} catch (error) {
  console.error('Failed to end call:', error.message);
}
```

## More Information

* [startCall](/click-to-call/sdk/api-reference/start-call)
* [disconnect](/click-to-call/sdk/api-reference/disconnect)
* [ended](/click-to-call/sdk/event-reference/ended) event
* [failed](/click-to-call/sdk/event-reference/failed) event
