<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6332">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  Kevin Harwell: Looks good to me, approved

</div><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;">diff --git a/channels/pjsip/dialplan_functions.c b/channels/pjsip/dialplan_functions.c<br>index 857684a..ff1b9b7 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>@@ -691,10 +697,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/6332">change 6332</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/6332"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I59b16c4b928896fcbde02ad88f0e98922b15d524 </div>
<div style="display:none"> Gerrit-Change-Number: 6332 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Andre Nazario <samoied@users.sourceforge.net> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>