From: Joshua Colp Date: Tue, 30 Sep 2014 11:31:12 +0000 (+0000) Subject: res_rtp_asterisk: Ensure that the base and mapped address for candidates is present... X-Git-Tag: 11.14.0-rc1~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd4191e016a4f97e05aafee2a30f999b919fe1a9;p=thirdparty%2Fasterisk.git 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 --- 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])); } }