<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hello,<br>
<br>
On 12/22/09 1:25 PM, alex pappas wrote:
<blockquote
 cite="mid:88b5e74c0912220425y5fe355e5p2d2b3be7ee6f2d78@mail.gmail.com"
 type="cite">Hi all,<br>
  <br>
Concerning portability again :-)<br>
  <br>
Is there any way I can add in the memory all the numbers with
portability? (2.000.000 rows)?<br>
And also reload these data a few times a day and access this data from
the&nbsp; Kamailio script?<br>
</blockquote>
<br>
while I advise usage of sqlops/sql_query() instead of
avpops/avp_db_query(), if you want to load such data in memory should
be in shared memory. For that look at htable or maybe you can re-use
pdt.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote
 cite="mid:88b5e74c0912220425y5fe355e5p2d2b3be7ee6f2d78@mail.gmail.com"
 type="cite"><br>
&nbsp;Cheers<br>
Alex<br>
  <br>
  <br>
  <br>
  <div class="gmail_quote">On Tue, Dec 22, 2009 at 12:56 AM, Henning
Westerholt <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:henning.westerholt@1und1.de">henning.westerholt@1und1.de</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On
Mon, December 21, 2009 9:50 pm, Alex Balashov wrote:<br>
&gt; [..]<br>
    <div class="im">&gt; Having said that, AVPs are still very useful
and necessary because they<br>
&gt; persist across the lifetime of a transaction, so you can access
them in<br>
&gt; subsequent reply and failure routes. &nbsp;This is not true of user<br>
&gt; pseudovariables ($var(...)), nor, as far as I know, of any other
class<br>
&gt; of pseudovariable at this point except special
transaction-persistent<br>
&gt; ones exported by modules.<br>
&gt;<br>
&gt; As a result, it is often necessary for me to take data from $dbr<br>
&gt; (sqlops) and load it into arrays of AVPs, such as for example when
doing<br>
&gt; custom fail-over in failure_route that uses logic for which
dispatcher<br>
&gt; is not suitable. &nbsp;I store a set of gateways in an AVP array along
with<br>
&gt; another AVP value indicating the current array index and iterate
over<br>
&gt; them in failure_route, and so on.<br>
&gt;<br>
&gt; Daniel taught me how to use AVP arrays once, although I noticed
this is<br>
&gt; not mentioned anywhere in the avpops documentation. &nbsp;It should be<br>
&gt; published somewhere, as it is one of the most useful programmatic<br>
&gt; features of Kamailio.<br>
&gt;<br>
&gt; Henning/Daniel, does Kamailio 3/SR offer any kind of better
substitute<br>
&gt; for what I am doing with AVPs as described above? &nbsp;In other words,
are<br>
&gt; there any transaction-persistent pseudovariables and/or namespace<br>
&gt; containers that are easier to deal with syntactically, and provide
more<br>
&gt; advanced data structure primitives like arrays? &nbsp;I am aware of
htable,<br>
&gt; but I need something local to a transaction, not global.<br>
    <br>
    </div>
There are the $var PVs you already mentioned, and then also the $shv
that<br>
are shared variables. But they are (process) global, and not<br>
transactional. Daniel proposed and developed the new xavp type for sr<br>
which are basically extended AVPs. More informations can be found here:<br>
    <a moz-do-not-send="true"
 href="http://sip-router.org/wiki/devel/xavp" target="_blank">http://sip-router.org/wiki/devel/xavp</a><br>
    <br>
Regards,<br>
    <font color="#888888"><br>
Henning<br>
    <br>
    </font></blockquote>
  </div>
  <br>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Kamailio (OpenSER) - Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.kamailio.org">Users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a>
<a class="moz-txt-link-freetext" href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
* <a class="moz-txt-link-freetext" href="http://www.asipto.com/">http://www.asipto.com/</a>
</pre>
</body>
</html>