[asterisk-commits] file: trunk r162619 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 10 09:22:27 CST 2008
Author: file
Date: Wed Dec 10 09:22:26 2008
New Revision: 162619
URL: http://svn.digium.com/view/asterisk?view=rev&rev=162619
Log:
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
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=162619&r1=162618&r2=162619
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Dec 10 09:22:26 2008
@@ -10545,7 +10545,9 @@
/* 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.local_address.sin_port;
+ }
/*
check which address we should use in our contact header
More information about the asterisk-commits
mailing list