Problem while snooping a channel

Hi,

I am working on an ACD system and I have a problem that I do not understand.

I have two channels speaking in one bridge (a customer and an agent).
A third person (a supervisor) can snoop and whisper on the agent channel.

Everything works fine. But if the agent holds the caller and the supervisor starts to whisper at this time, the agent cannot hear the supervisor.

When agent stops the holding, he hears the voice of the supervisor with one minute of delay (the holding time).

The agent (dialed channel) and the caller (stasis channel) are in a mixing bridge. The agent (snooped channel) and the supervisor (snooper channel) are in a second mixing bridge.
When the agent starts holding the caller’s channel, I remove it from the bridge, put it in an holding bridge and finally start music on hold.
The supervior who is snooping is mute because I don’t want the agent to know that someone is listening. When I start whispering, I unmute the snooping channel.
When agent stops the holding, I stop the moh, remove the channel from the holding bridge and add it in the bridge with the agent (snooped by the supervisor).

I am using ARI with the client for javascript (node-ari-client) and tested it on versions 13.0 and 13.9 of Asterisk.

Am I doing something wrong during channels manipulation ? If anyone has a clue I take it !

Thank you,

Lucas

I don’t think the code currently handles this scenario. At the very least it should not delay the audio like that. Please file an issue[1].

[1] https://issues.asterisk.org/jira

Ok thank you, I will open an issue.