Changeset 10966

Show
Ignore:
Timestamp:
01/15/11 15:08:49 (2 years ago)
Author:
p_lindheimer
Message:

checking in some incomplete work to finish later so I don't lose it (no backup where I'm at). All untested but I think it still has no affect re #4740

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/libraries/config.functions.php

    r10964 r10966  
    137137  } 
    138138 
    139   function parse_amportal_conf($filename, $bootstrap_conf = array()) { 
     139  function parse_amportal_conf($filename, $bootstrap_conf = array(), $file_is_authority=false) { 
    140140    global $db; 
    141141 
    142142    // if we have loaded for the db, then just return what we already have 
    143     if ($this->parsed_from_db) { 
     143    if ($this->parsed_from_db && !$file_is_authority) { 
    144144      return $this->conf; 
    145145    } 
    146146 
    147147    /* defaults 
    148     * This defines defaults and formating to assure consistency across the system so that 
     148    * This defines defaults and formatting to assure consistency across the system so that 
    149149    * components don't have to keep being 'gun shy' about these variables. 
    150150    *  
     
    153153    */ 
    154154    // If conf file is not writable, then we use it as the master so parse it. 
    155     if (!is_writable($filename)) { 
     155    if (!is_writable($filename) || $file_is_authority) { 
    156156      $file = file($filename);  
    157157      if (is_array($file)) {  
     
    277277  } 
    278278 
     279  // Check if a setting exists 
     280  // 
     281  function conf_setting_exists($keyword) { 
     282    return isset($this->db_conf_store[$keyword]); 
     283  } 
     284 
    279285  // TODO: no way to differentiate between a bad setting and boolean false 
    280286  //       but throwing an error on a bad keyword seems harsh? Maybe I should 
     
    373379  } 
    374380 
    375   function set_conf_values($update_arr, $commit=false) { 
     381  function set_conf_values($update_arr, $commit=false, $override_readonly=false) { 
    376382    $cnt = 0; 
    377383    if (!is_array($update_arr)) { 
     
    383389      }  
    384390      $prep_value = $this->_prepare_conf_value($value, $this->db_conf_store[$keyword]['type']); 
    385       if ($prep_value != $this->db_conf_store[$keyword]['value'] && ($prep_value !== '' || $this->db_conf_store[$keyword]['emptyok'])) { 
     391      if ($prep_value != $this->db_conf_store[$keyword]['value'] && ($prep_value !== '' || $this->db_conf_store[$keyword]['emptyok']) && ($override_readonly || !$this->db_conf_store[$keyword]['readonly'])) { 
    386392        $this->db_conf_store[$keyword]['value'] = $prep_value; 
    387393        $this->db_conf_store[$keyword]['modified'] = true; 
     
    394400  } 
    395401 
     402  // TODO: need to address emptyok situation with INT and UINT at least 
     403  // 
    396404  function _prepare_conf_value($value, $type) { 
    397405    switch ($type) { 
  • freepbx/trunk/install_amp

    r10965 r10966  
    3434$asterisk_user  = "asteriskuser"; 
    3535$asterisk_pass  = "amp109"; 
    36  
    37  
    38 /* 
    39 freepbx versions 
    40     '1.10.005', 
    41     '1.10.006', 
    42     '1.10.007beta1', 
    43     '1.10.007beta2', 
    44     '1.10.007', 
    45     '1.10.007a', 
    46     '1.10.008beta1', 
    47     '1.10.008beta2', 
    48     '1.10.008beta3', 
    49     '1.10.008', 
    50     '1.10.009beta1', 
    51     '1.10.009beta2', 
    52     '1.10.009', 
    53     '1.10.010beta1', 
    54     '1.10.010', 
    55     '2.0beta1', 
    56     '2.0beta2', 
    57     '2.0beta3', 
    58     '2.0beta4', 
    59     '2.0beta5', 
    60     '2.0.0', 
    61     '2.0.1', 
    62     '2.1beta1', 
    63     '2.1beta2', 
    64     '2.1beta3', 
    65     '2.1.0', 
    66     '2.1.1', 
    67     '2.1.2', 
    68     '2.1.3', 
    69     '2.2.0beta1', 
    70     '2.2.0beta2', 
    71     '2.2.0beta3', 
    72     '2.2.0rc1', 
    73     '2.2.0rc2', 
    74     '2.2.0rc3', 
    75     '2.2.0', 
    76     '2.2.1', 
    77     '2.2.2', 
    78     '2.2.3', 
    79     '2.3.0beta1', 
    80 */ 
    8136 
    8237/********************************************************************************************************************/ 
     
    287242    // 
    288243    // TODO: Should check if Asterisk is running and/or try to start it. 
     244    // TODO: test this 
    289245    // 
    290     passthru("su - asterisk -c \"".trim($amp_conf["AMPBIN"])."/retrieve_conf --run-install ".($debug ? ' --debug' : '').'"'); 
     246    $asteriskuser = isset($amp_conf['AMPASTERISKUSER']) && $amp_conf['AMPASTERISKUSER'] ? $amp_conf['AMPASTERISKUSER'] : 'asterisk'; 
     247    passthru("sudo -u $asteriskuser  ".trim($amp_conf["AMPBIN"])."/retrieve_conf --run-install ".($debug ? ' --debug' : '')); 
    291248} 
    292249 
     
    557514/********************************************************************************************************************/ 
    558515 
     516// 
     517// TODO: will this work, basically using bootstrap once installed if using to upgrade, etc? 
     518/* 
     519$bootstrap_settings['skip_astman']) = true; 
     520$bootstrap_settings['freepbx_auth'] = false; 
     521$restrict_mods = true; 
     522if (@include_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) { 
     523  out(_("FreePBX already installed, bootstrapping")); 
     524} else if (@include_once('/etc/asterisk/freepbx.conf')) { 
     525  out(_("FreePBX already installed, bootstrapping")); 
     526} else { 
     527  // all the initialization here instead 
     528} 
     529*/ 
     530 
    559531// **** Make sure we have STDIN etc 
    560532 
     
    724696// **** Look for user = root 
    725697 
     698// TODO: if we bootstrap, do this first before even trying. Also, is their a problem boostraping as user root??? 
     699// 
    726700outn("Checking user.."); 
    727701//$current_user=(isset($_ENV["USER"]) ? $_ENV["USER"] : exec('whoami',$output)); 
     
    735709 
    736710 
     711// TODO: if we bootstrap, do this first before even trying. 
     712// 
    737713outn("Checking if Asterisk is running.."); 
    738714exec("pidof asterisk", $pid_val, $ret); 
     
    765741// **** read amportal.conf 
    766742 
    767 // TODO: should check for freepbx.conf first in case this is not a first 
    768 //       time install? 
    769 //       If it is successful, then do we bootsrap (otherwise we won't have 
    770 //       these other parameters which are coming out of amportal.con 
     743// TODO: see comments above, have we already boostraped, if so, skip this? 
    771744// 
    772745outn("Reading ".AMP_CONF.".."); 
     
    777750out("OK"); 
    778751 
     752// TODO: if we boostrapped I think we can count on ALL of these being set but maybe it's 
     753//       fine to do a sanity check? 
     754// 
    779755// Ensure our "critical" variables are set.  We absolutely need these to copy in files. 
    780756 
     
    783759  $amp_conf["AMPWEBROOT"] = "/var/www/html"; 
    784760} 
    785  
    786761if (!array_key_exists("FOPWEBROOT",$amp_conf)) { 
    787762  out("Adding FOPWEBROOT option to amportal.conf - using AMP default"); 
    788763  $amp_conf["FOPWEBROOT"] = $amp_conf["AMPWEBROOT"]."/panel"; 
    789764} 
    790  
    791765if (!array_key_exists("AMPBIN",$amp_conf)) { 
    792766  out("Adding AMPBIN option to amportal.conf - using AMP default"); 
    793767  $amp_conf["AMPBIN"] = "/var/lib/asterisk/bin"; 
    794768} 
    795  
    796769if (!array_key_exists("AMPSBIN",$amp_conf)) { 
    797770  out("Adding AMPSBIN option to amportal.conf - using AMP default"); 
    798771  $amp_conf["AMPSBIN"] = "/usr/sbin"; 
    799772} 
    800  
    801773if (!array_key_exists("AMPDBENGINE",$amp_conf)) { 
    802774  out("Adding AMPDBENGINE option to amportal.conf - using AMP default"); 
     
    808780} 
    809781 
     782// TODO: if we boostrapped do we ignore these? (Can they even be set?) 
     783// 
    810784if (isset($new_username)) { 
    811785  $amp_conf["AMPDBUSER"] = $new_username; 
    812786} 
    813  
    814787if (isset($new_password)) { 
    815788  $amp_conf["AMPDBPASS"] = $new_password; 
    816789} 
    817  
    818790if (isset($dbhost)) { 
    819791  $amp_conf["AMPDBHOST"] = $dbhost; 
    820792} 
    821  
    822793if (isset($dbname)) { 
    823794  $amp_conf["AMPDBNAME"] = $dbname; 
     
    828799} 
    829800// If they pre-set this in their amportal.conf or this is an upgrade, we should honor it as well 
     801// 
     802// TODO: if we boostrap, then this value could be normalized (1/0 I think?) 
    830803// 
    831804if (isset($amp_conf['FOPDISABLE']) && (strtolower(trim($amp_conf['FOPDISABLE'])) == 'true' || strtolower(trim($amp_conf['FOPDISABLE'])) == 'yes' || strtolower(trim($amp_conf['FOPDISABLE'])) == 'y') )  { 
     
    833806}  
    834807// write amportal.conf 
    835 // TODO: What we do here may depend on if we bootsrapped, as well as how we set the 
    836 //       other paramerts just above (e.g. we would want to use the define 
     808// TODO: if we boostrapped we don't want to write amportal.conf, or do we? e.g. if we are running out of the file vs. the 
     809//       database then we probably want to write, though there should be a freepbx_conf class to use that does that and knows 
     810//       how to make that decsion as well as what to write? 
    837811// 
    838812write_amportal_conf(AMP_CONF, $amp_conf); 
     
    849823// **** read asterisk.conf 
    850824 
     825// TODO: if we boostrapped don't do this 
     826// 
    851827outn("Reading ".ASTERISK_CONF.".."); 
    852828$asterisk_conf = install_parse_asterisk_conf(ASTERISK_CONF); 
     
    856832out("OK"); 
    857833 
    858 /* deprecated on FreePBX 2.2, from now pages need to read this information  
    859    from $asterik_conf and not $amp_conf. 
    860     
    861    this code will stay in 2.2, but in 2.3 it will be gone. developers - please 
    862    update your code 
     834/* TODO: if we boostrapped this should have been done but doesn't hurt? 
    863835 */ 
    864836if (isset($asterisk_conf['astetcdir'])) { $amp_conf['ASTETCDIR'] = $asterisk_conf['astetcdir']; } 
     
    874846$amp_conf["AMPENGINE"]=$pbx_engine; 
    875847 
    876 // TODO: Again? didn't we just do that above? 
     848// TODO: I guess we have new variables set, of course see note above if we boostrapped. Probably 
     849//       this one stays? 
    877850// 
    878851write_amportal_conf(AMP_CONF, $amp_conf); 
     
    881854// **** Write asterisk version to ASTETCDIR/version 
    882855 
     856// TODO: does anything use this? What's the point? (other than we need the version for below) 
     857// 
    883858$tmpoutput = ''; 
    884859$tmpout = exec("asterisk -V", $tmpoutput, $exitcode); 
     
    955930// **** Connect to database 
    956931 
     932// TODO: if we bootstrapped, we are already connected and this can all be skipped 
     933// 
    957934outn("Connecting to database.."); 
    958935 
     
    11041081    need and then forgetting something. 
    11051082  */ 
     1083   
     1084  $asteriskuser = isset($amp_conf['AMPASTERISKUSER']) && $amp_conf['AMPASTERISKUSER'] ? $amp_conf['AMPASTERISKUSER'] : 'asterisk'; 
    11061085 
    11071086  outn("creating missing #include files.."); 
     
    11271106 
    11281107    if (!file_exists($target)) { 
    1129       exec("touch $target", $output, $retcode); 
     1108      exec("sudo -u $asteriskuser touch $target", $output, $retcode); 
    11301109        if ($retcode != 0) { 
    11311110        out("Error code $retcode: trying to create empty file $target"); 
     
    11481127 
    11491128// **** Create spool directories for monitor and fax 
    1150 if (!is_dir($asterisk_conf["astspooldir"]."/monitor")) 
    1151   amp_mkdir($asterisk_conf["astspooldir"]."/monitor","0766",true); 
    1152 if (!is_dir($asterisk_conf["astspooldir"]."/fax")) 
    1153   amp_mkdir($asterisk_conf["astspooldir"]."/fax","0766",true); 
     1129if (!is_dir($amp_conf["ASTSPOOLDIR"]."/monitor")) 
     1130  amp_mkdir($amp_conf["ASTSPOOLDIR"]."/monitor","0766",true); 
     1131if (!is_dir($amp_conf["ASTSPOOLDIR"]."/fax")) 
     1132  amp_mkdir($amp_conf["ASTSPOOLDIR"]."/fax","0766",true); 
    11541133 
    11551134 
     
    11711150// TODO: this is probably where we will put freepbx_settings_init 
    11721151//       to initialize/update all the possible settings 
     1152/* 
     1153outn("Creating or updating freepbx_conf settings.."); 
     1154freepbx_settings_init(); 
     1155out("..OK"); 
     1156*/ 
    11731157 
    11741158// **** Generate AMP configs 
     
    11821166  // **** Bounce FOP 
    11831167  outn("Restarting Flash Operator Panel.."); 
    1184   exec('su - asterisk -c "'.$amp_conf["AMPBIN"].'/bounce_op.sh"'); 
     1168  exec("sudo -u $asteriskuser ".$amp_conf["AMPBIN"].'/bounce_op.sh'); 
    11851169  out("OK"); 
    11861170} 
  • freepbx/trunk/libfreepbx.install.php

    r10965 r10966  
    447447  $freepbx_conf->define_conf_setting('ARI_ADMIN_PASSWORD',$set); 
    448448 
     449  // AMPASTERISKUSER 
     450  $set['value'] = 'asterisk'; 
     451  $set['description'] = 'The user Asterisk should be running as, used by freepbx_engine. Most systems should not change this.'; 
     452  $set['type'] = CONF_TYPE_TEXT; 
     453  $set['level'] = 4; 
     454  $freepbx_conf->define_conf_setting('AMPASTERISKUSER',$set); 
     455  $set['level'] = 0; 
     456 
     457  // AMPASTERISKGROUP 
     458  $set['value'] = 'asterisk'; 
     459  $set['description'] = 'The user group Asterisk should be running as, used by freepbx_engine. Most systems should not change this.'; 
     460  $set['type'] = CONF_TYPE_TEXT; 
     461  $set['level'] = 4; 
     462  $freepbx_conf->define_conf_setting('AMPASTERISKGROUP',$set); 
     463  $set['level'] = 0; 
     464 
     465  // AMPASTERISKWEBUSER 
     466  $set['value'] = 'asterisk'; 
     467  $set['description'] = 'The user your httpd should be running as, used by freepbx_engine. Most systems should not change this.'; 
     468  $set['type'] = CONF_TYPE_TEXT; 
     469  $set['level'] = 4; 
     470  $freepbx_conf->define_conf_setting('AMPASTERISKWEBUSER',$set); 
     471  $set['level'] = 0; 
     472 
     473  // AMPASTERISKWEBGROUP 
     474  $set['value'] = 'asterisk'; 
     475  $set['description'] = 'The user group your httpd should be running as, used by freepbx_engine. Most systems should not change this.'; 
     476  $set['type'] = CONF_TYPE_TEXT; 
     477  $set['level'] = 4; 
     478  $freepbx_conf->define_conf_setting('AMPASTERISKWEBGROUP',$set); 
     479  $set['level'] = 0; 
     480 
     481  // AMPDEVUSER 
     482  $set['value'] = 'asterisk'; 
     483  $set['description'] = 'The user that various device directories should be set to, used by freepbx_engine. Examples include /dev/zap, /dev/dahdi, /dev/misdn, /dev/mISDN and /dev/dsp. Most systems should not change this.'; 
     484  $set['type'] = CONF_TYPE_TEXT; 
     485  $set['level'] = 4; 
     486  $freepbx_conf->define_conf_setting('AMPDEVUSER',$set); 
     487  $set['level'] = 0; 
     488 
     489  // AMPDEVGROUP 
     490  $set['value'] = 'asterisk'; 
     491  $set['description'] = 'The user group that various device directories should be set to, used by freepbx_engine. Examples include /dev/zap, /dev/dahdi, /dev/misdn, /dev/mISDN and /dev/dsp. Most systems should not change this.'; 
     492  $set['type'] = CONF_TYPE_TEXT; 
     493  $set['level'] = 4; 
     494  $freepbx_conf->define_conf_setting('AMPDEVGROUP',$set); 
     495  $set['level'] = 0; 
    449496 
    450497  // 
     
    9711018} 
    9721019 
    973 /* TODO: These go in the modules 
    974  
    975 dashboard: 
    976  
    977 ('DASHBOARD_INFO_UPDATE_TIME','',0,'These can be used to change the refresh rate of the System Status Panel. Most of the stats are updated based on the STATS interval but a few items are','uint',NULL,NULL,NULL,NULL), 
    978 ('DASHBOARD_STATS_UPDATE_TIME','',0,'These can be used to change the refresh rate of the System Status Panel. Most of the stats are updated based on the STATS interval but a few items are','uint',NULL,NULL,NULL,NULL), 
    979  
    980 daynight: 
    981  
    982 ('DAYNIGHTTCHOOK','0',0,'By default, the Day/Night module will not hook Time Conditions allowing one to associate a daynight manual override with a time condition since now time conditions have their own feature code. If there is already an associaiton configured (on an upgraded system), this will have no affect for the Time Conditions that # are effected. Setting this to true reverts the previous behavior by allowing for the continued use of a daynight toggle to be associated with a time conditon. This can be useful for two scenarios. First, to override a Time Condition without the automatic resetting that occurs with the built in Time Condition overrides. The second use is the ability to associate a single daynight toggle with multiple time conditions thus creating a <b>master switch</b> that can be used to override several possible call flows through different time conditions.<br>Default = false','bool',NULL,'1',NULL,NULL),     
    983  
    984 timeconditions: 
    985  
    986 ('TCINTERVAL','60',0,'The polling interval used by the Time Conditions manintenace task, launched by an Asterisk call file used to update Time Conditions override states as well as keep custom device state hint values up-to-date when being used with BLF. This interval should be shorter than the shortest time condition true (open) or false (closed) interval to assure that an override is reset after the current time period has expired that it was set in.<br>Default value 60 seconds.','uint',NULL,'60',NULL,NULL), 
    987 ('TCMAINT','1',0,'If set to false, this will override the execution of the Time Conditons maintenace task launched by call files. If all the feature codes for time conditions are disabled, the maintenance task will not be launched so this is not needed for that condition. Setting this to false would be fairly un-common. On an extremely active system that has constant calls flowing throught all time conditions of interest that might be overriden one might set this to avoid the additional polling that would otherwise occur since calls traversing the time conditions contexts will also maintain all the necessary state information. You may also set this temporarily if debugging a system to avoid the periodic dialplan running through the CLI that the maintenance task otherwise creates.<br>Default = true','bool',NULL,'1',NULL,NULL),  
    988  
    989 queues: 
    990  
    991 ('USEQUEUESTATE','0',0,'Setting this flag will generate the required dialplan to integrate with the following Asterisk patch: <b>https://issues.asterisk.org/view.php?id=15168</b>. This feature is planned for a future 1.6 release but given the existence of the patch can be used prior. Once the release version is known, code will be added to automatically enable this format in versions of Asterisk that support it<br>Default = false','bool',NULL,'0',NULL,NULL), 
    992  
    993 music: 
    994  
    995 ('AMPMPG123','1',0,'When set to false, the old MoH behavior is adopted where MP3 files can be loaded and WAV files converted to MP3. The new default behavior assumes you have mpg123 loaded as well as sox and will convert MP3 files to WAV. This is highly recommended as MP3 files heavily tax the system and can cause instability on a busy phone system<br>Default = true','bool',NULL,'1',NULL,NULL), 
    996  
    997  
     1020// TODO: temporary, this is all going to be removed, just transitionary work 
     1021function bogus_for_now() { 
     1022// TODO: CODE FOR MODULES 
     1023 
     1024/* 
     1025  TODO: I think I need these 
     1026 
     1027  ASTMANAGERPROXYPORT 
     1028  SSHPORT 
     1029 
     1030  TODO: Check what version we have the patch for? Possibly skip, possibly not. 
     1031 
     1032  PARKINGPATCH 
     1033 
     1034  TODO: Check these, probably skip 
     1035 
     1036  AMPBACKUPEMAILFROM 
     1037  AMPBACKUPSUDO 
     1038  AMPBACKUPADVANCED 
     1039*/ 
     1040 
     1041  // TODO: skipping some of the BACKUP MIGRATION, IF THEY DIDN'T DO IT ALREADY, TOUCH LUCK! 
     1042 
     1043  // USEQUEUESTATE 
     1044  // 
     1045  $set['value'] = false; 
     1046  $set['defaultval'] =& $set['value']; 
     1047  $set['readonly'] = 0; 
     1048  $set['hidden'] = 0; 
     1049  $set['level'] = 3; 
     1050  $set['module'] = 'queues'; 
     1051  $set['category'] = ''; 
     1052  $set['emptyok'] = 0; 
     1053  $set['description'] = 'Setting this flag will generate the required dialplan to integrate with the following Asterisk patch: <b>https://issues.asterisk.org/view.php?id=15168</b>. This setting is obsolete on Asterisk 1.8+ systems where the hint state is now standard and always used. This asterisk patch is only available on Asterisk 1.4, trying to use this setting on Asterisk 1.6 will break some queue behavior and should be avoided'; 
     1054  $set['type'] = CONF_TYPE_BOOL; 
     1055  $freepbx_conf->define_conf_setting('USEQUEUESTATE',$set); 
     1056 
     1057 
     1058  // DASHBOARD_INFO_UPDATE_TIME 
     1059  // 
     1060  $set['value'] = 6; 
     1061  $set['defaultval'] =& $set['value']; 
     1062  $set['readonly'] = 0; 
     1063  $set['hidden'] = 0; 
     1064  $set['level'] = 0; 
     1065  $set['module'] = 'dashboard'; 
     1066  $set['category'] = ''; 
     1067  $set['emptyok'] = 1; 
     1068  $set['description'] = 'Update rate in seconds of all sections of the System Status panel except the Info box.'; 
     1069  $set['type'] = CONF_TYPE_UINT; 
     1070  $freepbx_conf->define_conf_setting('DASHBOARD_INFO_UPDATE_TIME',$set); 
     1071 
     1072  // DASHBOARD_INFO_UPDATE_TIME 
     1073  // 
     1074  $set['value'] = 30; 
     1075  $set['defaultval'] =& $set['value']; 
     1076  $set['readonly'] = 0; 
     1077  $set['hidden'] = 0; 
     1078  $set['level'] = 0; 
     1079  $set['module'] = 'dashboard'; 
     1080  $set['category'] = ''; 
     1081  $set['emptyok'] = 1; 
     1082  $set['description'] = 'Update rate in seconds of the Info section of the System Status panel.'; 
     1083  $set['type'] = CONF_TYPE_UINT; 
     1084  $freepbx_conf->define_conf_setting('DASHBOARD_INFO_UPDATE_TIME',$set); 
     1085 
     1086 
     1087  // AMPMPG123 
     1088  // 
     1089  $set['value'] = true; 
     1090  $set['defaultval'] =& $set['value']; 
     1091  $set['readonly'] = 0; 
     1092  $set['hidden'] = 0; 
     1093  $set['level'] = 0; 
     1094  $set['module'] = 'music'; 
     1095  $set['category'] = ''; 
     1096  $set['emptyok'] = 0; 
     1097  $set['description'] = 'When set to false, the MP3 files can be loaded and WAV files converted to MP3 in the MoH module. The default behavior of true assumes you have mpg123 loaded as well as sox and will convert MP3 files to WAV. This is highly recommended as MP3 files heavily tax the system and can cause instability on a busy phone system'; 
     1098  $set['type'] = CONF_TYPE_BOOL; 
     1099  $freepbx_conf->define_conf_setting('AMPMPG123',$set); 
     1100 
     1101   
     1102  // 
     1103  // NEW TO 2.9: 
     1104  // 
     1105 
     1106 
     1107  // DAYNIGHTTCHOOK 
     1108  // 
     1109  $set['value'] = false; 
     1110  $set['defaultval'] =& $set['value']; 
     1111  $set['readonly'] = 0; 
     1112  $set['hidden'] = 0; 
     1113  $set['level'] = 0; 
     1114  $set['module'] = 'daynight'; 
     1115  $set['category'] = ''; 
     1116  $set['emptyok'] = 0; 
     1117  $set['description'] = 'By default, the Day/Night module will not hook Time Conditions allowing one to associate a daynight manual override with a time condition since time conditions have their own feature code as of version 2.9. If there is already an associaiton configured (on an upgraded system), this will have no affect for the Time Conditions that are effected. Setting this to true reverts the 2.8 and prior behavior by allowing for the use of a daynight toggle to be associated with a time conditon. This can be useful for two scenarios. First, to override a Time Condition without the automatic resetting that occurs with the built in Time Condition overrides. The second use is the ability to associate a single daynight toggle with multiple time conditions thus creating a <b>master switch</b> that can be used to override several possible call flows through different time conditions.'; 
     1118  $set['type'] = CONF_TYPE_BOOL; 
     1119  $freepbx_conf->define_conf_setting('DAYNIGHTTCHOOK',$set); 
     1120 
     1121  // TCINTERVAL 
     1122  // 
     1123  $set['value'] = '60'; 
     1124  $set['defaultval'] =& $set['value']; 
     1125  $set['readonly'] = 0; 
     1126  $set['hidden'] = 0; 
     1127  $set['level'] = 0; 
     1128  $set['module'] = 'timeconditions'; 
     1129  $set['category'] = ''; 
     1130  $set['emptyok'] = 0; 
     1131  $set['description'] = 'The polling interval in seconds used by the Time Conditions manintenace task, launched by an Asterisk call file used to update Time Conditions override states as well as keep custom device state hint values up-to-date when being used with BLF. A shorter interval will assure that BLF keys states are accurate. The interval should be less than the shortest configured span between two time condition states, so that a manual overide during such a period is properly reset when the new period starts.'; 
     1132  $set['type'] = CONF_TYPE_SELECT; 
     1133  $set['options'] = '60, 120, 180, 240, 300, 600, 900'; 
     1134  $freepbx_conf->define_conf_setting('TCINTERVAL',$set); 
     1135 
     1136  // TCMAINT 
     1137  // 
     1138  $set['value'] = true; 
     1139  $set['defaultval'] =& $set['value']; 
     1140  $set['readonly'] = 0; 
     1141  $set['hidden'] = 0; 
     1142  $set['level'] = 0; 
     1143  $set['module'] = 'timeconditions'; 
     1144  $set['category'] = ''; 
     1145  $set['emptyok'] = 0; 
     1146  $set['description'] = 'If set to false, this will override the execution of the Time Conditons maintenace task launched by call files. If all the feature codes for time conditions are disabled, the maintenance task will not be launched anyhow. Setting this to false would be fairly un-common. You may want to set this temporarily if debugging a system to avoid the periodic dialplan running through the CLI that the maintenance task launches and can be distracting.'; 
     1147  $set['type'] = CONF_TYPE_BOOL; 
     1148  $freepbx_conf->define_conf_setting('TCMAINT',$set); 
     1149
     1150 
     1151/*  
    9981152// TODO: DON'T THINK WE NEED THIS ANYMORE 
    9991153('AMPWEBADDRESS','',0,'The IP address or host name used to access the CDR<br>Default = not used','text',NULL,NULL,NULL,NULL), 
    1000  */ 
     1154*/ 
     1155