<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/2156/">https://reviewboard.asterisk.org/r/2156/</a>
</td>
</tr>
</table>
<br />
<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.</div>
<div>By wdoekes.</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;">Sometimes I get these in my logs:
ERROR[xxx] netsock2.c: getaddrinfo("lync.somemachine.local", "5060", ...): Name or service not known
Turns out these are triggered by Contact hostname lookups when sending the end-to-end requests (like a BYE).
For whatever reason, certain people have invalid hostnames in the Contact field. But, because they're using TCP, we're not using the result of this Contact lookup at all. We always send to the open TCP socket. And everything works.
In fact, since we use nat=yes as a default, there are only few cases when we actually *do* use the Contact (or Route).
And as far as I can tell, if we don't send to the contact (or route) field, we don't need to do those lookups either.
Right? Or am I missing something crucial here?</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 used a sipp scenario which INVITEd in and waited for Asterisk to BYE. Only when nat=no and transport=udp was the contact (or record-route) header actually used. When using transport=tcp or nat=yes the BYE still arrived on the same place as without the patch.</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>/trunk/channels/chan_sip.c <span style="color: grey">(374800)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2156/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>