<div dir="ltr"><div>Thanks for your reply Daniel!</div><div>I agree with you, currently this function name is somewhat misleading...</div><div><br></div><div>Cheers,</div><div>Patrick Wakano<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 10 Dec 2018 at 18:31, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <p>I think the function was mainly made to check if it is a
      telephone number in international format.</p>
    <p>It could be better to make this function more strict in following
      the e.164 specs, there is another function to check if it looks
      like a telephone number, and as pointed in another response, there
      is a module for more strict checking on validity of a phone number
      per country...</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="gmail-m_-6180966137036046996moz-cite-prefix">On 05.12.18 04:10, Patrick Wakano
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div>Thanks for the replies guys!</div>
              <div>I will probably add a length test to invalidate too
                short numbers!<br>
              </div>
              <div>By the way, I had a quick look in the ITU
                recommendation (<a href="https://www.itu.int/rec/T-REC-E.164/en" target="_blank">https://www.itu.int/rec/T-REC-E.164/en</a>)
                and looks like the short numbers are for local purposes
                only being part of the "Non-ITU-T E.164 numbers"
                section, so I guess the function should return false in
                this case. Also it seems the + sign is recommended but
                not mandatory for a E.164 number, which is quite
                confusing.....<br>
              </div>
              <div><br>
              </div>
              <div>Kind regards,</div>
              <div>Patrick Wakano<br>
              </div>
              <div><br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">On Tue, 4 Dec 2018 at 08:57, Henning Westerholt
          <<a href="mailto:hw@kamailio.org" target="_blank">hw@kamailio.org</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am Montag,
          3. Dezember 2018, 06:08:27 CET schrieb Patrick Wakano:<br>
          > I am using the is_e164() function to validate the number
          we receive, and I<br>
          > come to see that the number +555 was accepted....<br>
          > After some googling it looks like(it is not very clear
          though) that 7<br>
          > digits are the minimum we could have for e164 numbers but
          after checking<br>
          > the source code, I saw it accepts anything starting with
          + and having<br>
          > between 2 and 16 numbers. So is it really valid to have a
          number with just<br>
          > 2 digits? What is the case?<br>
          <br>
          Hello Patrick,<br>
          <br>
          I think the implementation was done with a pragmatic approach,
          to make sure <br>
          that we don't reject numbers that are used in the field. The
          ITU standard <br>
          Amendment A mentions the possibility to use national short
          numbers, for <br>
          example. The standard mentions that the maximal length should
          be 15, but I <br>
          think in this case this was also implemented a bit more
          relaxed.<br>
          <br>
          The original implementation from the enum module allows even
          longer numbers, I <br>
          will check if this should be synchronized.<br>
          <br>
          Best regards,<br>
          <br>
          Henning<br>
          <br>
          <br>
          -- <br>
          Henning Westerholt - <a href="https://skalatan.de/blog/" rel="noreferrer" target="_blank">https://skalatan.de/blog/</a><br>
          Kamailio services - <a href="https://skalatan.de/services" rel="noreferrer" target="_blank">https://skalatan.de/services</a><br>
          Kamailio security assessment - <a href="https://skalatan.de/de/assessment" rel="noreferrer" target="_blank">https://skalatan.de/de/assessment</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="gmail-m_-6180966137036046996mimeAttachmentHeader"></fieldset>
      <pre class="gmail-m_-6180966137036046996moz-quote-pre">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="gmail-m_-6180966137036046996moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a class="gmail-m_-6180966137036046996moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="gmail-m_-6180966137036046996moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="gmail-m_-6180966137036046996moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a class="gmail-m_-6180966137036046996moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="gmail-m_-6180966137036046996moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio World Conference -- <a class="gmail-m_-6180966137036046996moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a>
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- <a class="gmail-m_-6180966137036046996moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a></pre>
  </div>

</blockquote></div>