<p></p>
<p>Looking at the combined diff against existing code, I think the condition on sock_flag has to be processed first (higher priority), respectively:</p>
<pre><code>if (_m->flags&sock_flag) {
</code></pre>
<p>Because that is a config admin instructing to take the value from a different place. With this PR, that will never work when advertised address is set.</p>
<p>Moreover, using advertised address (the <code>useinfo</code>) should be controlled via a modparam, because from sip routing point of view it is more useful to have local listen socket than the public ip. So it needs a new parameter for having this new feature enabled.</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/pull/2498#issuecomment-705340039">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZIYGNZD46E7GIHYTT3SJVFIDANCNFSM4SE4ZIWQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZNNSFQLWEVAML3K5XTSJVFIDA5CNFSM4SE4ZIW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFIFKFBY.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/pull/2498#issuecomment-705340039",
"url": "https://github.com/kamailio/kamailio/pull/2498#issuecomment-705340039",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>