Genesys Cloud JS SDK: setMute failing to persist for agent microphone

Running into a weird issue with the genesys-cloud-messaging or rather the genesys-cloud-voice SDK in our custom softphone wrapper. The goal is to programmatically toggle the agent’s microphone mute state during an active conversation.

We are using the JavaScript SDK v3.20. We initialize the client and join the conversation successfully. The audio stream is active. When the agent clicks the mute button in our UI, we call the method on the conversation object.

const conversation = await voiceClient.getConversation();
await conversation.setMute(true);

The SDK doesn’t throw an error. The promise resolves. However, the agent’s microphone isn’t actually muted on the other end. The remote party can still hear them. Interestingly, if I check the UI state in the standard Genesys Cloud web client (running in a separate browser window for the same user), the mute icon doesn’t update immediately either.

I tried adding a small delay and calling setMute(false) then setMute(true) again, thinking it might be a race condition with the audio track initialization. No luck. The audio keeps flowing.

Here is the full context of the call:

  1. User joins via voiceClient.join().
  2. conversation.on('stateChange') fires correctly.
  3. We call setMute(true).
  4. Remote party hears the agent.

I suspect this might be related to how the SDK handles the local media stream tracks versus the server-side mute flag. Is setMute supposed to stop the local track from sending data, or does it just signal the platform? If it’s the latter, why isn’t the platform muting the stream?

Also, I noticed in the network tab that a PATCH request goes out to /api/v2/conversations/voice/{id}/participants/{id}, but the body is empty when setMute is called. Shouldn’t there be a muted property in that payload?

Any thoughts on what I’m missing? The docs are pretty sparse on the actual network behavior of setMute.