[SR-Users] Kamailio 5.4 ndb_redis, selecting a database

Daniel Donoghue daniel.donoghue at freespee.com
Wed Dec 2 17:04:15 CET 2020


Hello,

I note that I can use the ndb_redis server config parameter to specify connection details for my redis servers; I also note that the connection string can specify a “db” parameter which can be set from 0 to 9, with the default being 0.

I am looking for a way to dynamically set the db parameter. I do not which to add the same server with different names N times just to select a different db and having N times more connections to it than necessary.

It looks as though I can call redis_cmd(“svrN”, “SELECT dbN”, “init”); but will that propagate properly and set the correct db for all connections to my redis server for the lifetime of the request?

Ideally, I’d like to be able to specify an avp for the db, or have a function to set the db per request.


With every blessing,
—
Daniel Donoghue




More information about the sr-users mailing list