From: Joshua Colp Date: Tue, 30 Sep 2014 11:34:08 +0000 (+0000) Subject: res_rtp_asterisk: Ensure that the base and mapped address for candidates is present... X-Git-Tag: 12.7.0-rc1~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccff62a72a5f392766754b8f4760202770f9e6d8;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 ........ Merged revisions 424151 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@424152 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index 46e9c737c0..5c5cfe5901 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -1149,7 +1149,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); @@ -2283,7 +2283,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])); } }