res_pjsip: Add headers to AMI Event ContactStatusDetail
authorAlexei Gradinari <alex2grad@gmail.com>
Thu, 7 Apr 2016 21:18:03 +0000 (17:18 -0400)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 12 Apr 2016 03:26:37 +0000 (22:26 -0500)
* Added Useragent and RegExpire headers to AMI Event
ContactStatusDetail with associated documentation.

ASTERISK-25903 #close

Change-Id: If3d121e943e588d016ba51d4eb9c6a421a562239

res/res_pjsip.c
res/res_pjsip/pjsip_options.c

index f4dc725..d12951c 100644 (file)
                                <parameter name="EndpointName">
                                        <para>The name of the endpoint associated with this information.</para>
                                </parameter>
+                               <parameter name="UserAgent">
+                                       <para>Content of the User-Agent header in REGISTER request</para>
+                               </parameter>
+                               <parameter name="RegExpire">
+                                       <para>Absolute time that this contact is no longer valid after</para>
+                               </parameter>
                        </syntax>
                </managerEventInstance>
        </managerEvent>
index 7fd606d..fc64947 100644 (file)
@@ -1119,6 +1119,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");