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

Number of Day / Night Mode Controls



    • Type: New Feature
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Time Conditions
    • Labels:
    • ToDo:


      This Patch changes FreePBX so that you can have more than 10 Day / Night Mode Controls.

      • The number is configurable, currently implemented by added a setting NUMDAYNIGHT into amp_conf, which can be (virtually) any number. e.g. NUMDAYNIGHT=20
        • The lenght of the feature code is then automatically computed using some simple math.
        • If the setting ist not present in amp_conf, the code defaults to 10 Day / Night Controls.
        • The selection on the Day/Night Control page will always show the correct number of (available) Indices. (Except when changing NUMDAYNIGHT so that an additional digit is needed, see below.)
      • I also had to change the text that ist playbacked cause some numbers might not exist in sounds/digits/ if you have an index larger than 20.

      What is currently missing in my code: If you already have Day/Nights configured, their feature code / index is not automatically changed if it needs an additional digit, e.g. if you had the standard 10 Day/night codes and had one already with index 5 and then change NUMDAYNIGHT to 20, the index and feature code won't be changed to 05.
      Additionally, it doesn't check if NUMDAYNIGHT is changed to some value lower than one of the existing D/N controls. But for the moment, I think we can live with the restriction that you shouldn't change the number of digits needed if you already have D/N controls configured.

      Also see discussion here: http://www.freepbx.org/forum/freepbx/users/number-of-day-night-mode-controls-available-in-freepbx

        Gliffy Diagrams




              • Assignee:
                tm1000 Andrew Nagy
                pwalker pwalker
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: