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