[SR-Users] issue using phonenum module

David Escartín descartin at sonoc.io
Mon Jun 13 15:48:46 CEST 2022


Hello all

we are using the phonenum_match_cn function to detect valid phone numbers,
but seems there are some numbers like 576015145834 which are no detected as
valid ones,
$phn(ani=>valid) --> 0
$phn(ani=>ccname) --> <null>
$phn(ani=>cctel) --> 0
$phn(ani=>error) --> Invalid number

but using
https://libphonenumber.appspot.com/phonenumberparser?number=576015145834&country=CO
seems it gives a valid result

Validation Results
Result from isPossibleNumber() true
Result from isValidNumber() true
Result from isValidNumberForRegion() true
Phone Number region CO
Result from getNumberType() FIXED_LINE

we are using kamailio 5.4 and libphonenumber tag v8.12.30 (also tested v8.9)
the command is used with 'ZZ' cnc and passing the number with +

maybe we are missing something in the configuration/setup?
thanks and regards
david

-- 
<http://www.sonoc.io/>
David Escartín
NOC engineer
*www.sonoc.io* <http://www.sonoc.io/>
[image: LinkedIn] <https://www.linkedin.com/company/sonoc>
[image: Twitter] <https://twitter.com/sonoc_>
[image: Facebook] <https://www.facebook.com/SONOCio/>
This e-mail is for the exclusive use of its recipients and may contain
business secrets or other confidential or privileged information. Any
unauthorised use, copying, publication or distribution of this e-mail is
strictly prohibited. If you are not the intended recipient, please inform
us immediately by replying to this e-mail and delete it, including any
attachments or copies on your system.

In accordance with the GDPR (EU) 2016/679 and the LOPDGDD 3/2018, we inform
you that this e-mail address and/or any other personal data you have
provided us with will be treated by SONOC with absolute confidentiality and
with the only purpose of providing you with the requested services, due to
your condition as a client, supplier or because you have requested
information from us at any time. These data will only be kept for as long
as required to comply with legal obligations. You can exercise your rights
at any time by sending an e-mail to: *dataprotection at sonoc.io*
<dataprotection at sonoc.io>*.* <dataprotection at sonoc.io>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220613/5e5c5d1e/attachment.htm>


More information about the sr-users mailing list