[Asterisk-code-review] res/res_rtp_asterisk: generate new SSRC on native bridge end (asterisk[16])

Torrey Searle asteriskteam at digium.com
Fri Feb 19 05:51:15 CST 2021


Torrey Searle has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/15490 )


Change subject: res/res_rtp_asterisk: generate new SSRC on native bridge end
......................................................................

res/res_rtp_asterisk: generate new SSRC on native bridge end

For RTCP to work, we update the ssrc to be the one corresponding to
the native bridge while active.  However when the bridge ends we
should generate a new SSRC as the sequence numbers will not continue
from the native bridge left off.

ASTERISK-29300 #close

Change-Id: I23334b6934d2bf6490bda4bbf6414d96b8d17d10
---
M res/res_rtp_asterisk.c
1 file changed, 6 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/90/15490/1

diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index ad9cb7d..0bc35ae 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -8489,6 +8489,12 @@
 		ast_smoother_free(rtp->smoother);
 		rtp->smoother = NULL;
 	}
+
+	/* We must use a new SSRC when local bridge ends */
+	if (!instance1) {
+		unsigned int ssrc = ast_random();
+		rtp->ssrc = ssrc;
+	}
 	ao2_unlock(instance0);
 
 	return 0;

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15490
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I23334b6934d2bf6490bda4bbf6414d96b8d17d10
Gerrit-Change-Number: 15490
Gerrit-PatchSet: 1
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210219/60f873a8/attachment.html>


More information about the asterisk-code-review mailing list