Thanks for the insight.  I ended up doing something like this:

redis_cmd("localredis", "AUTH REDIS_PASS", "r");

if ($redis(r=>type) == REDIS_REPLY_ERROR) {
    xlog("L_ERROR", "Redis authentication error");
    exit;
}

I think the confusion came from the fact that you do not specify the
password in the modparam() connection string, as you do with other DB
modules.  Maybe calling something like this out in the documentation would
help clear that up.

On Thu, Jan 29, 2015 at 3:48 PM, Marc Soda <ms...@coredial.com> wrote:

> Ah, so you should be able to do something like:
>
> redis_cmd("localredis", "AUTH $var(redis_password)");
>
> Nice.  I will try that and post my results.
>
> On Thu, Jan 29, 2015 at 1:28 PM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>>  Hello,
>>
>> it appears that hiredis library does the authentication after connecting
>> and can be done from config -- that's on a very quick search, not sure if
>> something has changed with the hiredis api meanwhile:
>>
>>  - https://github.com/redis/hiredis/issues/56
>>
>> Cheers,
>> Daniel
>>
>>
>> On 29/01/15 17:20, Marc Soda wrote:
>>
>> The only way it will work right now is to not use a password:
>>
>> modparam("ndb_redis", "server",
>> "name=localredis;addr=localhost;port=6379")
>>
>> I've been wanting to look at contributing support at that, but no time...
>>  On Thu, Jan 29, 2015 at 10:16 AM, Yuriy Gorlichenko <ovoshl...@gmail.com
>> > wrote:
>>
>>> Hello. I try to use NDB_REDIS with remote REDIS DB and can not to
>>> connect because remote DB use password, but Kamailio module have no any
>>> variable or attr of modparam that implenets password for DB.
>>>
>>> How I can connect to my REDIS?
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users@lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
>> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - 
>> http://www.linkedin.com/in/miconda
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to