summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJenkins2 <jenkins2@gerrit.asterisk.org>2017-08-31 17:15:52 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-08-31 17:15:52 -0500
commit07577fc9972da2d91d9cd8d16611705dd6c1253c (patch)
tree3b4c60ddb794ba14eb0e0b2facfc47687f688c91 /channels
parentb0064245b39516e9192a3e10eeafc1bd3cf1f1aa (diff)
parenta45af3298319b54649abe00b5841f95cc9fe3ae7 (diff)
Merge "chan_pjsip: Add tag info in CHANNEL function" into 13
Diffstat (limited to 'channels')
-rw-r--r--channels/pjsip/dialplan_functions.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/channels/pjsip/dialplan_functions.c b/channels/pjsip/dialplan_functions.c
index 27bc3d782..ae1c265bc 100644
--- a/channels/pjsip/dialplan_functions.c
+++ b/channels/pjsip/dialplan_functions.c
@@ -393,9 +393,15 @@
<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>
<enumlist>
@@ -691,10 +697,18 @@ static int channel_read_pjsip(struct ast_channel *chan, const char *type, const
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")) {