Difference between revisions of "System.conf"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 11: Line 11:
* '''show_warning''' = default 1. If 0, then WARNING messages will not be written in /var/log/radius/radiusd.log
* '''show_warning''' = default 1. If 0, then WARNING messages will not be written in /var/log/radius/radiusd.log
* '''show_error''' =  default 1. If 0, then ERROR messages will not be written in /var/log/radius/radiusd.log
* '''show_error''' =  default 1. If 0, then ERROR messages will not be written in /var/log/radius/radiusd.log
* '''cdr_batch_size''' – after call end, cdr is stored in a buffer and when that buffer is full, all cdrs are flushed to database. This variable defines how many cdrs are buffered before flushing to database. Default value is 30 (after 30 calls all cdrs will be flushed to database). Max value is 100.
* '''cdr_batch_size''' – after call end, cdr is stored in a buffer and when that buffer is full, all cdrs are flushed to the database. This variable defines how many cdrs are buffered before flushing to database. The default value is 30 (after 30 calls all cdrs will be flushed to the database). Max value is 100.
* '''cdr_flush_time''' – cdr buffer is periodically flushed to database. This variable defines how often to flush cdr buffer to database (value is in seconds). Default value is 60 seconds (after 60 seconds, all cdrs will be flushed to database, no matter how many calls are buffered)
* '''cdr_flush_time''' – cdr buffer is periodically flushed to database. This variable defines how often to flush cdr buffer to the database (value is in seconds). The default value is 60 seconds (after 60 seconds, all cdrs will be flushed to the database, no matter how many calls are buffered)
* '''balance_check_period''' – how often to recalculate total price for user's concurent calls. Calculated price is compared with user's balance and if total price is lower than balance limit, all user's calls will be terminated. Default value is 1 (in seconds)
* '''balance_check_period''' – how often to recalculate total price for user's concurrent calls. Calculated price is compared with user's balance and if the total price is lower than the balance limit, all user's calls will be terminated. The default value is 1 (in seconds)
* '''active_calls_check_period''' – how often to update active calls. Default value is 5 (in seconds)
* '''active_calls_check_period''' – how often to update active calls. Default value is 5 (in seconds)
* '''enforced_global_hgc''' – set specific hangupcause for all failed, busy and no answer calls. Only answered calls will return default 16 hangupcause. For example ''enforced_global_hgc = 34'' will return ''503 Service Unavailable'' to originator for all non answered calls.
* '''enforced_global_hgc''' – set specific hangupcause for all failed, busy and no answer calls. Only answered calls will return default 16 hangupcause. For example ''enforced_global_hgc = 34'' will return ''503 Service Unavailable'' to originator for all non answered calls.
* '''start_timeout''' - timeout between call initiation and answer/hangup. Default value is 240 seconds. If call is not answered of hangup in this period of time, M2 will drop call with 314 HGC.
* '''start_timeout''' - timeout between call initiation and answer/hangup. The default value is 240 seconds. If call is not answered of hangup in this period of time, M2 will drop the call with 314 HGC.
* '''stop_timeout''' - timeout between call answer and hangup. Default value is 7200 seconds. If call is answered but hangup is not received in this period of time, M2 will drop call with 315 HGC.
* '''stop_timeout''' - timeout between call answer and hangup. The default value is 7200 seconds. If call is answered but hangup is not received in this period of time, M2 will drop the call with 315 HGC.
* '''server_id''' - current server id (should match Maintenance -> Servers)
* '''server_id''' - current server id (should match Maintenance -> Servers)
* '''billsec_round_function''' - how billsec should be rounded? Allowed values are '''ceil''', '''round''' and '''floor'''. Ceil will round to higher value (1.1 will be rounded to 2), round will round to the closest value (1.4 will be rounded to 1 and 1.6 will be rounded to 2), floor will round to the lower value (1.9 will be rounded to 1). By default, ceil is used to round billsec.
* '''billsec_round_function''' - how billsec should be rounded? Allowed values are '''ceil''', '''round''' and '''floor'''. Ceil will round to higher value (1.1 will be rounded to 2), round will round to the closest value (1.4 will be rounded to 1 and 1.6 will be rounded to 2), floor will round to the lower value (1.9 will be rounded to 1). By default, ceil is used to round billsec.
* '''max_call_attempts''' - maximum number of call attempts for a single call. Default value is 50.
* '''max_call_attempts''' - maximum number of call attempts for a single call. The default value is 50.
* '''do_not_log_system_cdrs''' - Default 0. If 1, then M2 will not write FAILED CDRs with HGC >= 300. Use this option if you don't need such CDRs, it will slightly improve system performance.
* '''do_not_log_system_cdrs''' - Default 0. If 1, then M2 will not write FAILED CDRs with HGC >= 300. Use this option if you don't need such CDRs, it will slightly improve system performance.
* '''do_not_log_failed_cdrs''' - Default 0. If 1, then M2 will not write FAILED CDRs to database. Use this option if you don't need FAILED CDRs, it will slightly improve system performance.
* '''do_not_log_failed_cdrs''' - Default 0. If 1, then M2 will not write FAILED CDRs to the database. Use this option if you don't need FAILED CDRs, it will slightly improve system performance.
* '''log_only_last_cdr''' - Default 0. If 1, then M2 logs only last CDR for the Call. M2 will not log failed attempts to terminators until call goes over the last one. Only one CDR is logged for the call. Can be used to improve system performance.
* '''log_only_last_cdr''' - Default 0. If 1, then M2 logs only last CDR for the Call. M2 will not log failed attempts to terminators until call goes over the last one. Only one CDR is logged for the call. It can be used to improve system performance.
* '''mysql_ping''' - Default 0 (disabled). If value is greater than 0, then M2 Core will periodically ping MySQL server to keep connections alive. Value (in seconds) defines how often to ping MySQL server.
* '''mysql_ping''' - Default 0 (disabled). If the value is greater than 0, then M2 Core will periodically ping MySQL server to keep connections alive. Value (in seconds) defines how often to ping MySQL server.
* '''reroute_stop_hgc''' - List of hangup cause codes (ISDN codes, not SIP) that should stop rerouting through other terminators. If terminator returns code that is specified in reroute_stop_hgc setting, core will skip other terminators in routing list. Multiple causes can be specified by separating them with comma separator, for example reroute_stop_hgc = 1,2,3
* '''reroute_stop_hgc''' - List of hangup cause codes (ISDN codes, not SIP) that should stop rerouting through other terminators. If terminator returns code that is specified in reroute_stop_hgc setting, the core will skip other terminators in the routing list. Multiple causes can be specified by separating them with comma separator, for example reroute_stop_hgc = 1,2,3
* '''prefix_handle''' - controls which prefix is saved to database (statistics depend on prefixes so this variable changes how statistics are presented). Accepted values are ''default'', ''originator'', ''terminator''. Default value is ''default'' which tells core to save longest prefix from both Originator's and Terminator's tariffs. Value ''originator'' tells core to save prefix that was used from Originator's Tariff (statistics will be presented from Originator's perspective). Value ''terminator'' tells core to save prefix that was used from Terminator's Tariff (statistics will be presented from Terminator's perspective).
* '''prefix_handle''' - controls which prefix is saved to the database (statistics depend on prefixes so this variable changes how statistics are presented). Accepted values are ''default'', ''originator'', ''terminator''. The default value is ''default'' which tells core to save the longest prefix from both Originator's and Terminator's tariffs. Value ''originator'' tells core to save prefix that was used from Originator's Tariff (statistics will be presented from Originator's perspective). Value ''terminator'' tells core to save prefix that was used from Terminator's Tariff (statistics will be presented from Terminator's perspective).
* '''dial_peers_by_originator_prefix''' - Default 0. If 1, then Dial Peers will be searched by selected prefix from originator tariff. If 0, then Dial Peers are searched by longest matching prefix.
* '''dial_peers_by_originator_prefix''' - Default 0. If 1, then Dial Peers will be searched by selected prefix from originator tariff. If 0, then Dial Peers are searched by the longest matching prefix.
* '''invoice_generate_wait_time''' - how many hours system should wait before Invoice is generated automatically. Default value is 6 hours. Acceptable values are 0 - 23. Since CDRs are created after call ends, we need to wait some time before generating Invoice. For example, if call starts 23:55:00 and lasts more than 5 minutes, we cannot generate invoice at midnight because this call will not be included in Invoice. Wait time allows to postpone Invoice generate event.
* '''invoice_generate_wait_time''' - how many hours system should wait before Invoice is generated automatically. The default value is 6 hours. Acceptable values are 0 - 23. Since CDRs are created after the call ends, we need to wait sometime before generating Invoice. For example, if the call starts 23:55:00 and lasts more than 5 minutes, we cannot generate an invoice at midnight because this call will not be included in the Invoice. Wait time allows postponing Invoice generate event.
* '''change_failed_16_to''' - allows to change FAILED(16) hangupcause to another hangupcause, for example FAILED(34). Accepted values are between 1 and 127 (ISDN codes).
* '''change_failed_16_to''' - allows to change FAILED(16) hangupcause to another hangupcause, for example FAILED(34). Accepted values are between 1 and 127 (ISDN codes).
* '''non_blocking_balance''' - Default 0. If > 0, then it activates the new balance update mechanics which updates the User's balance every X seconds, where X is the value of this setting. Eg. non_blocking_balance = 10, will update balances every 10s.
* '''non_blocking_balance''' - Default 0. If > 0, then it activates the new balance update mechanics which updates the User's balance every X seconds, where X is the value of this setting. Eg. non_blocking_balance = 10, will update balances every 10s. Setting can help with high system load when Concurrent Calls > 4000 / CPS > 150. With a lower load on the server, this setting will not be useful.


<br>
<br>
Line 37: Line 37:
Note that there are spaces around = symbol
Note that there are spaces around = symbol


<br/>When settings are changed, core needs to be reloaded using following command:
<br/>When settings are changed, core needs to be reloaded using the following command:


  m2 reload
  m2 reload

Revision as of 13:49, 21 October 2019

This file is in /etc/m2/system.conf and describes some values for the M2.

  • dbname - MySQL database name
  • dbuser - MySQL database user
  • dbhost - MySQL database host
  • dbsecret - MySQL database password
  • dbport - MySQL database port
  • global_call_timeout - maximum length of call (default 7200 seconds)
  • show_debug = default 1. If 0, then DEBUG messages will not be written in /var/log/radius/radiusd.log
  • show_notice = default 1. If 0, then NOTICEmessages will not be written in /var/log/radius/radiusd.log
  • show_warning = default 1. If 0, then WARNING messages will not be written in /var/log/radius/radiusd.log
  • show_error = default 1. If 0, then ERROR messages will not be written in /var/log/radius/radiusd.log
  • cdr_batch_size – after call end, cdr is stored in a buffer and when that buffer is full, all cdrs are flushed to the database. This variable defines how many cdrs are buffered before flushing to database. The default value is 30 (after 30 calls all cdrs will be flushed to the database). Max value is 100.
  • cdr_flush_time – cdr buffer is periodically flushed to database. This variable defines how often to flush cdr buffer to the database (value is in seconds). The default value is 60 seconds (after 60 seconds, all cdrs will be flushed to the database, no matter how many calls are buffered)
  • balance_check_period – how often to recalculate total price for user's concurrent calls. Calculated price is compared with user's balance and if the total price is lower than the balance limit, all user's calls will be terminated. The default value is 1 (in seconds)
  • active_calls_check_period – how often to update active calls. Default value is 5 (in seconds)
  • enforced_global_hgc – set specific hangupcause for all failed, busy and no answer calls. Only answered calls will return default 16 hangupcause. For example enforced_global_hgc = 34 will return 503 Service Unavailable to originator for all non answered calls.
  • start_timeout - timeout between call initiation and answer/hangup. The default value is 240 seconds. If call is not answered of hangup in this period of time, M2 will drop the call with 314 HGC.
  • stop_timeout - timeout between call answer and hangup. The default value is 7200 seconds. If call is answered but hangup is not received in this period of time, M2 will drop the call with 315 HGC.
  • server_id - current server id (should match Maintenance -> Servers)
  • billsec_round_function - how billsec should be rounded? Allowed values are ceil, round and floor. Ceil will round to higher value (1.1 will be rounded to 2), round will round to the closest value (1.4 will be rounded to 1 and 1.6 will be rounded to 2), floor will round to the lower value (1.9 will be rounded to 1). By default, ceil is used to round billsec.
  • max_call_attempts - maximum number of call attempts for a single call. The default value is 50.
  • do_not_log_system_cdrs - Default 0. If 1, then M2 will not write FAILED CDRs with HGC >= 300. Use this option if you don't need such CDRs, it will slightly improve system performance.
  • do_not_log_failed_cdrs - Default 0. If 1, then M2 will not write FAILED CDRs to the database. Use this option if you don't need FAILED CDRs, it will slightly improve system performance.
  • log_only_last_cdr - Default 0. If 1, then M2 logs only last CDR for the Call. M2 will not log failed attempts to terminators until call goes over the last one. Only one CDR is logged for the call. It can be used to improve system performance.
  • mysql_ping - Default 0 (disabled). If the value is greater than 0, then M2 Core will periodically ping MySQL server to keep connections alive. Value (in seconds) defines how often to ping MySQL server.
  • reroute_stop_hgc - List of hangup cause codes (ISDN codes, not SIP) that should stop rerouting through other terminators. If terminator returns code that is specified in reroute_stop_hgc setting, the core will skip other terminators in the routing list. Multiple causes can be specified by separating them with comma separator, for example reroute_stop_hgc = 1,2,3
  • prefix_handle - controls which prefix is saved to the database (statistics depend on prefixes so this variable changes how statistics are presented). Accepted values are default, originator, terminator. The default value is default which tells core to save the longest prefix from both Originator's and Terminator's tariffs. Value originator tells core to save prefix that was used from Originator's Tariff (statistics will be presented from Originator's perspective). Value terminator tells core to save prefix that was used from Terminator's Tariff (statistics will be presented from Terminator's perspective).
  • dial_peers_by_originator_prefix - Default 0. If 1, then Dial Peers will be searched by selected prefix from originator tariff. If 0, then Dial Peers are searched by the longest matching prefix.
  • invoice_generate_wait_time - how many hours system should wait before Invoice is generated automatically. The default value is 6 hours. Acceptable values are 0 - 23. Since CDRs are created after the call ends, we need to wait sometime before generating Invoice. For example, if the call starts 23:55:00 and lasts more than 5 minutes, we cannot generate an invoice at midnight because this call will not be included in the Invoice. Wait time allows postponing Invoice generate event.
  • change_failed_16_to - allows to change FAILED(16) hangupcause to another hangupcause, for example FAILED(34). Accepted values are between 1 and 127 (ISDN codes).
  • non_blocking_balance - Default 0. If > 0, then it activates the new balance update mechanics which updates the User's balance every X seconds, where X is the value of this setting. Eg. non_blocking_balance = 10, will update balances every 10s. Setting can help with high system load when Concurrent Calls > 4000 / CPS > 150. With a lower load on the server, this setting will not be useful.


Make sure that format is:

variable = value

Note that there are spaces around = symbol


When settings are changed, core needs to be reloaded using the following command:

m2 reload