Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-21038

BLF Hint not working properly - wrong INSERT statement?

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 15.0.14
    • Fix Version/s: None
    • Labels:
      None
    • Sprint:
      Sprint 19!
    • ToDo:
    • Asterisk Version:
      16.6.2
    • Distro Version:
      12.7.6-1910-1.sng7
    • Distro:
      FreePBX Distro

      Description

      Hello,

      i am using FreePBX Version 15.0.16.38 and i think i found a little bug:

      When entering a TimeGroup with a single Day (e.g. Thursday only) with a special time (13-14 o'clock) it gets inserted like this into the asterisk database:

      
      MariaDB [asterisk]> select * from timegroups_details;
      
      40 |           2 | 13:00-14:00|thu||
      

       
      When i check the condition with

      
      /var/lib/asterisk/bin/schedtc.php --debug
      

      i will get the following output:

      
      [admin@pbxod ~]# /var/lib/asterisk/bin/schedtc.php --debug
      Time Now:13:28|Thu|16|Jan|Europe/Berlin
      
      ==Working with TimeCondition:lunch==
      INVERTED BLF: true (NOT_INUSE = INUSE & INUSE = NOT_INUSE)
      OVERRIDE MODE: not set
      =>13:00-14:00|thu|*|*|Europe/Berlin is not now
      TIME MATCHED: False (NOT_INUSE)
      BLF MODE: False (NOT_INUSE)
      Privilege: Command
      Changing TC2 to NOT_INUSE
      

      Allthough timezone and settings are correct:

      
      [admin@pbxod ~]# date
      Thu Jan 16 13:28:56 CET 2020
      [admin@pbxod ~]# ls -l /etc/localtime
      lrwxrwxrwx 1 root root 33 Jan 13 09:11 /etc/localtime -> /usr/share/zoneinfo/Europe/Berlin
      

      When i update the Database Entry to the follwing:

      
      MariaDB [asterisk]> select * from timegroups_details;
      40 | 2 | 13:00-14:00|thu-thu||
      

      i get

      
      [admin@pbxod ~]# /var/lib/asterisk/bin/schedtc.php --debug
      Time Now:13:33|Thu|16|Jan|Europe/Berlin
      
      
      ==Working with TimeCondition:lunch==
      INVERTED BLF: true (NOT_INUSE = INUSE & INUSE = NOT_INUSE)
      OVERRIDE MODE: not set
      =>13:00-14:00|thu|*|*|Europe/Berlin is now
      TIME MATCHED: True (INUSE)
      BLF MODE: True (INUSE)
      Privilege: Command
      Changing TC2 to INUSE
      

      Now the BLF Mode is correct and my LED on my Phone changes its state accordingly to the timecondition.
      This only happens when you enter a Time where you only need one single day, when you have a Time group with 2 or more days, everything gets inserted correctly.

      Greetings

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mmishra Mohit Mishra
                Reporter:
                Edge2020 Edge
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  NextupJiraPlusStatus

                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.