[SR-Users] REDIS load problem - Kamailio 5.0.1 - db_redis not found
Marko Tirs
marko.tirs at yahoo.com
Tue Jun 13 23:29:21 CEST 2017
Hello Daniel,ok, no db_redis module yet.
How about accounting with Redis, is there any example how to use Redis for authentication and accounting?Thank youRegardsMarko
----- Forwarded Message -----
From: Daniel-Constantin Mierla <miconda at gmail.com>
To: Marko Tirs <marko.tirs at yahoo.com>; Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Sent: Thursday, June 1, 2017 5:04 PM
Subject: Re: [SR-Users] REDIS load problem - Kamailio 5.0.1 - db_redis not found
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
| | Virenfrei. www.avast.com |
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170613/e57cd1a1/attachment.html>
More information about the sr-users
mailing list