<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello,</p>
<p>at this moment there is no db_redis module in Kamailio, some
people are working on it:</p>
<p> - <a class="moz-txt-link-freetext" href="https://github.com/kamailio/kamailio/issues/1137">https://github.com/kamailio/kamailio/issues/1137</a></p>
<p>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.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 31.05.17 18:19, Marko Tirs wrote:<br>
</div>
<blockquote
cite="mid:1890801050.3441109.1496247576606@mail.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff;
font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande,
sans-serif;font-size:16px">
<div id="yui_3_16_0_ym19_1_1496246614425_2433" dir="ltr">Hi all,</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2707"><br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2899">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.</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2898"><br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2897">When I
try to start Kamailio I get following errors:<br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2896"><br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2706"> 0(16737)
ERROR: <core> [db.c:203]: db_bind_mod(): Module db_redis
not found. Missing loadmodule? <br
id="yui_3_16_0_ym19_1_1496246614425_2567">
0(16737) ERROR: auth_db [auth_db_mod.c:175]: mod_init():
unable to bind to a database driver<br
id="yui_3_16_0_ym19_1_1496246614425_2568">
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)<br
id="yui_3_16_0_ym19_1_1496246614425_2569">
ERROR: error while initializing modules<br
id="yui_3_16_0_ym19_1_1496246614425_2570">
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2775"><br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2854">Bellow
are the relevant parts from config files.</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2877"><br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2878"> Is
there any example of kamailio.cfg with Redis configuration and
commands for authentication and accounting?<br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2852"><br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2869">Please
help me to use Kamailio with Redis.</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2832"><br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2850">Thank
you</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2833">Regards</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2834">Marko<br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2835"><br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1496246614425_2837"><br
id="yui_3_16_0_ym19_1_1496246614425_2571">
<br id="yui_3_16_0_ym19_1_1496246614425_2572">
kamctlrc<br id="yui_3_16_0_ym19_1_1496246614425_2573">
---------<br id="yui_3_16_0_ym19_1_1496246614425_2574">
DBENGINE=DBTEXT<br id="yui_3_16_0_ym19_1_1496246614425_2575">
<br id="yui_3_16_0_ym19_1_1496246614425_2576">
<br id="yui_3_16_0_ym19_1_1496246614425_2577">
kamailio.cfg<br id="yui_3_16_0_ym19_1_1496246614425_2578">
-------------<br id="yui_3_16_0_ym19_1_1496246614425_2579">
#!define WITH_REDIS<br
id="yui_3_16_0_ym19_1_1496246614425_2580">
#!define WITH_AUTH<br
id="yui_3_16_0_ym19_1_1496246614425_2581">
<br id="yui_3_16_0_ym19_1_1496246614425_2582">
#!ifdef WITH_REDIS<br
id="yui_3_16_0_ym19_1_1496246614425_2583">
#!define DBURL "redis://localhost:6379/"<br
id="yui_3_16_0_ym19_1_1496246614425_2584">
#!endif<br id="yui_3_16_0_ym19_1_1496246614425_2585">
<br id="yui_3_16_0_ym19_1_1496246614425_2586">
#!ifdef WITH_AUTH<br id="yui_3_16_0_ym19_1_1496246614425_2587">
loadmodule "auth.so"<br
id="yui_3_16_0_ym19_1_1496246614425_2588">
loadmodule "auth_db.so"<br
id="yui_3_16_0_ym19_1_1496246614425_2589">
#!endif<br id="yui_3_16_0_ym19_1_1496246614425_2590">
<br id="yui_3_16_0_ym19_1_1496246614425_2591">
#!ifdef WITH_REDIS<br
id="yui_3_16_0_ym19_1_1496246614425_2592">
loadmodule "ndb_redis.so"<br
id="yui_3_16_0_ym19_1_1496246614425_2593">
#!endif<br id="yui_3_16_0_ym19_1_1496246614425_2594">
<br id="yui_3_16_0_ym19_1_1496246614425_2595">
# ----- ndb_redis params -----<br
id="yui_3_16_0_ym19_1_1496246614425_2596">
modparam("ndb_redis", "server",
"name=srv1;addr=127.0.0.1;port=6379;db=1")<br
id="yui_3_16_0_ym19_1_1496246614425_2597">
<br id="yui_3_16_0_ym19_1_1496246614425_2598">
# ----- auth_db params -----<br
id="yui_3_16_0_ym19_1_1496246614425_2599">
#!ifdef WITH_AUTH<br id="yui_3_16_0_ym19_1_1496246614425_2600">
modparam("auth_db", "db_url", DBURL)<br
id="yui_3_16_0_ym19_1_1496246614425_2601">
modparam("auth_db", "calculate_ha1", yes)<br
id="yui_3_16_0_ym19_1_1496246614425_2602">
modparam("auth_db", "password_column", "password")<br
id="yui_3_16_0_ym19_1_1496246614425_2603">
modparam("auth_db", "load_credentials", "")<br
id="yui_3_16_0_ym19_1_1496246614425_2604">
modparam("auth_db", "use_domain", MULTIDOMAIN)<br
id="yui_3_16_0_ym19_1_1496246614425_2605">
#!endif<br id="yui_3_16_0_ym19_1_1496246614425_2606">
<br>
</div>
</div>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top: 1px solid #D3D4DE;">
<tbody>
<tr>
<td style="width: 55px; padding-top: 18px;"><a
moz-do-not-send="true"
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail"
target="_blank"><img moz-do-not-send="true"
src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif"
alt="" style="width: 46px; height: 29px;"
height="29" width="46"></a></td>
<td style="width: 470px; padding-top: 17px; color:
#41424e; font-size: 13px; font-family: Arial, Helvetica,
sans-serif; line-height: 18px;">Virenfrei. <a
moz-do-not-send="true"
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail"
target="_blank" style="color: #4453ea;">www.avast.com</a>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>