<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello, <br>
<br>
Just a quick note to say that I debugged the issue down to having
the MULTIDOMAIN set to 0 and as such most probably the
"&usrdom:username,domain" should have been in my case just
"&usrdom:username".<br>
Also if parsing of a field in redis comes out as having errors, just
tweak the type of value according to that field in the schema_path.
I had problems with usrloc's expires and last_modified which I
changed from "int" to "string".<br>
<br>
Thank you,<br>
Lucian<br>
<br>
<div class="moz-cite-prefix">On 22.02.2018 12:00, Lucian Balaceanu
wrote:<br>
</div>
<blockquote cite="mid:5A8E94A3.2030106@1and1.ro" type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
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
moz-do-not-send="true" 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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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>
</blockquote>
<br>
</body>
</html>