]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_sip: Use the server reflexive ICE candidate RTCP port as provided.
authorJoshua Colp <jcolp@digium.com>
Sun, 24 Aug 2014 17:19:23 +0000 (17:19 +0000)
committerJoshua Colp <jcolp@digium.com>
Sun, 24 Aug 2014 17:19:23 +0000 (17:19 +0000)
This code originally worked around an issue within res_rtp_asterisk itself.
The wrong socket was being used for the STUN check for RTCP, causing the
port to be the same as RTP. This was subsequently fixed and the RTCP port
provided for the ICE candidate is correct and does not need to be incremented.

ASTERISK-23997 #close
Reported by: Badalian Vyacheslav
Patches:
 plus1.diff submitted by Badalian Vyacheslav (license 5249)

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

channels/chan_sip.c

index fa20512b145fce6b14bd26b4e4488eca769e5456..78c80389e73d344995c9f3c497581799c4771d0d 100644 (file)
@@ -12538,12 +12538,7 @@ static void add_ice_to_sdp(struct ast_rtp_instance *instance, struct ast_str **a
                ast_str_append(a_buf, 0, "a=candidate:%s %u %s %d ", candidate->foundation, candidate->id, candidate->transport, candidate->priority);
                ast_str_append(a_buf, 0, "%s ", ast_sockaddr_stringify_host(&candidate->address));
 
-               if (candidate->type == AST_RTP_ICE_CANDIDATE_TYPE_SRFLX
-                       && candidate->id == AST_RTP_ICE_COMPONENT_RTCP) {
-                       ast_str_append(a_buf, 0, "%d typ ", ast_sockaddr_port(&candidate->address) + 1);
-               } else {
-                       ast_str_append(a_buf, 0, "%s typ ", ast_sockaddr_stringify_port(&candidate->address));
-               }
+               ast_str_append(a_buf, 0, "%s typ ", ast_sockaddr_stringify_port(&candidate->address));
 
                if (candidate->type == AST_RTP_ICE_CANDIDATE_TYPE_HOST) {
                        ast_str_append(a_buf, 0, "host");