mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-25 14:06:27 +00:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user