From fd4191e016a4f97e05aafee2a30f999b919fe1a9 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Tue, 30 Sep 2014 11:31:12 +0000 Subject: [PATCH] res_rtp_asterisk: Ensure that the base and mapped address for candidates is present in SDP. This change fixes an issue where ICE candidates put into the SDP did not contain the 'raddr' and 'rport' information for server reflexive and relay candidates. #SIPit31 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@424151 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_rtp_asterisk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index cc1325c208..da1c5c205b 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -1139,7 +1139,7 @@ static void ast_rtp_ice_turn_request(struct ast_rtp_instance *instance, enum ast pj_turn_sock_get_info(*turn_sock, &info); ast_rtp_ice_add_cand(rtp, component, conn_transport, PJ_ICE_CAND_TYPE_RELAYED, 65535, &info.relay_addr, - &info.relay_addr, NULL, pj_sockaddr_get_len(&info.relay_addr)); + &info.relay_addr, &info.mapped_addr, pj_sockaddr_get_len(&info.relay_addr)); if (component == AST_RTP_ICE_COMPONENT_RTP) { ast_sockaddr_copy(&rtp->rtp_loop, &loop); @@ -2269,7 +2269,7 @@ static void rtp_add_candidates_to_ice(struct ast_rtp_instance *instance, struct pj_sockaddr_init(pj_AF_INET(), &address[0], &mapped, ntohs(answer.sin_port)); ast_rtp_ice_add_cand(rtp, component, transport, PJ_ICE_CAND_TYPE_SRFLX, 65535, &address[0], &base, - NULL, pj_sockaddr_get_len(&address[0])); + &base, pj_sockaddr_get_len(&address[0])); } } -- 2.47.2