[svn-commits] file: branch 1.6.0 r180799 - /branches/1.6.0/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 10 08:33:03 CDT 2009


Author: file
Date: Tue Mar 10 08:32:58 2009
New Revision: 180799

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=180799
Log:
If a port is specified when dialing a peer then use it.

(closes issue #14626)
Reported by: acunningham

Modified:
    branches/1.6.0/channels/chan_sip.c

Modified: branches/1.6.0/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/channels/chan_sip.c?view=diff&rev=180799&r1=180798&r2=180799
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Tue Mar 10 08:32:58 2009
@@ -4175,6 +4175,11 @@
 		}
 		res = create_addr_from_peer(dialog, peer);
 		unref_peer(peer);
+		if (!ast_strlen_zero(port)) {
+			if ((portno = atoi(port))) {
+				dialog->sa.sin_port = dialog->recv.sin_port = htons(portno);
+			}
+		}
 		return res;
 	}
 




More information about the svn-commits mailing list