### Description
Parsing a number using `phonenum_match_cn()` doesn't honor the country code filter.
#### Reproduction
I have the following in code:
``` if (phonenum_match_cn("$fU", "PA", "src")) { if($phn(src=>valid)==1) { xlog("L_NOTICE", "Caller is type: (V=$phn(src=>valid) | N=$phn(src=>number) | NN=$phn(src=>normalized) | CC=$phn(src=>cctel) | ISO=$phn(src=>ccname) | T=$phn(src=>ltype) | D=$phn(src=>ndesc))\n"); return; } } ```
Using `+15162085XXX` as an example, I'm getting the following when passing that snippet of code:
``` Oct 1 19:31:11 sbc01 sbc[17850]: NOTICE: {1 102 INVITE 05d2e55e06832c71060e69b630cd5c6d@A.B.C.D} <script>: Caller is type: (V=1 | N=+15162085XXX | NN=+15162085XXX | CC=1 | ISO=US | T=fixed-line-or-mobile | D=New York) ```
I would expect this case to return `$phn(src=>valid)=0`
### Additional Information
* **Kamailio version**:
``` version: kamailio 5.4.1 (x86_64/linux) flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: unknown compiled with gcc 6.3.0 ```
* **Operating System**:
``` Distributor ID: Debian Description: Debian GNU/Linux 9.13 (stretch) Release: 9.13 Codename: stretch ```
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:
* https://javadoc.io/static/com.googlecode.libphonenumber/libphonenumber/8.4.1...
If you want to do country code restrictions, once the match is done, then compare `$phn(src=>ccname)` value.
Of course, a new function can be added to do such extra check internally.
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.
Closed #2495.