config.php

Go to the documentation of this file.
00001 <?php
00002 
00003 /** \file
00004  * Settings and constants for aTinyMON
00005  */
00006 
00007 /* Asterisk settings */
00008 
00009 /** Asterisk host. */
00010 define ('AST_HOST', 'localhost') ;
00011 /** Asterisk Manager Interface TCP port (5038 usually). */
00012 define ('AST_PORT', 5038) ;
00013 /** Username for Asterisk Manager Interface.
00014  * This user must be defined in Asterisk manager.conf file. */
00015 define ('AST_USERNAME', 'YOUR_AMI_USERNAME') ;
00016 /** Password for Asterisk Manager Interface user. */
00017 define ('AST_PASSWORD', 'YOUR_AMI_PASSWORD') ;
00018 
00019 /* Database settings */
00020 
00021 /** MySQL server host. */
00022 define ('DB_HOST', 'localhost') ;
00023 /** MySQL server port (3306 usually). */
00024 define ('DB_PORT', 3306) ;
00025 /** MySQL user for atinyman.pl and aTinyMON.php.
00026  * This user must have read/write permissions on the tickets table. */
00027 define ('DB_USERNAME', 'YOUR_MYSQL_USERNAME') ;
00028 /** Password for MySQL user. */
00029 define ('DB_PASSWORD', 'YOUR_MYSQL_PASSWORD') ;
00030 /** Database that hosts the tickets table ('test' database for instance). */
00031 define ('DB_DATABASE', 'test') ;
00032 /** Table that will contain the tickets.
00033  *     Suggestion to create tickets table :
00034  *         CREATE TABLE `tickets` (
00035  *           `id` int(11) NOT NULL auto_increment,
00036  *           `datetime` datetime NOT NULL default '0000-00-00 00:00:00',
00037  *           `ticket` text NOT NULL,
00038  *           PRIMARY KEY (`id`)
00039  *         ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
00040  *     You may choose different ENGINE and DEFAULT CHARSET.
00041  *     aTinyMON/atinyman can create it automatically if they have sufficient permissions.
00042  */
00043 define ('DB_TABLE', 'tickets') ;
00044 
00045 /* Monitoring utility settings */
00046 
00047 /** Location of atinyman.pl */
00048 define ('MON_APP', '/var/www/html/atinymon/atinyman.pl') ;
00049 /** Polling period for scheduled polling requests. */
00050 define ('POLLING_PERIOD', 300) ;
00051 /** How long to keep tickets.
00052  * Don't set this value too short, because TinyMON needs a bit of historical
00053  * data to self-train about Asterisk devices. Example : 900 = 15 minutes. */
00054 define ('TICKETS_PURGE', 900) ;
00055 
00056 /* Debug settings */
00057 
00058 /** Debug mode : 1 or more will activate miscellaneous debugging features. */
00059 define ('DEBUG', 0) ;
00060 /** Auto-freeze mode : freeze display if an unknown event could not be handled. */
00061 define ('FREEZE_IF_NOT_HANDLED', FALSE) ;
00062 /** Demo mode : run aTinyMON with a demo database. */
00063 define ('DEMO', FALSE) ;
00064 
00065 /* Misc settings : HTML page refresh, ... */
00066 
00067 /** Redirection when exiting aTinyMON. */
00068 define ('REDIRECT', '..') ;
00069 /** Delay before the web browser will request a page refresh. */
00070 define ('REFRESH_MIN', 2) ;
00071 /** Maximum delay between 2 pages. */
00072 define ('REFRESH_MAX', 10) ;
00073 /** How many tickets maximum should be handled for one page refresh. */
00074 define ('TICKETS_PER_REFRESH_MAX', 1000) ;
00075 /** How long should we wait before we "forget" a call when we have no news.
00076  * Advice : don't set lower than POLLING_PERIOD. */
00077 define ('CALL_TIMEOUT', 3600) ;
00078 /** How long should we wait before we "forget" a device when we have no news.
00079  * Advice : don't set lower than POLLING_PERIOD. */
00080 define ('DEVICE_TIMEOUT', 7200) ;
00081 /** Display by default all new channels types (SIP, IAX2, MGCP and others). */
00082 define ('VIEW_BY_DEFAULT', TRUE) ;
00083 /** Display offline devices by default. */
00084 define ('OFFLINE_BY_DEFAULT', TRUE) ;
00085 /** Display AMI events by default. */
00086 define ('EVENTS_BY_DEFAULT', FALSE) ;
00087 /** Mask pseudo-device Zap/pseudo (used for meetme conferences) and fake channel OutgoingSpoolFailed. */
00088 define ('MASK_PSEUDO', TRUE) ;
00089 
00090 /* Internal data : images, icons and tooltips */
00091 
00092 define ('PATH_IMG', 'images/') ;
00093 define ('IMG_BLANK', PATH_IMG . 'blank_16_16.png') ;
00094 define ('IMG_SELECTED', PATH_IMG . 'nu/ok_16.png') ;
00095 define ('IMG_NOT_SELECTED', PATH_IMG . 'nu/stop_16.png') ;
00096 
00097 $ui = array(
00098         'frozen' =>  array (PATH_IMG . 'nu/ktimer.png', 'Frozen'),
00099         'running' => array (PATH_IMG . 'nu/misc.png', 'Running'),
00100         'refresh' => array (PATH_IMG . 'nu/tool_resume.png', 'Refresh'),
00101         'freeze' =>  array (PATH_IMG . 'nu/tool_pause.png',  'Freeze'),
00102         'quit' =>  array (PATH_IMG . 'nu/no.png',  'Close session')) ;
00103 
00104 $status = array(
00105         'unknown' => array(PATH_IMG . '0purple22.png', 'Unknown'),
00106         'alarm' =>   array(PATH_IMG . '0red22.png', 'Offline'),
00107         'offline' => array(PATH_IMG . '0grey22.png', 'Offline'),
00108         'online' =>  array(PATH_IMG . '0blue22.png', 'Online'),
00109         'ringing' => array(PATH_IMG . '0orange22.png', 'Ringing'),
00110         'active' =>  array(PATH_IMG . '0green22.png', 'Active')) ;
00111 $special['SIP'] = array(
00112         'unknown' => PATH_IMG . '1purple22.png',
00113         'alarm' =>   PATH_IMG . '1red22.png',
00114         'offline' => PATH_IMG . '1grey22.png',
00115         'online' =>  PATH_IMG . '1blue22.png',
00116         'ringing' => PATH_IMG . '1orange22.png',
00117         'active' =>  PATH_IMG . '1green22.png') ;
00118 $special['IAX2'] = $special['SIP'] ;
00119 $special['Meetme'] = array(
00120         'unknown' => PATH_IMG . '3purple22.png',
00121         'alarm' =>   PATH_IMG . '3red22.png',
00122         'offline' => PATH_IMG . '3grey22.png',
00123         'online' =>  PATH_IMG . '3blue22.png',
00124         'ringing' => PATH_IMG . '3orange22.png',
00125         'active' =>  PATH_IMG . '3green22.png') ;
00126 
00127 /* Internal data : constants */
00128 define ('UPDATE', 1) ;
00129 define ('DELETE', 0) ;
00130 
00131 ?>

Generated on Sun Jan 21 20:33:34 2007 for TinyMON by  doxygen 1.5.1