summaryrefslogtreecommitdiff
path: root/res/res_pjsip_registrar.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2014-06-27 13:50:02 +0000
committerMatthew Jordan <mjordan@digium.com>2014-06-27 13:50:02 +0000
commit15dcaeef82ce4fc013668392838f8ff9e0ec8075 (patch)
treefe66165bc3eeb12dbef6a71a86f9fbdd41938780 /res/res_pjsip_registrar.c
parent512e505dc3e7a8f20a5054c5ee364c7c46d8976f (diff)
res_pjsip: Add ActionID to events created as a result of PJSIP AMI actions
A number of various PJSIP AMI actions were failing to parse out and place the ActionID into their responses. This patch updates the various PJSIP actions such that the passed in ActionID is emitted on any event list complete events, as well as any intermediate events created as a result of the action. #ASTERISK-23947 #close Reported by: Mark Michelson Review: https://reviewboard.asterisk.org/r/3675/ ........ Merged revisions 417460 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_registrar.c')
-rw-r--r--res/res_pjsip_registrar.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/res/res_pjsip_registrar.c b/res/res_pjsip_registrar.c
index 962895b60..f7d082c18 100644
--- a/res/res_pjsip_registrar.c
+++ b/res/res_pjsip_registrar.c
@@ -765,15 +765,17 @@ static int ami_registrations_endpoints(void *arg)
static int ami_show_registrations(struct mansession *s, const struct message *m)
{
int count = 0;
- struct ast_sip_ami ami = { .s = s, .m = m, .arg = &count };
+ struct ast_sip_ami ami = { .s = s, .m = m, .arg = &count, .action_id = astman_get_header(m, "ActionID"), };
astman_send_listack(s, m, "Following are Events for each Inbound "
"registration", "start");
ami_registrations_endpoints(&ami);
- astman_append(s,
- "Event: InboundRegistrationDetailComplete\r\n"
- "EventList: Complete\r\n"
+ astman_append(s, "Event: InboundRegistrationDetailComplete\r\n");
+ if (!ast_strlen_zero(ami.action_id)) {
+ astman_append(s, "ActionID: %s\r\n", ami.action_id);
+ }
+ astman_append(s, "EventList: Complete\r\n"
"ListItems: %d\r\n\r\n", count);
return 0;
}