[Asterisk-code-review] res_rtp_asterisk: Send correct sender SSRC when p2p bridge in use (asterisk[13])

George Joseph asteriskteam at digium.com
Thu Mar 12 10:32:04 CDT 2020


George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13859 )

Change subject: res_rtp_asterisk: Send correct sender SSRC when p2p bridge in use
......................................................................

res_rtp_asterisk: Send correct sender SSRC when p2p bridge in use

bridge_p2p_rtp_write will forward rtp to the bridged rtp instance
without modifying the ssrc.  However, it is not updating the SSRC
in the bridged rtp.  Thus, when SSRC packets are generated, they
have the correct SSRC for the sender.

ASTERISK-28773 #close

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

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 4244d1b..5669f99 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -5373,6 +5373,11 @@
 	reconstruct |= (mark << 23);
 	rtpheader[0] = htonl(reconstruct);
 
+	if (mark) {
+		/* make this rtp instance aware of the new ssrc it is sending */
+		bridged->ssrc = ntohl(rtpheader[2]);
+	}
+
 	/* Send the packet back out */
 	res = rtp_sendto(instance1, (void *)rtpheader, len, 0, &remote_address, &ice);
 	if (res < 0) {

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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I39f923bde28ebb4f0fddc926b92494aed294a478
Gerrit-Change-Number: 13859
Gerrit-PatchSet: 3
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200312/19a3238a/attachment.html>


More information about the asterisk-code-review mailing list