Hi Alex,<div><br></div><div>Kamailio seems to be completely ignoring the fact that auth and auth_db are loaded. the modules are loaded but when a call is placed it doesn&#39;t do any SQL queries (except for accounting) and the call is placed without being authenticated. </div>
<div><br></div><div>ROR: auth [challenge.c:283]: no authorized credentials found (error in scripts)</div><div><br></div><div><div>loadmodule &quot;auth.so&quot;</div><div>loadmodule &quot;auth_db.so&quot;</div><div><br></div>
<div><br></div><div><div># auth_db</div><div><br></div><div>modparam(&quot;auth_db&quot;, &quot;db_url&quot;, &quot;mysql://openser:xxxxxxxxx@localhost/openser&quot;)</div><div>modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, 1)</div>
<div>modparam(&quot;auth_db&quot;, &quot;password_column&quot;, &quot;password&quot;)</div><div>modparam(&quot;auth_db&quot;, &quot;load_credentials&quot;, &quot;$avp(s:rpid)=rpid&quot;)</div><div><br></div><div># auth</div>
<div><br></div><div>modparam(&quot;auth&quot;, &quot;rpid_avp&quot;, &quot;$avp(s:rpid)&quot;)</div><div>modparam(&quot;auth&quot;, &quot;rpid_prefix&quot;, &quot;&lt;sip:&quot;)</div><div>modparam(&quot;auth&quot;, &quot;rpid_suffix&quot;,&quot;@<a href="http://xxxxxx.ie">xxxxxx.ie</a>;party=calling;id-type=subscriber;privacy=off;screen=yes&gt;&quot;)</div>
<div><br></div><div><div>: DEBUG: &lt;core&gt; [sr_module.c:871]: DEBUG: init_mod: auth</div><div>: DEBUG: &lt;core&gt; [sr_module.c:871]: DEBUG: init_mod: auth_db</div><div>: DEBUG: &lt;core&gt; [sr_module.c:509]: find_export_record: found &lt;bind_auth&gt; in module auth [/lib/kamailio/modules_k/auth.so]</div>
<div>: DEBUG: &lt;core&gt; [route.c:911]: fixing proxy_authorize()</div><div>: DEBUG: &lt;core&gt; [route.c:911]: fixing www_authorize()</div><div>: DEBUG: &lt;core&gt; [route.c:911]: fixing proxy_authorize()</div><div>: DEBUG: &lt;core&gt; [sr_module.c:807]: DEBUG: init_mod_child (-127): auth_db</div>
<div>: DEBUG: &lt;core&gt; [sr_module.c:807]: DEBUG: init_mod_child (1): auth_db</div><div>: DEBUG: &lt;core&gt; [sr_module.c:807]: DEBUG: init_mod_child (2): auth_db</div><div>: DEBUG: &lt;core&gt; [sr_module.c:807]: DEBUG: init_mod_child (3): auth_db</div>
<div>: DEBUG: &lt;core&gt; [sr_module.c:807]: DEBUG: init_mod_child (4): auth_db</div><div>: DEBUG: &lt;core&gt; [sr_module.c:807]: DEBUG: init_mod_child (5): auth_db</div><div>: DEBUG: &lt;core&gt; [sr_module.c:807]: DEBUG: init_mod_child (6): auth_db</div>
<div>: DEBUG: &lt;core&gt; [sr_module.c:807]: DEBUG: init_mod_child (7): auth_db</div><div>: DEBUG: &lt;core&gt; [sr_module.c:807]: DEBUG: init_mod_child (8): auth_db</div><div>: DEBUG: &lt;core&gt; [sr_module.c:807]: DEBUG: init_mod_child (9): auth_db</div>
<div>: DEBUG: &lt;core&gt; [sr_module.c:807]: DEBUG: init_mod_child (-1): auth_db</div><div>: DEBUG: &lt;core&gt; [sr_module.c:807]: DEBUG: init_mod_child (-1): auth_db</div><div>: DEBUG: &lt;core&gt; [sr_module.c:807]: DEBUG: init_mod_child (10): auth_db</div>
<div>: DEBUG: &lt;core&gt; [sr_module.c:807]: DEBUG: init_mod_child (0): auth_db</div><div><br></div></div><div><br></div></div></div><div>I have #!kamailio at the start of the config. Am I missing something really obvious? Maybe there is much more for config compat. from 1.x.x to 3.0.x</div>
<div><br></div><div>Stephen</div><div><br></div><div><br></div><div><br><div class="gmail_quote">On 25 March 2010 22:11, Alex Balashov <span dir="ltr">&lt;<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Is the type of the &#39;rpid&#39; column &#39;varchar&#39;?<br>
<br>
Odd data type incompatibility or client library version incompatibility might explain it.  I agree that it is bizarre.<br>
<br>
Perhaps it would behoove you to turn on query logging on MySQL and verify that the &#39;rpid&#39; column is actually being selected in the query.<br>
<br>
The only other thing I can think of would relate to one of the various db_mode settings involved.<div class="im"><br>
<br>
On 03/25/2010 06:08 PM, dotnetdub wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Hi Alex,<br>
<br>
I modified the script, same result. sip[8892]: INFO: &lt;script&gt;: [ROUTE-4<br>
-&gt;] rpid test: &lt;null&gt; and the rpid is not being added.<br>
<br>
Very odd..<br>
<br>
Stephen.<br>
<br>
On 25 March 2010 21:57, Alex Balashov &lt;<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a><br></div><div><div></div><div class="h5">
&lt;mailto:<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>&gt;&gt; wrote:<br>
<br>
    On 03/25/2010 05:53 PM, dotnetdub wrote:<br>
<br>
        Attached:<br>
<br>
            if(is_uri_host_local()) {<br>
                         if(!allow_trusted()) {<br>
                                 if(!proxy_authorize(&quot;&quot;, &quot;subscriber&quot;)) {<br>
                                         proxy_challenge(&quot;&quot;, &quot;1&quot;);<br>
                                         exit;<br>
                                 }<br>
<br>
                                 else if(!check_from()) {<br>
                                         sl_send_reply(&quot;403&quot;, &quot;Forbidden&quot;);<br>
                                         exit;<br>
                                 }<br>
                         }<br>
<br>
                         else {<br>
                                 sl_send_reply(&quot;403&quot;, &quot;Forbidden&quot;);<br>
                                 exit;<br>
                         }<br>
                 }<br>
<br>
                 append_rpid_hf();<br>
<br>
                 consume_credentials();<br>
<br>
<br>
    There is no guarantee that either append_rpid_hf() or<br>
    consume_credentials() runs if and only if proxy_authorize() was called.<br>
<br>
    Also, it is not clear why check_from() is at a relationship of<br>
    logical disjunction vis-a-vis to proxy_authorize().  While not<br>
    incorrect, it obfuscates the flow.<br>
<br>
    Try this and see if the problem continues:<br>
<br>
<br>
       if(is_uri_host_local()) {<br>
<br>
                    if(!allow_trusted()) {<br>
<br>
                            if(!proxy_authorize(&quot;&quot;, &quot;subscriber&quot;)) {<br>
                                    proxy_challenge(&quot;&quot;, &quot;1&quot;);<br>
                                    exit;<br>
                            }<br>
<br>
                            if(!check_from()) {<br>
                                    sl_send_reply(&quot;403&quot;, &quot;Forbidden&quot;);<br>
                                    exit;<br>
                            }<br>
<br>
                            append_rpid_hf();<br>
                            consume_credentials();<br>
                    }<br>
<br>
                    else {<br>
                            sl_send_reply(&quot;403&quot;, &quot;Forbidden&quot;);<br>
                            exit;<br>
                    }<br>
            }<br>
<br>
    --<br>
    Alex Balashov - Principal<br>
    Evariste Systems LLC<br>
<br>
    Tel    : +1 678-954-0670<br>
    Direct : +1 678-954-0671<br>
    Web    : <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a><br>
<br>
<br>
</div></div></blockquote><div><div></div><div class="h5">
<br>
<br>
-- <br>
Alex Balashov - Principal<br>
Evariste Systems LLC<br>
<br>
Tel    : +1 678-954-0670<br>
Direct : +1 678-954-0671<br>
Web    : <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a><br>
</div></div></blockquote></div><br></div>