From: Jason Parker Date: Wed, 2 May 2012 15:59:43 +0000 (+0000) Subject: Save the address on which a MESSAGE was received, so it can be used in MESSAGE() X-Git-Tag: 11.0.0-beta1~360 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=067064bd65e39c45d4b36d50523c395f75c0c32d;p=thirdparty%2Fasterisk.git 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. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@365011 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index a05baac5d0..8579a96389 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -16977,6 +16977,7 @@ static void receive_message(struct sip_pvt *p, struct sip_request *req, struct a 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); }