PageRenderTime 387ms CodeModel.GetById 201ms app.highlight 10ms RepoModel.GetById 171ms app.codeStats 0ms

/ser-0.9.6/serweb-0.9.4/config/config.php

#
PHP | 379 lines | 111 code | 79 blank | 189 comment | 0 complexity | 1559f60b0112c3b08173914e4a1dbbce MD5 | raw file
  1<?
  2/*
  3 * $Id: config.php,v 1.18.2.4 2005/06/27 09:15:35 kozlik Exp $
  4 */
  5
  6/*****************************************************************************
  7 * 	                     DOMAIN INDEPENDING OPTIONS                          *
  8 *****************************************************************************/
  9
 10	/* this array contain list of config parameter which can be modified
 11	   by admins of particular domains */
 12
 13	$config->domain_depend_config=array("mail_header_from", "web_contact", 
 14		"html_title", "html_doctype", "html_headers", "display_page_heading", 
 15		"alias_generation",	"first_alias_number", "alias_prefix", 
 16		"alias_postfix", "alias_lenght", "alias_generation_retries",
 17		"infomail", "regmail", "lang");
 18
 19
 20	/* set to true if SERWEB is used for more domains */
 21	$config->multidomain = false;
 22
 23		
 24	/* ------------------------------------------------------------*/
 25	/* serweb appearance                                           */
 26	/* ------------------------------------------------------------*/
 27
 28	/* use fully qualified name on user login like 'username@domain'
 29	   instead of 'username' only
 30	*/
 31
 32	$config->fully_qualified_name_on_login=true;
 33	
 34	/* the default timezone which is assigned to user on register
 35	*/		
 36	
 37	$config->default_timezone='America/New_York';
 38
 39	/* set to true if should be displayed confirmation page on deleting anything.
 40	   This option is INCOPLETE and need to be supported in templates.
 41	*/
 42	$config->require_delete_confirmation_page=false;
 43
 44	/* Regular expressions for check if phonenumber entered by user is valid
 45	   (is used only if serweb is workong with phonenumbers instead of sip addresses)
 46	   The diferent between phonenumber_regex and strict_phonenumber_regex is that 
 47	   phonenumber_regex can contain chars as '-' '/' ' ' (which will be removed
 48	   after form submition)
 49	*/
 50	
 51	$config->phonenumber_regex = "\\+?[-/ ()1-9]+";
 52	$config->strict_phonenumber_regex = "\\+?[1-9]+";
 53	
 54	/* which tabs should show in user's profile ? those set to false
 55	   by default are experimental features which have not been tested
 56	   yet
 57	*/
 58
 59	/* user tabs definitions
 60		Ctab (enabled, name_of_tab, php_script)
 61	*/
 62
 63	$config->user_tabs=array();
 64	$config->user_tabs[]=new Ctab (true, "tab_my_account", "my_account.php");					// $lang_str['tab_my_account']
 65	$config->user_tabs[]=new Ctab (true, "tab_phonebook", "phonebook.php");						// $lang_str['tab_phonebook']
 66	$config->user_tabs[]=new Ctab (true, "tab_missed_calls", "missed_calls.php");				// $lang_str['tab_missed_calls']
 67	$config->user_tabs[]=new Ctab (true, "tab_accounting", "accounting.php");					// $lang_str['tab_accounting']
 68	$config->user_tabs[]=new Ctab (true, "tab_send_im", "send_im.php");							// $lang_str['tab_send_im']
 69	$config->user_tabs[]=new Ctab (true, "tab_message_store", "message_store.php");				// $lang_str['tab_message_store']
 70	$config->user_tabs[]=new Ctab (false, "tab_voicemail", "voicemail.php");					// $lang_str['tab_voicemail']
 71	$config->user_tabs[]=new Ctab (false, "tab_user_preferences", "user_preferences.php");		// $lang_str['tab_user_preferences']
 72	$config->user_tabs[]=new Ctab (true, "tab_speed_dial", "speed_dial.php");					// $lang_str['tab_speed_dial']
 73	$config->user_tabs[]=new Ctab (false, "tab_caller_screening", "caller_screening.php");		// $lang_str['tab_caller_screening']
 74
 75	/* admin tabs definitions
 76		Ctab (enabled, name_of_tab, php_script)
 77	*/
 78	$config->admin_tabs=array();
 79	$config->admin_tabs[]=new Ctab (true, "tab_users", "users.php");							// $lang_str['tab_users']
 80	$config->admin_tabs[]=new Ctab (true, "tab_admin_privileges", "list_of_admins.php");		// $lang_str['tab_admin_privileges']
 81	$config->admin_tabs[]=new Ctab (true, "tab_ser_moni", "ser_moni.php");						// $lang_str['tab_ser_moni']
 82	$config->admin_tabs[]=new Ctab (true, "tab_user_preferences", "user_preferences.php");		// $lang_str['tab_user_preferences']
 83
 84	$config->num_of_showed_items=20; 	/* num of showed items in the list of users */
 85	$config->max_showed_rows=50;		/* maximum of showed items in "user find" */
 86
 87	
 88	/* experimental/incomplete features turned off: voicemail
 89	   and set up a jabber account for each new SIP user too
 90	*/
 91// currently disabled in serweb:	$config->show_voice_silo=false; /* show voice messages in silo too */
 92	$config->enable_dial_voicemail=false;
 93	$config->setup_jabber_account=false;
 94
 95
 96	/* allow change language of serweb on login page
 97	   this require enable more lanaguages in config_lang.php and do 
 98	   the translations
 99	*/
100	$config->allow_change_language_on_login = false;
101
102
103	$config->jserver = "localhost";   		# Jabber server hostname
104	$config->jport = "5222";     			# Jabber server port
105	$config->jcid  = 0;      				# Jabber communication ID
106
107	# Jabber module database
108	$config->jab_db_type="mysql";           # type of db host, enter "mysql" for MySQL or "pgsql" for PostgreSQL
109	$config->jab_db_srv="localhost";        # database server
110	$config->jab_db_port="";                # database port - leave empty for default
111	$config->jab_db_usr="ser";              # database user
112	$config->jab_db_pas="heslo";            # database user's password
113	$config->jab_db_db="sip_jab";           # database name
114
115
116	/* ------------------------------------------------------------*/
117	/* My account TAB                                              */
118	/* ------------------------------------------------------------*/
119	
120	$config->allow_change_email=true;
121	$config->allow_change_password=true;
122
123	/* name of attribute in user preference for set visibility status of user
124	   set to empty string if status of users should be always visible
125
126	   When enabling this option you should create user preference named
127	   same as this option of type boolean. Use tab user preferences in
128	   admin interface for create it or install script scripts/sql/usr_preferences.sql
129	   into database.
130
131	   $config->status_vibility = "sw_user_status_visible";
132	 */
133	$config->status_vibility = "";
134
135
136	/* ------------------------------------------------------------*/
137	/* accounting TAB                                              */
138	/* ------------------------------------------------------------*/
139	
140	/* Leave true to display corelated entries from cdr instead of 
141	   raw entries from acc table
142	*/
143	$config->acc_use_cdr_table = false;
144
145
146	/* ------------------------------------------------------------*/
147	/* Loging                                                      */
148	/* ------------------------------------------------------------*/
149
150	/* When you enable loging be sure if you have instaleld PEAR package
151	   Log. See http://pear.php.net/manual/en/installation.getting.php 
152	   for more information
153	*/
154
155	$config->enable_loging = false;
156	$config->log_file = "/var/log/serweb";
157
158	/* Log messages up to and including this level. Possible values:
159		  PEAR_LOG_EMERG, PEAR_LOG_ALERT, PEAR_LOG_CRIT, PEAR_LOG_ERR, 
160		  PEAR_LOG_WARNING, PEAR_LOG_NOTICE, PEAR_LOG_INFO, PEAR_LOG_DEBUG
161	   see http://www.indelible.org/pear/Log/guide.php#log-levels for more info
162	 */
163	$config->log_level = "PEAR_LOG_WARNING";
164	
165	/* If location where error was occured should be returned to user
166	   html output, set this to true
167	 */
168	$config->log_error_return_location_of_error_to_html = false;
169
170
171	/* ------------------------------------------------------------*/
172	/* ACLs                                                        */
173	/* ------------------------------------------------------------*/
174
175	/* there may be SIP contacts which you wish to prevent from being added
176	   through serweb to avoid loops, forwarding to unfriendly domains, etc.
177	   use these REGexs  to specify which contacts you do not wish;
178	   the first value includes banned REs, the second displays error message
179	   displayed to users if they attempt to introduce a banned contact
180	   Second parameter is index into $lang_str array (see files in lang directory)
181	*/
182	$config->denny_reg=array();
183	$config->denny_reg[]=new CREG_list_item("iptel\.org$", "acl_err_local_forward");
184	$config->denny_reg[]=new CREG_list_item("gateway", "acl_err_gateway_forward");
185
186	/* SER configuration script may check for group membership of users
187	   identified using digest authentication; e.g., it may only allow
188	   international calls to callers who are members of 'int' group;
189	   this is a list of groups that serweb allows to set -- they need to
190	   correspond to names of groups used in SER's membership checks
191	*/
192	$config->grp_values=array();
193	$config->grp_values[]="ld";
194	$config->grp_values[]="local";
195	$config->grp_values[]="int";
196
197
198
199	/* =========================================================== */
200    /* ADVANCED SETTINGS                                           */
201	/* =========================================================== */
202
203	/* Maximum allowed idle time before the authentication expires. 
204	   If set to 0, The authentication never expires 
205	 */
206	$config->auth_lifetime = 20;
207	
208	/* ------------------------------------------------------------*/
209	/* applications (experimental)                                 */
210	/* ------------------------------------------------------------*/
211
212	/* metar wheather application */
213	//this is an identificator in event table for sending METAR data
214	$config->metar_event_uri="sip:weather@iptel.org;type=metar";
215	//from header in sip message
216	$config->metar_from_sip_uri="sip:daemon@iptel.org";
217	// N/A message - is sended to user when we can't get his location or METAR data
218	$config->metar_na_message="sorry we can't get your location or METAR data for you";
219
220
221	/* ------------------------------------------------------------*/
222	/*            configure FW/NAT detection applet                */
223	/* ------------------------------------------------------------*/
224
225	/* the applet is used to detect whether user is behind firewall or NAT 
226	   to enable FW/NAT detection must be installed STUN server */
227
228	// show test firewall/NAT button at my account tab
229	$config->enable_test_firewall=false;
230
231	//width of NAT detection applet
232	$config->stun_applet_width=350;				
233	//height of NAT detection applet
234	$config->stun_applet_height=100;				
235	//starting class of NAT detection applet
236	$config->stun_class="STUNClientApplet.class"; 
237	//jar archive with NAT detection applet - optional - you can comment 
238	// it if you don't use jar archive
239    $config->stun_archive="STUNClientApplet.jar";             
240
241	/* applet parameters: */
242
243	/* STUN server address - must be same as web server address because 
244	   the java security manager allows only this one
245	*/
246	$config->stun_applet_param=array();
247	$config->stun_applet_param[]=new Capplet_params("server", "www.iptel.org");
248
249	/* STUN server port. The Default value is 1221 - optional - you can comment 
250		it if you want use default value
251	*/
252	$config->stun_applet_param[]=new Capplet_params("port", 1221);
253	/* destination port for the first probing attempt -- just set up a simple
254	   tcp echo server there; we use the first TCP connection to determine
255	   local IP address, which can't be learned from systems setting due to
256       security manager ; default is 5060
257	*/
258	$config->stun_applet_param[]=new Capplet_params("tcp_dummyport", 5061);
259
260	/* Number of times to resend a STUN message to a STUN server. The 
261		Default is 9 times - optional - you can comment it if you want 
262		use default value
263	*/
264	// $config->stun_applet_param[]=new Capplet_params("retransmit", 9);
265
266	/* Specify source port of UDP packet to be sent from. The Default value 
267	   is 5000 - optional - you can comment it if you want use default value
268	*/
269	// $config->stun_applet_param[]=new Capplet_params("sourceport", 5000);
270
271
272
273	/* ------------------------------------------------------------*/
274	/*            configure server monitoring					   */
275	/* ------------------------------------------------------------*/
276
277	/* if you change this values, please delete all data from table	
278	   "table_ser_mon_agg" and "table_ser_mon" by reason that the 
279		aggregated data may be calculated bad if you don't do it
280	*/
281
282	/* length of marginal period in seconds */
283	$config->ser_moni_marginal_period_length=60*5;   //5 minutes
284	
285	/* length of interval (in seconds) for which will data stored, 
286	   data older then this interval will be deleted
287	*/
288	$config->ser_moni_aggregation_interval=60*15;	//15 minut
289
290	/* ------------------------------------------------------------*/
291	/*            click to dial                                    */
292	/* ------------------------------------------------------------*/
293
294	/* address of the final destination to which we want to transfer
295	   initial CSeq and CallId */
296	$config->ctd_target="sip:23@192.168.2.16";
297
298	/* address of user wishing to initiate conversation */
299	$config->ctd_uri="sip:44@192.168.2.16";
300	
301	/* from header for click-to-dial request */
302	$config->ctd_from	=	"sip:controller@mydomain.org";
303	
304	/* sip address of outbound proxy - leave empty for no proxy*/
305	$config->ctd_outbound_proxy	=	"sip:proxy.domain.org:5060";
306
307	/* header field 'secret' for CTD request - leave empty for no use this field
308	   
309	   in SER script should be something like this:
310
311			if (search("Secret: heslo")) { 
312			    remove_hf("Secret");
313			    setflag(xy)l
314			};
315
316		and in authentication block:
317		
318			if is)flagset(xz) breakl;		   
319	   
320	 */
321	$config->ctd_secret	=	"heslo";
322	
323
324	/* ------------------------------------------------------------*/
325	/* Values you typically do NOT want to change unless you know  *
326    /* well what you are doing                                     *
327	/* ------------------------------------------------------------*/
328
329
330	/* these are table names as reffered from script and via FIFO */
331	$config->ul_table="location";
332	$config->fifo_aliases_table="aliases";
333
334	/* serweb version */
335	$config->psignature="Web_interface_Karel_Kozlik-0.9";
336
337	/* IM paging configuration */
338	$config->im_length=1300;
339
340	/* expiration times, priorities, etc. for usrloc/alias contacts */
341	$config->new_alias_expires='567648000';
342	$config->new_alias_q=1.00;
343	$config->new_alias_callid="web_call_id@fox";
344	$config->new_alias_cseq=1;
345	$config->ul_priority="1.00";
346	/* replication support ? (a new ser feature) */
347	$config->ul_replication=1;
348	/* flags support ? (a new ser feature) */
349	$config->ul_flags=1;
350
351	/* seconds in which expires "get pass session" */
352	$config->pre_uid_expires=3600;                
353	/* is the sql database query for user authentication formed
354	   with clear text password or a hashed one; the former is less
355	   secure the latter works even if password hash is incorrect,
356	   which sometimes happens, when it is calculated from an
357	   incorrect domain during installation process
358	*/
359	$config->clear_text_pw=true;
360
361	/* ------------------------------------------------------------*/
362	/*            send daily missed calls by email                 */
363	/* ------------------------------------------------------------*/
364	
365	/*
366		name of attribute in user preferences for daily sending missed  
367		calls to email, it's type should be boolean
368	*/
369	$config->up_send_daily_missed_calls="send_daily_missed_calls";
370	
371	/*
372		subject and body of daily sended email with missed calls
373	*/
374	$config->send_daily_missed_calls_mail_subj="your missed calls";
375	$config->send_daily_missed_calls_mail_body=" Hello, \n".
376			"we are sending your missed calls";
377
378				
379?>