Redis In Place Of Astdb
Hi,
Does anyone know of any projects that would allow you to use Redis in place of AstDB? By in place of I don’t mean for what Asterisk needs but to store values. For instance for CNAM currently we need to use an AGI to connect to redis to pull CNAM. So in place of:
Set(CALLERID(name)=${DB(CNAM/${CALLERID(num)})}
it would be done with redis for example:
Set(CALLERID(name)=${REDIS1(CNAM_${CALLERID(num)})}
If not can the devs here give me a pointer to where to look?
TIA.
Regards,
Dovid
11 thoughts on - Redis In Place Of Astdb
After googling around I found this:
https://langiac.blogspot.com/2018/04/asterisk-dialplan-and-redis-integration.html
I would rather not use shell as it’s running a script every time which can become resource intensive. Also the projects written for Asterisk seems to have not been updated in 6 years. Is there any reason why there was never a push to have this added to Asterisk? It seems like a no brainer and we would pay for development of it. I am asking before I start in case there is a reason why it was not done.
Hello,
Are you looking for a general caching solution or you specifically need to use Redis? At Thirdlane we use Memcached which works just fine for our purposes.
Regards, Volodya Ivanets
From: “Dovid Bender”
To: “Asterisk Users Mailing List – Non-Commercial Discussion”
Sent: Wednesday, July 8, 2020 2:36:03 PM
Subject: [asterisk-users] Redis in place of astdb
Hi,
Does anyone know of any projects that would allow you to use Redis in place of AstDB? By in place of I don’t mean for what Asterisk needs but to store values. For instance for CNAM currently we need to use an AGI to connect to redis to pull CNAM. So in place of:
Set(CALLERID(name)=${DB(CNAM/${CALLERID(num)})}
it would be done with redis for example:
Set(CALLERID(name)=${REDIS1(CNAM_${CALLERID(num)})}
If not can the devs here give me a pointer to where to look?
TIA.
Regards,
Dovid
Volodya,
I prefer redis since that’s what we have under the hood for other items. I
do have it working with the SHELL function but like I mentioned I need to invoke another script which adds to resources being used.
https://langiac.blogspot.com/2018/04/asterisk-dialplan-and-redis-integration.html covers func_redis and Perl Redis.
—
Thanks in advance,
————————————————————————-
Steve Edwards sedwards@sedwards.com Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281
—
Dovid, You could use func_odb + a ODBC Redis driver to keep from having to shell out.
I can execute about 400 AGIs (written in C, only parsing the AGI
environment) per second on a Linode Nanode:
verbose(1,${EPOCH});
agi(null-agi);
…
agi(null-agi);
verbose(1,${EPOCH});
Is the Redis startup (or script startup if you’re using a scripting language) that expensive or are you running very high calls per second?
—
Thanks in advance,
————————————————————————-
Steve Edwards sedwards@sedwards.com Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281
—
El Wed, 8 Jul 2020 12:23:42 -0700 escribió:
John Kiniston
DO you know odbc redis drivers? It would be nice to store cdrs ans other stuff in redis without patching asterisk
—
PekePBX, the multitenant PBX solution https://pekepbx.com
—
A quick Google search turns up https://www.cdata.com/kb/tech/redis-odbc-python-linux.rst which I have no experience of and cannot comment on, but looks like what you need.
PS: I question the wisdom of storing CDRs in Redis – I think an RDBMS is the correct tool for *that* job. I agree that Redis may be useful in other areas, though.
Antony.
—
All matter in the Universe can be placed into one of two categories:
1. Things which need to be fixed.
2. Things which need to be fixed once you’ve had a few minutes to play with them.
Please reply to the list;
please *don’t* CC me.
—
I’ll second that – for CDR you want the fastest sequential writing with possible batching of CDR records
Best regards, Alex
http://www.thirdlane.com
El Thu, 9 Jul 2020 10:37:52 +0200 escribió:
Antony Stone
You’re right but I need to do some post-processing to the cdr and store the final one in mysql.
—
PekePBX, the multitenant PBX solution https://pekepbx.com
—
Though ASTDB use is very flexible with DB() function, abandoning this flexibility to gain REDIS features (clustering, speed, ..) has benefits.
Still, being able to “implement ASTDB with REDIS” would allow a lot currently impossible setups (synchronizing SIP registrations on multiples Asterisk instances, …)
Le mer. 8 juil. 2020 à 21:24, John Kiniston a
écrit :