Changeset 10965

Show
Ignore:
Timestamp:
01/15/11 03:39:06 (2 years ago)
Author:
p_lindheimer
Message:

partially done work to intialize freepbx_settings, will replace migration insert table, the plan is that we will be able to run this from framework modules or install_amp like ugrades, need to make sure we can run this class from install_amp though re #4740, this work is untested and should not currently do anything

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/install_amp

    r10215 r10965  
    765765// **** read amportal.conf 
    766766 
     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 
     771// 
    767772outn("Reading ".AMP_CONF.".."); 
    768773$amp_conf = install_parse_amportal_conf(AMP_CONF); 
     
    828833}  
    829834// 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 
     837// 
    830838write_amportal_conf(AMP_CONF, $amp_conf); 
    831839 
     
    866874$amp_conf["AMPENGINE"]=$pbx_engine; 
    867875 
     876// TODO: Again? didn't we just do that above? 
     877// 
    868878write_amportal_conf(AMP_CONF, $amp_conf); 
    869879 
     
    11591169upgrade_all($version); 
    11601170 
     1171// TODO: this is probably where we will put freepbx_settings_init 
     1172//       to initialize/update all the possible settings 
     1173 
    11611174// **** Generate AMP configs 
    11621175out("Generating AMP configs.."); 
  • freepbx/trunk/libfreepbx.install.php

    r9043 r10965  
    378378/********************************************************************************************************************/ 
    379379 
    380 ?> 
     380// TODO: copy all descriptions into _() gettext at top to be picked up by localization tools 
     381// 
     382function freepbx_settings_init() { 
     383  global $amp_conf; 
     384  //TODO will probably change to freepbx_settings.class.php 
     385  require_once ($amp_conf['AMPWEBROOT'].'/admin/libraries/config.functions.php'); 
     386 
     387  $freepbx_conf =& freepbx_conf::create(); 
     388 
     389  $set['value'] = ''; 
     390  $set['defaultval'] =& $set['value']; 
     391  $set['readonly'] = 0; 
     392  $set['hidden'] = 0; 
     393  $set['level'] = 0; 
     394  $set['module'] = ''; 
     395  $set['emptyok'] = 0; 
     396 
     397  // 
     398  // CATEGORY: Basic Setup 
     399  // 
     400  $set['category'] = 'Basic Setup'; 
     401 
     402  // AMPENGINE 
     403  $set['value'] = 'asterisk'; 
     404  $set['options'] = 'asterisk'; 
     405  $set['description'] = 'The telephony backend engine being used, asterisk is the only option currently.'; 
     406  $set['level'] = 3; 
     407  $set['readonly'] = 1; 
     408  $set['type'] = CONF_TYPE_SELECT; 
     409  $freepbx_conf->define_conf_setting('AMPENGINE',$set); 
     410  $set['readonly'] = 0; 
     411  $set['level'] = 0; 
     412 
     413  // AUTHTYPE 
     414  $set['value'] = 'database'; 
     415  $set['options'] = 'none,database,webserver'; 
     416  $set['description'] = 'Authentication type to use for web admin. If type set to <b>database</b>, the primary AMP admin credentials will be the AMPDBUSER/AMPDBPASS above. Valid settings are: none, database.'; 
     417  $set['level'] = 3; 
     418  $set['type'] = CONF_TYPE_SELECT; 
     419  $freepbx_conf->define_conf_setting('AUTHTYPE',$set); 
     420  $set['level'] = 0; 
     421 
     422  // AMPEXTENSIONS 
     423  $set['value'] = 'extensions'; 
     424  $set['options'] = 'extensions,deviceanduser'; 
     425  $set['description'] = 'Sets the extension behavior in FreePBX.  If set to <b>extensions</b>, Devices and Users are administered together as a unified Extension, and appear on a single page. If set to <b>deviceanduser</b>, Devices and Users will be administered seperately. Devices (e.g. each individual line on a SIP phone) and Users (e.g. <b>101</b>) will be configured independent of each other, allowing association of one User to many Devices, or allowing Users to login and logout of Devices.'; 
     426  $set['type'] = CONF_TYPE_SELECT; 
     427  $freepbx_conf->define_conf_setting('AMPEXTENSIONS',$set); 
     428 
     429  // AMPVMUMASK 
     430  $set['value'] = '007'; 
     431  $set['description'] = 'Defaults to 077 allowing only the asterisk user to have any permission on VM files. If set to something like 007, it would allow the group to have permissions. This can be used if setting apache to a different user then asterisk, so that the apache user (and thus ARI) can have access to read/write/delete the voicemail files. If changed, some of the voicemail directory structures may have to be manually changed.'; 
     432  $set['type'] = CONF_TYPE_TEXT; 
     433  $freepbx_conf->define_conf_setting('AMPVMUMASK',$set); 
     434 
     435  // ARI_ADMIN_USERNAME 
     436  $set['value'] = ''; 
     437  $set['description'] = 'This is the default admin name used to allow an administrator to login to ARI bypassing all security. Change this to whatever you want, dont forget to change the ARI_ADMIN_PASSWORD as well.Default = not set'; 
     438  $set['emptyok'] = 1; 
     439  $set['type'] = CONF_TYPE_TEXT; 
     440  $freepbx_conf->define_conf_setting('ARI_ADMIN_USERNAME',$set); 
     441  $set['emptyok'] = 0; 
     442 
     443  // ARI_ADMIN_PASSWORD 
     444  $set['value'] = 'ari_password'; 
     445  $set['description'] = 'This is the default admin password to allow an administrator to login to ARI bypassing all security. Change this to a secure password.Default = not set'; 
     446  $set['type'] = CONF_TYPE_TEXT; 
     447  $freepbx_conf->define_conf_setting('ARI_ADMIN_PASSWORD',$set); 
     448 
     449 
     450  // 
     451  // CATEGORY: Dialplan and Operational 
     452  // 
     453  $set['category'] = 'Dialplan and Operational'; 
     454 
     455  // AMPBADNUMBER 
     456  $set['value'] = true; 
     457  $set['description'] = 'Generate the bad-number context which traps any bogus number or feature code and plays a message to the effect. If you use the Early Dial feature on some Grandstream phones, you will want to set this to false.'; 
     458  $set['type'] = CONF_TYPE_BOOL; 
     459  $freepbx_conf->define_conf_setting('AMPBADNUMBER',$set); 
     460 
     461  // CWINUSEBUSY 
     462  $set['value'] = true; 
     463  $set['description'] = 'For extensions that have CW enabled, report unanswered CW calls as <b>busy</b> (resulting in busy voicemail greeting). If set to no, unanswered CW calls simply report as <b>no-answer</b>.'; 
     464  $set['type'] = CONF_TYPE_BOOL; 
     465  $freepbx_conf->define_conf_setting('CWINUSEBUSY',$set); 
     466 
     467  // ZAP2DAHDICOMPAT 
     468  $set['value'] = false; 
     469  $set['description'] = 'If set to true, FreePBX will check if you have chan_dadhi installed. If so, it will automatically use all your ZAP configuration settings (devices and trunks) and silently convert them, under the covers, to DAHDI so no changes are needed. The GUI will continue to refer to these as ZAP but it will use the proper DAHDI channels. This will also keep Zap Channel DIDs working.'; 
     470  $set['type'] = CONF_TYPE_BOOL; 
     471  $freepbx_conf->define_conf_setting('ZAP2DAHDICOMPAT',$set); 
     472 
     473  // DYNAMICHINTS 
     474  $set['value'] = false; 
     475  $set['description'] = 'If true, Core will not statically generate hints, but instead make a call to the AMPBIN php script, and generate_hints.php through an Asterisk #exec call. This requires Asterisk.conf to be configured with <b>execincludes=yes<b> set in the [options] section.'; 
     476  $set['type'] = CONF_TYPE_BOOL; 
     477  $freepbx_conf->define_conf_setting('DYNAMICHINTS',$set); 
     478 
     479  // ENABLECW 
     480  $set['value'] = true; 
     481  $set['description'] = 'Enable call waiting by default when an extension is created (Default is yes). Set to <b>no</b> to if you dont want phones to be commissioned with call waiting already enabled. The user would then be required to dial the CW feature code (*70 default) to enable their phone. Most installations should leave this alone. It allows multi-line phones to receive multiple calls on their line appearances.'; 
     482  $set['type'] = CONF_TYPE_BOOL; 
     483  $freepbx_conf->define_conf_setting('ENABLECW',$set); 
     484 
     485  // FCBEEPONLY 
     486  $set['value'] = false; 
     487  $set['description'] = 'When set to true, a beep is played instead of confirmation message when activating/de-activating: CallForward, CallWaiting, DayNight, DoNotDisturb and FindMeFollow.'; 
     488  $set['type'] = CONF_TYPE_BOOL; 
     489  $freepbx_conf->define_conf_setting('FCBEEPONLY',$set); 
     490 
     491  // USEDEVSTATE 
     492  $set['value'] = false; 
     493  $set['description'] = 'If this is set, it assumes that you are running Asterisk 1.4 or higher and want to take advantage of the func_devstate.c backport available from Asterisk 1.6. This allows custom hints to be created to support BLF for server side feature codes such as daynight, followme, etc'; 
     494  $set['type'] = CONF_TYPE_BOOL; 
     495  $freepbx_conf->define_conf_setting('USEDEVSTATE',$set); 
     496 
     497  // USEGOOGLEDNSFORENUM 
     498  $set['value'] = false; 
     499  $set['description'] = 'Setting this flag will generate the required global variable so that enumlookup.agi will use Google DNS 8.8.8.8 when performing an ENUM lookup. Not all DNS deals with NAPTR record, but Google does. There is a drawback to this as Google tracks every lookup. If you are not comfortable with this, do not enable this setting. Please read Google FAQ about this: <b>http://code.google.com/speed/public-dns/faq.html#privacy</b>.'; 
     500  $set['type'] = CONF_TYPE_BOOL; 
     501  $freepbx_conf->define_conf_setting('USEGOOGLEDNSFORENUM',$set); 
     502 
     503  // DISABLECUSTOMCONTEXTS 
     504  $set['value'] = false; 
     505  $set['description'] = 'Normally FreePBX auto-generates a custom context that may be usable for adding custom dialplan to modify the normal behavior of FreePBX. It takes a good understanding of how Asterisk processes these includes to use this and in many of the cases, there is no useful application. All includes will result in a WARNING in the Asterisk log if there is no context found to include though it results in no errors. If you know that you want the includes, you can set this to true. If you comment it out FreePBX will revert to legacy behavior and include the contexts.'; 
     506  $set['type'] = CONF_TYPE_BOOL; 
     507  $freepbx_conf->define_conf_setting('DISABLECUSTOMCONTEXTS',$set); 
     508 
     509 
     510  // 
     511  // CATEGORY: Directory Layout 
     512  // 
     513  $set['category'] = 'Directory Layout'; 
     514 
     515  // AMPBIN 
     516  $set['value'] = '/var/lib/asterisk/bin'; 
     517  $set['description'] = 'Location of the FreePBX command line scripts.'; 
     518  $set['type'] = CONF_TYPE_DIR; 
     519  $freepbx_conf->define_conf_setting('AMPBIN',$set); 
     520 
     521  // AMPSBIN 
     522  $set['value'] = '/usr/sbin'; 
     523  $set['description'] = 'Where (root) command line scripts are located.'; 
     524  $set['type'] = CONF_TYPE_DIR; 
     525  $freepbx_conf->define_conf_setting('AMPSBIN',$set); 
     526     
     527  // AMPWEBROOT 
     528  $set['value'] = '/var/www/html'; 
     529  $set['description'] = 'The path to Apache webroot (leave off trailing slash).'; 
     530  $set['type'] = CONF_TYPE_DIR; 
     531  $freepbx_conf->define_conf_setting('AMPWEBROOT',$set); 
     532 
     533  // ASTAGIDIR 
     534  $set['value'] = '/var/lib/asterisk/agi-bin'; 
     535  $set['description'] = 'This is the default directory for Asterisks agi files.'; 
     536  $set['type'] = CONF_TYPE_DIR; 
     537  $freepbx_conf->define_conf_setting('ASTAGIDIR',$set); 
     538 
     539  // ASTETCDIR 
     540  $set['value'] = '/etc/asterisk'; 
     541  $set['description'] = 'This is the default directory for Asterisks configuration files.'; 
     542  $set['type'] = CONF_TYPE_DIR; 
     543  $freepbx_conf->define_conf_setting('ASTETCDIR',$set); 
     544 
     545  // ASTLOGDIR 
     546  $set['value'] = '/var/log/asterisk'; 
     547  $set['description'] = 'This is the default directory for Asterisks log files.'; 
     548  $set['type'] = CONF_TYPE_DIR; 
     549  $freepbx_conf->define_conf_setting('ASTLOGDIR',$set); 
     550 
     551  // ASTMODDIR 
     552  $set['value'] = '/usr/lib/asterisk/modules'; 
     553  $set['description'] = 'This is the default directory for Asterisks modules.'; 
     554  $set['type'] = CONF_TYPE_DIR; 
     555  $freepbx_conf->define_conf_setting('ASTMODDIR',$set); 
     556 
     557  // ASTSPOOLDIR 
     558  $set['value'] = '/var/spool/asterisk'; 
     559  $set['description'] = 'This is the default directory for Asterisks spool directory.'; 
     560  $set['type'] = CONF_TYPE_DIR; 
     561  $freepbx_conf->define_conf_setting('ASTSPOOLDIR',$set); 
     562 
     563  // ASTRUNDIR 
     564  $set['value'] = '/var/run/asterisk'; 
     565  $set['description'] = 'This is the default directory for Asterisks run files.'; 
     566  $set['type'] = CONF_TYPE_DIR; 
     567  $freepbx_conf->define_conf_setting('ASTRUNDIR',$set); 
     568 
     569  // ASTRUNDIR 
     570  $set['value'] = '/var/run/asterisk'; 
     571  $set['description'] = 'This is the default directory for Asterisks run files.'; 
     572  $set['type'] = CONF_TYPE_DIR; 
     573  $freepbx_conf->define_conf_setting('ASTRUNDIR',$set); 
     574 
     575  // ASTVARLIBDIR 
     576  $set['value'] = '/var/lib/asterisk'; 
     577  $set['description'] = 'This is the default directory for Asterisks lib files.'; 
     578  $set['type'] = CONF_TYPE_DIR; 
     579  $freepbx_conf->define_conf_setting('ASTVARLIBDIR',$set); 
     580 
     581  // AMPCGIBIN 
     582  $set['value'] = '/var/www/cgi-bin '; 
     583  $set['description'] = 'The path to Apache cgi-bin dir (leave off trailing slash).'; 
     584  $set['type'] = CONF_TYPE_DIR; 
     585  $freepbx_conf->define_conf_setting('AMPCGIBIN',$set); 
     586 
     587  // MOHDIR 
     588  $set['value'] = 'moh'; 
     589  $set['description'] = 'This is the subdirectory for the MoH files/directories which is located in ASTVARLIBDIR if not specified it will default to mohmp3 for backward compatibility.'; 
     590  $set['type'] = CONF_TYPE_DIR; 
     591  $freepbx_conf->define_conf_setting('MOHDIR',$set); 
     592 
     593  // 
     594  // CATEGORY: GUI Behavior 
     595  // 
     596  $set['category'] = 'GUI Behavior'; 
     597 
     598  // CHECKREFERER 
     599  $set['value'] = true; 
     600  $set['description'] = 'When set to the default value of true, all requests into FreePBX that might possibly add/edit/delete settings will be validated to assure the request is coming from the server. This will protect the system from CSRF (cross site request forgery) attacks. It will have the effect of preventing legitimately entering URLs that could modify settings which can be allowed by changing this field to false.'; 
     601  $set['type'] = CONF_TYPE_BOOL; 
     602  $freepbx_conf->define_conf_setting('CHECKREFERER',$set); 
     603 
     604  // MODULEADMINWGET 
     605  $set['value'] = false; 
     606  $set['description'] = 'Module Admin normally tries to get its online information through direct file open type calls to URLs that go back to the freepbx.org server. If it fails, typically because of content filters in firewalls that dont like the way PHP formats the requests, the code will fall back and try a wget to pull the information. This will often solve the problem. However, in such environment there can be a significant timeout before the failed file open calls to the URLs return and there are often 2-3 of these that occur. Setting this value will force FreePBX to avoid the attempt to open the URL and go straight to the wget calls.'; 
     607  $set['type'] = CONF_TYPE_BOOL; 
     608  $freepbx_conf->define_conf_setting('MODULEADMINWGET',$set); 
     609 
     610  // USECATEGORIES 
     611  $set['value'] = true; 
     612  $set['description'] = 'Controls if the menu items in the admin interface are sorted by category (true) or sorted alphebetically with no categories shown (false). Defaults = true'; 
     613  $set['type'] = CONF_TYPE_BOOL; 
     614  $freepbx_conf->define_conf_setting('USECATEGORIES',$set); 
     615 
     616  // SERVERINTITLE 
     617  $set['value'] = false; 
     618  $set['description'] = 'Precede browser title with the server name.'; 
     619  $set['type'] = CONF_TYPE_BOOL; 
     620  $freepbx_conf->define_conf_setting('SERVERINTITLE',$set); 
     621 
     622  // RELOADCONFIRM 
     623  $set['value'] = true; 
     624  $set['description'] = 'When set to false, will bypass the confirm on Reload Box.'; 
     625  $set['type'] = CONF_TYPE_BOOL; 
     626  $freepbx_conf->define_conf_setting('RELOADCONFIRM',$set); 
     627 
     628  // BADDESTABORT 
     629  $set['value'] = false; 
     630  $set['description'] = 'Setting either of these to true will result in retrieve_conf aborting during a reload if an extension conflict is detected or a destination is detected. It is usually better to allow the reload to go through and then correct the problem but these can be set if a more strict behavior is desired.'; 
     631  $set['level'] = 3; 
     632  $set['type'] = CONF_TYPE_BOOL; 
     633  $freepbx_conf->define_conf_setting('BADDESTABORT',$set); 
     634  $set['level'] = 0; 
     635 
     636  // XTNCONFLICTABORT 
     637  $set['value'] = false; 
     638  $set['description'] = 'Setting either of these to true will result in retrieve_conf aborting during a reload if an extension conflict is detected or a destination is detected. It is usually better to allow the reload to go through and then correct the problem but these can be set if a more strict behavior is desired.'; 
     639  $set['level'] = 3; 
     640  $set['type'] = CONF_TYPE_BOOL; 
     641  $freepbx_conf->define_conf_setting('XTNCONFLICTABORT',$set); 
     642  $set['level'] = 0; 
     643 
     644  // CUSTOMASERROR 
     645  $set['value'] = true; 
     646  $set['description'] = 'If false, then the Destination Registry will not report unknown destinations as errors. This should be left to the default true and custom destinations should be moved into the new custom apps registry.'; 
     647  $set['level'] = 2; 
     648  $set['type'] = CONF_TYPE_BOOL; 
     649  $freepbx_conf->define_conf_setting('CUSTOMASERROR',$set); 
     650  $set['level'] = 0; 
     651 
     652 
     653  // 
     654  // CATEGORY: Asterisk Manager 
     655  // 
     656  $set['category'] = 'Asterisk Manager'; 
     657 
     658  // AMPMGRPASS 
     659  $set['value'] = 'amp111'; 
     660  $set['description'] = 'Password for accessing the Asterisk Manager Interface (AMI), you must change this in manager.conf if changed here.<br>Default = amp111'; 
     661  $set['type'] = CONF_TYPE_TEXT; 
     662  $freepbx_conf->define_conf_setting('AMPMGRPASS',$set); 
     663 
     664  // AMPMGRUSER 
     665  $set['value'] = 'admin'; 
     666  $set['description'] = 'Username for accessing the Asterisk Manager Interface (AMI), you must change this in manager.conf if changed here.<br>Default = admin'; 
     667  $set['type'] = CONF_TYPE_TEXT; 
     668  $freepbx_conf->define_conf_setting('AMPMGRUSER',$set); 
     669 
     670  // ASTMANAGERHOST 
     671  $set['value'] = 'localhost'; 
     672  $set['description'] = 'Hostname for the Asterisk Manager<br>Default = 5038'; 
     673  $set['type'] = CONF_TYPE_TEXT; 
     674  $freepbx_conf->define_conf_setting('ASTMANAGERHOST',$set); 
     675 
     676  $set['type'] = CONF_TYPE_UINT; 
     677 
     678  // ASTMANAGERPORT 
     679  $set['value'] = '5038'; 
     680  $set['description'] = 'Port for the Asterisk Manager<br>Default = 5038'; 
     681  $set['type'] = CONF_TYPE_TEXT; 
     682  $freepbx_conf->define_conf_setting('ASTMANAGERPORT',$set); 
     683 
     684 
     685  // CATEGORY: Developer and Customization 
     686  // 
     687  $set['category'] = 'Developer and Customization'; 
     688  $set['level'] = 2; 
     689 
     690  // POST_RELOAD 
     691  $set['value'] =  
     692  $set['description'] = 'Automatically execute a script after applying changes in the AMP admin. Set POST_RELOAD to the script you wish to execute after applying changes. If POST_RELOAD_DEBUG=true, you will see the output of the script in the web page.'; 
     693  $set['emptyok'] = 0; 
     694  $set['type'] = CONF_TYPE_TEXT; 
     695  $freepbx_conf->define_conf_setting('POST_RELOAD',$set); 
     696  $set['emptyok'] = 1; 
     697 
     698  // FPBXDBUGFILE 
     699  $set['value'] = '/tmp/freepbx_debug.log'; 
     700  $set['description'] = 'Full path and name of FreePBX debug file. Used by the dbug() funciton by developers.'; 
     701  $set['type'] = CONF_TYPE_TEXT; 
     702  $freepbx_conf->define_conf_setting('FPBXDBUGFILE',$set); 
     703 
     704  // DEVEL 
     705  $set['value'] = false; 
     706  $set['description'] = 'This enables several debug features geared towards developers, including some page load timing information, some debug information in Module Admin, use of original CSS files and other future capabilities will be enabled.'; 
     707  $set['type'] = CONF_TYPE_BOOL; 
     708  $freepbx_conf->define_conf_setting('DEVEL',$set); 
     709 
     710  // DEVELRELOAD 
     711  $set['value'] = false; 
     712  $set['description'] = 'Forces the "Apply Configuration Changes" reload bar to always be present even when not necessary.'; 
     713  $set['type'] = CONF_TYPE_BOOL; 
     714  $freepbx_conf->define_conf_setting('DEVELRELOAD',$set); 
     715 
     716  // POST_RELOAD_DEBUG 
     717  $set['value'] = false; 
     718  $set['description'] = 'Display debug output for script used if POST_RELOAD is used.'; 
     719  $set['type'] = CONF_TYPE_BOOL; 
     720  $freepbx_conf->define_conf_setting('POST_RELOAD_DEBUG',$set); 
     721 
     722  // AMPDISABLELOG 
     723  $set['value'] = true; 
     724  $set['description'] = 'Whether or not to invoke the FreePBX log facility.'; 
     725  $set['type'] = CONF_TYPE_BOOL; 
     726  $freepbx_conf->define_conf_setting('AMPDISABLELOG',$set); 
     727 
     728  // AMPENABLEDEVELDEBUG 
     729  $set['value'] = false; 
     730  $set['description'] = 'Whether or not to include log messages marked as <b>devel-debug</b> in the log system.'; 
     731  $set['type'] = CONF_TYPE_BOOL; 
     732  $freepbx_conf->define_conf_setting('AMPENABLEDEVELDEBUG',$set); 
     733 
     734  // AMPSYSLOGLEVEL 
     735  $set['value'] = 'LOG_ERR'; 
     736  $set['options'] = 'LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, LOG_DEBUG, LOG_SQL,SQL'; 
     737  $set['description'] = 'Where to log if enabled, SQL, LOG_SQL logs to old MySQL table, others are passed to syslog system to determine where to log.'; 
     738  $set['type'] = CONF_TYPE_SELECT; 
     739  $freepbx_conf->define_conf_setting('AMPSYSLOGLEVEL',$set); 
     740   
     741  // DISABLE_CSS_AUTOGEN 
     742  $set['value'] = false; 
     743  $set['description'] = 'Stops the automatic generation of a stripped CSS file that replaces the primary sheet, usually mainstyle.css.'; 
     744  $set['type'] = CONF_TYPE_BOOL; 
     745  $freepbx_conf->define_conf_setting('DISABLE_CSS_AUTOGEN',$set); 
     746 
     747  // 
     748  // CATEGORY: Flash Operator Panel 
     749  // 
     750  $set['category'] = 'Flash Operator Panel'; 
     751  $set['level'] = 0; 
     752 
     753  // FOPSORT 
     754  $set['value'] = 'extension'; 
     755  $set['options'] = 'extension,lastname'; 
     756  $set['description'] = 'How FOP sort extensions. By Last Name [lastname] or by Extension [extension].'; 
     757  $set['type'] = CONF_TYPE_SELECT; 
     758  $freepbx_conf->define_conf_setting('FOPSORT',$set); 
     759 
     760  // FOPWEBROOT 
     761  $set['value'] = '/var/www/html/panel'; 
     762  $set['description'] = 'Path to the Flash Operator Panel webroot (leave off trailing slash).'; 
     763  $set['type'] = CONF_TYPE_DIR; 
     764  $freepbx_conf->define_conf_setting('FOPWEBROOT',$set); 
     765 
     766  // FOPPASSWORD 
     767  $set['value'] = 'passw0rd'; 
     768  $set['description'] = 'Password for performing transfers and hangups in the Flash Operator Panel (FOP).'; 
     769  $set['type'] = CONF_TYPE_TEXT; 
     770  $freepbx_conf->define_conf_setting('FOPPASSWORD',$set); 
     771 
     772  // FOPDISABLE 
     773  $set['value'] = false; 
     774  $set['description'] = 'Set to true to disable FOP in interface and retrieve_conf.  Useful for sqlite3 or if you do not want FOP.'; 
     775  $set['type'] = CONF_TYPE_BOOL; 
     776  $freepbx_conf->define_conf_setting('FOPDISABLE',$set); 
     777 
     778  // FOPRUN 
     779  $set['value'] = true; 
     780  $set['description'] = 'Set to true if you want FOP started by freepbx_engine (amportal_start), false otherwise.'; 
     781  $set['type'] = CONF_TYPE_BOOL; 
     782  $freepbx_conf->define_conf_setting('FOPRUN',$set); 
     783 
     784 
     785  // 
     786  // CATEGORY: Remote CDR Database 
     787  // 
     788  $set['category'] = 'Remote CDR Database'; 
     789  $set['level'] = 3; 
     790  $set['emptyok'] = 1; 
     791 
     792  // CDRDBHOST 
     793  $set['value'] = ''; 
     794  $set['description'] = 'DO NOT set this unless you know what you are doing. Only used if you dont use the default values provided by FreePBX.<br>Hostname of db server if not the same as AMPDBHOST.'; 
     795  $set['type'] = CONF_TYPE_TEXT; 
     796  $freepbx_conf->define_conf_setting('CDRDBHOST',$set); 
     797 
     798  // CDRDBNAME 
     799  $set['value'] = ''; 
     800  $set['description'] = 'DO NOT set this unless you know what you are doing. Only used if you dont use the default values provided by FreePBX.<br>Name of database used for cdr records.'; 
     801  $set['type'] = CONF_TYPE_TEXT; 
     802  $freepbx_conf->define_conf_setting('CDRDBNAME',$set); 
     803 
     804  // CDRDBPASS 
     805  $set['value'] = ''; 
     806  $set['description'] = 'DO NOT set this unless you know what you are doing. Only used if you dont use the default values provided by FreePBX.<br>Password for connecting to db if its not the same as AMPDBPASS.'; 
     807  $set['type'] = CONF_TYPE_TEXT; 
     808  $freepbx_conf->define_conf_setting('CDRDBPASS',$set); 
     809 
     810  // CDRDBPORT 
     811  $set['value'] = ''; 
     812  $set['description'] = 'DO NOT set this unless you know what you are doing. Only used if you dont use the default values provided by FreePBX.<br>Port number for db host.'; 
     813  $set['type'] = CONF_TYPE_TEXT; 
     814  $freepbx_conf->define_conf_setting('CDRDBPORT',$set); 
     815 
     816  // CDRDBTABLENAME 
     817  $set['value'] = ''; 
     818  $set['description'] = 'DO NOT set this unless you know what you are doing. Only used if you dont use the default values provided by FreePBX. Name of the table in the db where the cdr is stored. cdr is default.'; 
     819  $set['type'] = CONF_TYPE_TEXT; 
     820  $freepbx_conf->define_conf_setting('CDRDBTABLENAME',$set); 
     821 
     822  // CDRDBTYPE 
     823  $set['value'] = ''; 
     824  $set['description'] = 'DO NOT set this unless you know what you are doing. Only used if you dont use the default values provided by FreePBX. Defaults to your configured AMDBENGINE.'; 
     825  $set['options'] = ',mysql,postgres'; 
     826  $set['type'] = CONF_TYPE_SELECT; 
     827  $freepbx_conf->define_conf_setting('CDRDBTYPE',$set); 
     828 
     829  // CDRDBUSER 
     830  $set['value'] = ''; 
     831  $set['description'] = 'DO NOT set this unless you know what you are doing. Only used if you dont use the default values provided by FreePBX. Username to connect to db with if it is not the same as AMPDBUSER.'; 
     832  $set['type'] = CONF_TYPE_TEXT; 
     833  $freepbx_conf->define_conf_setting('CDRDBUSER',$set); 
     834 
     835 
     836  // 
     837  // CATEGORY: Remote CDR Database 
     838  // 
     839  $set['category'] = 'Styling and Logos'; 
     840  $set['level'] = 1; 
     841  $set['emptyok'] = 0; 
     842 
     843 
     844  // AMPADMINLOGO 
     845  $set['value'] = ''; 
     846  $set['description'] = 'Legacy setting, use BRAND_IMAGE_FREEPBX_RIGHT in the future. If set, this will override BRAND_IMAGE_FREEPBX_RIGHT. Overrides the standard logo that is to be displayed at the TOP RIGHT of the admin screen. This enables you to customize the look of the administration screen. NOTE: images need to be saved in the ..../admin/images directory of your AMP install. This image should be 55px in height.'; 
     847  $set['type'] = CONF_TYPE_TEXT; 
     848  $set['emptyok'] = 1; 
     849  $freepbx_conf->define_conf_setting('AMPADMINLOGO',$set); 
     850 
     851  // BRAND_IMAGE_HIDE_NAV_BACKGROUND 
     852  $set['value'] = false; 
     853  $set['description'] = 'Hide the configured left navigation bar background.'; 
     854  $set['type'] = CONF_TYPE_BOOL; 
     855  $set['emptyok'] = 0; 
     856  $freepbx_conf->define_conf_setting('BRAND_IMAGE_HIDE_NAV_BACKGROUND',$set); 
     857 
     858  // BRAND_IMAGE_SHADOW_SIDE_BACKGROUND 
     859  $set['value'] = 'images/shadow-side-background.png'; 
     860  $set['description'] = 'Styling image.'; 
     861  $set['emptyok'] = 1; 
     862  $set['type'] = CONF_TYPE_TEXT; 
     863  $freepbx_conf->define_conf_setting('BRAND_IMAGE_HIDE_NAV_BACKGROUND',$set); 
     864 
     865  // BRAND_IMAGE_FREEPBX_RIGHT 
     866  $set['value'] = 'images/logo.png'; 
     867  $set['description'] = 'Right upper logo. Use this setting instead of AMPADMINLOGO. Path is relative to admin.'; 
     868  $set['type'] = CONF_TYPE_TEXT; 
     869  $set['emptyok'] = 0; 
     870  $freepbx_conf->define_conf_setting('BRAND_IMAGE_FREEPBX_RIGHT',$set); 
     871 
     872  // BRAND_IMAGE_FREEPBX_LEFT 
     873  $set['value'] = 'images/freepbx_large.png'; 
     874  $set['description'] = 'Left upper logo.  Path is relative to admin.'; 
     875  $set['type'] = CONF_TYPE_TEXT; 
     876  $set['emptyok'] = 0; 
     877  $freepbx_conf->define_conf_setting('BRAND_IMAGE_FREEPBX_LEFT',$set); 
     878 
     879  // BRAND_IMAGE_FREEPBX_FOOT 
     880  $set['value'] = 'images/freepbx_small.png'; 
     881  $set['description'] = 'Logo in footer.  Path is relative to admin.'; 
     882  $set['type'] = CONF_TYPE_TEXT; 
     883  $set['emptyok'] = 1; 
     884  $freepbx_conf->define_conf_setting('BRAND_IMAGE_FREEPBX_FOOT',$set); 
     885 
     886  // BRAND_IMAGE_RELOAD_LOADING 
     887  $set['value'] = 'images/loading.gif'; 
     888  $set['description'] = 'Image used during a reload, default is animated GIF eating the * (asterisk).  Path is relative to admin.'; 
     889  $set['type'] = CONF_TYPE_TEXT; 
     890  $set['emptyok'] = 1; 
     891  $freepbx_conf->define_conf_setting('BRAND_IMAGE_RELOAD_LOADING',$set); 
     892 
     893  // BRAND_FREEPBX_ALT_LEFT 
     894  $set['value'] = ''; 
     895  $set['description'] = 'alt attribute to use in place of image and title hover value. Defaults to FreePBX'; 
     896  $set['type'] = CONF_TYPE_TEXT; 
     897  $set['emptyok'] = 1; 
     898  $freepbx_conf->define_conf_setting('BRAND_FREEPBX_ALT_LEFT',$set); 
     899 
     900  // BRAND_FREEPBX_ALT_RIGHT 
     901  $set['value'] = ''; 
     902  $set['description'] = 'alt attribute to use in place of image and title hover value. Defaults to FreePBX'; 
     903  $set['type'] = CONF_TYPE_TEXT; 
     904  $set['emptyok'] = 1; 
     905  $freepbx_conf->define_conf_setting('BRAND_FREEPBX_ALT_RIGHT',$set); 
     906 
     907  // BRAND_FREEPBX_ALT_FOOT 
     908  $set['value'] = ''; 
     909  $set['description'] = 'alt attribute to use in place of image and title hover value. Defaults to FreePBX'; 
     910  $set['type'] = CONF_TYPE_TEXT; 
     911  $set['emptyok'] = 1; 
     912  $freepbx_conf->define_conf_setting('BRAND_FREEPBX_ALT_FOOT',$set); 
     913 
     914  // BRAND_IMAGE_FREEPBX_LINK_LEFT 
     915  $set['value'] = ''; 
     916  $set['description'] = 'link to follow when clicking on logo, defaults to http://www.freepbx.org'; 
     917  $set['type'] = CONF_TYPE_TEXT; 
     918  $set['emptyok'] = 1; 
     919  $freepbx_conf->define_conf_setting('BRAND_IMAGE_FREEPBX_LINK_LEFT',$set); 
     920 
     921  // BRAND_IMAGE_FREEPBX_LINK_RIGHT 
     922  $set['value'] = ''; 
     923  $set['description'] = 'link to follow when clicking on logo, defaults to http://www.freepbx.org'; 
     924  $set['type'] = CONF_TYPE_TEXT; 
     925  $set['emptyok'] = 1; 
     926  $freepbx_conf->define_conf_setting('BRAND_IMAGE_FREEPBX_LINK_RIGHT',$set); 
     927 
     928  // BRAND_IMAGE_FREEPBX_LINK_FOOT 
     929  $set['value'] = ''; 
     930  $set['description'] = 'link to follow when clicking on logo, defaults to http://www.freepbx.org'; 
     931  $set['type'] = CONF_TYPE_TEXT; 
     932  $set['emptyok'] = 1; 
     933  $freepbx_conf->define_conf_setting('BRAND_IMAGE_FREEPBX_LINK_FOOT',$set); 
     934 
     935  // BRAND_HIDE_LOGO_RIGHT 
     936  $set['value'] = false; 
     937  $set['description'] = 'Setting to true will hide the upper right logo.'; 
     938  $set['type'] = CONF_TYPE_BOOL; 
     939  $set['emptyok'] = 0; 
     940  $freepbx_conf->define_conf_setting('BRAND_HIDE_LOGO_RIGHT',$set); 
     941 
     942  // BRAND_HIDE_HEADER_VERSION 
     943  $set['value'] = false; 
     944  $set['description'] = 'Setting to true will hide the FreePBX version information below the left upper header.'; 
     945  $set['type'] = CONF_TYPE_BOOL; 
     946  $set['emptyok'] = 0; 
     947  $freepbx_conf->define_conf_setting('BRAND_HIDE_HEADER_VERSION',$set); 
     948 
     949  // BRAND_HIDE_HEADER_MENUS 
     950  $set['value'] = false; 
     951  $set['description'] = 'Setting to true will hide the complete horizontal menu bar in the header.'; 
     952  $set['type'] = CONF_TYPE_BOOL; 
     953  $set['emptyok'] = 0; 
     954  $freepbx_conf->define_conf_setting('BRAND_HIDE_HEADER_MENUS',$set); 
     955 
     956  // BRAND_CSS_ALT_MAINSTYLE 
     957  $set['value'] = ''; 
     958  $set['description'] = 'Set this to replace the default mainstyle.css style sheet with your own, relative to admin.'; 
     959  $set['type'] = CONF_TYPE_TEXT; 
     960  $set['emptyok'] = 1; 
     961  $freepbx_conf->define_conf_setting('BRAND_CSS_ALT_MAINSTYLE',$set); 
     962 
     963  // BRAND_CSS_CUSTOM 
     964  $set['value'] = ''; 
     965  $set['description'] = 'Optional custom CSS style sheet included after the primary one and any module specific ones are loaded, relative to admin.'; 
     966  $set['type'] = CONF_TYPE_TEXT; 
     967  $set['emptyok'] = 1; 
     968  $freepbx_conf->define_conf_setting('BRAND_CSS_CUSTOM',$set); 
     969 
     970  $freepbx_conf->commit_conf_settings(); 
     971
     972 
     973/* TODO: These go in the modules 
     974 
     975dashboard: 
     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 
     980daynight: 
     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 
     984timeconditions: 
     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 
     989queues: 
     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 
     993music: 
     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 
     998// TODO: DON'T THINK WE NEED THIS ANYMORE 
     999('AMPWEBADDRESS','',0,'The IP address or host name used to access the CDR<br>Default = not used','text',NULL,NULL,NULL,NULL), 
     1000 */