Understanding Time Group Schedules

VitalPBX Community Support General Discussion Understanding Time Group Schedules

  • Post
    crankshaft
    Participant

    Please take a look at the attached screenshots.

    I am having trouble understanding the time groups and they are not being activated correctly.

    The screen shot shows open hours in the morning from 9:00 to 12:29 and then from 13:30 to 17:59, I have another for lunch time for 12:30 to 13:29 and another for after hours 18:00 to 08:59.

    Problem is it seems to be erratic with it’s matching, right now it should match open, but instead it matches nothing at all, and the incoming call just hangs.

    Is my understanding of the schedule definition in the attached correct ?

     

    Thanks

     

    0
Viewing 6 replies - 1 through 6 (of 6 total)
  • Replies
    Up
    0
    Down

    Check your server time and make sure have the right timezone

    0
    crankshaft
    Participant
    Up
    0
    Down

    @ing-joserivera26 – Thanks, yes that was the first thing that I set and checked, server time is correct.

     

     

    0
    crankshaft
    Participant
    Up
    0
    Down
    -- Executing [s@TG-1:1] NoOp("SIP/102-0000001a", "Time Group: OPEN") in new stack
    -- Executing [s@TG-1:2] Set("SIP/102-0000001a", "__TGMATCH=0") in new stack
    -- Executing [s@TG-1:3] GotoIfTime("SIP/102-0000001a", "09:00-12:29,mon,1-31,jan-dec,?match:") in new stack
    -- Executing [s@TG-1:4] GotoIfTime("SIP/102-0000001a", "13:30-17:59,mon,1-31,jan-dec,?match:") in new stack
    -- Executing [s@TG-1:5] Return("SIP/102-0000001a", "") in new stack
    -- Executing [TC-7@app-time-condition:3] NoOp("SIP/102-0000001a", "0") in new stack
    -- Executing [TC-7@app-time-condition:4] Set("SIP/102-0000001a", "OVERRIDE_STATE=no") in new stack
    -- Executing [TC-7@app-time-condition:5] GotoIf("SIP/102-0000001a", "0?:check-default") in new stack
    -- Goto (app-time-condition,TC-7,8)
    -- Executing [TC-7@app-time-condition:8] GotoIf("SIP/102-0000001a", "0?match") in new stack
    -- Executing [TC-7@app-time-condition:9] NoOp("SIP/102-0000001a", "Time Condition No Matched") in new stack
    -- Executing [TC-7@app-time-condition:10] Goto("SIP/102-0000001a", "app-announcement,announcement-13,1") in new stack


    # date
    Wed Apr 8 09:25:53 +08 2020

     

    As you can see from the logs, the time is 09:25, the match should have succeeded with: “09:00-12:29,mon,1-31,jan-dec” but it did not – why not ???

     

     

     

     

    0
    crankshaft
    Participant
    Up
    0
    Down

    Here’s another test I just did, as you can see the time is 14:08, however the time condition did not match:

     

    -- Executing [s@TG-1:4] GotoIfTime("SIP/102-0000004f", "13:30-17:59,mon,1-31,jan-dec,?match:") in new stack

     

    [2020-04-08 14:08:11] ERROR[14376][C-00000044]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
    ...
    ...

    time-condition,TC-7,1") in new stack
    -- Goto (app-time-condition,TC-7,1)
    -- Executing [TC-7@app-time-condition:1] NoOp("SIP/102-0000004f", "Time Condition: TEST-GROUP") in new stack
    -- Executing [TC-7@app-time-condition:2] Gosub("SIP/102-0000004f", "TG-1,s,1") in new stack
    -- Executing [s@TG-1:1] NoOp("SIP/102-0000004f", "Time Group: OPEN") in new stack
    -- Executing [s@TG-1:2] Set("SIP/102-0000004f", "__TGMATCH=0") in new stack
    -- Executing [s@TG-1:3] GotoIfTime("SIP/102-0000004f", "09:00-12:29,mon,1-31,jan-dec,?match:") in new stack
    -- Executing [s@TG-1:4] GotoIfTime("SIP/102-0000004f", "13:30-17:59,mon,1-31,jan-dec,?match:") in new stack
    -- Executing [s@TG-1:5] Return("SIP/102-0000004f", "") in new stack
    -- Executing [TC-7@app-time-condition:3] NoOp("SIP/102-0000004f", "0") in new stack
    -- Executing [TC-7@app-time-condition:4] Set("SIP/102-0000004f", "OVERRIDE_STATE=no") in new stack
    -- Executing [TC-7@app-time-condition:5] GotoIf("SIP/102-0000004f", "0?:check-default") in new stack
    -- Goto (app-time-condition,TC-7,8)
    -- Executing [TC-7@app-time-condition:8] GotoIf("SIP/102-0000004f", "0?match") in new stack
    -- Executing [TC-7@app-time-condition:9] NoOp("SIP/102-0000004f", "Time Condition No Matched") in new stack
    -- Executing [TC-7@app-time-condition:10] Goto("SIP/102-0000004f", "app-announcement,announcement-13,1") in new stack
    -- Goto (app-announcement,announcement-13,1)
    -- Executing [announcement-13@app-announcement:1] NoOp("SIP/102-0000004f", "Announcement: TEST-FALSE") in new stack
    -- Executing [announcement-13@app-announcement:2] Playback("SIP/102-0000004f", "/var/lib/ombutel/static/7ecad415d78f5488/recordings/1ff1de774005f8da13f42943881c655f") in new stack
    > 0x7f6f080c9130 -- Strict RTP qualifying stream type: audio
    -- <SIP/102-0000004f> Playing '/var/lib/ombutel/static/7ecad415d78f5488/recordings/1ff1de774005f8da13f42943881c655f.slin' (language 'en_GB')
    -- Executing [announcement-13@app-announcement:3] Goto("SIP/102-0000004f", "app-termination,hangup,1") in new stack
    -- Goto (app-termination,hangup,1)
    -- Executing [hangup@app-termination:1] NoOp("SIP/102-0000004f", "Termination: Hangup Call") in new stack
    -- Executing [hangup@app-termination:2] NoCDR("SIP/102-0000004f", "") in new stack
    -- Executing [hangup@app-termination:3] Hangup("SIP/102-0000004f", "") in new stack
    == Spawn extension (app-termination, hangup, 3) exited non-zero on 'SIP/102-0000004f'
    == Extension Changed 102[extension-hints] new state Idle for Notify User 101

     

     

     

     

     

    0
    crankshaft
    Participant
    Up
    0
    Down

    I noticed an error in the logs after posting, but was unable to update or delete the previous post.

    mon,1-31,jan-dec,?match:”)

    This shows that it was only set for monday- monday, when I cnaged monday-friday it was recognized.

    But if I want to specify monday to friday, do I still have to specify the start / end months as well ?

     

    0
    mo10
    Moderator
    none
    Up
    0
    Down

    You don’t need to set the months!
    Just play around (test) a little bit and you will figure it out.

    mon,1-31,jan-dec,?match:”)
    This shows you exactly what is does:
    Is it Monday and is it 1-31 of jan-dec?

    If you want to achieve special conditions: You can combine many Time Groups and time conditions as you like.

    0
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.