<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6100">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_rtp_asterisk: enable rtcp & QOS stats on native bridge<br><br>Asterisk wasn't generating or forwarding RTCP packets when native<br>bridge was activated.  Also the stats weren't available via<br>CHANNEL(qos). Now the RTCP stats are always calculated.<br><br>ASTERISK-27158 #close<br><br>Change-Id: I46fb8f61c95e836b9d2dda6054b0cf205c16037b<br>---<br>M res/res_rtp_asterisk.c<br>1 file changed, 22 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c<br>index a93bb77..bf0d9cc 100644<br>--- a/res/res_rtp_asterisk.c<br>+++ b/res/res_rtp_asterisk.c<br>@@ -4854,9 +4854,6 @@<br>            return -1;<br>    }<br> <br>- rtp->rxcount++;<br>-   rtp->rxoctetcount += (len - hdrlen);<br>-<br>    /* If the payload coming in is not one of the negotiated ones then send it to the core, this will cause formats to change and the bridge to break */<br>  if (ast_rtp_codecs_find_payload_code(ast_rtp_instance_get_codecs(instance1), bridged_payload) == -1) {<br>                ast_debug(1, "Unsupported payload type received \n");<br>@@ -5092,13 +5089,6 @@<br>               }<br>     }<br> <br>- /* If we are directly bridged to another instance send the audio directly out */<br>-     instance1 = ast_rtp_instance_get_bridged(instance);<br>-  if (instance1<br>-                && !bridge_p2p_rtp_write(instance, instance1, rtpheader, res, hdrlen)) {<br>-             return &ast_null_frame;<br>-  }<br>-<br>  /* If the version is not what we expected by this point then just drop the packet */<br>  if (version != 2) {<br>           return &ast_null_frame;<br>@@ -5203,6 +5193,28 @@<br>           rtp->themssrc = ntohl(rtpheader[2]); /* Record their SSRC to put in future RR */<br>   }<br> <br>+<br>+      /* If we are directly bridged to another instance send the audio directly out,<br>+        * but only after updating core information about the received traffic so that<br>+        * outgoing RTCP reflects it.<br>+         */<br>+  instance1 = ast_rtp_instance_get_bridged(instance);<br>+  if (instance1<br>+                && !bridge_p2p_rtp_write(instance, instance1, rtpheader, res, hdrlen)) {<br>+             struct timeval rxtime;<br>+               struct ast_frame *f;<br>+<br>+              /* Update statistics for jitter so they are correct in RTCP */<br>+               calc_rxstamp(&rxtime, rtp, timestamp, mark);<br>+<br>+          /* When doing P2P we don't need to raise any frames about SSRC change to the core */<br>+             while ((f = AST_LIST_REMOVE_HEAD(&frames, frame_list)) != NULL) {<br>+                        ast_frfree(f);<br>+               }<br>+<br>+         return &ast_null_frame;<br>+  }<br>+<br>  if (rtp_debug_test_addr(&addr)) {<br>                 ast_verbose("Got  RTP packet from    %s (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6d)\n",<br>                            ast_sockaddr_stringify(&addr),<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6100">change 6100</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/6100"/><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: I46fb8f61c95e836b9d2dda6054b0cf205c16037b </div>
<div style="display:none"> Gerrit-Change-Number: 6100 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Torrey Searle <tsearle@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>