Hello,
at this moment there is no db_redis module in Kamailio, some people are
working on it:
-
https://github.com/kamailio/kamailio/issues/1137
ndb_redis cannot be used as a db driver, in the way you try. If you need
to fetch the password for authentication from redis, then use ndb_redis
to get it and auth module to do authentication -- see pv_auth_check(...)
functions.
Cheers,
Daniel
On 31.05.17 18:19, Marko Tirs wrote:
Hi all,
I'm trying to use the Redis database for authentication and later for
accounting. I installed Redis on the server, I compiled Kamailio with
ndb_redis and the module exists.
When I try to start Kamailio I get following errors:
0(16737) ERROR: <core> [db.c:203]: db_bind_mod(): Module db_redis not
found. Missing loadmodule?
0(16737) ERROR: auth_db [auth_db_mod.c:175]: mod_init(): unable to
bind to a database driver
0(16737) ERROR: <core> [core/sr_module.c:968]: init_mod(): Error
while initializing module auth_db
(/usr/local/lib64/kamailio/modules/auth_db.so)
ERROR: error while initializing modules
Bellow are the relevant parts from config files.
Is there any example of kamailio.cfg with Redis configuration and
commands for authentication and accounting?
Please help me to use Kamailio with Redis.
Thank you
Regards
Marko
kamctlrc
---------
DBENGINE=DBTEXT
kamailio.cfg
-------------
#!define WITH_REDIS
#!define WITH_AUTH
#!ifdef WITH_REDIS
#!define DBURL "redis://localhost:6379/"
#!endif
#!ifdef WITH_AUTH
loadmodule "auth.so"
loadmodule "auth_db.so"
#!endif
#!ifdef WITH_REDIS
loadmodule "ndb_redis.so"
#!endif
# ----- ndb_redis params -----
modparam("ndb_redis", "server",
"name=srv1;addr=127.0.0.1;port=6379;db=1")
# ----- auth_db params -----
#!ifdef WITH_AUTH
modparam("auth_db", "db_url", DBURL)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "load_credentials", "")
modparam("auth_db", "use_domain", MULTIDOMAIN)
#!endif
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virenfrei.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio Advanced Training -
www.asipto.com
Kamailio World Conference -
www.kamailioworld.com