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

# mute

> Silences the local microphone during a call so the remote party stops hearing audio.

Mutes the local microphone for the current call. The remote party won't hear audio from the local user.

## Signature

```typescript theme={null}
await client.mute();
```

## Parameters

None.

## Returns

`Promise<void>`

## Throws

An error if there is no active session to mute or if the session is not established. The error messages start with `Failed to mute call:`, for example, `Failed to mute call: No active session to mute`.

## Example

```typescript theme={null}
await client.mute();
console.log('Microphone muted');
```

### Toggle Mute

```typescript theme={null}
const session = client.getCurrentSession();
if (session) {
  if (session.muted) {
    await client.unmute();
  } else {
    await client.mute();
  }
}
```

## More Information

* [unmute](https://docs-classic.cognigy.com/click-to-call/sdk/api-reference/unmute.md)
* [getCurrentSession](https://docs-classic.cognigy.com/click-to-call/sdk/api-reference/get-current-session.md)
* [muted](https://docs-classic.cognigy.com/click-to-call/sdk/event-reference/muted.md) event


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