<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello Andreas,<br>
<br>
<br>
Congratulations for adding db_redis, which I find a very interesting
and useful module.<br>
<br>
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).<br>
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.<br>
I guess I have made some wrong configurations? The REGISTER/INVITE
scenario works fine for you with only the upmentioned changes to the
config?<br>
<br>
<br>
My <b>config</b> contains:<br>
<br>
loadmodule "db_redis.so"<br>
#!define DBURL_USRLOC "redis://127.0.0.1:6379/5"<br>
#!define DBURL_ACC "redis://127.0.0.1:6379/6"<br>
#!define DBURL_AUTH "redis://127.0.0.1:6379/7"<br>
<br>
modparam("db_redis", "schema_path",
"/home/XXX/utils/kamctl/db_redis/kamailio")<br>
modparam("db_redis", "keys",
"location=entry:ruid&usrdom:username,domain&timer:partition,keepalive")<br>
modparam("db_redis", "keys",
"acc=entry:callid,time_hires&<a class="moz-txt-link-freetext" href="cid:callid">cid:callid</a>")<br>
modparam("db_redis", "keys", "subscriber=entry:username,domain")<br>
<br>
modparam("usrloc", "db_mode", 3)<br>
modparam("usrloc", "use_domain", MULTIDOMAIN)<br>
modparam("usrloc", "db_url", DBURL_USRLOC)<br>
<br>
The lookup("location") leads to this <b>log</b>:<br>
<br>
<i>1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:1683]: db_redis_query(): querying prefix (table)
'location'</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:508]: db_redis_build_query_keys(): build query keys</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:281]: db_redis_find_query_key(): checking for
existence of entry key 'ruid' in query</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 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</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:534]: db_redis_build_query_keys(): no direct entry
key found, checking type keys</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:537]: db_redis_build_query_keys(): checking type
'usrdom'</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:281]: db_redis_find_query_key(): checking for
existence of entry key 'username' in query</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:291]: db_redis_find_query_key(): found key in entry
key</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:119]: db_redis_val2str(): converting str value '33'
with len 2 to str</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:323]: db_redis_find_query_key(): entry key so far
is 'location:usrdom::33'</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:281]: db_redis_find_query_key(): checking for
existence of entry key 'domain' in query</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 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</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:537]: db_redis_build_query_keys(): checking type
'timer'</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:281]: db_redis_find_query_key(): checking for
existence of entry key 'partition' in query</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 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</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:1726]: db_redis_query(): unable to build query
keys, falling back to full table scan</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:1741]: db_redis_query(): done performing query</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: usrloc
[udomain.c:645]: db_load_urecord(): aor 33 not found in table
location</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: db_redis
[redis_dbase.c:2145]: db_redis_free_result(): perform redis free
result</i><i><br>
</i><i>{1 1 INVITE <a class="moz-txt-link-abbreviated" href="mailto:1-23806@127.0.1.1">1-23806@127.0.1.1</a>} 0(23787) DEBUG: registrar
[lookup.c:233]: lookup_helper(): '33' Not found in usrloc</i><i><br>
</i><br>
<br>
Any input is appreciated.<br>
<br>
Many thanks,<br>
Lucian Balaceanu<br>
<br>
<br>
<br>
</body>
</html>