[SR-Users] accounting and db_redis

Daniel Tryba d.tryba at pocos.nl
Wed Mar 27 14:42:18 CET 2019


Under
https://www.kamailio.org/docs/modules/5.2.x/modules/db_redis.html#db_redis.sec.usage
there is an example for using db_redis for accounting. This doesn't
appear to work (5.2.2)
modparam("db_redis", "keys", "acc=entry:callid,time_hires&cid:callid")

results in:
db_redis [redis_dbase.c:1886]: db_redis_insert(): inserting to prefix (table) 'acc'
db_redis [redis_dbase.c:382]: db_redis_build_entry_keys(): build entry keys
db_redis [redis_dbase.c:295]: db_redis_find_query_key(): checking for existence of ent
db_redis [redis_dbase.c:306]: db_redis_find_query_key(): found key in entry key
db_redis [redis_dbase.c:133]: db_redis_val2str(): converting str value '1db9c0bc57291e
db_redis [redis_dbase.c:338]: db_redis_find_query_key(): entry key so far is 'acc:entr
db_redis [redis_dbase.c:295]: db_redis_find_query_key(): checking for existence of entry key 'time_hires' in query
db_redis [redis_dbase.c:346]: db_redis_find_query_key(): key 'time_hires' for type 'entry' not found, unable to use this type
db_redis [redis_dbase.c:405]: db_redis_build_entry_keys(): Failed to create direct entry key, no matching key definition
db_redis [redis_dbase.c:1892]: db_redis_insert(): failed to build entry keys
db_redis [redis_dbase.c:1976]: db_redis_insert(): failed to do the insert

What does work is "time" instead of "time_hires". Since I have no idea
what values are available (I guess the table names?) and time only has a
1 sec resolution, what is a correct version of time_hires?



More information about the sr-users mailing list