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