[asterisk-commits] qwell: trunk r365011 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 2 10:59:48 CDT 2012


Author: qwell
Date: Wed May  2 10:59:43 2012
New Revision: 365011

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=365011
Log:
Save the address on which a MESSAGE was received, so it can be used in MESSAGE()

This is useful in cases where chan_sip may be listening on multiple addresses.

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=365011&r1=365010&r2=365011
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed May  2 10:59:43 2012
@@ -16977,6 +16977,7 @@
 	res |= ast_msg_set_body(msg, "%s", ast_str_buffer(buf));
 	res |= ast_msg_set_context(msg, "%s", p->context);
 
+	res |= ast_msg_set_var(msg, "SIP_RECVADDR", ast_sockaddr_stringify(&p->recv));
 	if (!ast_strlen_zero(p->peername)) {
 		res |= ast_msg_set_var(msg, "SIP_PEERNAME", p->peername);
 	}




More information about the asterisk-commits mailing list