<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&#39;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&#39;ve added the following to the script to make it work: (but it doesn&#39;t)</font></div>
<div><font face="Verdana"></font> </div>
<div>...</div>
<div>loadmodule &quot;auth.so&quot;<br>loadmodule &quot;auth_db.so&quot;</div>
<div>...</div>
<div>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>...</div>

<div>        if (!(method==&quot;REGISTER&quot;) &amp;&amp; from_uri==myself) /*no multidomain 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 auth ID&quot;);<br>                        exit;<br>                }<br>
                consume_credentials();<br>        }<br>...</div>
<div><br>        if (is_method(&quot;REGISTER&quot;))<br>        {<br>                # authenticate the REGISTER requests (uncomment to enable 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 auth ID&quot;);<br>                        exit;<br>                }</div>
<div>                if (!save(&quot;location&quot;))<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> -&gt; <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: &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">sip:1000@172.30.140.8</a>&gt;<br>From: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@172.30.140.8">sip:1000@172.30.140.8</a>&gt;;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> -&gt; <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: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@172.30.140.8">sip:1000@172.30.140.8</a>&gt;;tag=c97b4d1cb1f3d0da549e06a8d482ef63.34dc<br>From: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@172.30.140.8">sip:1000@172.30.140.8</a>&gt;;tag=cd3e2323<br>
Call-ID: MmU0YjM1NThiNTg0ZjhiNGM4ODA4ZmU1YWFiYjBmNTc.<br>CSeq: 1 REGISTER<br>Contact: &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>
</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>