res_pjsip_sdp_rtp: Don't place an extra whitespace before 'rport' and don't put IPv6...
authorJoshua Colp <jcolp@digium.com>
Tue, 30 Sep 2014 11:42:00 +0000 (11:42 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 30 Sep 2014 11:42:00 +0000 (11:42 +0000)
#SIPit31
........

Merged revisions 424155 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424156 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424157 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_pjsip_sdp_rtp.c

index 5aa176a..2ab6ec4 100644 (file)
@@ -371,7 +371,7 @@ static void add_ice_to_stream(struct ast_sip_session *session, struct ast_sip_se
                struct ast_str *attr_candidate = ast_str_create(128);
 
                ast_str_set(&attr_candidate, -1, "%s %u %s %d %s ", candidate->foundation, candidate->id, candidate->transport,
-                                       candidate->priority, ast_sockaddr_stringify_host(&candidate->address));
+                                       candidate->priority, ast_sockaddr_stringify_addr_remote(&candidate->address));
                ast_str_append(&attr_candidate, -1, "%s typ ", ast_sockaddr_stringify_port(&candidate->address));
 
                switch (candidate->type) {
@@ -387,7 +387,7 @@ static void add_ice_to_stream(struct ast_sip_session *session, struct ast_sip_se
                }
 
                if (!ast_sockaddr_isnull(&candidate->relay_address)) {
-                       ast_str_append(&attr_candidate, -1, " raddr %s rport ", ast_sockaddr_stringify_host(&candidate->relay_address));
+                       ast_str_append(&attr_candidate, -1, " raddr %s rport", ast_sockaddr_stringify_addr_remote(&candidate->relay_address));
                        ast_str_append(&attr_candidate, -1, " %s", ast_sockaddr_stringify_port(&candidate->relay_address));
                }