Hello Andreas,

Congratulations for adding db_redis, which I find a very interesting and useful module.

I know it is not yet in its final form, but I have tried to make a REGISTER/INVITE save()/lookup() scenario by adding the db_redis snippets from the README in the default Kamailio configuration (usrloc db_mode=3). The save() succeeds, but only a "location:entry::uloc-5a8d7eb2-6bd1-1" hash and a "location:timer::0:0" set are created (I seem to miss the location:usrdom). Besides this, the lookup("location") fails. I guess I have made some wrong configurations? The REGISTER/INVITE scenario works fine for you with only the upmentioned changes to the config?


My *config* contains:

loadmodule "db_redis.so"
#!define DBURL_USRLOC "redis://127.0.0.1:6379/5"
#!define DBURL_ACC    "redis://127.0.0.1:6379/6"
#!define DBURL_AUTH   "redis://127.0.0.1:6379/7"

modparam("db_redis", "schema_path", "/home/XXX/utils/kamctl/db_redis/kamailio") modparam("db_redis", "keys", "location=entry:ruid&usrdom:username,domain&timer:partition,keepalive")
modparam("db_redis", "keys", "acc=entry:callid,time_hires&cid:callid")
modparam("db_redis", "keys", "subscriber=entry:username,domain")

modparam("usrloc", "db_mode", 3)
modparam("usrloc", "use_domain", MULTIDOMAIN)
modparam("usrloc", "db_url", DBURL_USRLOC)

The lookup("location") leads to this *log*:

/1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:1683]: db_redis_query(): querying prefix (table) 'location'// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:508]: db_redis_build_query_keys(): build query keys// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:281]: db_redis_find_query_key(): checking for existence of entry key 'ruid' in query// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:332]: db_redis_find_query_key(): key 'ruid' for type 'entry' not found, unable to use this type// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:534]: db_redis_build_query_keys(): no direct entry key found, checking type keys// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:537]: db_redis_build_query_keys(): checking type 'usrdom'// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:281]: db_redis_find_query_key(): checking for existence of entry key 'username' in query// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:291]: db_redis_find_query_key(): found key in entry key// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:119]: db_redis_val2str(): converting str value '33' with len 2 to str// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:323]: db_redis_find_query_key(): entry key so far is 'location:usrdom::33'// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:281]: db_redis_find_query_key(): checking for existence of entry key 'domain' in query// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:332]: db_redis_find_query_key(): key 'domain' for type 'usrdom' not found, unable to use this type// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:537]: db_redis_build_query_keys(): checking type 'timer'// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:281]: db_redis_find_query_key(): checking for existence of entry key 'partition' in query// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:332]: db_redis_find_query_key(): key 'partition' for type 'timer' not found, unable to use this type// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:1726]: db_redis_query(): unable to build query keys, falling back to full table scan// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:1741]: db_redis_query(): done performing query// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: usrloc [udomain.c:645]: db_load_urecord(): aor 33 not found in table location// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: db_redis [redis_dbase.c:2145]: db_redis_free_result(): perform redis free result// //{1 1 INVITE 1-23806@127.0.1.1} 0(23787) DEBUG: registrar [lookup.c:233]: lookup_helper(): '33' Not found in usrloc//
/

Any input is appreciated.

Many thanks,
Lucian Balaceanu



_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to