Resolved : STRFTIME issue (read inside for solution)

Hi,

I am using the following code to get our phones redirected on saturday / sunday and after 17:00 and before 08:00.

exten => 4949,1,set(CallHour=${STRFTIME(${EPOCH},GMT,"%H")})
exten => 4949,2,set(Weekday=${STRFTIME(${EPOCH},GMT,%u)})
exten => 4949,3,Noop(${CallHour})
exten => 4949,4,Noop(${Weekday})
exten => 4949,5,GotoIf($[${Weekday} > 5] + $[${CallHour} > 16] + $[${CallHour} < 8]?7)
exten => 4949,6,Goto(sd_open,1)
exten => 4949,7,Goto(sd_closed,1)

Although the Weekday variable is working the Callhour is not working… Anybody can see what i did wrong ??

I found the problem

Asterisk was not able to handle all commands in a row so i had to seperate them…

this is a working example:

exten => 4949,1,set(CallTIME=${STRFTIME(${EPOCH},GMT,%H)})
exten => 4949,2,set(Weekday=${STRFTIME(${EPOCH},GMT,%u)})
exten => 4949,3,Noop(${CallTIME})
exten => 4949,4,Noop(${Weekday})
exten => 4949,5,GotoIf($[${Weekday} > 5]?9)
exten => 4949,6,GotoIf($[${CallTIME} > 16]?9)
exten => 4949,7,GotoIf($[${CallTIME} < 8]?9)
exten => 4949,8,Goto(sd_open,1)
exten => 4949,9,Goto(sd_closed,1)

exten => sd_closed,1,Background(service_closed)
exten => sd_closed,n,Background(divert)
exten => sd_closed,n,Ringing
exten => sd_closed,n,Goto(900XXXXXXXXX,1)

It will ring the 900XXX number in the weekends or afterhours