[SR-Users] htable Arrays and dbmode 1

Sebastian Damm damm at sipgate.de
Fri Apr 28 15:15:54 CEST 2017


Hi,

I'm trying to use a htable array. For that, I have inserted some
values in the database (in pseudo CSV):

key_name; key_type; value_type; key_value
'1234567'; 1; 0; 'foo'
'1234567', 1, 0, 'bar'
'1234567', 1, 0, 'baz'

insert into htable (key_name , key_type , value_type , key_value )
values ('1234567', 1, 0, 'foo'),('1234567', 1, 0, 'bar'),('1234567',
1, 0, 'baz');

Now after just starting Kamailio, reading those values, from db and
then stopping Kamailio again, the table content looks like this:

key_name; key_type; value_type; key_value
'1234567[2]'; 0; 0; 'baz'
'1234567[0]', 0, 0, 'foo'
'1234567[1]', 0, 0, 'bar'
'1234567::size', 0, 1, 3

Is this how it is supposed to work? When re-reading those entries, the
htable contents look the same as during the first start, but in the
database it is a bit harder to read.


And while I'm at it: Is there a way to regularly write back the
current htable contents to the database? Or even to sync every write
directly into the database?

Thanks in advance
Sebastian



More information about the sr-users mailing list