I want to get a variable, depending on the time. I tried this one, but it does not work: exten => 75,1,Set(guess=SYSTEM(echo $((1 + $(date +%S)*100 % 23))) The idea is that the variable guess will change every 23 times per minute. How would be the right syntax? bye Ronald Wiplinger
I don't know if this will help you, but have you tried ${EPOCH}
Also check this out:
http://www.voip-info.org/wiki/view/Asterisk+variables
On 7/4/06, Ronald Wiplinger <ronald@elmit.com>
wrote:> I want to get a variable, depending on the time.
> I tried this one, but it does not work:
>
> exten => 75,1,Set(guess=SYSTEM(echo $((1 + $(date +%S)*100 % 23)))
>
> The idea is that the variable guess will change every 23 times per minute.
>
> How would be the right syntax?
>
>
> bye
>
> Ronald Wiplinger
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
Thanks for your email, I am currently on annual leave and will return on the 19th July. Many Thanks Scott Pinhorne
Thanks for your email, I am currently on annual leave and will return on the 19th July. Many Thanks Scott Pinhorne
Thanks for your email, I am currently on annual leave and will return on the 19th July. Many Thanks Scott Pinhorne
Thanks for your email, I am currently on annual leave and will return on the 19th July. Many Thanks Scott Pinhorne
Thanks for your email, I am currently on annual leave and will return on the 19th July. Many Thanks Scott Pinhorne
Thanks for your email, I am currently on annual leave and will return on the 19th July. Many Thanks Scott Pinhorne
Thanks for your email, I am currently on annual leave and will return on the 19th July. Many Thanks Scott Pinhorne
It'm my macro from extensions.ael
macro randomfile() {
set(DZIEL=${TIMESTAMP:0:8}${TIMESTAMP:9});
set(DZIEL=${DZIEL:6});
math(WYNIK,${DZIEL}/${NumberOfFiles);
set(ROZMIAR=${LEN(${WYNIK})});
MATH(ROZMIAR,${ROZMIAR}-7);
set(WYNIK=${WYNIK:0:${ROZMIAR}});
math(WYNIK,${WYNIK}*${NumberOfFiles});
math(WYNIK,${DZIEL}-${WYNIK});
math(WYNIK,${WYNIK}+1);
};
I have specified NumberOfFiles and want to randomly play one of them.
This macro gets hours and minutes from TIMESTAMP (first two lines) and
store it as 4 digit number (DZIEL).
It is divided by NumberOfFiles, cuted (-7 digits) to discard comma and
all behind.
...
at the end random number is created as result of HHMM number mod
NumberOfFiles
-mayby that will help You a little
> I want to get a variable, depending on the time.
> I tried this one, but it does not work:
>
> exten => 75,1,Set(guess=SYSTEM(echo $((1 + $(date +%S)*100 % 23)))
>
> The idea is that the variable guess will change every 23 times per
> minute.
>
> How would be the right syntax?
>
>
> bye
>
> Ronald Wiplinger
>