]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_rtp_asterisk: Set correct raddr port on RTCP srflx candidates.
authorJoshua C. Colp <jcolp@sangoma.com>
Thu, 20 May 2021 12:51:46 +0000 (09:51 -0300)
committerGeorge Joseph <gjoseph@digium.com>
Wed, 26 May 2021 15:35:44 +0000 (10:35 -0500)
RTCP ICE candidates use a base address derived from the RTP
candidate. The port on the base address was not being updated to
the RTCP port.

This change sets the base port to the RTCP port and all is well.

ASTERISK-29433

Change-Id: Ide2d2115b307bfd3c2dfbc4d187515d724519040

res/res_rtp_asterisk.c

index 0f883e9462a58bc3bf89269280193655c32a9ec8..e5bef24258ba2a6a56681104729c1200f0ed78da 100644 (file)
@@ -3687,6 +3687,7 @@ static void rtp_add_candidates_to_ice(struct ast_rtp_instance *instance, struct
                        ao2_iterator_destroy(&i);
 
                        if (srflx && baseset) {
+                               pj_sockaddr_set_port(&base, port);
                                ast_rtp_ice_add_cand(instance, rtp, component, transport,
                                        PJ_ICE_CAND_TYPE_SRFLX, 65535, &ext, &base, &base,
                                        pj_sockaddr_get_len(&ext));