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

# ended

> The ended event fires when a Click To Call call terminates normally.

Emitted when the call ends normally, for example, when either party hangs up. The [`audioEnded`](https://docs-classic.cognigy.com/click-to-call/sdk/event-reference/audio-ended) event is emitted before this event. In the `endInfo` object, `description` is set only when the remote party ends the call.

## Category

Call

## Callback Parameters

| Parameter | Type | Description |
| - | - | - |
| `session` | [`CallSession`](https://docs-classic.cognigy.com/click-to-call/sdk/api-reference/types#callsession) | The ended call session. |
| `endInfo` | [`CallEndInfo`](https://docs-classic.cognigy.com/click-to-call/sdk/api-reference/types#callendinfo) | Information about why the call ended. |

## Example

```typescript theme={null}
client.on('ended', (session, endInfo) => {
  console.log('Call ended. Cause:', endInfo.cause);
  console.log('Originator:', endInfo.originator);
  console.log('Description:', endInfo.description);
});
```

## More Information

* [failed](https://docs-classic.cognigy.com/click-to-call/sdk/event-reference/failed.md)
* [answered](https://docs-classic.cognigy.com/click-to-call/sdk/event-reference/answered.md)
* [endCall](https://docs-classic.cognigy.com/click-to-call/sdk/api-reference/end-call.md)
* [CallEndInfo](https://docs-classic.cognigy.com/click-to-call/sdk/api-reference/types.md#callendinfo)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.