[Asterisk-code-review] res pjsip: add Useragent and RegExpire to AMI Event ContactS... (asterisk[master])

Joshua Colp asteriskteam at digium.com
Mon Apr 11 20:14:49 CDT 2016


Joshua Colp has uploaded a new change for review.

  https://gerrit.asterisk.org/2574

Change subject: res_pjsip: add Useragent and RegExpire to AMI Event ContactStatus
......................................................................

res_pjsip: add Useragent and RegExpire to AMI Event ContactStatus

This patch added Useragent and RegExpire to AMI Event ContactStatus

ASTERISK-25903

Change-Id: If3d121e943e588d016ba51d4eb9c6a421a562239

Added new fields to the documentation for ContactStatusDetail

Change-Id: If3d121e943e588d016ba51d4eb9c6a421a562239
---
M res/res_pjsip.c
M res/res_pjsip/pjsip_options.c
2 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/74/2574/1

diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index f4dc725..d12951c 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -1835,6 +1835,12 @@
 				<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>
diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c
index 7fd606d..fc64947 100644
--- a/res/res_pjsip/pjsip_options.c
+++ b/res/res_pjsip/pjsip_options.c
@@ -1119,6 +1119,8 @@
 
 	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");

-- 
To view, visit https://gerrit.asterisk.org/2574
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3d121e943e588d016ba51d4eb9c6a421a562239
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>



More information about the asterisk-code-review mailing list