[asterisk-commits] jamesgolovich: branch group/sip-tcptls r97632 - /team/group/sip-tcptls/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 9 15:30:28 CST 2008


Author: jamesgolovich
Date: Wed Jan  9 15:30:27 2008
New Revision: 97632

URL: http://svn.digium.com/view/asterisk?view=rev&rev=97632
Log:
Insure the correct port is specified in a contact header on outgoing 
registrations with TCP/TLS

Modified:
    team/group/sip-tcptls/channels/chan_sip.c

Modified: team/group/sip-tcptls/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/sip-tcptls/channels/chan_sip.c?view=diff&rev=97632&r1=97631&r2=97632
==============================================================================
--- team/group/sip-tcptls/channels/chan_sip.c (original)
+++ team/group/sip-tcptls/channels/chan_sip.c Wed Jan  9 15:30:27 2008
@@ -8766,6 +8766,9 @@
 		if (!ast_strlen_zero(r->callback))
 			ast_string_field_set(p, exten, r->callback);
 
+		/* Set transport and port so the correct contact is built */
+		p->socket.type = r->transport;
+		p->socket.port = htons(r->portno);
 		/*
 		  check which address we should use in our contact header 
 		  based on whether the remote host is on the external or
@@ -8774,8 +8777,6 @@
 		ast_sip_ouraddrfor(&p->sa.sin_addr, &p->ourip);
 		build_contact(p);
 	}
-
-	p->socket.type = r->transport;
 
 	/* set up a timeout */
 	if (auth == NULL)  {




More information about the asterisk-commits mailing list