GotoIfTime problem - in need of help

I´m trying to make a “GotoIfTime” and I´m stuck.

I want it to be open on tuesdays between 10:00-12:00 and 14:00-18:00, otherwise closed.
What am I doing wrong? Right now it´s open all the time…

[itsam_kin_19530]
exten => 19530,1,NoOp(Horns Bibliotek)
same => n,Macro(stdexten,${EXTEN},SIP/kin19530,40)
same => n,GotoIfTime(10:00-12:00,tue,,?open,s,1)
same => n,GotoIfTime(14:00-18:00,tue,,?open,s,1)
same => n, Goto(closed,s,1)
same => n,Hangup()

You may want to add:

        same = n,                       verbose(${STRFTIME(,,%R %a)})

to see what time Asterisk thinks it is. It seems to work for me.

    -- Executing [*@newline:6] Verbose("SIP/poly-77a1-000000b7", "17:54 Wed") in new stack
17:54 Wed
    -- Executing [*@newline:7] GotoIfTime("SIP/poly-77a1-000000b7", "16:00-17:56,wed,,?open,s,1") in new stack
    -- Goto (open,s,1)

and

    -- Executing [*@newline:6] Verbose("SIP/poly-77a1-000000bb", "17:57 Wed") in new stack
17:57 Wed
    -- Executing [*@newline:7] GotoIfTime("SIP/poly-77a1-000000bb", "16:00-17:56,wed,,?open,s,1") in new stack
    -- Executing [*@newline:8] GotoIfTime("SIP/poly-77a1-000000bb", "10:00-12:00,tue,,?open,s,1") in new stack
    -- Executing [*@newline:9] GotoIfTime("SIP/poly-77a1-000000bb", "14:00-18:00,tue,,?open,s,1") in new stack
    -- Executing [*@newline:10] Goto("SIP/poly-77a1-000000bb", "closed,s,1") in new stack
    -- Goto (closed,s,1)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.