[Freeswitch-users] Can't set/get values using mod_redis

William King william.king at quentustech.com
Wed Jan 28 21:06:23 MSK 2015


The current mod_redis implementation does not support arbitrary redis
commands. It was build as a channel limit(with only increment and
decrement functions).

The functionality it appears you are trying to use would require
additional feature development. For instance using the hiredis C library
and supporting arbitrary redis commands.

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
william.king at quentustech.com

On 01/28/2015 11:53 AM, Aqs Younas wrote:
> Hi, list.
> 
> I have successfully installed redis-server on my system and mod_redis on
> freeswitch.
> But when i try to set a value with redis in my default.xml, i see
> nothing. This is my default.xml file.
> 
> <include>
> <context name="default">
>  <extension name="Testing">
>         <condition>
>                 <action application="sched_hangup" data="+10800
> alloted_timeout"/>
>                 <action application="answer"/>
>                 <action application="set" data="max_forwards=100"/>
>                 <action application="set" data="dst=${destination_number}"/>
>                 <action application="log" data="${uuid}"/>
>                 <action application="set" data="src=${caller_id_number}"/>
>                 *<action application="set" data="ignore=${redis(set
> ${uuid} ${destination_number})}"/>
>                 <action application="set" data="ignore=${redis(get
> ${uuid}}"/>
>                 <action application="log" data="${ignore}"/>*
>                <action application="playback" data="vlc:///opt/song.mp3"/>
>         </condition>
>    </extension>
> </context>
> </include>
> 
> And what I see in my logs is this.
> 
> 2015-01-28 22:48:19.542161 [NOTICE] mod_dptools.c:1258 Channel
> [sofia/internal/14048002020 <tel:14048002020>@1003] has been answered
> 2015-01-28 22:48:19.542161 [DEBUG] switch_core_session.c:1053 Send
> signal sofia/internal/14048002020 <tel:14048002020>@1003 [BREAK]
> 2015-01-28 22:48:19.542161 [DEBUG] switch_core_session.c:1053 Send
> signal sofia/internal/14048002020 <tel:14048002020>@1003 [BREAK]
> 2015-01-28 22:48:19.542161 [DEBUG] switch_core_session.c:1053 Send
> signal sofia/internal/14048002020 <tel:14048002020>@1003 [BREAK]
> 2015-01-28 22:48:19.562178 [DEBUG] switch_channel.c:3689
> (sofia/internal/14048002020 <tel:14048002020>@1003) Callstate Change
> EARLY -> ACTIVE
> 2015-01-28 22:48:19.562178 [DEBUG] sofia.c:6614 Channel
> sofia/internal/14048002020 <tel:14048002020>@1003 entering state
> [ready][200]
> EXECUTE sofia/internal/14048002020 <tel:14048002020>@1003
> set(max_forwards=100)
> 2015-01-28 22:48:19.562178 [DEBUG] mod_dptools.c:1435
> sofia/internal/14048002020 <tel:14048002020>@1003 SET [max_forwards]=[100]
> EXECUTE sofia/internal/14048002020 <tel:14048002020>@1003
> set(dst=19292461002 <tel:19292461002>)
> 2015-01-28 22:48:19.562178 [DEBUG] mod_dptools.c:1435
> sofia/internal/14048002020 <tel:14048002020>@1003 SET [dst]=[19292461002
> <tel:%5B19292461002>]
> EXECUTE sofia/internal/14048002020 at 1003
> log(c63b137d-4553-41ed-a4e8-fff431889c40)
> 2015-01-28 22:48:19.562178 [DEBUG] mod_dptools.c:1628
> c63b137d-4553-41ed-a4e8-fff431889c40
> EXECUTE sofia/internal/14048002020 at 1003 set(src=14048002020)
> 2015-01-28 22:48:19.562178 [DEBUG] mod_dptools.c:1435
> sofia/internal/14048002020 at 1003 SET [src]=[14048002020]
> *EXECUTE sofia/internal/14048002020 at 1003 set(ignore=)*
> 2015-01-28 22:48:19.562178 [DEBUG] mod_dptools.c:1435
> sofia/internal/14048002020 at 1003 SET [ignore]=[UNDEF]
> *EXECUTE sofia/internal/14048002020 at 1003 set(ignore=)*
> 2015-01-28 22:48:19.562178 [DEBUG] mod_dptools.c:1435
> sofia/internal/14048002020 at 1003 SET [ignore]=[UNDEF]*
> EXECUTE sofia/internal/14048002020 at 1003 log()*
> 2015-01-28 22:48:19.562178 [DEBUG] mod_dptools.c:1628
> 
> I see nothing. Neither a value being set or an error.
> 
> Your help would be much appreciated.
> Thanks.
> 
> 
> 
> 
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services: 
> consulting at 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-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
> 



Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list