<p>Joshua Colp <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18499">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Joshua Colp: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">apps/confbridge: Added hear_own_join_sound option to control who hears sound_join<br><br>Added the hear_own_join_sound option to the confbridge user profile to<br>control who hears the sound_join audio file. When set to 'yes' the user<br>entering the conference and the participants already in the conference<br>will hear the sound_join audio file. When set to 'no' the user entering<br>the conference will not hear the sound_join audio file, but the<br>participants already in the conference will hear the sound_join audio<br>file.<br><br>ASTERISK-29931<br>Added by Michael Cargile<br><br>Change-Id: I856bd66dc0dfa057323860a6418c1371d249abd2<br>---<br>M apps/app_confbridge.c<br>M apps/confbridge/conf_config_parser.c<br>M apps/confbridge/include/confbridge.h<br>M configs/samples/confbridge.conf.sample<br>A doc/CHANGES-staging/app_confbridge_hear_join.txt<br>5 files changed, 34 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c</span><br><span>index d811d64..d365075 100644</span><br><span>--- a/apps/app_confbridge.c</span><br><span>+++ b/apps/app_confbridge.c</span><br><span>@@ -2725,17 +2725,24 @@</span><br><span> ast_autoservice_stop(chan);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Play the Join sound to both the conference and the user entering. */</span><br><span> if (!quiet) {</span><br><span> const char *join_sound = conf_get_sound(CONF_SOUND_JOIN, conference->b_profile.sounds);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (strcmp(conference->b_profile.language, ast_channel_language(chan))) {</span><br><span style="color: hsl(0, 100%, 40%);">- ast_stream_and_wait(chan, join_sound, "");</span><br><span style="color: hsl(120, 100%, 40%);">+ /* if hear_own_join_sound is enabled play the Join sound to everyone */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_test_flag(&user.u_profile, USER_OPT_HEAR_OWN_JOIN_SOUND) ) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (strcmp(conference->b_profile.language, ast_channel_language(chan))) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_stream_and_wait(chan, join_sound, "");</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_autoservice_start(chan);</span><br><span style="color: hsl(120, 100%, 40%);">+ play_sound_file(conference, join_sound);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_autoservice_stop(chan);</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span style="color: hsl(120, 100%, 40%);">+ async_play_sound_file(conference, join_sound, chan);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ /* if hear_own_join_sound is disabled only play the Join sound to just the conference */</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span> ast_autoservice_start(chan);</span><br><span> play_sound_file(conference, join_sound);</span><br><span> ast_autoservice_stop(chan);</span><br><span style="color: hsl(0, 100%, 40%);">- } else {</span><br><span style="color: hsl(0, 100%, 40%);">- async_play_sound_file(conference, join_sound, chan);</span><br><span> }</span><br><span> }</span><br><span> </span><br><span>diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c</span><br><span>index 4f58c18..b27adf2 100644</span><br><span>--- a/apps/confbridge/conf_config_parser.c</span><br><span>+++ b/apps/confbridge/conf_config_parser.c</span><br><span>@@ -97,6 +97,9 @@</span><br><span> <configOption name="quiet"></span><br><span> <synopsis>Silence enter/leave prompts and user intros for this user</synopsis></span><br><span> </configOption></span><br><span style="color: hsl(120, 100%, 40%);">+ <configOption name="hear_own_join_sound"></span><br><span style="color: hsl(120, 100%, 40%);">+ <synopsis>Determines if the user also hears the join sound when they enter a conference</synopsis></span><br><span style="color: hsl(120, 100%, 40%);">+ </configOption></span><br><span> <configOption name="announce_user_count"></span><br><span> <synopsis>Sets if the number of users should be announced to the user</synopsis></span><br><span> </configOption></span><br><span>@@ -1574,6 +1577,9 @@</span><br><span> ast_cli(a->fd,"Quiet: %s\n",</span><br><span> u_profile.flags & USER_OPT_QUIET ?</span><br><span> "enabled" : "disabled");</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_cli(a->fd,"Hear Join: %s\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ u_profile.flags & USER_OPT_HEAR_OWN_JOIN_SOUND ?</span><br><span style="color: hsl(120, 100%, 40%);">+ "enabled" : "disabled");</span><br><span> ast_cli(a->fd,"Wait Marked: %s\n",</span><br><span> u_profile.flags & USER_OPT_WAITMARKED ?</span><br><span> "enabled" : "disabled");</span><br><span>@@ -2396,6 +2402,7 @@</span><br><span> aco_option_register(&cfg_info, "startmuted", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_STARTMUTED);</span><br><span> aco_option_register(&cfg_info, "music_on_hold_when_empty", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_MUSICONHOLD);</span><br><span> aco_option_register(&cfg_info, "quiet", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_QUIET);</span><br><span style="color: hsl(120, 100%, 40%);">+ aco_option_register(&cfg_info, "hear_own_join_sound", ACO_EXACT, user_types, "yes", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_HEAR_OWN_JOIN_SOUND);</span><br><span> aco_option_register_custom(&cfg_info, "announce_user_count_all", ACO_EXACT, user_types, "no", announce_user_count_all_handler, 0);</span><br><span> aco_option_register(&cfg_info, "announce_user_count", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_ANNOUNCEUSERCOUNT);</span><br><span> /* Negative logic. Defaults to "yes" and evaluates with ast_false(). If !ast_false(), USER_OPT_NOONLYPERSON is cleared */</span><br><span>diff --git a/apps/confbridge/include/confbridge.h b/apps/confbridge/include/confbridge.h</span><br><span>index 95a0732..f90f185 100644</span><br><span>--- a/apps/confbridge/include/confbridge.h</span><br><span>+++ b/apps/confbridge/include/confbridge.h</span><br><span>@@ -70,6 +70,7 @@</span><br><span> USER_OPT_ECHO_EVENTS = (1 << 18), /*!< Send events only to the admin(s) */</span><br><span> USER_OPT_TEXT_MESSAGING = (1 << 19), /*!< Send text messages to the user */</span><br><span> USER_OPT_ANSWER_CHANNEL = (1 << 20), /*!< Sets if the channel should be answered if currently unanswered */</span><br><span style="color: hsl(120, 100%, 40%);">+ USER_OPT_HEAR_OWN_JOIN_SOUND = (1 << 21), /*!< Set if the caller should hear the join sound */</span><br><span> };</span><br><span> </span><br><span> enum bridge_profile_flags {</span><br><span>diff --git a/configs/samples/confbridge.conf.sample b/configs/samples/confbridge.conf.sample</span><br><span>index eecbb65..ed4c72b 100644</span><br><span>--- a/configs/samples/confbridge.conf.sample</span><br><span>+++ b/configs/samples/confbridge.conf.sample</span><br><span>@@ -41,6 +41,12 @@</span><br><span> ; There are some prompts, such as the prompt to enter a PIN number,</span><br><span> ; that must be played regardless of what this option is set to.</span><br><span> ; Off by default</span><br><span style="color: hsl(120, 100%, 40%);">+;hear_own_join_sound=yes ; Sets if a user joining the conference should hear the sound_join</span><br><span style="color: hsl(120, 100%, 40%);">+ ; audio sound when they enter the conference. If set to 'no' the</span><br><span style="color: hsl(120, 100%, 40%);">+ ; user will not hear the sound_join audio but the other participants</span><br><span style="color: hsl(120, 100%, 40%);">+ ; in the conference will still hear the audio. If set to 'yes'</span><br><span style="color: hsl(120, 100%, 40%);">+ ; everyone hears the sound_join audio when this user enters the conference.</span><br><span style="color: hsl(120, 100%, 40%);">+ ; On by default</span><br><span> ;announce_user_count=yes ; Sets if the number of users should be announced to the</span><br><span> ; caller. Off by default.</span><br><span> ;announce_user_count_all=yes ; Sets if the number of users should be announced to</span><br><span>diff --git a/doc/CHANGES-staging/app_confbridge_hear_join.txt b/doc/CHANGES-staging/app_confbridge_hear_join.txt</span><br><span>new file mode 100644</span><br><span>index 0000000..40f2383</span><br><span>--- /dev/null</span><br><span>+++ b/doc/CHANGES-staging/app_confbridge_hear_join.txt</span><br><span>@@ -0,0 +1,8 @@</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: app_confbridge</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Added the hear_own_join_sound option to the confbridge user profile to</span><br><span style="color: hsl(120, 100%, 40%);">+control who hears the sound_join audio file. When set to 'yes' the user</span><br><span style="color: hsl(120, 100%, 40%);">+entering the conference and the participants already in the conference</span><br><span style="color: hsl(120, 100%, 40%);">+will hear the sound_join audio file. When set to 'no' the user entering</span><br><span style="color: hsl(120, 100%, 40%);">+the conference will not hear the sound_join audio file, but the</span><br><span style="color: hsl(120, 100%, 40%);">+participants already in the conference will hear the sound_join audio file.</span><br><span></span><br></pre><div style="white-space:pre-wrap"></div><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18499">change 18499</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/18499"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 19 </div>
<div style="display:none"> Gerrit-Change-Id: I856bd66dc0dfa057323860a6418c1371d249abd2 </div>
<div style="display:none"> Gerrit-Change-Number: 18499 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Michael Cargile <mikec@vicidial.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>