[svn-commits] file: branch 11 r371482 - /branches/11/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Aug 17 14:49:33 CDT 2012


Author: file
Date: Fri Aug 17 14:49:29 2012
New Revision: 371482

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=371482
Log:
When a peer registers using WebSocket do not resolve the Contact provided.

(closes issue ASTERISK-20238)
Reported by: james.mortensen

Modified:
    branches/11/channels/chan_sip.c

Modified: branches/11/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_sip.c?view=diff&rev=371482&r1=371481&r2=371482
==============================================================================
--- branches/11/channels/chan_sip.c (original)
+++ branches/11/channels/chan_sip.c Fri Aug 17 14:49:29 2012
@@ -15305,8 +15305,9 @@
 		ao2_t_unlink(peers_by_ip, peer, "ao2_unlink of peer from peers_by_ip table");
 	}
 
-	if (!ast_test_flag(&peer->flags[0], SIP_NAT_FORCE_RPORT) && !ast_test_flag(&peer->flags[0], SIP_NAT_RPORT_PRESENT)) {
-		 /* use the data provided in the Contact header for call routing */
+	if ((transport_type != SIP_TRANSPORT_WS) && (transport_type != SIP_TRANSPORT_WSS) &&
+	    (!ast_test_flag(&peer->flags[0], SIP_NAT_FORCE_RPORT) && !ast_test_flag(&peer->flags[0], SIP_NAT_RPORT_PRESENT))) {
+		/* use the data provided in the Contact header for call routing */
 		ast_debug(1, "Store REGISTER's Contact header for call routing.\n");
 		/* XXX This could block for a long time XXX */
 		/*! \todo Check NAPTR/SRV if we have not got a port in the URI */




More information about the svn-commits mailing list