[OpenSIPS-Users] how to adapt opensips's database to authentification ?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Apr 20 11:43:21 CEST 2010


Hi,

1) you need to add to the version table a record about your new auth 
table (add it with the same version as the subscriber table)

2) set the "use_domain" to 0 to disable to usage of the domain part in 
the auth query.

3) set the "calculate_ha1" to 1 (to enable it) as you have plaintext 
passwd in DB.

Please read the docs for details on these params :
       http://www.opensips.org/html/docs/modules/1.6.x/auth.html
       http://www.opensips.org/html/docs/modules/1.6.x/auth_db.html

Regards,
Bogdan

samoh wrote:
> I'm trying to change the table where opensips check for the authentification
> like that :
>
> I change the names of colums an desable calculate_ha1 (I don't need it
> because my passwords are stored plaintext in DB)
>
> modparam("auth_db", "use_domain", 1)  ### I have juste 1 domain
> modparam("auth_db", "calculate_ha1", 0)
> modparam("auth_db", "password_column", "password")
> modparam("auth_db", "user_column", "name")
> modparam("auth_db", "db_url",	"mysql://user:password@mydb.net/mydb")
> modparam("auth_db", "load_credentials", "")
>
> and I try to change the table like that :
>
> if (!www_authorize("", "my_table")) {...}
>
> I don't know if what I do is right ??
>
> after restart opensips (of course it doesn't start, I check in the syslog
> file and I foud that :
>
> ERROR:db_mysql:db_mysql_submit_query: driver error: Table 'my_db.version'
> doesn't exist 
>
> so I don't know if I must create this table and I don't know for what this
> table is necessary ?
>
> Are there any trick to baypass this obligation ?.
>
> Thanks.
>
> Best Regards.
>
> 		
>
>
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list