<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/2392/">https://reviewboard.asterisk.org/r/2392/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<p>- Joshua</p>
<br />
<p>On March 15th, 2013, 12:29 p.m., Mark Michelson 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 Joshua Colp.</div>
<div>By Mark Michelson.</div>
<p style="color: grey;"><i>Updated March 15, 2013, 12:29 p.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;">I noticed after the NAT merge that I encountered an issue when trying to hang up calls.
If the called party hung up, Asterisk would respond with a 403 Forbidden. The reason for this was that endpoint lookup was being done on the incoming BYE. Since Asterisk did not include a user name in the To header of the initial INVITE, the from header of the BYE therefore also did not have a user name in it. The lack of a user name meant that res_sip_endpoint_identifier_user could not recognize the endpoint and thus the request was rejected.
The solution here is to not do endpoint lookups for in-dialog requests if possible. A new API call, ast_sip_dialog_set_endpoint(), a sister function to ast_sip_dialog_set_serializer() has been added. This makes the distributor able to distinguish what endpoint the request is from in-dialog and place this endpoint in the request data. The endpoint lookup module will then skip endpoint lookup if there is an endpoint already in the request data.</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;">I have ensured that basic calls still function properly and now when the called party hangs up, everything performs smoothly.</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>/team/group/pimp_my_sip/include/asterisk/res_sip.h <span style="color: grey">(383227)</span></li>
<li>/team/group/pimp_my_sip/res/res_sip.exports.in <span style="color: grey">(383227)</span></li>
<li>/team/group/pimp_my_sip/res/res_sip/sip_distributor.c <span style="color: grey">(383227)</span></li>
<li>/team/group/pimp_my_sip/res/res_sip_session.c <span style="color: grey">(383227)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2392/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>