<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hi,<br>
<br>
On 10/14/2010 04:26 PM, Javier Gallart wrote:
<blockquote
cite="mid:AANLkTi==ZOcTj-RkpfhYW86gNC7Wh==4EO8ExDL7YNFb@mail.gmail.com"
type="cite">Hi all
<div><br>
</div>
<div>I'm testing the htable module at Kamailio 3.1. Currently it's an
extremely simple table with a single row loaded from a postgres DB.</div>
<div>These are the relevant lines in the configuration file:</div>
<div><br>
</div>
<div>
<div>modparam("htable", "db_url",
"postgres://user:password@localhost:5432/database")</div>
<div>modparam("htable", "htable",
"a=>size=2;autoexpire=0;dbtable=h_table;")</div>
<div>modparam("htable", "key_name_column", "key_name")</div>
<div>modparam("htable", "key_type_column", "key_type")</div>
<div>modparam("htable", "value_type_column", "value_type")</div>
<div>modparam("htable", "key_value_column", "key_value")</div>
</div>
<div><br>
</div>
<div>The only line in the table is:</div>
<div><br>
</div>
<div>
<div> key_name | key_value | key_type | value_type </div>
<div>----------+-----------+----------+------------</div>
<div> 5 | 1 | 1 | 0</div>
</div>
</blockquote>
<br>
do you want to store the value in an array-like format? I see you have
key_type=1<br>
<br>
<br>
For key_type 1 the key name in htable should be 5[0] and another item
with key 5::size should be there, but sht_print() does not show it.<br>
<br>
Are you sure this is the record you had in database? I tested with same
record but with mysql and it looks ok in sht_print().<br>
<br>
Regards,<br>
Ramona<br>
<br>
<blockquote
cite="mid:AANLkTi==ZOcTj-RkpfhYW86gNC7Wh==4EO8ExDL7YNFb@mail.gmail.com"
type="cite">
<div><br>
</div>
<div>However, sht_print() shows this:</div>
<div><br>
</div>
<div>
<div> 0(8570) ERROR: htable [ht_api.c:488]: ===== htable[a] hid: 109
exp: 0></div>
<div> 0(8570) ERROR: htable [ht_api.c:492]: htable[0] -- <0></div>
<div> 0(8570) ERROR: htable [ht_api.c:492]: htable[1] -- <0></div>
<div> 0(8570) ERROR: htable [ht_api.c:492]: htable[2] -- <0></div>
<div> 0(8570) ERROR: htable [ht_api.c:492]: htable[3] -- <1></div>
<div> 0(8570) ERROR: htable [ht_api.c:496]: <span
class="Apple-tab-span" style="white-space: pre;"> </span>cell: 5</div>
<div> 0(8570) ERROR: htable [ht_api.c:498]: <span
class="Apple-tab-span" style="white-space: pre;"> </span>hid: 51
msize: 74 flags: 0 expire: 0</div>
<div> 0(8570) ERROR: htable [ht_api.c:502]: <span
class="Apple-tab-span" style="white-space: pre;"> </span>v-i:9585128</div>
</div>
<div><br>
</div>
<div>Any idea of what might be happening?</div>
<div><br>
</div>
<div>Thanks in advance.</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
</body>
</html>