<p></p>
<p>Revising this one after quite some time, I looked at the code and the $HN(...) variable is supposed to work with <code>gethostname()</code>, being related to hostname value.</p>
<p>The proposed change to use <code>gethostbyname()</code> in the result from <code>gethostname()</code> is changing the purpose, because I thing there can be situations when the dns result has something else in the <code>h->h_name</code> than the value of local hostname.</p>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/lazedo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lazedo">@lazedo</a>: so maybe we should look at what you actually need to get, instead of changing the behaviour of $HN().</p>
<p>Is it the full domain based on local IP? For what you need it (only for logs or use in sip uri, ...)?</p>
<p>Maybe a new var or field to this var has to be added.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2119#issuecomment-631440383">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZLVXL26S3K7XXNKCO3RSPDW3ANCNFSM4JHLXPFQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZO6TPQV2ALH65TA6ETRSPDW3A5CNFSM4JHLXPF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEWRQH7Y.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2119#issuecomment-631440383",
"url": "https://github.com/kamailio/kamailio/issues/2119#issuecomment-631440383",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>