No subject


Wed Jun 24 00:39:36 CEST 2009


memory.(corect me if I'm wrong). I'm starting kamailio with private
memory 256 and shared memory 2048.<br>
  <br>
I also did and some fine tuning in mysql server(local):<br>
  <br>
query_cache_type =3D 1<br>
query_cache_limit =3D 1024M<br>
query_cache_size =3D 1024M<br>
key_buffer =3D 64M<br>
table_cache=A0 =3D 1024<br>
sort_buffer=3D4M<br>
read_buffer_size=3D1M<br>
max_allowed_packet=A0=A0=A0=A0=A0 =3D 1536M<br>
thread_stack=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D 128K<br>
thread_cache_size=A0=A0=A0=A0=A0=A0 =3D 8<br>
And i cached the table by running to the server the command SELECT
SQL_CACHE=A0 * from htable;<br>
  <br>
After this fine tuning I don&#39;t get any error when I run kamailio BUT
when I try to receive any vaule from the htable I get NULL back.(this
configuration work&#39;s when i have a few values only in the htable)<br>
  <br>
Now the question is does private memory is involve in this? Is an
memory issue or something else?<br>
</blockquote>
<br></div>
Private memory is involved only when data is loaded from mysql, after
that is moved in shared memory.<br>
<br>
There is an MI command that can dump the content of a hash table (you
can use kamctl for that) to check if there are some values in it.<br>
<br>
Since you have a lot of records, make sure the size of htable is big
(14 is max and recommended).<br>
<br>
Cheers,<br><font color=3D"#888888">
Daniel</font><div><div></div><div class=3D"h5"><br>
<br>
<br>
<blockquote type=3D"cite"><br>
Thank you for your help<br>
Best wishes<br>
  <br>
Peace!<br>
Alex<br>
  <br>
  <br>
  <br>
  <br>
  <div class=3D"gmail_quote">On Thu, Dec 24, 2009 at 7:31 PM,
Daniel-Constantin Mierla <span dir=3D"ltr">&lt;<a href=3D"mailto:miconda at gm=
ail.com" target=3D"_blank">miconda at gmail.com</a>&gt;</span> wrote:<br>
  <blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204=
, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div text=3D"#000000" bgcolor=3D"#ffffff">
Hi Alex,
    <div><br>
    <br>
On 12/24/09 6:18 PM, alex pappas wrote:
    <blockquote type=3D"cite">Daniel,<br>
      <br>
The reason that I was NOT understanding how to implement the htable is
that even I read the all internet ;-) I did not see the already setup
table Htable in my mysql server which was already made from the
installation and=A0 that&#39;s why the value type=A0 and key types did not =
make
sense!! now i fill a bit stupid :-(<br>
      <br>
I apologize for stilling you time.<br>
    </blockquote>
    </div>
no need for that! If I have no time I do not answer. Sometime even
obvious things are not seen, happens to me, this is life ...<br>
    <br>
Merry Christmas!<br>
    <font color=3D"#888888">Daniel<br>
    </font><br>
PS. or do you celebrate Christmas in January, using the old calendar
date?
    <div>
    <div><br>
    <br>
    <blockquote type=3D"cite"><br>
Cheers<br>
Alex<br>
      <br>
      <br>
      <br>
      <div class=3D"gmail_quote">On Thu, Dec 24, 2009 at 4:36 PM, alex
pappas <span dir=3D"ltr">&lt;<a href=3D"mailto:rebel.pappas at gmail.com" targ=
et=3D"_blank">rebel.pappas at gmail.com</a>&gt;</span>
wrote:<br>
      <blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb=
(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thank
you
Daniel,<br>
        <br>
Cheers<br>
        <font color=3D"#888888">Alex</font>
        <div>
        <div><br>
        <br>
        <div class=3D"gmail_quote">On Thu, Dec 24, 2009 at 4:05 PM,
Daniel-Constantin Mierla <span dir=3D"ltr">&lt;<a href=3D"mailto:miconda at gm=
ail.com" target=3D"_blank">miconda at gmail.com</a>&gt;</span>
wrote:<br>
        <blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid r=
gb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
          <div text=3D"#000000" bgcolor=3D"#ffffff">Hi Alex,<br>
          <br>
the default table structure for htable is defined by sql:<br>
          <br>
CREATE TABLE htable (<br>
=A0=A0=A0 id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,<br>
=A0=A0=A0 key_name VARCHAR(64) DEFAULT &#39;&#39; NOT NULL,<br>
=A0=A0=A0 key_type INT DEFAULT 0 NOT NULL,<br>
=A0=A0=A0 value_type INT DEFAULT 0 NOT NULL,<br>
=A0=A0=A0 key_value VARCHAR(128) DEFAULT &#39;&#39; NOT NULL<br>
) ENGINE=3DMyISAM;<br>
          <br>
If you map over another table, then you must have at least four columns
there (id is for generic purpose). See here descriptions of the columns:<br=
>
          <a href=3D"http://kamailio.org/docs/modules/3.0.x/modules_k/htabl=
e.html#id2529061" target=3D"_blank">http://kamailio.org/docs/modules/3.0.x/=
modules_k/htable.html#id2529061</a><br>
          <br>
Cheers,<br>
          <font color=3D"#888888">Daniel</font>
          <div>
          <div><br>
          <br>
On 12/23/09 6:13 PM, alex pappas wrote:
          <blockquote type=3D"cite">Hi Daniel,<br>
            <br>
My problem is how to define the hash table in Kamailio.cfg. Especially
I don&#39;t understand how to define :<br>
            <h3><code>key_name_column: here I
understand that is the name of the key =3D fist col (phonenumber)<br>
            </code></h3>
            <h3><code>key_type_column =3D=3D string ?<br>
            </code></h3>
            <h3><code>value_type_column =3D=3D string ?<br>
            </code></h3>
            <h3><code>key_value_column =3D=3D second
col(prefix)?<br>
            </code></h3>
=A0<br>
            <br>
I get the following errors:<br>
            <br>
ERROR:db_mysql:db_mysql_submit_query: driver error on query: Unknown
column &#39;key_type&#39; in &#39;field list&#39;<br>
ERROR:core:db_do_query: error while submitting query<br>
ERROR:htable:ht_db_load_table: Error while querying db<br>
ERROR:core:init_mod: failed to initialize module htable<br>
ERROR:core:main: error while initializing modules<br>
            <br>
Thank you <br>
            <br>
Alex<br>
            <br>
            <br>
            <br>
            <div class=3D"gmail_quote">On Wed, Dec 23, 2009 at 6:43 PM,
Daniel-Constantin Mierla <span dir=3D"ltr">&lt;<a href=3D"mailto:miconda at gm=
ail.com" target=3D"_blank">miconda at gmail.com</a>&gt;</span>
wrote:<br>
            <blockquote class=3D"gmail_quote" style=3D"border-left: 1px sol=
id rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
              <div text=3D"#000000" bgcolor=3D"#ffffff">Hello,
              <div><br>
              <br>
On 12/23/09 4:28 PM, alex pappas wrote: </div>
              <blockquote type=3D"cite">Hi all,<br>
                <br>
                <div>It is possible to have some help in defining the
hash table?<br>
                <br>
I&#39;m giving some parameters but some of them i don&#39;t really understa=
nd
them. my configuration is:<br>
                <br>
# --------- Htable ---------<br>
modparam(&quot;htable&quot;, &quot;htable&quot;, &quot;a=3D&gt;dbtable=3Dpo=
rted1;&quot;)<br>
modparam(&quot;htable&quot;, &quot;db_url&quot;,
&quot;mysql://pskoul:pskoul123@localhost/openser&quot;)<br>
modparam(&quot;htable&quot;, &quot;key_name_column&quot;, &quot;phonenumber=
&quot;)<br>
modparam(&quot;htable&quot;, &quot;key_value&quot;, &quot;prefix&quot;)<br>
modparam(&quot;htable&quot;, &quot;fetch_rows&quot;, 1000)<br>
                <br>
The table I want to htable is a 2 cols table (phonenumber,prefix) In
mysql they are defined as varchar(10). All the phonenumber values are
unique so the key in htable is phonenumber with value in prefix.<br>
                </div>
              </blockquote>
              <br>
what don&#39;t you understand? I do not know what to explain. Is there any
error you get? At least the parameter key_value is wrong, should be
key_value_column.<br>
              <br>
Cheers,<br>
              <font color=3D"#888888">Daniel</font>
              <div>
              <div><br>
              <br>
              <blockquote type=3D"cite"><br>
Thanks All,<br>
                <br>
Alex<br>
                <br>
                <br>
                <br>
                <div class=3D"gmail_quote">On Wed, Dec 23, 2009 at 1:04
PM,
alex
pappas <span dir=3D"ltr">&lt;<a href=3D"mailto:rebel.pappas at gmail.com" targ=
et=3D"_blank">rebel.pappas at gmail.com</a>&gt;</span>
wrote:<br>
                <blockquote class=3D"gmail_quote" style=3D"border-left: 1px=
 solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">T=
hank
you
Daniel,<br>
                  <br>
I will try first oracle db and then htable which is also very
interesting. When I&#39;m done I will get back with the results.<br>
                  <br>
Cheers<br>
                  <font color=3D"#888888">Alex</font>
                  <div>
                  <div><br>
                  <br>
                  <br>
                  <br>
                  <div class=3D"gmail_quote">On Wed, Dec 23, 2009 at
11:44
AM,
Daniel-Constantin Mierla <span dir=3D"ltr">&lt;<a href=3D"mailto:miconda at gm=
ail.com" target=3D"_blank">miconda at gmail.com</a>&gt;</span>
wrote:<br>
                  <blockquote class=3D"gmail_quote" style=3D"border-left: 1=
px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"=
>
                    <div text=3D"#000000" bgcolor=3D"#ffffff">Hello,
                    <div><br>
                    <br>
On 12/22/09 1:25 PM, alex pappas wrote:
                    <blockquote type=3D"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=A0 Kamailio script?<br>
                    </blockquote>
                    <br>
                    </div>
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 type=3D"cite">
                      <div>
                      <div><br>
=A0Cheers<br>
Alex<br>
                      <br>
                      <br>
                      <br>
                      <div class=3D"gmail_quote">On Tue, Dec 22, 2009 at
12:56 AM,
Henning
Westerholt <span dir=3D"ltr">&lt;<a href=3D"mailto:henning.westerholt at 1und1=
.de" target=3D"_blank">henning.westerholt at 1und1.de</a>&gt;</span>
wrote:<br>
                      <blockquote class=3D"gmail_quote" style=3D"border-lef=
t: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1=
ex;">On
Mon,
December
21,
2009
9:50 pm, Alex Balashov wrote:<br>
&gt; [..]<br>
                        <div>&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. =A0This 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. =A0I 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. =A0It 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? =A0In 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? =A0I 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 href=3D"http://sip-router.org/wiki/devel/xavp" t=
arget=3D"_blank">http://sip-router.org/wiki/devel/xavp</a><br>
                        <br>
Regards,<br>
                        <font color=3D"#888888"><br>
Henning<br>
                        <br>
                        </font></blockquote>
                      </div>
                      <br>
                      </div>
                      </div>
                      <pre><fieldset></fieldset>
_______________________________________________
Kamailio (OpenSER) - Users mailing list
<div><a href=3D"mailto:Users at lists.kamailio.org" target=3D"_blank">Users at li=
sts.kamailio.org</a>
<a href=3D"http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target=
=3D"_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a>
<a href=3D"http://lists.openser-project.org/cgi-bin/mailman/listinfo/users"=
 target=3D"_blank">http://lists.openser-project.org/cgi-bin/mailman/listinf=
o/users</a></div></pre>
                    </blockquote>
                    <br>
                    <div>
                    <pre cols=3D"72">--=20
Daniel-Constantin Mierla
* <a href=3D"http://www.asipto.com/" target=3D"_blank">http://www.asipto.co=
m/</a>
      </pre>
                    </div>
                    </div>
                  </blockquote>
                  </div>
                  <br>
                  </div>
                  </div>
                </blockquote>
                </div>
                <br>
                <pre><fieldset></fieldset>
_______________________________________________
Kamailio (OpenSER) - Users mailing list
<a href=3D"mailto:Users at lists.kamailio.org" target=3D"_blank">Users at lists.k=
amailio.org</a>
<a href=3D"http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target=
=3D"_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a>
<a href=3D"http://lists.openser-project.org/cgi-bin/mailman/listinfo/users"=
 target=3D"_blank">http://lists.openser-project.org/cgi-bin/mailman/listinf=
o/users</a></pre>
              </blockquote>
              <br>
              <pre cols=3D"72">--=20
Daniel-Constantin Mierla
* <a href=3D"http://www.asipto.com/" target=3D"_blank">http://www.asipto.co=
m/</a>
    </pre>
              </div>
              </div>
              </div>
            </blockquote>
            </div>
            <br>
            <input type=3D"hidden"><input type=3D"hidden">
            <pre><fieldset></fieldset>
_______________________________________________
Kamailio (OpenSER) - Users mailing list
<a href=3D"mailto:Users at lists.kamailio.org" target=3D"_blank">Users at lists.k=
amailio.org</a>
<a href=3D"http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target=
=3D"_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a>
<a href=3D"http://lists.openser-project.org/cgi-bin/mailman/listinfo/users"=
 target=3D"_blank">http://lists.openser-project.org/cgi-bin/mailman/listinf=
o/users</a></pre>
          </blockquote>
          <br>
          <pre cols=3D"72">--=20
Daniel-Constantin Mierla
* <a href=3D"http://www.asipto.com/" target=3D"_blank">http://www.asipto.co=
m/</a>
      </pre>
          </div>
          </div>
          </div>
        </blockquote>
        </div>
        <br>
        </div>
        </div>
      </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
    <pre cols=3D"72">--=20
Daniel-Constantin Mierla
* <a href=3D"http://www.asipto.com/" target=3D"_blank">http://www.asipto.co=
m/</a>
    </pre>
    </div>
    </div>
    </div>
  </blockquote>
  </div>
  <br>
  <pre><fieldset></fieldset>
_______________________________________________
Kamailio (OpenSER) - Users mailing list
<a href=3D"mailto:Users at lists.kamailio.org" target=3D"_blank">Users at lists.k=
amailio.org</a>
<a href=3D"http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target=
=3D"_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a>
<a href=3D"http://lists.openser-project.org/cgi-bin/mailman/listinfo/users"=
 target=3D"_blank">http://lists.openser-project.org/cgi-bin/mailman/listinf=
o/users</a></pre>
</blockquote>
<br>
<pre cols=3D"72">--=20
Daniel-Constantin Mierla
* <a href=3D"http://www.asipto.com/" target=3D"_blank">http://www.asipto.co=
m/</a>
</pre>
</div></div></div>

</blockquote></div><br>

--0003255550cea33fd4047bf377ba--



More information about the Users mailing list