<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/3925/">https://reviewboard.asterisk.org/r/3925/</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;">> This changeset modifies the process by getting the hostname and then
> resolving that into an IP address. On my box, I could change the IP
> address by modifying my /etc/hosts file to resolve my hostname to a
> different IP address.
That's not going to work on many debian style boxes that have 127.0.1.1
as their IP. Which happens to be the default.
https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution
Example:
$ grep ns1.osso /etc/hosts
127.0.1.1 ns1.osso.xx osso-ns1
$ ping `hostname -f`
PING ns1.osso.xx (127.0.1.1) 56(84) bytes of data.
$ host `hostname -f`
ns1.osso.xx has address 91.194.xx.xx
Is this going to be configurable somehow? Because 127.0.1.1 is worse
than my hostname.</pre>
<br />
<p>- wdoekes</p>
<br />
<p>On August 20th, 2014, 11:06 p.m. UTC, Mark Michelson wrote:</p>
<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.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By Mark Michelson.</div>
<p style="color: grey;"><i>Updated Aug. 20, 2014, 11:06 p.m.</i></p>
<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/ASTERISK-23994">ASTERISK-23994</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;">From the issue, it was determined that using pj_gethostname() to populate the origin line of SDPs is not guaranteed to meet RFC 4566's requirement that the address be a FQDN or IP address. This changeset modifies the process by getting the hostname and then resolving that into an IP address. On my box, I could change the IP address by modifying my /etc/hosts file to resolve my hostname to a different IP address.</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;">Placed an outbound call from Asterisk. I observed that the SDP origin line now contained an IP address instead of a hostname. When I modified /etc/hosts to resolve the hostname to a different IP address, that IP address appeared in the SDP origin line instead.</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/res/res_pjsip_session.c <span style="color: grey">(421564)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3925/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>