Besides having the negation (!) as remarked in another response, to match starting with in a regexp you have to use ^ at the beginning, like:
$au =~ "^32"
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.
The $au is available after doing the authentication.
Cheers, Daniel
On 13.01.18 18:53, David Villasmil wrote:
I'm trying to verify the auth username begins with, i.e. "32", but i'm using in AUTH route:
if( !($au=~"32") ){ do something }
and that's not working, and i don't get why?
Regards,
David Villasmil email: david.villasmil.work@gmail.com mailto:david.villasmil.work@gmail.com phone: +34669448337 ᐧ
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users