<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6185">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 8121dc9..fe1d1e3 100644<br>--- a/res/res_rtp_asterisk.c<br>+++ b/res/res_rtp_asterisk.c<br>@@ -4853,9 +4853,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>@@ -5091,13 +5088,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>@@ -5202,6 +5192,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/6185">change 6185</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/6185"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </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: 6185 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </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>