<p></p>
<blockquote>
<p>How about expanding the discovery procedure with a NAPTR request sent to the provider's domain (as found in From and/or P-A-I) in case (1) fails</p>
</blockquote>
<p>Yes, looks as it will be a good extension.<br>
Domain from <code>From</code> header may be used only if domain not available in <code>P-A-I</code> header.</p>
<p>Here examples of <code>From</code> and <code>P-A-I</code> headers that we can receive<br>
<strong>Example 1</strong> - domain matched in <code>From</code> and <code>P-A-I</code> headers</p>
<pre><code>From: <sip:+18556667788@206.147.246.118:5060>;tag=gK0e0d09a4
P-Asserted-Identity: <sip:+18556667788@206.147.246.118:5060>
</code></pre>
<p><strong>Example 2</strong> - private IP address in <code>From</code> header and no domain in <code>P-A-I</code> header. <code>P-A-I</code> contains tel and sip uri.</p>
<pre><code>From: <sip:+16692481432@198.226.45.84>;tag=gK04090b5e
P-Asserted-Identity: <tel:+16692481432>, <sip:+16692481432@vzimstest.com>
</code></pre>
<p><strong>Example 3</strong> - IPv6 address in <code>From</code> header and no domain in <code>P-A-I</code> header</p>
<pre><code>From: "9255111003"<sip:9255111003@[2605:97c0:2058:3120:1::1]:50001>;tag=75fdbcf61a;epid=SC597fbd
P-Asserted-Identity: <tel:9255111003>
</code></pre>
<p><strong>Example 4</strong> - no domain in <code>From</code> and <code>P-A-I</code> headers</p>
<pre><code>From: <tel:+13559598013>;tag=SDtl3t701-5f7f754a-5f89c26229204b60-Noo-lucentNGFS-000264
P-Asserted-Identity: <tel:+11005534340>
</code></pre>
<p>Think not required to make double reverse and NAPTR DNS lookups if the domain from <code>P-A-I</code> or <code>From</code> headers equals to caller network IP address.</p>
<p>Could you look at this example.</p>
<pre><code>P-Asserted-Identity: <tel:+16692481432>, <sip:+16692481432@vzimstest.com>
</code></pre>
<p>IP address does exist here, put present caller domain. So we can skip reverse lookup and execute NAPTR.</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/2574#issuecomment-739504721">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPTBISJWV4YAFHK6TTSTODELANCNFSM4UL3X5TQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZKGKLWSFEK4LVSZJYLSTODELA5CNFSM4UL3X5T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFQJ7EUI.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/2574#issuecomment-739504721",
"url": "https://github.com/kamailio/kamailio/issues/2574#issuecomment-739504721",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>