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(a)gmail.com
<mailto:david.villasmil.work@gmail.com>
phone: +34669448337
ᐧ
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio Advanced Training - March 5-7, 2018, Berlin -
www.asipto.com
Kamailio World Conference - May 14-16, 2018 -
www.kamailioworld.com