<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi, all.</p>
    <p>I'm trying to separate registrar and proxy functions between
      several hosts. Registrations successfully  saves at registrar, but
      sip proxy could not find record when trying to lookup at
      "location" table on INVITE. I can't see any querys to my DB from
      proxy.</p>
    <p><b>registrar conf:</b></p>
    <p>loadmodule
"usrloc.so"                                                                                                                                                                           
      <br>
      modparam("usrloc", "db_url",
<a class="moz-txt-link-rfc2396E" href="mailto:mysql://opensips:open_sips@db1.example.com/opensips">"mysql://opensips:open_sips@db1.example.com/opensips"</a>)                                                                                                                 
      <br>
      modparam("usrloc", "db_mode",
2)                                                                                                                                                                 
      <br>
    </p>
    <p>if
(!save("location","f"))                                                                                                                                                                   
      <br>
          sl_reply_error();    <i> </i>                                                                                                                                                                   
      <br>
    </p>
    <p><b>proxy conf:</b></p>
    <p>loadmodule
"usrloc.so"                                                                                                                                                                           
      <br>
      modparam("usrloc", "db_url",
<a class="moz-txt-link-rfc2396E" href="mailto:mysql://opensips:open_sips@db1.example.com/opensips">"mysql://opensips:open_sips@db1.example.com/opensips"</a>)                                                                                                                 
      <br>
      modparam("usrloc", "db_mode", 2)      <br>
    </p>
    <p>route[location]
{                                                                                                                                                                                
      <br>
          xlog("L_INFO","Lookup for
$ru");                                                                                                                                                             
      <br>
         
lookup("location");                                                                                                                                                                          
      <br>
          switch($retcode)
{                                                                                                                                                                           
      <br>
              case -1: <br>
    </p>
    <p>        case
-3:                                                                                                                                                                                 
      <br>
                   sl_send_reply("404","Not found");</p>
    <p>             exit;</p>
    <p>        case -2:</p>
    <p>            sl_send_reply("405","Not found");</p>
    <p>            exit;</p>
    <p>     };</p>
    <p>}     <i>      </i>                                                                                                                                               
      <br>
                                                                                          
      <br>
    </p>
    <pre class="moz-signature" cols="72">-- 
____________
Best regards,
Igor Pavlov</pre>
  </body>
</html>