Muted is never true in ConfbridgeWelcome

Hello!

As stated in the title, the muted attribute for channels in ConfbridgeWelcome is always false.

I have checked in the asterisk CLI with “confbridge list <confbridge_name>” and even though a channel has the m-flag (which is changing based on ConfbridgeMute/ConfbridgeUnmute), ConbridgeWelcome does not reflect it.

Am I correct in assuming that the muted attribute of ConfbridgeWelcome is supposed to reflect the muted state of a channel in the confbridge?

Im using Asterisk 18.8.0 and chan_pjsip.

Thanks in advance!

I had a look through the source code myself to see if I could spot an issue.

Looks like the method conf_send_event_to_participants(…) in /apps/confbridge/confbridge_manager.c receives an argument “struct stasis_message *msg” which contains a blob of data for the channel that is joining the conference. The blob contains the state of muted and some other data.

The issue seems to be that there is a loop that uses this blob(variable named extras) of data to create json for ALL active channels in the conference. (Will be used in the welcome message). Which means every channel has the same blob/json data as the joining participant.

I made a quick fix to solve the issue I had but there are other variables in the blob that will still be wrong.

--- ./apps/confbridge/confbridge_manager.c      2022-08-10 16:24:22.489678724 +0200
+++ ../asterisk/apps/confbridge/confbridge_manager.c    2022-08-10 16:26:13.791044981 +0200
@@ -459,6 +459,7 @@
                        }

                        target_json_channel = channel_to_json(target_snapshot, extras, NULL);
+                       ast_json_object_set(target_json_channel, "muted", user->muted ? ast_json_true() : ast_json_false());
                        ao2_ref(target_snapshot, -1);

                        if (!json_channels) {

So I’m assuming that this is a bug and I’ll create an issue tomorrow unless there are any objections here.

If it’s a bug (which this seems like it is), definitely go ahead and open an issue for it: https://issues.asterisk.org

If you don’t have an Asterisk CLA, you may also want to get one so that you can submit the patch to the project: How to Contribute to Asterisk: Part One ⋆ Asterisk

They take a while to process so better to submit one sooner rather than later.

I created an issue.

https://issues.asterisk.org/jira/browse/ASTERISK-30175

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.