[OpenSIPS-Users] Question about auth_db

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Oct 6 12:44:11 CEST 2008


Hi Juan,

A more simpler approach is to create a view over your external table, a 
view to follow the definition of the subscriber table in OpenSIPs. This 
will reduce a lot the volume of changes you need to do in the additional 
scripts.

Regards,
Bogdan

Juan Backson wrote:
> Hi Gustavo,
>  
> Thanks alot for your response. 
>  
> I currently use ./opensipsctl add <user> <password> to create the user 
> in subscriber table.  I notice that ./opensipsctl add would also 
> generate the hal1 and hal2 column in the subscriber.  If I create user 
> in my own table, what is the proper way of generating the hal1 and 
> hal2 fields?  Alternatively, is it possible to confi ./opensipsctl add 
> feature so that it would create the hal1 and hal2 fields in my custom 
> table?
>  
> Thanks alot for your help.
>  
> JB
>
> On Sun, Sep 21, 2008 at 10:37 AM, Gustavo Mistrinelli 
> <gmistrinelli at gmail.com <mailto:gmistrinelli at gmail.com>> wrote:
>
>     Hi Juan,
>
>     Yes, you can use another database/table to do user authorization,
>     just you only need to setup auth_db parameters to map your own schema.
>
>     *Change auth_db parameters*/
>
>     modparam("auth_db", "user_column", "*u**sername_column*")
>     modparam("auth_db", "password_column", "*password_**column*")
>     modparam("auth_db",  "db_url",
>     "mysql://*database_user:password@database_host/database_name*")  /
>
>     You need to take care about how password column and if it's plain
>     text you need to set up calculate_ha1:
>     /modparam("auth_db", "calculate_ha1", 0)/
>     *
>     Modify **table name inside your*/ /*authentication blocks*/
>     /
>     /if (www_authorize("your_realm", "*new_users_table*//")) {
>         www_challenge("your_realm, "0");
>     };
>     ...
>     //if (proxy_authorize("your_realm", "*new_users_table*//")) {
>         proxy_challenge("your_realm, "0");
>     };/
>
>
>     Regards,
>
>     Gustavo
>
>     On Sat, Sep 20, 2008 at 10:04 PM, Juan Backson
>     <juanbackson at gmail.com <mailto:juanbackson at gmail.com>> wrote:
>
>         Hi,
>          
>         I am maintaining an application DB and an Opensips DB.  For
>         the Opensips DB, I would like to move the subscribers table to
>         my app DB so that I don't need to maintain two sip_user_name
>         in two different places.  It is do-able?  Can I just move that
>         one table to my app DB or I also need the rest of the Opensips
>         tables moved as well?
>          
>         Also, is it possible to tell Opensips to check auth against
>         the table I am defining instead of the subscriber table?
>          
>         Could anyone have done that give me some suggestion on how to
>         do it?
>          
>         Thanks,
>         JB
>
>         _______________________________________________
>         Users mailing list
>         Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
>     -- 
>     Gustavo Mistrinelli
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   




More information about the Users mailing list