[asterisk-commits] oej: branch group/pine-multiple-externip-trunk r289089 - /team/group/pine-mul...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 28 06:39:19 CDT 2010


Author: oej
Date: Tue Sep 28 06:39:14 2010
New Revision: 289089

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=289089
Log:
Make sure that we handle incoming requests too.

Modified:
    team/group/pine-multiple-externip-trunk/channels/chan_sip.c

Modified: team/group/pine-multiple-externip-trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-trunk/channels/chan_sip.c?view=diff&rev=289089&r1=289088&r2=289089
==============================================================================
--- team/group/pine-multiple-externip-trunk/channels/chan_sip.c (original)
+++ team/group/pine-multiple-externip-trunk/channels/chan_sip.c Tue Sep 28 06:39:14 2010
@@ -15011,6 +15011,12 @@
 			ao2_t_ref(peer, 1, "copy pointer into (*authpeer)");
 			(*authpeer) = peer;	/* Add a ref to the object here, to keep it in memory a bit longer if it is realtime */
 		}
+		/* Check if we have externip setting for this peer. If so, reset our address */
+		if (!ast_sockaddr_isnull(&peer->externaddr)) {
+			ast_sockaddr_copy(&p->externaddr, &peer->externaddr);
+			/* Recalculate our side, and recalculate Call ID */
+			ast_sip_ouraddrfor(&p->sa, &p->ourip, p);
+		} 
 
 		if (!ast_strlen_zero(peer->username)) {
 			ast_string_field_set(p, username, peer->username);




More information about the asterisk-commits mailing list