Re: [OpenSIPS-Users] using avops for authentication

2010-07-14 Thread Gabriel Bermudez
Hi Bodgan, Thanks for your answer, is there a way to know if $au is set or check for the WWW-Authenticate header? If it isn't I can www_challenge the user for credentials.  After some trial and error I managed to authenticate my users, I setted calculate_ha1 param to 1 modparam("auth", "calculate

Re: [OpenSIPS-Users] using avops for authentication

2010-07-14 Thread Bogdan-Andrei Iancu
Hi Gabriel, I guess the problem is at: $var(username)=$au; as without doing auth, $au is not defined (parsed) yet. better try: $var(username)=$fU; Regards, Bogdan Gabriel Bermudez wrote: > Hi, > > I need to authenticate and register users that are stored on the > opensips db AND a diff

Re: [OpenSIPS-Users] using avops for authentication

2010-07-13 Thread Gabriel Bermudez
I'm forgetting about something, the userpassword field is a plain text password. Regards, 2010/7/13 Gabriel Bermudez > Hi, > > I need to authenticate and register users that are stored on the opensips > db AND a different database. For that I have the following code > > if (is_method("REGI

[OpenSIPS-Users] using avops for authentication

2010-07-13 Thread Gabriel Bermudez
Hi, I need to authenticate and register users that are stored on the opensips db AND a different database. For that I have the following code if (is_method("REGISTER") && $fu=~"^sip:[0-9]{10}@") { # authenticate the REGISTER based on a different DB xlog("getting valid cre