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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200708/4a625b75/attachment.html>
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. On Wed, Jul 8, 2020 at 7:36 AM Dovid Bender <dovid at telecurve.com> wrote:> 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200708/3fa8f930/attachment.html>
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" <dovid at telecurve.com> To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users at lists.digium.com> 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 -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200708/1460c45a/attachment.html>
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. On Wed, Jul 8, 2020 at 11:53 AM Volodya Ivanets <volodya at thirdlane.com> wrote:> 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" <dovid at telecurve.com> > *To: *"Asterisk Users Mailing List - Non-Commercial Discussion" < > asterisk-users at lists.digium.com> > *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 > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200708/c2c26c97/attachment.html>
On Wed, 8 Jul 2020, Dovid Bender wrote:> Does anyone know of any projects that would allow you to use Redis in place of AstDB?https://langiac.blogspot.com/2018/04/asterisk-dialplan-and-redis-integration.html covers func_redis and Perl Redis. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at 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. On Wed, Jul 8, 2020 at 4:37 AM Dovid Bender <dovid at telecurve.com> wrote:> 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 > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. ---Heinlein -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200708/2cd16f59/attachment.html>
On Wed, 8 Jul 2020, Dovid Bender wrote:> we need to use an AGI to connect to redis...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 at 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 John Kiniston <johnkiniston at gmail.com> escribió:> Dovid, You could use func_odb + a ODBC Redis driver to keep from having to > shell out. > >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
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 <johnkiniston at gmail.com> a écrit :> Dovid, You could use func_odb + a ODBC Redis driver to keep from having to > shell out. > > On Wed, Jul 8, 2020 at 4:37 AM Dovid Bender <dovid at telecurve.com> wrote: > >> 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 >> -- >> _____________________________________________________________________ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> >> Check out the new Asterisk community forum at: >> https://community.asterisk.org/ >> >> New to Asterisk? Start here: >> https://wiki.asterisk.org/wiki/display/AST/Getting+Started >> >> asterisk-users mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-users > > > > -- > A human being should be able to change a diaper, plan an invasion, butcher > a hog, conn a ship, design a building, write a sonnet, balance accounts, > build a wall, set a bone, comfort the dying, take orders, give orders, > cooperate, act alone, solve equations, analyze a new problem, pitch manure, > program a computer, cook a tasty meal, fight efficiently, die gallantly. > Specialization is for insects. > ---Heinlein > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200710/30f8f0c7/attachment.html>