<p>Alexei Gradinari has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18583">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_dialog_info_body_generator: Set LOCAL target URI as local URI<br><br>The change "Add LOCAL/REMOTE tags in dialog-info+xml" set both "local"<br>Identity Element URI and Target Element URI to the same value -<br>the channel Caller Number.<br>For Identity Element it's ok to set as Caller ID.<br>But Local Target URI should be set as local URI.<br><br>In this case the Local Target URI can be used for Directed Call Pickup<br>by Polycom ip-phones (parameter useLocalTargetUriforLegacyPickup).<br><br>Also XML sanitized Display names.<br><br>ASTERISK-24601<br><br>Change-Id: If130a2f2f3b2339b14dca0ec0ebeea3a87b34343<br>---<br>M res/res_pjsip_dialog_info_body_generator.c<br>1 file changed, 10 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/83/18583/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_dialog_info_body_generator.c b/res/res_pjsip_dialog_info_body_generator.c</span><br><span>index 88aa6c2..972b908 100644</span><br><span>--- a/res/res_pjsip_dialog_info_body_generator.c</span><br><span>+++ b/res/res_pjsip_dialog_info_body_generator.c</span><br><span>@@ -234,7 +234,10 @@</span><br><span> </span><br><span> pj_strdup2(state_data->pool, &remote_identity_node->content, remote_target);</span><br><span> if (!ast_strlen_zero(remote_cid_name)) {</span><br><span style="color: hsl(0, 100%, 40%);">- ast_sip_presence_xml_create_attr(state_data->pool, remote_identity_node, "display", remote_cid_name);</span><br><span style="color: hsl(120, 100%, 40%);">+ char display_sanitized[PJSIP_MAX_URL_SIZE];</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_sip_sanitize_xml(remote_cid_name, display_sanitized, sizeof(display_sanitized));</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_sip_presence_xml_create_attr(state_data->pool, remote_identity_node, "display", display_sanitized);</span><br><span> }</span><br><span> ast_sip_presence_xml_create_attr(state_data->pool, remote_target_node, "uri", remote_target);</span><br><span> }</span><br><span>@@ -247,9 +250,13 @@</span><br><span> /* If a channel is not available we fall back to the sanitized local URI instead */</span><br><span> pj_strdup2(state_data->pool, &local_identity_node->content, S_OR(local_target, sanitized));</span><br><span> if (!ast_strlen_zero(local_cid_name)) {</span><br><span style="color: hsl(0, 100%, 40%);">- ast_sip_presence_xml_create_attr(state_data->pool, local_identity_node, "display", local_cid_name);</span><br><span style="color: hsl(120, 100%, 40%);">+ char display_sanitized[PJSIP_MAX_URL_SIZE];</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_sip_sanitize_xml(local_cid_name, display_sanitized, sizeof(display_sanitized));</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_sip_presence_xml_create_attr(state_data->pool, local_identity_node, "display", display_sanitized);</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- ast_sip_presence_xml_create_attr(state_data->pool, local_target_node, "uri", S_OR(local_target, sanitized));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_sip_presence_xml_create_attr(state_data->pool, local_target_node, "uri", sanitized);</span><br><span> }</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18583">change 18583</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/18583"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: If130a2f2f3b2339b14dca0ec0ebeea3a87b34343 </div>
<div style="display:none"> Gerrit-Change-Number: 18583 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexei Gradinari <alex2grad@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>