Reference
?

session.mute

Mutes or unmutes the microphone while the session stays live.
session.mute() / session.unmute() / session.isMuted

Mutes and unmutes the microphone without ending the call, with isMuted reflecting the current state. A visible, working mute is one of the two controls a voice UI must always have; the other is end.

Toggle the mic
await session.mute();
session.isMuted; // true
await session.unmute();