[asterisk-commits] dvossel: trunk r323325 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 14 09:37:45 CDT 2011


Author: dvossel
Date: Tue Jun 14 09:37:41 2011
New Revision: 323325

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=323325
Log:
Store sip peer name as var data on a outofcall msg.

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=323325&r1=323324&r2=323325
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jun 14 09:37:41 2011
@@ -16095,6 +16095,7 @@
 			if (!ast_strlen_zero(peer->messagecontext)) {
 				ast_string_field_set(p, messagecontext, peer->messagecontext);
 			}
+			ast_string_field_set(p, peername, peer->name);
 			peer = unref_peer(peer, "from find_peer() in receive_message");
 		}
 	}
@@ -16122,6 +16123,10 @@
 		res |= ast_msg_set_context(msg, "%s", sip_cfg.messagecontext);
 	} else {
 		res |= ast_msg_set_context(msg, "%s", p->context);
+	}
+
+	if (!ast_strlen_zero(p->peername)) {
+		res |= ast_msg_set_var(msg, "SIP_PEERNAME", p->peername);
 	}
 
 	res |= ast_msg_set_exten(msg, "%s", p->exten);




More information about the asterisk-commits mailing list