<p>George Joseph <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15490">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  Kevin Harwell: 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;">res/res_rtp_asterisk: generate new SSRC on native bridge end<br><br>For RTCP to work, we update the ssrc to be the one corresponding to<br>the native bridge while active.  However when the bridge ends we<br>should generate a new SSRC as the sequence numbers will not continue<br>from the native bridge left off.<br><br>ASTERISK-29300 #close<br><br>Change-Id: I23334b6934d2bf6490bda4bbf6414d96b8d17d10<br>---<br>M res/res_rtp_asterisk.c<br>1 file changed, 14 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c</span><br><span>index a962d70..21eff54 100644</span><br><span>--- a/res/res_rtp_asterisk.c</span><br><span>+++ b/res/res_rtp_asterisk.c</span><br><span>@@ -362,6 +362,8 @@</span><br><span>  struct ast_frame f;</span><br><span>  unsigned char rawdata[8192 + AST_FRIENDLY_OFFSET];</span><br><span>   unsigned int ssrc;              /*!< Synchronization source, RFC 3550, page 10. */</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned int ssrc_orig;         /*!< SSRC used before native bridge activated */</span><br><span style="color: hsl(120, 100%, 40%);">+   unsigned char ssrc_saved;       /*!< indicates if ssrc_orig has a value */</span><br><span>        char cname[AST_UUID_STR_LEN]; /*!< Our local CNAME */</span><br><span>     unsigned int themssrc;          /*!< Their SSRC */</span><br><span>        unsigned int themssrc_valid;    /*!< True if their SSRC is available. */</span><br><span>@@ -8530,6 +8532,18 @@</span><br><span>                 ast_smoother_free(rtp->smoother);</span><br><span>                 rtp->smoother = NULL;</span><br><span>     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   /* We must use a new SSRC when local bridge ends */</span><br><span style="color: hsl(120, 100%, 40%);">+   if (!instance1) {</span><br><span style="color: hsl(120, 100%, 40%);">+             rtp->ssrc = rtp->ssrc_orig;</span><br><span style="color: hsl(120, 100%, 40%);">+             rtp->ssrc_orig = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+                rtp->ssrc_saved = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+       } else if (!rtp->ssrc_saved) {</span><br><span style="color: hsl(120, 100%, 40%);">+             /* In case ast_rtp_local_bridge is called multiple times, only save the ssrc from before local bridge began */</span><br><span style="color: hsl(120, 100%, 40%);">+                rtp->ssrc_orig = rtp->ssrc;</span><br><span style="color: hsl(120, 100%, 40%);">+             rtp->ssrc_saved = 1;</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  ao2_unlock(instance0);</span><br><span> </span><br><span>   return 0;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15490">change 15490</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/15490"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I23334b6934d2bf6490bda4bbf6414d96b8d17d10 </div>
<div style="display:none"> Gerrit-Change-Number: 15490 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Torrey Searle <tsearle@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>