<font face="verdana,sans-serif">Thanks Bogdan...working on that!<br></font><br>
<div class="gmail_quote">2011/2/4 Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>></span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi Toyima,<br><br>1) be sure your opensips is using the right cfg file<br><br>2) be sure you restart opensips after doing changes in the cfg file<br>
<br>3) is still not working, debug your script by placing xlog() statement in different key point (like after "if") to see what is the execution flow in your script.<br><br>Regards,<br>Bogdan<br><br><br>Toyima Dias wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Any help my friends?<br> 2011/2/3 Toyima Dias <<a href="mailto:toyimads@gmail.com" target="_blank">toyimads@gmail.com</a> <mailto:<a href="mailto:toyimads@gmail.com" target="_blank">toyimads@gmail.com</a>>> 
<div class="im"><br><br>   SORRY!!!!! OpenSIPS should send BEFORE (NOT after) the 200 OK, the<br>   401 :)<br><br></div>   2011/2/3 Toyima Dias <<a href="mailto:toyimads@gmail.com" target="_blank">toyimads@gmail.com</a> <mailto:<a href="mailto:toyimads@gmail.com" target="_blank">toyimads@gmail.com</a>>> 
<div class="im"><br><br>       =) but it should send after the 200 OK, the 401<br>       unauthorized...and the same for INVITES or any other request<br>       with 407 proxy authentication, and that's not working my dear<br>
       friend...at least seems not to work per the traces :(<br><br>       I did the changes in opensips.cfg as i mentioned in my first<br>       email...what is wrong? i can get the point :(<br><br><br><br>       2011/2/3 Anton Zagorskiy <<a href="mailto:a.zagorskiy@oyster-telecom.ru" target="_blank">a.zagorskiy@oyster-telecom.ru</a><br>
</div>       <mailto:<a href="mailto:a.zagorskiy@oyster-telecom.ru" target="_blank">a.zagorskiy@oyster-telecom.ru</a>>> 
<div>
<div></div>
<div class="h5"><br><br>           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>><br>           [mailto:<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<br>           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><br>           Hello my friends,<br>                        I'm trying to configure authentication on my OpenSIPS and<br>
           is not working at<br>           all :(<br>                        I've added the following to the script to make it work:<br>           (but it doesn't)<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)<br>
           /*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<br>           auth ID");<br>
                                   exit;<br>                           }<br>                           consume_credentials();<br>                   }<br>           ...<br><br>                   if (is_method("REGISTER"))<br>
                   {<br>                           # authenticate the REGISTER requests<br>           (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<br>           auth ID");<br>                                   exit;<br>
                           }<br>                           if (!save("location"))<br>                                   sl_reply_error();<br>                           exit;<br>                   }<br>                        But is not working at all...take a look:<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><br></div></div>           <<a href="http://172.30.140.22:48752/" target="_blank">http://172.30.140.22:48752/</a>> -> <a href="http://172.30.140.8:5060/" target="_blank">172.30.140.8:5060</a><br>
           <<a href="http://172.30.140.8:5060/" target="_blank">http://172.30.140.8:5060/</a>> 
<div class="im"><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:<br>           <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>
</div>           <mailto:<a href="mailto:sip%253A1000@172.30.140.8" target="_blank">sip%3A1000@172.30.140.8</a>>> 
<div class="im"><br>           From: "1000"<<a href="mailto:sip%3A1000@172.30.140.8" target="_blank">sip:1000@172.30.140.8</a><br></div>           <mailto:<a href="mailto:sip%253A1000@172.30.140.8" target="_blank">sip%3A1000@172.30.140.8</a>>>;tag=cd3e2323 
<div class="im"><br>           Call-ID: MmU0YjM1NThiNTg0ZjhiNGM4ODA4ZmU1YWFiYjBmNTc.<br>           CSeq: 1 REGISTER<br>           Expires: 3600<br>           Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY,<br>           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><br>
</div>           <<a href="http://172.30.140.8:5060/" target="_blank">http://172.30.140.8:5060/</a>> -> <a href="http://172.30.140.22:48752/" target="_blank">172.30.140.22:48752</a><br>           <<a href="http://172.30.140.22:48752/" target="_blank">http://172.30.140.22:48752/</a>> 
<div class="im"><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><br>
</div>           <mailto:<a href="mailto:sip%253A1000@172.30.140.8" target="_blank">sip%3A1000@172.30.140.8</a>>>;tag=c97b4d1cb1f3d0da549e06a8d482ef63.34dc 
<div class="im"><br>           From: "1000"<<a href="mailto:sip%3A1000@172.30.140.8" target="_blank">sip:1000@172.30.140.8</a><br></div>           <mailto:<a href="mailto:sip%253A1000@172.30.140.8" target="_blank">sip%3A1000@172.30.140.8</a>>>;tag=cd3e2323 
<div class="im"><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>                        Thanks in advance!!!<br>                                                                                                       <br>
<br><br>           _______________________________________________<br>           Users mailing list<br></div>           <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>> 
<div class="im"><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><br><br><br></div>------------------------------------------------------------------------ 
<div class="im"><br><br>_______________________________________________<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></div></blockquote><font color="#888888"><br><br>-- <br>Bogdan-Andrei Iancu<br>OpenSIPS Event - expo, conf, social, bootcamp<br>2 - 4 February 2011, ITExpo, Miami,  USA<br>OpenSIPS solutions and "know-how"</font> 
<div>
<div></div>
<div class="h5"><br><br><br>_______________________________________________<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>
</div></div></blockquote></div><br>