[asterisk-commits] branch 1.2 r11279 - /branches/1.2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Feb 27 08:14:54 MST 2006


Author: russell
Date: Mon Feb 27 09:14:53 2006
New Revision: 11279

URL: http://svn.digium.com/view/asterisk?rev=11279&view=rev
Log:
fix finding realtime peers that are not dynamic by ip address (issue #6093)

Modified:
    branches/1.2/channels/chan_sip.c

Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?rev=11279&r1=11278&r2=11279&view=diff
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Mon Feb 27 09:14:53 2006
@@ -1680,7 +1680,10 @@
 		var = ast_load_realtime("sippeers", "name", peername, NULL);
 	else if (sin) {	/* Then check on IP address */
 		ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr);
-		var = ast_load_realtime("sippeers", "ipaddr", iabuf, NULL);
+		var = ast_load_realtime("sippeers", "host", iabuf, NULL);	/* First check for fixed IP hosts */
+		if (!var)
+			var = ast_load_realtime("sippeers", "ipaddr", iabuf, NULL);	/* Then check for registred hosts */
+	
 	} else
 		return NULL;
 



More information about the asterisk-commits mailing list