Thanks for the reply. Below is the relevaent code.
As I said above, this works - except for the very first call after 23:00. For example, last night I called at 23:05 and it branched to open. I called right back and it worked fine. And continued to work fine.
[code]
[macro-incoming_line]
exten => s,1,Wait(3)
exten => s,n,Answer()
exten => s,n,Set(CALLERID(name)="${ARG1}")
exten => s,n,GotoIfTime(10:30-23:00,sun-thu,,?open)
exten => s,n,GotoIfTime(10:30-23:59,fri-sat,,?open)
exten => s,n,Goto(closed)
exten => s,n(open),Playback(/recordings/3Forall)
exten => s,n,Goto(queue)
exten => s,n(closed),Playback(/recordings/closed_message)
exten => s,n,Goto(queue)
exten => s,n(queue),Queue(order-queue)
exten => s,n,Hangup[/code]