<div><font face="verdana,sans-serif">Hello my friends, </font></div>
<div><font face="verdana,sans-serif"></font> </div>
<div><font face="verdana,sans-serif">I'm trying to configure authentication on my OpenSIPS and is not working at all :(</font></div>
<div><font face="verdana,sans-serif"></font> </div>
<div><font face="Verdana">I've added the following to the script to make it work: (but it doesn't)</font></div>
<div><font face="Verdana"></font> </div>
<div>...</div>
<div>loadmodule "auth.so"<br>loadmodule "auth_db.so"</div>
<div>...</div>
<div>modparam("usrloc", "db_url",<br> "mysql://opensips:opensipsrw@localhost/opensips")<br>modparam("auth_db", "calculate_ha1", yes)<br>modparam("auth_db", "password_column", "password")<br>
modparam("auth_db", "db_url",<br> "mysql://opensips:opensipsrw@localhost/opensips")<br>modparam("auth_db", "load_credentials", "")<br>...</div>
<div> if (!(method=="REGISTER") && from_uri==myself) /*no multidomain version*/<br> {<br> if (!proxy_authorize("", "subscriber")) {<br> proxy_challenge("", "0");<br>
exit;<br> }<br> if (!db_check_from()) {<br> sl_send_reply("403","Forbidden auth ID");<br> exit;<br> }<br>
consume_credentials();<br> }<br>...</div>
<div><br> if (is_method("REGISTER"))<br> {<br> # authenticate the REGISTER requests (uncomment to enable auth)<br> if (!www_authorize("", "subscriber"))<br>
{<br> www_challenge("", "0");<br> exit;<br> }<br> ##<br> if (!db_check_to())<br> {<br>
sl_send_reply("403","Forbidden auth ID");<br> exit;<br> }</div>
<div> if (!save("location"))<br> sl_reply_error();</div>
<div> exit;<br> }<br></div>
<div> </div>
<div>But is not working at all...take a look:</div>
<div> </div>
<div>#<br>U 2011/02/03 09:31:04.402891 <a href="http://172.30.140.22:48752">172.30.140.22:48752</a> -> <a href="http://172.30.140.8:5060">172.30.140.8:5060</a><br>REGISTER sip:172.30.140.8 SIP/2.0<br>Via: SIP/2.0/UDP 172.30.140.22:48752;branch=z9hG4bK-d87543-9a54af22967ae417-1--d87543-;rport<br>
Max-Forwards: 70<br>Contact: <sip:1000@172.30.140.22:48752;rinstance=fcade2df86ce0ab8><br>To: "1000"<<a href="mailto:sip%3A1000@172.30.140.8">sip:1000@172.30.140.8</a>><br>From: "1000"<<a href="mailto:sip%3A1000@172.30.140.8">sip:1000@172.30.140.8</a>>;tag=cd3e2323<br>
Call-ID: MmU0YjM1NThiNTg0ZjhiNGM4ODA4ZmU1YWFiYjBmNTc.<br>CSeq: 1 REGISTER<br>Expires: 3600<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO<br>User-Agent: X-Lite release 1011s stamp 41150<br>
Content-Length: 0</div>
<div><br>#<br>U 2011/02/03 09:31:04.404039 <a href="http://172.30.140.8:5060">172.30.140.8:5060</a> -> <a href="http://172.30.140.22:48752">172.30.140.22:48752</a><br>SIP/2.0 200 OK<br>Via: SIP/2.0/UDP 172.30.140.22:48752;branch=z9hG4bK-d87543-9a54af22967ae417-1--d87543-;rport=48752<br>
To: "1000"<<a href="mailto:sip%3A1000@172.30.140.8">sip:1000@172.30.140.8</a>>;tag=c97b4d1cb1f3d0da549e06a8d482ef63.34dc<br>From: "1000"<<a href="mailto:sip%3A1000@172.30.140.8">sip:1000@172.30.140.8</a>>;tag=cd3e2323<br>
Call-ID: MmU0YjM1NThiNTg0ZjhiNGM4ODA4ZmU1YWFiYjBmNTc.<br>CSeq: 1 REGISTER<br>Contact: <sip:1000@172.30.140.22:48752;rinstance=fcade2df86ce0ab8>;expires=3600<br>Server: OpenSIPS (1.6.4-2-notls (i386/linux))<br>Content-Length: 0<br>
</div>
<div>Am i missing something in my configuration?</div>
<div> </div>
<div>Thanks in advance!!!</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div><font face="Verdana"></font> </div>
<div><font face="Verdana"></font> </div>
<div><font face="verdana,sans-serif"> </font></div>
<div><br></div>