<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Hi Rodrigo,<br>
<br>
What you try to do is not consistent.<br>
<br>
Either you use db_mode 1 to be have immediate writting in DB from
usrloc module (see
<a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.11.x/usrloc.html#id294459">http://www.opensips.org/html/docs/modules/1.11.x/usrloc.html#id294459</a>)
-> it will be safe to run your script query after the save().<br>
<br>
Either push the extra info you want to save into DB (and memory
cache) via the attr AVP (see
<a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id293909">http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id293909</a>)
and opensips will do everything for you.<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></pre>
<div class="moz-cite-prefix">On 09.06.2016 17:42, Rodrigo Pimenta
Carvalho wrote:<br>
</div>
<blockquote
cite="mid:BY2PR02MB1655F8E179884372D44BFC5EB55F0@BY2PR02MB1655.namprd02.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><span><br>
</span></p>
<p><span>Hi.</span></p>
<p><span><br>
</span></p>
<p><span>My script has the configuration: <br>
</span></p>
<p><span><br>
</span></p>
<p><span></span></p>
<div><span style="color: rgb(0, 111, 201);">modparam("usrloc",
"db_mode", 2)</span><br>
<span style="color: rgb(0, 111, 201);">modparam("usrloc",
"timer_interval",3)</span><br>
<br>
Always after receiving a new register in table location, I
must to execute a code like this:<br>
</div>
<br>
<p><span><span style="color: rgb(0, 111, 201);">avp_db_query("UPDATE
location...</span></span></p>
<p><br>
<span></span></p>
<p>That is, an update will complement data in the new register.<br>
<span></span></p>
<p><span><br>
</span></p>
<p><span></span>However, how could I immediately update table
location if data might be in
<span>memory cache</span> (RAM) for 3 seconds. It could fail
obviously.</p>
<p>The command avp_db_query UPDATE is acting over the database
on hard disc, not in
<span>obviously</span>.</p>
<p>So, is there a way to update table location even still in
cache (RAM)? If yes, when data from RAM is recorded into the
database, the register will already be updated.</p>
<p><br>
</p>
<p>Any hint will be very helpful!</p>
<p><br>
</p>
<p>Best regards.<br>
</p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper"
style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:; margin:0">
<div class="BodyFragment"><font size="2">
<div class="PlainText">RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: +55 35 3471 9200 RAMAL 979<br>
</div>
</font></div>
</div>
</div>
</div>
<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>