<font face="verdana,sans-serif">SORRY!!!!! OpenSIPS should send BEFORE (NOT after) the 200 OK, the 401 :) <br></font><br>
<div class="gmail_quote">2011/2/3 Toyima Dias <span dir="ltr"><<a href="mailto:toyimads@gmail.com">toyimads@gmail.com</a>></span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div><font face="verdana,sans-serif">=) but it should send after the 200 OK, the 401 unauthorized...and the same for INVITES or any other request with 407 proxy authentication, and that's not working my dear friend...at least seems not to work per the traces :(</font></div>
<p><font face="verdana,sans-serif">I did the changes in opensips.cfg as i mentioned in my first email...what is wrong? i can get the point :(</font></p>
<div><br><br></div>
<div class="gmail_quote">2011/2/3 Anton Zagorskiy <span dir="ltr"><<a href="mailto:a.zagorskiy@oyster-telecom.ru" target="_blank">a.zagorskiy@oyster-telecom.ru</a>></span>
<div>
<div></div>
<div class="h5"><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi Toyima.<br><br>I see 200 OK reply. What is wrong? =)<br><br><br>From: <a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a><br>
[mailto:<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>] On Behalf Of Toyima Dias<br>Sent: Thursday, February 03, 2011 11:32 AM<br>To: OpenSIPS users mailling list<br>
Subject: [OpenSIPS-Users] authentication is not working<br>
<div>
<div></div>
<div><br>Hello my friends,<br>š<br>I'm trying to configure authentication on my OpenSIPS and is not working at<br>all :(<br>š<br>I've added the following to the script to make it work: (but it doesn't)<br>š<br>
...<br>loadmodule "auth.so"<br>loadmodule "auth_db.so"<br>...<br>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>...<br>ššššššš if (!(method=="REGISTER") && from_uri==myself) /*no multidomain<br>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>...<br><br>ššššššš if (is_method("REGISTER"))<br>ššššššš {<br>ššššššššššššššš # authenticate the REGISTER requests (uncomment to enable<br>
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>ššššššššššššššš }<br>
ššššššššššššššš if (!save("location"))<br>ššššššššššššššššššššššš sl_reply_error();<br>ššššššššššššššš exit;<br>ššššššš }<br>š<br>But is not working at all...take a look:<br>š<br>#<br>U 2011/02/03 09:31:04.402891 <a href="http://172.30.140.22:48752/" target="_blank">172.30.140.22:48752</a> -> <a href="http://172.30.140.8:5060/" target="_blank">172.30.140.8:5060</a><br>
REGISTER sip:172.30.140.8 SIP/2.0<br>Via: SIP/2.0/UDP<br>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" target="_blank">sip:1000@172.30.140.8</a>><br>From: "1000"<<a href="mailto:sip%3A1000@172.30.140.8" target="_blank">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,<br>INFO<br>User-Agent: X-Lite release 1011s stamp 41150<br>
Content-Length: 0<br><br>#<br>U 2011/02/03 09:31:04.404039 <a href="http://172.30.140.8:5060/" target="_blank">172.30.140.8:5060</a> -> <a href="http://172.30.140.22:48752/" target="_blank">172.30.140.22:48752</a><br>SIP/2.0 200 OK<br>
Via: SIP/2.0/UDP<br>172.30.140.22:48752;branch=z9hG4bK-d87543-9a54af22967ae417-1--d87543-;rport=<br>48752<br>To: "1000"<<a href="mailto:sip%3A1000@172.30.140.8" target="_blank">sip:1000@172.30.140.8</a>>;tag=c97b4d1cb1f3d0da549e06a8d482ef63.34dc<br>
From: "1000"<<a href="mailto:sip%3A1000@172.30.140.8" target="_blank">sip:1000@172.30.140.8</a>>;tag=cd3e2323<br>Call-ID: MmU0YjM1NThiNTg0ZjhiNGM4ODA4ZmU1YWFiYjBmNTc.<br>CSeq: 1 REGISTER<br>Contact:<br><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>Am i missing something in my configuration?<br>š<br>Thanks in advance!!!<br>š<br>š<br>š<br>š<br>š<br>š<br>š<br>š<br><br><br><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>
</blockquote></div></div></div><br></blockquote></div><br>