<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/4184/">https://reviewboard.asterisk.org/r/4184/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By Matt Jordan.</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-24522">ASTERISK-24522</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Consider the following:
A marked user in a conference
Two or more endmarked users in the conference
When the marked users leaves, we will be in the conf_state_multi_marked state. This currently will traverse the users, kicking out any who have the endmarked flags. When they are kicked, a full ast_bridge_remove is immediately called on the channels. At this time, we also unilaterally set the need_prompt flag.
When the need_prompt flag is set, we then playback a sound to the bridge informing everyone that the leader has left:
if (need_prompt) {
/* Play back the audio prompt saying the leader has left the conference */
if (!ast_test_flag(&user->u_profile, USER_OPT_QUIET)) {
ao2_unlock(user->conference);
ast_autoservice_start(user->chan);
play_sound_file(user->conference,
conf_get_sound(CONF_SOUND_LEADER_HAS_LEFT, user->b_profile.sounds));
ast_autoservice_stop(user->chan);
ao2_lock(user->conference);
}
}
If, however, we have a conference full of only endmarked users, this prompt is pointless. They've already been removed from the bridge, and cannot hear the sound being played into a now empty bridge. Instead, they get an odd 5 second wait time until they are fully kicked.
Unfortunately, we do have to keep the bridge locked while we're playing back the 'leader-has-left' prompt if there are wait_marked only users in the conference - so we can't make this behavior nicer easier in other situations. In this one, however, we can make it so that end_marked users immediately here their prompt if possible.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Prior to patch: the marked user leaves the conference, and an end_marked user waits a good 5 seconds or so until getting their prompt that they were kicked.
After patch: the marked user leaves the conference, and an end_marked user hears the kicked prompt quickly.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/11/apps/confbridge/conf_state_multi_marked.c <span style="color: grey">(427618)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/4184/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>