<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">&lt;<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>&gt;</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 &quot;if&quot;) 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 &lt;<a href="mailto:toyimads@gmail.com" target="_blank">toyimads@gmail.com</a> &lt;mailto:<a href="mailto:toyimads@gmail.com" target="_blank">toyimads@gmail.com</a>&gt;&gt; 
<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 &lt;<a href="mailto:toyimads@gmail.com" target="_blank">toyimads@gmail.com</a> &lt;mailto:<a href="mailto:toyimads@gmail.com" target="_blank">toyimads@gmail.com</a>&gt;&gt; 
<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&#39;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 &lt;<a href="mailto:a.zagorskiy@oyster-telecom.ru" target="_blank">a.zagorskiy@oyster-telecom.ru</a><br>
</div>       &lt;mailto:<a href="mailto:a.zagorskiy@oyster-telecom.ru" target="_blank">a.zagorskiy@oyster-telecom.ru</a>&gt;&gt; 
<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>
           &lt;mailto:<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>&gt;<br>           [mailto:<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a><br>
           &lt;mailto:<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>&gt;] 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&#39;m trying to configure authentication on my OpenSIPS and<br>
           is not working at<br>           all :(<br>                        I&#39;ve added the following to the script to make it work:<br>           (but it doesn&#39;t)<br>                        ...<br>           loadmodule &quot;auth.so&quot;<br>
           loadmodule &quot;auth_db.so&quot;<br>           ...<br>           modparam(&quot;usrloc&quot;, &quot;db_url&quot;,<br>                                              &quot;mysql://opensips:opensipsrw@localhost/opensips&quot;)<br>
           modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, yes)<br>           modparam(&quot;auth_db&quot;, &quot;password_column&quot;, &quot;password&quot;)<br>           modparam(&quot;auth_db&quot;, &quot;db_url&quot;,<br>
                                              &quot;mysql://opensips:opensipsrw@localhost/opensips&quot;)<br>           modparam(&quot;auth_db&quot;, &quot;load_credentials&quot;, &quot;&quot;)<br>           ...<br>                   if (!(method==&quot;REGISTER&quot;) &amp;&amp; from_uri==myself)<br>
           /*no multidomain<br>           version*/<br>                   {<br>                           if (!proxy_authorize(&quot;&quot;, &quot;subscriber&quot;)) {<br>                                   proxy_challenge(&quot;&quot;, &quot;0&quot;);<br>
                                   exit;<br>                           }<br>                           if (!db_check_from()) {<br>                                   sl_send_reply(&quot;403&quot;,&quot;Forbidden<br>           auth ID&quot;);<br>
                                   exit;<br>                           }<br>                           consume_credentials();<br>                   }<br>           ...<br><br>                   if (is_method(&quot;REGISTER&quot;))<br>
                   {<br>                           # authenticate the REGISTER requests<br>           (uncomment to enable<br>           auth)<br>                           if (!www_authorize(&quot;&quot;, &quot;subscriber&quot;))<br>
                           {<br>                                   www_challenge(&quot;&quot;, &quot;0&quot;);<br>                                   exit;<br>                           }<br>                           ##<br>
                           if (!db_check_to())<br>                           {<br>                                   sl_send_reply(&quot;403&quot;,&quot;Forbidden<br>           auth ID&quot;);<br>                                   exit;<br>
                           }<br>                           if (!save(&quot;location&quot;))<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>           &lt;<a href="http://172.30.140.22:48752/" target="_blank">http://172.30.140.22:48752/</a>&gt; -&gt; <a href="http://172.30.140.8:5060/" target="_blank">172.30.140.8:5060</a><br>
           &lt;<a href="http://172.30.140.8:5060/" target="_blank">http://172.30.140.8:5060/</a>&gt; 
<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>           &lt;sip:1000@172.30.140.22:48752;rinstance=fcade2df86ce0ab8&gt;<br>           To: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@172.30.140.8" target="_blank">sip:1000@172.30.140.8</a><br>
</div>           &lt;mailto:<a href="mailto:sip%253A1000@172.30.140.8" target="_blank">sip%3A1000@172.30.140.8</a>&gt;&gt; 
<div class="im"><br>           From: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@172.30.140.8" target="_blank">sip:1000@172.30.140.8</a><br></div>           &lt;mailto:<a href="mailto:sip%253A1000@172.30.140.8" target="_blank">sip%3A1000@172.30.140.8</a>&gt;&gt;;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>           &lt;<a href="http://172.30.140.8:5060/" target="_blank">http://172.30.140.8:5060/</a>&gt; -&gt; <a href="http://172.30.140.22:48752/" target="_blank">172.30.140.22:48752</a><br>           &lt;<a href="http://172.30.140.22:48752/" target="_blank">http://172.30.140.22:48752/</a>&gt; 
<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: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@172.30.140.8" target="_blank">sip:1000@172.30.140.8</a><br>
</div>           &lt;mailto:<a href="mailto:sip%253A1000@172.30.140.8" target="_blank">sip%3A1000@172.30.140.8</a>&gt;&gt;;tag=c97b4d1cb1f3d0da549e06a8d482ef63.34dc 
<div class="im"><br>           From: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@172.30.140.8" target="_blank">sip:1000@172.30.140.8</a><br></div>           &lt;mailto:<a href="mailto:sip%253A1000@172.30.140.8" target="_blank">sip%3A1000@172.30.140.8</a>&gt;&gt;;tag=cd3e2323 
<div class="im"><br>           Call-ID: MmU0YjM1NThiNTg0ZjhiNGM4ODA4ZmU1YWFiYjBmNTc.<br>           CSeq: 1 REGISTER<br>           Contact:<br>           &lt;sip:1000@172.30.140.22:48752;rinstance=fcade2df86ce0ab8&gt;;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> &lt;mailto:<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>&gt; 
<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 &quot;know-how&quot;</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>