<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/2842/">https://reviewboard.asterisk.org/r/2842/</a>
     </td>
    </tr>
   </table>
   <br />




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/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, jbigelow and Joshua Colp.</div>
<div>By Mark Michelson.</div>








<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://issues.asterisk.org/jira/browse/AST-1207">AST-1207</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>


<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;">John Bigelow discovered during testing calls between two Asterisk boxes that ACKs were being sent to the wrong port. As it turned out, the ACKs were dutifully being sent to the destination specified in the Contact header of the 200 OK. The issue is that the UAS Asterisk instance was populating the Contact header with bad information. This was because we were using PJSIP&#39;s default behavior, which is to populate the Contact header with the information in the To header of the incoming INVITE, which contained no port.

This patch changes the contact header used at UAS-side dialog creation time to be based on the transport on which the incoming request was received. The API call includes the endpoint, which for now is unused other than in a warning message if dialog creation fails. This is thinking ahead in case we want to use a configured transport on the endpoint as a means of creating the contact header instead.</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;">Tested incoming calls from phones and SIPp. Tried setting Asterisk to use a non-standard port for SIP, and ensured that the Contact header from Asterisk included the port.</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/12/include/asterisk/res_pjsip.h <span style="color: grey">(398367)</span></li>

 <li>/branches/12/res/res_pjsip.c <span style="color: grey">(398367)</span></li>

 <li>/branches/12/res/res_pjsip.exports.in <span style="color: grey">(398367)</span></li>

 <li>/branches/12/res/res_pjsip_pubsub.c <span style="color: grey">(398367)</span></li>

 <li>/branches/12/res/res_pjsip_session.c <span style="color: grey">(398367)</span></li>

</ul>

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







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




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