[Freeswitch-users] Random number in variable

Gregor Nanger gregor at infomedia.si
Thu Dec 14 13:21:06 UTC 2017


Thank you

2017-12-14 14:17 GMT+01:00 Stanislav Sinyagin <ssinyagin at gmail.com>:

> either the random function, or a global counter if you want some more
> predictable randomness:
>
>         <action application="set_global" data="global_fsqa_counter=${
> expr(mod(${global_fsqa_counter}+1,23))}"/>
>         <action application="set" data="silence_pause=${expr(${
> global_fsqa_counter}*3+1000)}"/>
>         <action application="playback" data="silence_stream://${
> silence_pause}"/>
>
> this was for a test appliance, to make sure the same pieces of playback
> audio don't get cut into 20ms frames in the same way.
>
>
>
>
> On Thu, Dec 14, 2017 at 1:05 PM, Gregor Nanger <gregor at infomedia.si>
> wrote:
>
>> :-) thank you, Aviv
>>
>> 2017-12-14 10:17 GMT+01:00 Aviv Shaham <aviv at ironsip.com>:
>>
>>> https://wiki.freeswitch.org/wiki/Mod_expr has it
>>>
>>>
>>> On Thu, Dec 14, 2017, at 02:05 AM, Gregor Nanger wrote:
>>>
>>> Hi, Guys!
>>>
>>> One hint, please. Is there a way to get random integer in FS variable
>>> without lua in Dialplan like:
>>>
>>> <action application="set" data="
>>> myvar=
>>> some function to get random number betwee 100-200 or curl fetch?
>>> "/>
>>>
>>>
>>> Thank you, Gregor
>>>
>>>
>>> *_________________________________________________________________________*
>>> 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
>>>
>>>
>>>
>>> ____________________________________________________________
>>> _____________
>>> 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
>>>
>>
>>
>>
>> --
>> Gregor Nanger
>>
>> *CTO*
>> t./f.: 00386 (0) 7 6000 308/309 • m:. 00386 (0)41 756485
>> • Infomedia d.o.o. • Jerebova 3, Novo mesto, Slovenia
>> • www.infomedia.si
>>
>> _________________________________________________________________________
>> 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
>>
>
>
> _________________________________________________________________________
> 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
>



-- 
Gregor Nanger

*CTO*
t./f.: 00386 (0) 7 6000 308/309 • m:. 00386 (0)41 756485
• Infomedia d.o.o. • Jerebova 3, Novo mesto, Slovenia
• www.infomedia.si
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20171214/2bbdf4d4/attachment.html>


More information about the FreeSWITCH-users mailing list