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

# off

> Removes previously registered event listeners from a Click To Call client.

Removes a previously registered event listener.

## Signature

```typescript theme={null}
client.off<T extends EventName>(event: T, callback: EventCallback<T>): this;
```

## Parameters

| Parameter | Type | Description | Required |
| - | - | - | - |
| `event` | `EventName` | The name of the event to stop listening for. | Yes |
| `callback` | `EventCallback<T>` | The callback function to remove. | Yes |

## Returns

`this` — the client instance, allowing method chaining.

> [!WARNING]
>
> You must pass the same function reference that was used with [`on()`](https://docs-classic.cognigy.com/click-to-call/sdk/api-reference/on). Anonymous functions can't be removed.

## Example

```typescript theme={null}
const onAnswered = (session) => {
  console.log('Call answered:', session.id);
};

// Subscribe
client.on('answered', onAnswered);

// Unsubscribe
client.off('answered', onAnswered);
```

## More Information

* [on](https://docs-classic.cognigy.com/click-to-call/sdk/api-reference/on.md)
* [Event Reference](https://docs-classic.cognigy.com/click-to-call/sdk/event-reference/overview)


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