<p>Andre Nazario has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6333">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_pjsip: Add tag info in CHANNEL function<br><br>Create local_tag and remote_tag in CHANNEL info to get tag from From and<br>To headers of a SIP dialog.<br><br>ASTERISK-27220<br><br>Change-Id: I59b16c4b928896fcbde02ad88f0e98922b15d524<br>---<br>M channels/pjsip/dialplan_functions.c<br>1 file changed, 14 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/33/6333/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/channels/pjsip/dialplan_functions.c b/channels/pjsip/dialplan_functions.c<br>index 93875b3..861edf7 100644<br>--- a/channels/pjsip/dialplan_functions.c<br>+++ b/channels/pjsip/dialplan_functions.c<br>@@ -393,8 +393,14 @@<br> <enum name="local_uri"><br> <para>The local URI.</para><br> </enum><br>+ <enum name="local_tag"><br>+ <para>Tag in From header</para><br>+ </enum><br> <enum name="remote_uri"><br> <para>The remote URI.</para><br>+ </enum><br>+ <enum name="remote_tag"><br>+ <para>Tag in To header</para><br> </enum><br> <enum name="t38state"><br> <para>The current state of any T.38 fax on this channel.</para><br>@@ -690,10 +696,18 @@<br> pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR, dlg->local.info->uri, buf, buflen);<br> buf_copy = ast_strdupa(buf);<br> ast_escape_quoted(buf_copy, buf, buflen);<br>+ } else if (!strcmp(type, "local_tag")) {<br>+ ast_copy_pj_str(buf, &dlg->local.info->tag, buflen);<br>+ buf_copy = ast_strdupa(buf);<br>+ ast_escape_quoted(buf_copy, buf, buflen);<br> } else if (!strcmp(type, "remote_uri")) {<br> pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR, dlg->remote.info->uri, buf, buflen);<br> buf_copy = ast_strdupa(buf);<br> ast_escape_quoted(buf_copy, buf, buflen);<br>+ } else if (!strcmp(type, "remote_tag")) {<br>+ ast_copy_pj_str(buf, &dlg->remote.info->tag, buflen);<br>+ buf_copy = ast_strdupa(buf);<br>+ ast_escape_quoted(buf_copy, buf, buflen);<br> } else if (!strcmp(type, "t38state")) {<br> ast_copy_string(buf, t38state_to_string[channel->session->t38state], buflen);<br> } else if (!strcmp(type, "local_addr")) {<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6333">change 6333</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6333"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I59b16c4b928896fcbde02ad88f0e98922b15d524 </div>
<div style="display:none"> Gerrit-Change-Number: 6333 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Andre Nazario <samoied@users.sourceforge.net> </div>