Hi,

On 10/14/2010 04:26 PM, Javier Gallart wrote:
Hi all

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.
These are the relevant lines in the configuration file:

modparam("htable", "db_url", "postgres://user:passw...@localhost:5432/database")
modparam("htable", "htable", "a=>size=2;autoexpire=0;dbtable=h_table;")
modparam("htable", "key_name_column", "key_name")
modparam("htable", "key_type_column", "key_type")
modparam("htable", "value_type_column", "value_type")
modparam("htable", "key_value_column", "key_value")

The only line in the table is:

 key_name | key_value | key_type | value_type
----------+-----------+----------+------------
 5        | 1         | 1        | 0

do you want to store the value in an array-like format? I see you have key_type=1


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.

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().

Regards,
Ramona


However, sht_print() shows this:

 0(8570) ERROR: htable [ht_api.c:488]: ===== htable[a] hid: 109 exp: 0>
 0(8570) ERROR: htable [ht_api.c:492]: htable[0] -- <0>
 0(8570) ERROR: htable [ht_api.c:492]: htable[1] -- <0>
 0(8570) ERROR: htable [ht_api.c:492]: htable[2] -- <0>
 0(8570) ERROR: htable [ht_api.c:492]: htable[3] -- <1>
 0(8570) ERROR: htable [ht_api.c:496]: cell: 5
0(8570) ERROR: htable [ht_api.c:498]: hid: 51 msize: 74 flags: 0 expire: 0
 0(8570) ERROR: htable [ht_api.c:502]: v-i:9585128

Any idea of what might be happening?

Thanks in advance.




_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to