<p>Torrey Searle has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6100">View Change</a></p><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, 17 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/00/6100/1</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 e521756..de6c29b 100644<br>--- a/res/res_rtp_asterisk.c<br>+++ b/res/res_rtp_asterisk.c<br>@@ -4822,9 +4822,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>@@ -5060,13 +5057,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>@@ -5171,6 +5161,23 @@<br> rtp->themssrc = ntohl(rtpheader[2]); /* Record their SSRC to put in future RR */<br> }<br> <br>+<br>+ /* This needs to be after RTCP calculations to get more RTCP data */<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>+ struct timeval rxtime;<br>+ struct ast_frame *f;<br>+ /* update jitter statistics */<br>+ calc_rxstamp(&rxtime, rtp, timestamp, mark);<br>+ /* if we do p2p bridge, free the frames SSRC CHANGE frames we won't return */<br>+ while ((f = AST_LIST_REMOVE_HEAD(&frames, frame_list)) != NULL) {<br>+ ast_frfree(f);<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: newchange </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: 1 </div>
<div style="display:none"> Gerrit-Owner: Torrey Searle <tsearle@gmail.com> </div>