<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://reviewboard.asterisk.org/r/1574/">https://reviewboard.asterisk.org/r/1574/</a>
     </td>
    </tr>
   </table>
   <br />















<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">You might be interested in this patch I submitted almost two months ago but still has not been committed.  I have some Aastra phones that stopped working when transitioning from 1.6 to 1.8 because they send the port number in the To: header in the REGISTER packet.

https://issues.asterisk.org/jira/browse/ASTERISK-18572
</pre>
<br />








<p>- ulogic</p>


<br />
<p>On November 9th, 2011, 12:04 a.m., Terry Wilson wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers and wdoekes.</div>
<div>By Terry Wilson.</div>


<p style="color: grey;"><i>Updated Nov. 9, 2011, 12:04 a.m.</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">In reviewing https://reviewboard.asterisk.org/r/1533/ I noticed that going from 1.4 to 1.8, setting domain=x.x.x.x stopped matching when receiving a request to x.x.x.x. The reason is that the parse_uri function returns host:port in what was labeled the &quot;domain&quot; variable in 1.8 when in 1.4 the parsing was done in each individual function and the port truncated manually. For example, peer-&gt;fromdomain could be set to a host:port, even though it is specifically split into peer-&gt;fromdomain and peer-&gt;fromport other places in the code.

We can&#39;t change the parsing function because sometimes we actually use the host:port form of the result (as in when passing it to ast_sockaddr_resolve_first), so we need to do the truncation manually when appropriate. This patch does two things: 1) it renames the &quot;domain&quot; variables in the API functions to &quot;hostport&quot; to more accurately reflect what we are really returning and 2) implements a truncate_hostport function and uses it where appropriate.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ran the SIP unit tests and SIP-related testsuite tests and saw no difference in behavior. Set domain=127.0.0.1 and verified register requests started working.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/branches/1.8/channels/chan_sip.c <span style="color: grey">(343673)</span></li>

 <li>/branches/1.8/channels/sip/include/reqresp_parser.h <span style="color: grey">(343673)</span></li>

 <li>/branches/1.8/channels/sip/include/sip.h <span style="color: grey">(343673)</span></li>

 <li>/branches/1.8/channels/sip/reqresp_parser.c <span style="color: grey">(343673)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/1574/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>