<p>Igor Goncharovsky has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19505">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_outbound_registration: Allow to use multiple proxies for registration<br><br>Current registration code use pjsip_parse_uri to verify outbound_proxy<br>that is different from the reading this option for the endpoint. This<br>made value with multiple proxies invalid for registration pjsip settings.<br>Removing URI validation helps to use registration through multiple proxies.<br><br>ASTERISK-30217 #close<br><br>Change-Id: I064558e66f04b9f3260c46181812a01349761357<br>---<br>M res/res_pjsip_outbound_registration.c<br>1 file changed, 16 insertions(+), 12 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/05/19505/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_outbound_registration.c b/res/res_pjsip_outbound_registration.c</span><br><span>index c85b5ee..79cba6a 100644</span><br><span>--- a/res/res_pjsip_outbound_registration.c</span><br><span>+++ b/res/res_pjsip_outbound_registration.c</span><br><span>@@ -1827,20 +1827,8 @@</span><br><span>          return -1;</span><br><span>   }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   if (!ast_strlen_zero(registration->outbound_proxy)) {</span><br><span style="color: hsl(0, 100%, 40%);">-                pj_strdup2_with_null(pool, &tmp, registration->outbound_proxy);</span><br><span style="color: hsl(0, 100%, 40%);">-          uri = pjsip_parse_uri(pool, tmp.ptr, tmp.slen, 0);</span><br><span style="color: hsl(0, 100%, 40%);">-              if (!uri) {</span><br><span style="color: hsl(0, 100%, 40%);">-                     ast_log(LOG_ERROR, "Invalid outbound proxy URI '%s' specified on outbound registration '%s'\n",</span><br><span style="color: hsl(0, 100%, 40%);">-                               registration->outbound_proxy, ast_sorcery_object_get_id(registration));</span><br><span style="color: hsl(0, 100%, 40%);">-                      pjsip_endpt_release_pool(ast_sip_get_pjsip_endpoint(), pool);</span><br><span style="color: hsl(0, 100%, 40%);">-                   return -1;</span><br><span style="color: hsl(0, 100%, 40%);">-              }</span><br><span style="color: hsl(0, 100%, 40%);">-       }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>    pjsip_endpt_release_pool(ast_sip_get_pjsip_endpoint(), pool);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>    ast_assert(state->client_state->client == NULL);</span><br><span>       if (pjsip_regc_create(ast_sip_get_pjsip_endpoint(), state->client_state,</span><br><span>                  sip_outbound_registration_response_cb,</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19505">change 19505</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/+/19505"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 19 </div>
<div style="display:none"> Gerrit-Change-Id: I064558e66f04b9f3260c46181812a01349761357 </div>
<div style="display:none"> Gerrit-Change-Number: 19505 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Igor Goncharovsky <igor.goncharovsky@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>