From 70b7673f09ca53b56d174ea3d220d96eddc088c0 Mon Sep 17 00:00:00 2001 From: Alexei Gradinari Date: Thu, 7 Apr 2016 17:18:03 -0400 Subject: [PATCH] res_pjsip: Add headers to AMI Event ContactStatusDetail * Added Useragent and RegExpire headers to AMI Event ContactStatusDetail with associated documentation. ASTERISK-25903 #close Change-Id: If3d121e943e588d016ba51d4eb9c6a421a562239 --- res/res_pjsip.c | 6 ++++++ res/res_pjsip/pjsip_options.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/res/res_pjsip.c b/res/res_pjsip.c index 2b0e777faa..cc86f90450 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -1829,6 +1829,12 @@ The name of the endpoint associated with this information. + + Content of the User-Agent header in REGISTER request + + + Absolute time that this contact is no longer valid after + diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c index 3a4524316a..b8d38ed42d 100644 --- a/res/res_pjsip/pjsip_options.c +++ b/res/res_pjsip/pjsip_options.c @@ -1130,6 +1130,8 @@ static int format_contact_status(void *obj, void *arg, int flags) ast_str_append(&buf, 0, "AOR: %s\r\n", wrapper->aor_id); ast_str_append(&buf, 0, "URI: %s\r\n", contact->uri); + ast_str_append(&buf, 0, "UserAgent: %s\r\n", contact->user_agent); + ast_str_append(&buf, 0, "RegExpire: %ld\r\n", contact->expiration_time.tv_sec); ast_str_append(&buf, 0, "Status: %s\r\n", ast_sip_get_contact_status_label(status->status)); if (status->status == UNKNOWN) { ast_str_append(&buf, 0, "RoundtripUsec: N/A\r\n"); -- 2.47.2