> ## 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.

# ended

Emitted when the call ends normally, for example, when either party hangs up.

## Category

Call

## Callback Parameters

| Parameter | Type                                                                | Description                           |
| --------- | ------------------------------------------------------------------- | ------------------------------------- |
| `session` | [`CallSession`](/click-to-call/sdk/api-reference/types#callsession) | The ended call session.               |
| `endInfo` | [`CallEndInfo`](/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](/click-to-call/sdk/event-reference/failed)
* [answered](/click-to-call/sdk/event-reference/answered)
* [endCall](/click-to-call/sdk/api-reference/end-call)
* [CallEndInfo](/click-to-call/sdk/api-reference/types#callendinfo)
