<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/9060">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_confbridge: Add talking indicator for ConfBridgeList AMI response<br><br>When an AMI client connects, it cannot determine if a user was talking<br>prior to a transition in the user speaking state (which would generate<br>a ConfbridgeTalking event). This patch causes app_confbridge to track the<br>talking state and make this state available via ConfBridgeList.<br><br>ASTERISK-27877 #close<br><br>Change-Id: I19b5284f34966c3fda94f5b99a7e40e6b89767c6<br>---<br>M CHANGES<br>M apps/app_confbridge.c<br>M apps/confbridge/include/confbridge.h<br>3 files changed, 21 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/CHANGES b/CHANGES<br>index 4bb2737..a02cd8a 100644<br>--- a/CHANGES<br>+++ b/CHANGES<br>@@ -28,6 +28,12 @@<br> Content-Type of a message. Since you can now set Content-Type, other<br> text/* content types are now valid.<br> <br>+app_confbridge<br>+------------------<br>+ * ConfbridgeList now shows talking status. This utilizes the same voice<br>+ detection as the ConfbridgeTalking event, so bridges must be configured<br>+ with "talk_detection_events=yes" for this flag to have meaning.<br>+<br> ------------------------------------------------------------------------------<br> --- Functionality changes from Asterisk 13.20.0 to Asterisk 13.21.0 ----------<br> ------------------------------------------------------------------------------<br>diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c<br>index df93215..ebeef92 100644<br>--- a/apps/app_confbridge.c<br>+++ b/apps/app_confbridge.c<br>@@ -278,6 +278,13 @@<br> <enum name="No"/><br> </enumlist><br> </parameter><br>+ <parameter name="Talking"><br>+ <para>Is this user talking?</para><br>+ <enumlist><br>+ <enum name="Yes"/><br>+ <enum name="No"/><br>+ </enumlist><br>+ </parameter><br> <parameter name="AnsweredTime"><br> <para>The number of seconds the channel has been up.</para><br> </parameter><br>@@ -2085,7 +2092,7 @@<br> <br> static int conf_handle_talker_cb(struct ast_bridge_channel *bridge_channel, void *hook_pvt, int talking)<br> {<br>- const struct confbridge_user *user = hook_pvt;<br>+ struct confbridge_user *user = hook_pvt;<br> RAII_VAR(struct confbridge_conference *, conference, NULL, ao2_cleanup);<br> struct ast_json *talking_extras;<br> <br>@@ -2094,6 +2101,10 @@<br> /* Remove the hook since the conference does not exist. */<br> return -1;<br> }<br>+<br>+ ao2_lock(conference);<br>+ user->talking = talking;<br>+ ao2_unlock(conference);<br> <br> talking_extras = ast_json_pack("{s: s, s: b}",<br> "talking_status", talking ? "on" : "off",<br>@@ -3526,6 +3537,7 @@<br> "EndMarked: %s\r\n"<br> "Waiting: %s\r\n"<br> "Muted: %s\r\n"<br>+ "Talking: %s\r\n"<br> "AnsweredTime: %d\r\n"<br> "%s"<br> "\r\n",<br>@@ -3537,6 +3549,7 @@<br> AST_YESNO(ast_test_flag(&user->u_profile, USER_OPT_ENDMARKED)),<br> AST_YESNO(waiting),<br> AST_YESNO(user->muted),<br>+ AST_YESNO(user->talking),<br> ast_channel_get_up_time(user->chan),<br> ast_str_buffer(snap_str));<br> <br>diff --git a/apps/confbridge/include/confbridge.h b/apps/confbridge/include/confbridge.h<br>index e59400c..a1f9f4a 100644<br>--- a/apps/confbridge/include/confbridge.h<br>+++ b/apps/confbridge/include/confbridge.h<br>@@ -254,6 +254,7 @@<br> unsigned int muted:1; /*!< Has the user requested to be muted? */<br> unsigned int kicked:1; /*!< User has been kicked from the conference */<br> unsigned int playing_moh:1; /*!< MOH is currently being played to the user */<br>+ unsigned int talking:1; /*!< User is currently talking */<br> AST_LIST_HEAD_NOLOCK(, post_join_action) post_join_list; /*!< List of sounds to play after joining */;<br> AST_LIST_ENTRY(confbridge_user) list; /*!< Linked list information */<br> };<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9060">change 9060</a>. To unsubscribe, 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/9060"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I19b5284f34966c3fda94f5b99a7e40e6b89767c6 </div>
<div style="display:none"> Gerrit-Change-Number: 9060 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: William McCall <william.mccall@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: William McCall <william.mccall@gmail.com> </div>