summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2014-08-24 17:21:38 +0000
committerJoshua Colp <jcolp@digium.com>2014-08-24 17:21:38 +0000
commit6fa02d1bfda4d18a8e06c722409b1027553187c5 (patch)
tree9a0b17b8a9aaac003fac3f18b5194807b1852651
parent16c96760e71eb4feac55dba60b601ecf41268ea0 (diff)
chan_sip: Use the server reflexive ICE candidate RTCP port as provided.
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) ........ Merged revisions 421909 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 421910 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@421911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 41ea8e6dc..197f0bde7 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12691,12 +12691,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");