<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Ho Igor,<br>
<br>
Normally, in usrloc, the main data storage in the memory; the DB
is used only for flushing the memory, for restart persistence. So,
at runtime, OpenSIPS does not read from DB. The only db_mode where
OpenSIPS read from DB is 3 (DB_ONLY) where the memory caching is
disabled.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2017, Houston, US
<a class="moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2017.html">http://opensips.org/training/OpenSIPS_Bootcamp_2017.html</a>
</pre>
<div class="moz-cite-prefix">On 07/31/2017 07:32 AM, Igor Pavlov
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:6845f1a5-6b33-c8d3-e23a-3ceaff13815a@gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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"
moz-do-not-send="true">"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"
moz-do-not-send="true">"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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>