Discussion:
[Freeswitch-users] mod_hiredis
William King
2015-05-10 01:40:20 UTC
Permalink
I'm working on an update Redis integration module that will use the C
library hiredis:
http://redis.io/clients#c
https://github.com/redis/hiredis

I've pushed an alpha version of the module to a branch here:
https://freeswitch.org/stash/projects/FS/repos/freeswitch/commits?until=
refs%2Fheads%2Fmod_hiredis

The current module has a dialplan app and an api for 'hiredis_raw'
which allows any single line Redis command, and executes it in a
blocking manner, then supports returning string and integer responses.

If anyone on this list has any use cases for FreeSWITCH+Redis, please
reply to this thread. Currently the two main use cases are:
1. Call per second limits
2. Concurrent call limits

Possible additional functionality:
1. Support for fail-over connections
2. Asynchronous commands(is there a use case for this?)
- --
William King
Senior Engineer
Quentus Technologies, INC
1037 NE 65th St Suite 273
Seattle, WA 98115
Main: (877) 211-9337
Office: (206) 388-4772
Cell: (253) 686-5518
***@quentustech.com
Peter Steinbach
2015-05-12 11:34:42 UTC
Permalink
Hello William,

this is great, the idea of integrating Redis. We currently use Memcache
in raw mode as a method of externally controlling dialplans and failover
scenarios.
Redis, of course, brings much more features here.
Post by William King
1. Call per second limits
2. Concurrent call limits
1. Support for fail-over connections
2. Asynchronous commands(is there a use case for this?)
Another idea for your list would be to route calls according to
prefixes. You may lookup Redis with a part of the phone number and it
returns the gateway for this part of the number (redis DB is then
preloaded from another application).
And - as Redis has a publish/subscribe method - you will be able to
publish call informations from the dialplan to multiple external
subscribers (e.g. announce an incoming call to a CRM) without the use of
ESL. Is there a chance to run the redis dialplan app in a non blocking
manner for this scenario, in order to speed up the dialplan?



Best regards
Peter
Post by William King
I'm working on an update Redis integration module that will use the C
http://redis.io/clients#c
https://github.com/redis/hiredis
https://freeswitch.org/stash/projects/FS/repos/freeswitch/commits?until=
refs%2Fheads%2Fmod_hiredis
The current module has a dialplan app and an api for 'hiredis_raw'
which allows any single line Redis command, and executes it in a
blocking manner, then supports returning string and integer responses.
If anyone on this list has any use cases for FreeSWITCH+Redis, please
1. Call per second limits
2. Concurrent call limits
1. Support for fail-over connections
2. Asynchronous commands(is there a use case for this?)
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
With kind regards
Peter Steinbach

Telefaks Services GmbH
mailto:lists (att) telefaks.de
Internet: www.telefaks.de
William King
2015-05-12 18:15:18 UTC
Permalink
Peter,

The pubsub actions should be available now with the raw app, though this
would work in a blocking manner. You do raise a good use case for
asynchronous commands, specifically for fire and forget cases like pubsub.

For the prefix routing, currently the array return type isn't supported,
but if redis returns a single result that should be able to work and be
tested right now. Can you provide a few sample redis commands and
responses for how you'd setup this scenario?

William King
Senior Engineer
Quentus Technologies, INC
1037 NE 65th St Suite 273
Seattle, WA 98115
Main: (877) 211-9337
Office: (206) 388-4772
Cell: (253) 686-5518
Post by Peter Steinbach
Hello William,
this is great, the idea of integrating Redis. We currently use Memcache
in raw mode as a method of externally controlling dialplans and failover
scenarios.
Redis, of course, brings much more features here.
Post by William King
1. Call per second limits
2. Concurrent call limits
1. Support for fail-over connections
2. Asynchronous commands(is there a use case for this?)
Another idea for your list would be to route calls according to
prefixes. You may lookup Redis with a part of the phone number and it
returns the gateway for this part of the number (redis DB is then
preloaded from another application).
And - as Redis has a publish/subscribe method - you will be able to
publish call informations from the dialplan to multiple external
subscribers (e.g. announce an incoming call to a CRM) without the use of
ESL. Is there a chance to run the redis dialplan app in a non blocking
manner for this scenario, in order to speed up the dialplan?
Best regards
Peter
Post by William King
I'm working on an update Redis integration module that will use the C
http://redis.io/clients#c
https://github.com/redis/hiredis
https://freeswitch.org/stash/projects/FS/repos/freeswitch/commits?until=
refs%2Fheads%2Fmod_hiredis
The current module has a dialplan app and an api for 'hiredis_raw'
which allows any single line Redis command, and executes it in a
blocking manner, then supports returning string and integer responses.
If anyone on this list has any use cases for FreeSWITCH+Redis, please
1. Call per second limits
2. Concurrent call limits
1. Support for fail-over connections
2. Asynchronous commands(is there a use case for this?)
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
With kind regards
Peter Steinbach
Telefaks Services GmbH
mailto:lists (att) telefaks.de
Internet: www.telefaks.de
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
***@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-***@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Seven Du
2015-05-13 01:13:13 UTC
Permalink
maybe use as a central storage for http sessions and ws sessions. or even
SSO if run FreeSWITCH as a cluster if we extend the http support in
FreeSWITCH.
Post by William King
Peter,
The pubsub actions should be available now with the raw app, though this
would work in a blocking manner. You do raise a good use case for
asynchronous commands, specifically for fire and forget cases like pubsub.
For the prefix routing, currently the array return type isn't supported,
but if redis returns a single result that should be able to work and be
tested right now. Can you provide a few sample redis commands and
responses for how you'd setup this scenario?
William King
Senior Engineer
Quentus Technologies, INC
1037 NE 65th St Suite 273
Seattle, WA 98115
Main: (877) 211-9337
Office: (206) 388-4772
Cell: (253) 686-5518
Post by Peter Steinbach
Hello William,
this is great, the idea of integrating Redis. We currently use Memcache
in raw mode as a method of externally controlling dialplans and failover
scenarios.
Redis, of course, brings much more features here.
Post by William King
1. Call per second limits
2. Concurrent call limits
1. Support for fail-over connections
2. Asynchronous commands(is there a use case for this?)
Another idea for your list would be to route calls according to
prefixes. You may lookup Redis with a part of the phone number and it
returns the gateway for this part of the number (redis DB is then
preloaded from another application).
And - as Redis has a publish/subscribe method - you will be able to
publish call informations from the dialplan to multiple external
subscribers (e.g. announce an incoming call to a CRM) without the use of
ESL. Is there a chance to run the redis dialplan app in a non blocking
manner for this scenario, in order to speed up the dialplan?
Best regards
Peter
Post by William King
I'm working on an update Redis integration module that will use the C
http://redis.io/clients#c
https://github.com/redis/hiredis
https://freeswitch.org/stash/projects/FS/repos/freeswitch/commits?until=
Post by Peter Steinbach
Post by William King
refs%2Fheads%2Fmod_hiredis
The current module has a dialplan app and an api for 'hiredis_raw'
which allows any single line Redis command, and executes it in a
blocking manner, then supports returning string and integer responses.
If anyone on this list has any use cases for FreeSWITCH+Redis, please
1. Call per second limits
2. Concurrent call limits
1. Support for fail-over connections
2. Asynchronous commands(is there a use case for this?)
_________________________________________________________________________
Post by Peter Steinbach
Post by William King
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
http://lists.freeswitch.org/mailman/options/freeswitch-users
Post by Peter Steinbach
Post by William King
http://www.freeswitch.org
--
With kind regards
Peter Steinbach
Telefaks Services GmbH
mailto:lists (att) telefaks.de
Internet: www.telefaks.de
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
About: http://about.me/dujinfang
Blog: http://www.dujinfang.com
Proj: http://www.freeswitch.org.cn
William King
2015-05-14 20:16:18 UTC
Permalink
Very interesting use case. This should be currently supported with the
raw get and set actions.

William King
Senior Engineer
Quentus Technologies, INC
1037 NE 65th St Suite 273
Seattle, WA 98115
Main: (877) 211-9337
Office: (206) 388-4772
Cell: (253) 686-5518
Post by Seven Du
maybe use as a central storage for http sessions and ws sessions. or
even SSO if run FreeSWITCH as a cluster if we extend the http support in
FreeSWITCH.
On Wed, May 13, 2015 at 2:15 AM, William King
Peter,
The pubsub actions should be available now with the raw app, though this
would work in a blocking manner. You do raise a good use case for
asynchronous commands, specifically for fire and forget cases like pubsub.
For the prefix routing, currently the array return type isn't supported,
but if redis returns a single result that should be able to work and be
tested right now. Can you provide a few sample redis commands and
responses for how you'd setup this scenario?
William King
Senior Engineer
Quentus Technologies, INC
1037 NE 65th St Suite 273
Seattle, WA 98115
Main: (877) 211-9337 <tel:%28877%29%20211-9337>
Office: (206) 388-4772 <tel:%28206%29%20388-4772>
Cell: (253) 686-5518 <tel:%28253%29%20686-5518>
Post by Peter Steinbach
Hello William,
this is great, the idea of integrating Redis. We currently use
Memcache
Post by Peter Steinbach
in raw mode as a method of externally controlling dialplans and
failover
Post by Peter Steinbach
scenarios.
Redis, of course, brings much more features here.
Post by William King
1. Call per second limits
2. Concurrent call limits
1. Support for fail-over connections
2. Asynchronous commands(is there a use case for this?)
Another idea for your list would be to route calls according to
prefixes. You may lookup Redis with a part of the phone number and it
returns the gateway for this part of the number (redis DB is then
preloaded from another application).
And - as Redis has a publish/subscribe method - you will be able to
publish call informations from the dialplan to multiple external
subscribers (e.g. announce an incoming call to a CRM) without the
use of
Post by Peter Steinbach
ESL. Is there a chance to run the redis dialplan app in a non blocking
manner for this scenario, in order to speed up the dialplan?
Best regards
Peter
Post by William King
I'm working on an update Redis integration module that will use the C
http://redis.io/clients#c
https://github.com/redis/hiredis
https://freeswitch.org/stash/projects/FS/repos/freeswitch/commits?until=
Post by Peter Steinbach
Post by William King
refs%2Fheads%2Fmod_hiredis
The current module has a dialplan app and an api for 'hiredis_raw'
which allows any single line Redis command, and executes it in a
blocking manner, then supports returning string and integer
responses.
Post by Peter Steinbach
Post by William King
If anyone on this list has any use cases for FreeSWITCH+Redis, please
1. Call per second limits
2. Concurrent call limits
1. Support for fail-over connections
2. Asynchronous commands(is there a use case for this?)
_________________________________________________________________________
Post by Peter Steinbach
Post by William King
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
Post by Peter Steinbach
Post by William King
http://www.freeswitch.org
--
With kind regards
Peter Steinbach
Telefaks Services GmbH
mailto:lists <mailto:lists> (att) telefaks.de <http://telefaks.de>
Internet: www.telefaks.de <http://www.telefaks.de>
_________________________________________________________________________
Post by Peter Steinbach
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
Post by Peter Steinbach
http://www.freeswitch.org
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
About: http://about.me/dujinfang
Blog: http://www.dujinfang.com
Proj: http://www.freeswitch.org.cn
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
***@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-***@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Loading...