Re: [asterisk-users] Redis in place of astdb

2020-07-10 Thread Olivier
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 :

> 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  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
-- 
_
-- 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

Re: [asterisk-users] Redis in place of astdb

2020-07-10 Thread Jon Bonilla (Manwe)
El Thu, 9 Jul 2020 10:37:52 +0200
Antony Stone  escribió:

> On Thursday 09 July 2020 at 00:50:28, Jon Bonilla (Manwe) wrote:
> 
> > DO you know odbc redis drivers? It would be nice to store cdrs ans other
> > stuff in redis without patching asterisk  
> 
> 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.
> 

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

-- 
_
-- 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

Re: [asterisk-users] Redis in place of astdb

2020-07-09 Thread alex epshteyn
I’ll second that - for CDR you want the fastest sequential writing with 
possible batching of CDR records

Best regards,
Alex

www.thirdlane.com



> On Jul 9, 2020, at 1:37 AM, Antony Stone 
>  wrote:
> 
> On Thursday 09 July 2020 at 00:50:28, Jon Bonilla (Manwe) wrote:
> 
>> DO you know odbc redis drivers? It would be nice to store cdrs ans other
>> stuff in redis without patching asterisk
> 
> 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.
> 
> -- 
> _
> -- 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

Re: [asterisk-users] Redis in place of astdb

2020-07-09 Thread Antony Stone
On Thursday 09 July 2020 at 00:50:28, Jon Bonilla (Manwe) wrote:

> DO you know odbc redis drivers? It would be nice to store cdrs ans other
> stuff in redis without patching asterisk

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.

-- 
_
-- 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

Re: [asterisk-users] Redis in place of astdb

2020-07-09 Thread Jon Bonilla (Manwe)
El Wed, 8 Jul 2020 12:23:42 -0700
John Kiniston  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

-- 
_
-- 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

Re: [asterisk-users] Redis in place of astdb

2020-07-08 Thread Steve Edwards

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   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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

Re: [asterisk-users] Redis in place of astdb

2020-07-08 Thread John Kiniston
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  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

Re: [asterisk-users] Redis in place of astdb

2020-07-08 Thread Steve Edwards

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   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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

Re: [asterisk-users] Redis in place of astdb

2020-07-08 Thread Dovid Bender
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 
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" 
> *To: *"Asterisk Users Mailing List - Non-Commercial Discussion" <
> asterisk-users@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
-- 
_
-- 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

Re: [asterisk-users] Redis in place of astdb

2020-07-08 Thread Volodya Ivanets
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 

-- 
_ 
-- 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

Re: [asterisk-users] Redis in place of astdb

2020-07-08 Thread Dovid Bender
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  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

[asterisk-users] Redis in place of astdb

2020-07-08 Thread Dovid Bender
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