<br><br>
<div class="gmail_quote">On Wed, Jul 8, 2009 at 7:16 AM, Nathaniel L Keeling <span dir="ltr"><<a href="mailto:keeling@akan-tech.com">keeling@akan-tech.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I am having a problem with database authentication and would like some<br>help. I have everything setup for the database and have added a user.<br>
The user was added using opensipsctl. The setting for the database is to<br>not use plain text passwords. If I add the password to the database<br>entry, the user will authenticate. I feel that there is a configuration<br>
problem but don't know where. Here is the extract from my config file<br><br>/* uncomment the following lines if you want to enable the DB based<br> authentication */<br><br>modparam("auth_db", "calculate_ha1", yes)<br>
modparam("auth_db", "password_column", "password")<br>modparam("auth_db", "db_url",<br> "postgres://opensips:opensipsrw@localhost/opensips")<br>modparam("auth_db", "load_credentials", "")<br>
<br>/* uncomment the following line if you want to enable multi-domain support<br> in the modules (dafault off) */<br><br>modparam("alias_db|auth_db|usrloc|uri_db", "use_domain", 1)<br><br><br> From opensipsctlrc and osipsconsolerc<br>
<br>## do (1) or don't (0) store plaintext passwords<br>## in the subscriber table - default '1'<br>STORE_PLAINTEXT_PW=0<br></blockquote>
<div> </div>
<div>Hi</div>
<div> </div>
<div>apart from that you need to edit some more information like</div>
<div> </div>
<div># ----- usrloc params -----<br>#modparam("usrloc", "db_mode", 0)<br>/* uncomment the following lines if you want to enable DB persistency<br> for location entries */<br>modparam("usrloc", "db_mode", 2)<br>
modparam("usrloc", "db_url",<br> "mysql://opensips:opensipsrw@localhost/opensips")</div>
<div><br># ----- uri_db params -----<br>/* by default we disable the DB support in the module as we do not need it<br> in this configuration */<br>modparam("uri_db", "use_uri_table", 0)<br>modparam("uri_db", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")<br>
</div>
<div> </div>
<div>and </div>
<div> </div>
<div># generated by local subscriber (domain from FROM URI is local)<br> if (!(method=="REGISTER") && from_uri==myself) /*no multidomain version*/<br> if (!(method=="REGISTER") && is_from_local()) /*multidomain version*/<br>
{<br> if (!proxy_authorize("", "subscriber")) {<br> proxy_challenge("", "0");<br> exit;<br> }<br> if (!check_from()) {<br>
sl_send_reply("403","Forbidden auth ID");<br> exit;<br> }</div>
<div> consume_credentials();<br> # caller authenticated<br> }<br></div>
<div> </div>
<div>Or else post full config to suggest better</div>
<div> </div>
<div>Ram</div></div>