<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Besides having the negation (!) as remarked in another response,
      to match starting with in a regexp you have to use ^ at the
      beginning, like:</p>
    <p>$au =~ "^32"</p>
    <p>Without ^, any $au that has 32 inside will match. Then, there is
      also a function starts_with() that can be used for this particular
      case.</p>
    <p>The $au is available after doing the authentication.<br>
    </p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 13.01.18 18:53, David Villasmil
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFGRPVqcjh4=2dWuQ0wX5RK8=g6_KUQDAaXepapMbZ2zeTmNbw@mail.gmail.com">
      <div dir="ltr">I'm trying to verify the auth username begins with,
        i.e. "32", but i'm using in AUTH route:
        <div><br>
        </div>
        <div>if( !($au=~"32") ){</div>
        <div> do something</div>
        <div>}</div>
        <div><br>
        </div>
        <div>and that's not working, and i don't get why?<br>
          <div><br>
          </div>
          <div><br clear="all">
            <div>
              <div class="gmail_signature"
                data-smartmail="gmail_signature">
                <div dir="ltr">
                  <div>Regards,</div>
                  <div><br>
                  </div>
                  David Villasmil
                  <div>email: <a
                      href="mailto:david.villasmil.work@gmail.com"
                      target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a></div>
                  <div>phone: +34669448337</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div hspace="streak-pt-mark" style="max-height:1px"><img alt=""
          style="width:0px;max-height:0px;overflow:hidden"
src="https://mailfoogae.appspot.com/t?sender=aZGF2aWQudmlsbGFzbWlsLndvcmtAZ21haWwuY29t&type=zerocontent&guid=86b8a180-aec1-4d5b-a8d0-e195a97d299d"
          moz-do-not-send="true"><font size="1" color="#ffffff">ᐧ</font></div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - March 5-7, 2018, Berlin - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>