mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-03 19:16:46 +00:00
Store sip peer name as var data on a outofcall msg.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -16095,6 +16095,7 @@ static void receive_message(struct sip_pvt *p, struct sip_request *req, struct a
|
||||
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");
|
||||
}
|
||||
}
|
||||
@@ -16124,6 +16125,10 @@ static void receive_message(struct sip_pvt *p, struct sip_request *req, struct a
|
||||
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);
|
||||
|
||||
if (res) {
|
||||
|
Reference in New Issue
Block a user