diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-10 15:26:49 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-10 15:26:49 +0000 |
commit | 9c4ef238c39ab6368867bad9972c28c4f87f479a (patch) | |
tree | 064d691d2fcab614d3f34d256af7c4f658425728 /channels | |
parent | e8da6195fcac008ae2363c3c42d2c05db02b9fc5 (diff) |
Merged revisions 162619 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r162619 | file | 2008-12-10 11:22:26 -0400 (Wed, 10 Dec 2008) | 4 lines
When transmitting a register set the socket port to the local one for the transport being used, not the port for the remote server.
(closes issue #13633)
Reported by: performer
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@162621 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 5994003b6..4f4ebb929 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -9475,7 +9475,9 @@ static int transmit_register(struct sip_registry *r, int sipmethod, const char * /* Set transport and port so the correct contact is built */ p->socket.type = r->transport; - p->socket.port = htons(r->portno); + if (r->transport == SIP_TRANSPORT_TLS || r->transport == SIP_TRANSPORT_TCP) { + p->socket.port = sip_tcp_desc.sin.sin_port; + } /* check which address we should use in our contact header based on whether the remote host is on the external or |