<p>William McCall has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/9062">View Change</a></p><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 apps/app_confbridge.c<br>M apps/confbridge/include/confbridge.h<br>2 files changed, 15 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/62/9062/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c<br>index 25cf275..a789a1b 100644<br>--- a/apps/app_confbridge.c<br>+++ b/apps/app_confbridge.c<br>@@ -276,6 +276,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>@@ -2102,7 +2109,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>@@ -2111,6 +2118,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>@@ -3562,6 +3573,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>@@ -3573,6 +3585,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 0a0a571..f9187e0 100644<br>--- a/apps/confbridge/include/confbridge.h<br>+++ b/apps/confbridge/include/confbridge.h<br>@@ -269,6 +269,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/9062">change 9062</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/9062"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I19b5284f34966c3fda94f5b99a7e40e6b89767c6 </div>
<div style="display:none"> Gerrit-Change-Number: 9062 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: William McCall <william.mccall@gmail.com> </div>