<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">How are you calling the function in Kamailio?  It’s possible that the appspot app tries a few variations on formatting that result in success.  From the phonum module doc for
<span style="font-size:10.0pt;font-family:"Courier New"">phonenum_match_cn(num, cnc, pvc)</span> :<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">Note from libphonenumber library docs: country name code is the region that is expected the number to be from. It is only used if the number being parsed is not written in international format. The country code
 for the number in this case would be stored as that of the region supplied. If the number is guaranteed to start with a '+' followed by the country calling code, then region 'ZZ'.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>Kaufman<o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> sr-users <sr-users-bounces@lists.kamailio.org> <b>
On Behalf Of </b>David Escartín<br>
<b>Sent:</b> Monday, June 13, 2022 8:49 AM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>; Vicente Hernando <vhernando@sonoc.io>; Javier Gallart <jgallart@sonoc.io><br>
<b>Subject:</b> [SR-Users] issue using phonenum module<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hello all<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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, <o:p></o:p></p>
</div>
<p class="MsoNormal">$phn(ani=>valid) --> 0<br>
$phn(ani=>ccname) --> <null><br>
$phn(ani=>cctel) --> 0<br>
$phn(ani=>error) --> Invalid number<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">but using <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flibphonenumber.appspot.com%2Fphonenumberparser%3Fnumber%3D576015145834%26country%3DCO&data=05%7C01%7Cbkaufman%40bcmone.com%7Cb2f5358948fa4e8c467508da4d43974a%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C637907249957000424%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=pLAOjgn9o61nk03k7%2FgRsLKinYDTnHTs2%2FNgd%2BK%2BG40%3D&reserved=0">https://libphonenumber.appspot.com/phonenumberparser?number=576015145834&country=CO</a>
 seems it gives a valid result<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Validation Results<br>
Result from isPossibleNumber() true<br>
Result from isValidNumber() true<br>
Result from isValidNumberForRegion() true<br>
Phone Number region CO<br>
Result from getNumberType() FIXED_LINE<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">we are using kamailio 5.4 and libphonenumber tag v8.12.30 (also tested v8.9)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">the command is used with 'ZZ' cnc and passing the number with +<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">maybe we are missing something in the configuration/setup?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">thanks and regards<br>
david<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:11.25pt 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="border:none;border-right:dotted #009BDF 2.25pt;padding:0in 7.5pt 0in 0in">
<p class="MsoNormal"><a href="https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.sonoc.io%2F&data=05%7C01%7Cbkaufman%40bcmone.com%7Cb2f5358948fa4e8c467508da4d43974a%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C637907249957000424%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=59dpA3rMEP1RnAWzDYwuNzdQ1zAbViC7yPjY26hgWGU%3D&reserved=0" target="_blank"><span style="font-size:1.0pt;text-decoration:none"><img border="0" width="90" height="90" style="width:.9333in;height:.9416in" id="_x0000_i1028" src="https://www.sonoc.io/wp-content/uploads/2020/07/Logo_SONOC_emails.png"></span></a><span style="font-size:1.0pt"><o:p></o:p></span></p>
</td>
<td valign="top" style="padding:0in 0in 0in 7.5pt">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td valign="top" style="padding:0in 0in 0in 3.75pt">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="200" style="width:150.0pt">
<tbody>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:12.0pt;color:#102F4A">David Escartín<o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="200" style="width:150.0pt">
<tbody>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:11.5pt;color:#102F4A">NOC engineer<o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="200" style="width:150.0pt">
<tbody>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:11.5pt;color:#009BDF"><a href="https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.sonoc.io%2F&data=05%7C01%7Cbkaufman%40bcmone.com%7Cb2f5358948fa4e8c467508da4d43974a%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C637907249957000424%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=59dpA3rMEP1RnAWzDYwuNzdQ1zAbViC7yPjY26hgWGU%3D&reserved=0" target="_blank"><strong><span style="font-family:"Calibri",sans-serif;color:#009BDF;font-weight:normal;text-decoration:none">www.sonoc.io</span></strong></a><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:15.0pt 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="200" style="width:150.0pt">
<tbody>
<tr>
<td style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0in 2.25pt 2.25pt 0in">
<p class="MsoNormal"><a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fsonoc&data=05%7C01%7Cbkaufman%40bcmone.com%7Cb2f5358948fa4e8c467508da4d43974a%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C637907249957000424%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=%2B%2BQrJtOr4eDeCStfkSqskYmKZKiry7WCgCTuUKUxCiU%3D&reserved=0" target="_blank"><span style="font-size:1.0pt;text-decoration:none"><img border="0" width="20" height="20" style="width:.2083in;height:.2083in" id="_x0000_i1027" src="https://ci3.googleusercontent.com/mail-sig/AIorK4xLBR5Q81qJDdF-wA6Vxl36FBT7fmJuw_gr0t0SU5l7h6qIzk1HPcQBjct-yc5E2W-Rfx0w19g" alt="LinkedIn"></span></a><span style="font-size:1.0pt"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0in 2.25pt 2.25pt 0in">
<p class="MsoNormal"><a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2Fsonoc_&data=05%7C01%7Cbkaufman%40bcmone.com%7Cb2f5358948fa4e8c467508da4d43974a%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C637907249957000424%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=kWxD3cUTYKmEcKGcTka%2FwHQ%2FNpFjtDvrqQm%2BzwLqNH4%3D&reserved=0" target="_blank"><span style="font-size:1.0pt;text-decoration:none"><img border="0" width="20" height="20" style="width:.2083in;height:.2083in" id="_x0000_i1026" src="https://ci3.googleusercontent.com/mail-sig/AIorK4z31tQAlOpDQOc0kjURZ7ojxKhGln-V770XS6xTsOGXzJDUavb9Frw44B_mIQNL8rIz1YbO8OM" alt="Twitter"></span></a><span style="font-size:1.0pt"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0in 2.25pt 2.25pt 0in">
<p class="MsoNormal"><a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.facebook.com%2FSONOCio%2F&data=05%7C01%7Cbkaufman%40bcmone.com%7Cb2f5358948fa4e8c467508da4d43974a%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C637907249957000424%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=lv6mhnoPr0YOopcKSmH5PZw5nim2lAsxB0XqhLv65dw%3D&reserved=0" target="_blank"><span style="font-size:1.0pt;text-decoration:none"><img border="0" width="20" height="20" style="width:.2083in;height:.2083in" id="_x0000_i1025" src="https://ci3.googleusercontent.com/mail-sig/AIorK4waToTIrAwHv7uts8d9mEV1mTtoUvqLw07le8AIQiZtPqWyBRCFLEm1EVURJDw1TzXZ0v1kkUw" alt="Facebook"></span></a><span style="font-size:1.0pt"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:7.5pt 0in 0in 0in">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="550" style="width:412.5pt">
<tbody>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal" style="text-align:justify"><span style="font-size:8.5pt;color:#636363">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.<br>
<br>
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: </span><span style="font-size:8.5pt;color:#009BDF"><a href="mailto:dataprotection@sonoc.io" target="_blank"><strong><span style="font-family:"Calibri",sans-serif;color:#009BDF;font-weight:normal;text-decoration:none">dataprotection@sonoc.io</span></strong></a></span><span style="font-size:8.5pt;color:#636363"><a href="mailto:dataprotection@sonoc.io" target="_blank"><strong><span style="font-family:"Calibri",sans-serif;color:#000001;font-weight:normal;text-decoration:none">.</span></strong></a><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>