<p></p>
<p>The purpose of the country code name is fill full number value when it is in local or national format, not for numbers in the international the format. It doesn't have the role to restrict to be an international number for that country, but to detect if it is a valid local or national format within the country. I added in the docs of the module a note taken from the docs of libphonenumber parse() function:</p>
<ul>
<li><a href="https://javadoc.io/static/com.googlecode.libphonenumber/libphonenumber/8.4.1/com/google/i18n/phonenumbers/PhoneNumberUtil.html#parse-java.lang.String-java.lang.String-" rel="nofollow">https://javadoc.io/static/com.googlecode.libphonenumber/libphonenumber/8.4.1/com/google/i18n/phonenumbers/PhoneNumberUtil.html#parse-java.lang.String-java.lang.String-</a></li>
</ul>
<p>If you want to do country code restrictions, once the match is done, then compare <code>$phn(src=>ccname)</code> value.</p>
<p>Of course, a new function can be added to do such extra check internally.</p>
<p>I am going to close this issue, not being a bug, but what libphonenumber is expected to do in such case. For further discussions use sr-users or make PR with a new function.</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/2495#issuecomment-702924995">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZIE4LIO4F7DI7ZUPQDSIYUXNANCNFSM4SBDWNNA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZLI73CE6LGU376OSKDSIYUXNA5CNFSM4SBDWNNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFHS4RQY.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/2495#issuecomment-702924995",
"url": "https://github.com/kamailio/kamailio/issues/2495#issuecomment-702924995",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>