[Asterisk-code-review] chan pjsip: Add tag info in CHANNEL function (asterisk[15])
Jenkins2
asteriskteam at digium.com
Thu Aug 31 17:28:48 CDT 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/6333 )
Change subject: chan_pjsip: Add tag info in CHANNEL function
......................................................................
chan_pjsip: Add tag info in CHANNEL function
Create local_tag and remote_tag in CHANNEL info to get tag from From and
To headers of a SIP dialog.
ASTERISK-27220
Change-Id: I59b16c4b928896fcbde02ad88f0e98922b15d524
---
M channels/pjsip/dialplan_functions.c
1 file changed, 14 insertions(+), 0 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/channels/pjsip/dialplan_functions.c b/channels/pjsip/dialplan_functions.c
index 93875b3..861edf7 100644
--- a/channels/pjsip/dialplan_functions.c
+++ b/channels/pjsip/dialplan_functions.c
@@ -393,8 +393,14 @@
<enum name="local_uri">
<para>The local URI.</para>
</enum>
+ <enum name="local_tag">
+ <para>Tag in From header</para>
+ </enum>
<enum name="remote_uri">
<para>The remote URI.</para>
+ </enum>
+ <enum name="remote_tag">
+ <para>Tag in To header</para>
</enum>
<enum name="t38state">
<para>The current state of any T.38 fax on this channel.</para>
@@ -690,10 +696,18 @@
pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR, dlg->local.info->uri, buf, buflen);
buf_copy = ast_strdupa(buf);
ast_escape_quoted(buf_copy, buf, buflen);
+ } else if (!strcmp(type, "local_tag")) {
+ ast_copy_pj_str(buf, &dlg->local.info->tag, buflen);
+ buf_copy = ast_strdupa(buf);
+ ast_escape_quoted(buf_copy, buf, buflen);
} else if (!strcmp(type, "remote_uri")) {
pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR, dlg->remote.info->uri, buf, buflen);
buf_copy = ast_strdupa(buf);
ast_escape_quoted(buf_copy, buf, buflen);
+ } else if (!strcmp(type, "remote_tag")) {
+ ast_copy_pj_str(buf, &dlg->remote.info->tag, buflen);
+ buf_copy = ast_strdupa(buf);
+ ast_escape_quoted(buf_copy, buf, buflen);
} else if (!strcmp(type, "t38state")) {
ast_copy_string(buf, t38state_to_string[channel->session->t38state], buflen);
} else if (!strcmp(type, "local_addr")) {
--
To view, visit https://gerrit.asterisk.org/6333
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I59b16c4b928896fcbde02ad88f0e98922b15d524
Gerrit-Change-Number: 6333
Gerrit-PatchSet: 1
Gerrit-Owner: Andre Nazario <samoied at users.sourceforge.net>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170831/5296e616/attachment.html>
More information about the asterisk-code-review
mailing list