<div dir="ltr"><div>Hi Gustavo,</div>
<div> </div>
<div>Thanks alot for your response. </div>
<div> </div>
<div>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?</div>
<div> </div>
<div>Thanks alot for your help.</div>
<div> </div>
<div>JB<br><br></div>
<div class="gmail_quote">On Sun, Sep 21, 2008 at 10:37 AM, Gustavo Mistrinelli <span dir="ltr"><<a href="mailto:gmistrinelli@gmail.com">gmistrinelli@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div dir="ltr">Hi Juan, <br><br>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.<br><br><b>Change auth_db parameters</b><i><br><br>modparam("auth_db", "user_column", "<span style="COLOR: rgb(153,0,0)"><b>u</b><b>sername_column</b></span>")<br>
modparam("auth_db", "password_column", "<span style="COLOR: rgb(153,0,0)"><b>password_</b><b>column</b></span>") <br>modparam("auth_db", "db_url", "mysql://<b><span style="COLOR: rgb(102,0,0)">database_user:password@database_host/database_name</span></b>") </i><br>
<br>You need to take care about how password column and if it's plain text you need to set up calculate_ha1:<br><i>modparam("auth_db", "calculate_ha1", 0)</i><br><b><br>Modify </b><b></b><b>table name inside your</b><i> </i><b>authentication blocks</b><i><br>
</i><br><i style="COLOR: rgb(204,0,0)"><span style="COLOR: rgb(0,0,0)">if (www_authorize("your_realm",</span> "<b style="COLOR: rgb(102,0,0)">new_users_table</b></i><i>")) {<br> www_challenge("your_realm, "0");<br>
};<br>...<br></i><i style="COLOR: rgb(204,0,0)"><span style="COLOR: rgb(0,0,0)">if (proxy_authorize("your_realm",</span> "<b style="COLOR: rgb(102,0,0)">new_users_table</b></i><i>")) {<br> proxy_challenge("your_realm, "0");<br>
};</i><br><br><br>Regards,<br><br>Gustavo<br><br>
<div class="gmail_quote">
<div>
<div></div>
<div class="Wj3C7c">On Sat, Sep 20, 2008 at 10:04 PM, Juan Backson <span dir="ltr"><<a href="mailto:juanbackson@gmail.com" target="_blank">juanbackson@gmail.com</a>></span> wrote:<br></div></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>
<div></div>
<div class="Wj3C7c">
<div dir="ltr">
<div>Hi,</div>
<div> </div>
<div>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?</div>
<div> </div>
<div>Also, is it possible to tell Opensips to check auth against the table I am defining instead of the subscriber table?</div>
<div> </div>
<div>Could anyone have done that give me some suggestion on how to do it?</div>
<div> </div>
<div>Thanks,</div>
<div>JB</div></div><br></div></div>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Gustavo Mistrinelli<br></div></blockquote></div><br></div>