From e6b67b2a5d424b15dcab2fb6b4a5043b95119e81 Mon Sep 17 00:00:00 2001
From: Joshua Colp <jcolp@digium.com>
Date: Thu, 21 Feb 2019 18:06:23 +0000
Subject: [PATCH] res_pjsip_sdp_rtp: Allow only single ssrc attribute.

When processing SSRC attributes we were iterating through
all of them, even though we only need to know the remote
SSRC once. This was problematic because some browsers group
SSRCs together on a stream, and due to our negotiation only
end up using the first one. Since we set the second one as
the remote SSRC we would drop the received media from them
instead of allowing it through.

In the future this may be extended to allow SSRC groups
and to use information from the attributes.

Change-Id: I4dc87087dbe56a83aa65f0f897bbd4ca75ec1270
---
 res/res_pjsip_sdp_rtp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index c2b7d67037..9686960c50 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -1127,6 +1127,7 @@ static void process_ssrc_attributes(struct ast_sip_session *session, struct ast_
 		}
 
 		ast_rtp_instance_set_remote_ssrc(session_media->rtp, ssrc);
+		break;
 	}
 }
 
-- 
GitLab