Update default configuration file

This commit is contained in:
DanB
2016-08-29 19:15:54 +02:00
parent 0829f33243
commit db02afe33e
3 changed files with 103 additions and 67 deletions

View File

@@ -9,7 +9,7 @@ import (
"github.com/cgrates/cgrates/utils"
)
// Cache is an LRU cache. It is not safe for concurrent access.
// Cache is an LRU cache.
type Cache struct {
mu sync.RWMutex
// MaxEntries is the maximum number of cache entries before

View File

@@ -45,25 +45,27 @@ const CGRATES_CFG_JSON = `
"response_cache_ttl": "0s", // the life span of a cached response
"internal_ttl": "2m", // maximum duration to wait for internal connections before giving up
"locking_timeout": "5s", // timeout internal locks to avoid deadlocks
"cache_dump_dir": "", // cache dump for faster start (leave empty to disable)
"cache_dump_dir": "", // cache dump for faster start (leave empty to disable)
},
"cache":{
"destinations": {"limit": 10000, "ttl":"0s", "precache": false},
"reverse_destinations": {"limit": 10000, "ttl":"0s", "precache": false},
"rating_plans": {"limit": 10000, "ttl":"0s","precache": true},
"rating_profiles": {"limit": 10000, "ttl":"0s", "precache": false},
"lcr": {"limit": 10000, "ttl":"0s", "precache": false},
"cdr_stats": {"limit": 10000, "ttl":"0s", "precache": false},
"actions": {"limit": 10000, "ttl":"0s", "precache": false},
"action_plans": {"limit": 10000, "ttl":"0s", "precache": false},
"action_triggers": {"limit": 10000, "ttl":"0s", "precache": false},
"shared_groups": {"limit": 10000, "ttl":"0s", "precache": false},
"aliases": {"limit": 10000, "ttl":"0s", "precache": false},
"reverse_aliases": {"limit": 10000, "ttl":"0s", "precache": false},
"destinations": {"limit": 10000, "ttl":"0s", "precache": false},
"reverse_destinations": {"limit": 10000, "ttl":"0s", "precache": false},
"rating_plans": {"limit": 10000, "ttl":"0s","precache": true},
"rating_profiles": {"limit": 10000, "ttl":"0s", "precache": false},
"lcr": {"limit": 10000, "ttl":"0s", "precache": false},
"cdr_stats": {"limit": 10000, "ttl":"0s", "precache": false},
"actions": {"limit": 10000, "ttl":"0s", "precache": false},
"action_plans": {"limit": 10000, "ttl":"0s", "precache": false},
"action_triggers": {"limit": 10000, "ttl":"0s", "precache": false},
"shared_groups": {"limit": 10000, "ttl":"0s", "precache": false},
"aliases": {"limit": 10000, "ttl":"0s", "precache": false},
"reverse_aliases": {"limit": 10000, "ttl":"0s", "precache": false},
},
"listen": {
"rpc_json": "127.0.0.1:2012", // RPC JSON listening address
"rpc_gob": "127.0.0.1:2013", // RPC GOB listening address
@@ -149,6 +151,7 @@ const CGRATES_CFG_JSON = `
"save_interval": "1m", // interval to save changed stats into dataDb storage
},
"cdrc": [
{
"id": "*default", // identifier of the CDRC runner

View File

@@ -7,40 +7,43 @@
// This is what you get when you load CGRateS with an empty configuration file.
// "general": {
// "http_skip_tls_verify": false, // if enabled Http Client will accept any TLS certificate
// "rounding_decimals": 5, // system level precision for floats
// "dbdata_encoding": "msgpack", // encoding used to store object data in strings: <msgpack|json>
// "http_skip_tls_verify": false, // if enabled Http Client will accept any TLS certificate
// "rounding_decimals": 5, // system level precision for floats
// "dbdata_encoding": "msgpack", // encoding used to store object data in strings: <msgpack|json>
// "tpexport_dir": "/var/spool/cgrates/tpe", // path towards export folder for offline Tariff Plans
// "httpposter_attempts": 3, // number of http attempts before considering request failed (eg: *call_url)
// "httpposter_attempts": 3, // number of http attempts before considering request failed (eg: *call_url)
// "http_failed_dir": "/var/spool/cgrates/http_failed", // directory path where we store failed http requests
// "default_request_type": "*rated", // default request type to consider when missing from requests: <""|*prepaid|*postpaid|*pseudoprepaid|*rated>
// "default_category": "call", // default category to consider when missing from requests
// "default_tenant": "cgrates.org", // default tenant to consider when missing from requests
// "default_timezone": "Local", // default timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
// "connect_attempts": 3, // initial server connect attempts
// "reconnects": -1, // number of retries in case of connection lost
// "connect_timeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
// "reply_timeout": "2s", // consider connection down for replies taking longer than this value
// "response_cache_ttl": "0s", // the life span of a cached response
// "internal_ttl": "2m", // maximum duration to wait for internal connections before giving up
// "locking_timeout": "5s", // timeout internal locks to avoid deadlocks
// "default_request_type": "*rated", // default request type to consider when missing from requests: <""|*prepaid|*postpaid|*pseudoprepaid|*rated>
// "default_category": "call", // default category to consider when missing from requests
// "default_tenant": "cgrates.org", // default tenant to consider when missing from requests
// "default_timezone": "Local", // default timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
// "connect_attempts": 3, // initial server connect attempts
// "reconnects": -1, // number of retries in case of connection lost
// "connect_timeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
// "reply_timeout": "2s", // consider connection down for replies taking longer than this value
// "response_cache_ttl": "0s", // the life span of a cached response
// "internal_ttl": "2m", // maximum duration to wait for internal connections before giving up
// "locking_timeout": "5s", // timeout internal locks to avoid deadlocks
// "cache_dump_dir": "", // cache dump for faster start (leave empty to disable)
// },
// "cache":{
// "destinations": {"limit": 10000, "ttl":"0s", "precache": false},
// "reverse_destinations": {"limit": 10000, "ttl":"0s", "precache": false},
// "rating_plans": {"limit": 10000, "ttl":"0s","precache": true},
// "rating_profiles": {"limit": 10000, "ttl":"0s", "precache": false},
// "lcr": {"limit": 10000, "ttl":"0s", "precache": false},
// "cdr_stats": {"limit": 10000, "ttl":"0s", "precache": false},
// "actions": {"limit": 10000, "ttl":"0s", "precache": false},
// "action_plans": {"limit": 10000, "ttl":"0s", "precache": false},
// "action_triggers": {"limit": 10000, "ttl":"0s", "precache": false},
// "shared_groups": {"limit": 10000, "ttl":"0s", "precache": false},
// "aliases": {"limit": 10000, "ttl":"0s", "precache": false},
// "reverse_aliases": {"limit": 10000, "ttl":"0s", "precache": false},
// "destinations": {"limit": 10000, "ttl":"0s", "precache": false},
// "reverse_destinations": {"limit": 10000, "ttl":"0s", "precache": false},
// "rating_plans": {"limit": 10000, "ttl":"0s","precache": true},
// "rating_profiles": {"limit": 10000, "ttl":"0s", "precache": false},
// "lcr": {"limit": 10000, "ttl":"0s", "precache": false},
// "cdr_stats": {"limit": 10000, "ttl":"0s", "precache": false},
// "actions": {"limit": 10000, "ttl":"0s", "precache": false},
// "action_plans": {"limit": 10000, "ttl":"0s", "precache": false},
// "action_triggers": {"limit": 10000, "ttl":"0s", "precache": false},
// "shared_groups": {"limit": 10000, "ttl":"0s", "precache": false},
// "aliases": {"limit": 10000, "ttl":"0s", "precache": false},
// "reverse_aliases": {"limit": 10000, "ttl":"0s", "precache": false},
// },
// "listen": {
// "rpc_json": "127.0.0.1:2012", // RPC JSON listening address
// "rpc_gob": "127.0.0.1:2013", // RPC GOB listening address
@@ -109,6 +112,7 @@
// "enabled": false, // start the CDR Server service: <true|false>
// "extra_fields": [], // extra fields to store in CDRs for non-generic CDRs
// "store_cdrs": true, // store cdrs in storDb
// "cdr_account_summary": false, // add account information from dataDB
// "rals_conns": [
// {"address": "*internal"} // address where to reach the Rater for cost calculation, empty to disable functionality: <""|*internal|x.y.z.y:1234>
// ],
@@ -125,30 +129,32 @@
// "save_interval": "1m", // interval to save changed stats into dataDb storage
// },
// "cdrc": [
// {
// "id": "*default", // identifier of the CDRC runner
// "enabled": false, // enable CDR client functionality
// "dry_run": false, // do not send the CDRs to CDRS, just parse them
// "enabled": false, // enable CDR client functionality
// "dry_run": false, // do not send the CDRs to CDRS, just parse them
// "cdrs_conns": [
// {"address": "*internal"} // address where to reach CDR server. <*internal|x.y.z.y:1234>
// {"address": "*internal"} // address where to reach CDR server. <*internal|x.y.z.y:1234>
// ],
// "cdr_format": "csv", // CDR file format <csv|freeswitch_csv|fwv|opensips_flatstore>
// "field_separator": ",", // separator used in case of csv files
// "timezone": "", // timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
// "run_delay": 0, // sleep interval in seconds between consecutive runs, 0 to use automation via inotify
// "max_open_files": 1024, // maximum simultaneous files to process, 0 for unlimited
// "data_usage_multiply_factor": 1024, // conversion factor for data usage
// "cdr_in_dir": "/var/spool/cgrates/cdrc/in", // absolute path towards the directory where the CDRs are stored
// "cdr_format": "csv", // CDR file format <csv|freeswitch_csv|fwv|opensips_flatstore|partial_csv>
// "field_separator": ",", // separator used in case of csv files
// "timezone": "", // timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
// "run_delay": 0, // sleep interval in seconds between consecutive runs, 0 to use automation via inotify
// "max_open_files": 1024, // maximum simultaneous files to process, 0 for unlimited
// "data_usage_multiply_factor": 1024, // conversion factor for data usage
// "cdr_in_dir": "/var/spool/cgrates/cdrc/in", // absolute path towards the directory where the CDRs are stored
// "cdr_out_dir": "/var/spool/cgrates/cdrc/out", // absolute path towards the directory where processed CDRs will be moved
// "failed_calls_prefix": "missed_calls", // used in case of flatstore CDRs to avoid searching for BYE records
// "cdr_path": "", // path towards one CDR element in case of XML CDRs
// "cdr_source_id": "freeswitch_csv", // free form field, tag identifying the source of the CDRs within CDRS database
// "cdr_filter": "", // filter CDR records to import
// "continue_on_success": false, // continue to the next template if executed
// "partial_record_cache": "10s", // duration to cache partial records when not pairing
// "header_fields": [], // template of the import header fields
// "content_fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
// "failed_calls_prefix": "missed_calls", // used in case of flatstore CDRs to avoid searching for BYE records
// "cdr_path": "", // path towards one CDR element in case of XML CDRs
// "cdr_source_id": "freeswitch_csv", // free form field, tag identifying the source of the CDRs within CDRS database
// "cdr_filter": "", // filter CDR records to import
// "continue_on_success": false, // continue to the next template if executed
// "partial_record_cache": "10s", // duration to cache partial records when not pairing
// "partial_cache_expiry_action": "*dump_to_file", // action taken when cache when records in cache are timed-out <*dump_to_file|*post_cdr>
// "header_fields": [], // template of the import header fields
// "content_fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
// {"tag": "TOR", "field_id": "ToR", "type": "*composed", "value": "2", "mandatory": true},
// {"tag": "OriginID", "field_id": "OriginID", "type": "*composed", "value": "3", "mandatory": true},
// {"tag": "RequestType", "field_id": "RequestType", "type": "*composed", "value": "4", "mandatory": true},
@@ -163,6 +169,23 @@
// {"tag": "Usage", "field_id": "Usage", "type": "*composed", "value": "13", "mandatory": true},
// ],
// "trailer_fields": [], // template of the import trailer fields
// "cache_dump_fields": [
// {"tag": "CGRID", "type": "*composed", "value": "CGRID"},
// {"tag": "RunID", "type": "*composed", "value": "RunID"},
// {"tag": "TOR", "type": "*composed", "value": "ToR"},
// {"tag": "OriginID", "type": "*composed", "value": "OriginID"},
// {"tag": "RequestType", "type": "*composed", "value": "RequestType"},
// {"tag": "Direction", "type": "*composed", "value": "Direction"},
// {"tag": "Tenant", "type": "*composed", "value": "Tenant"},
// {"tag": "Category", "type": "*composed", "value": "Category"},
// {"tag": "Account", "type": "*composed", "value": "Account"},
// {"tag": "Subject", "type": "*composed", "value": "Subject"},
// {"tag": "Destination", "type": "*composed", "value": "Destination"},
// {"tag": "SetupTime", "type": "*composed", "value": "SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
// {"tag": "AnswerTime", "type": "*composed", "value": "AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
// {"tag": "Usage", "type": "*composed", "value": "Usage"},
// {"tag": "Cost", "type": "*composed", "value": "Cost"},
// ],
// },
// ],
@@ -180,7 +203,7 @@
// "cost_shift_digits": 0, // shift digits in the cost on export (eg: convert from EUR to cents)
// "mask_destination_id": "MASKED_DESTINATIONS", // destination id containing called addresses to be masked on export
// "mask_length": 0, // length of the destination suffix to be masked
// "export_folder": "/var/log/cgrates/cdre", // path where the exported CDRs will be placed
// "export_directory": "/var/spool/cgrates/cdre", // path where the exported CDRs will be placed
// "header_fields": [], // template of the exported header fields
// "content_fields": [ // template of the exported content fields
// {"tag": "CGRID", "type": "*composed", "value": "CGRID"},
@@ -217,19 +240,21 @@
// "min_call_duration": "0s", // only authorize calls with allowed duration higher than this
// "max_call_duration": "3h", // maximum call duration a prepaid call can last
// "session_ttl": "0s", // time after a session with no updates is terminated, not defined by default
//"session_ttl_last_used": "", // tweak LastUsed for sessions timing-out, not defined by default
//"session_ttl_usage": "", // tweak Usage for sessions timing-out, not defined by default
// //"session_ttl_last_used": "", // tweak LastUsed for sessions timing-out, not defined by default
// //"session_ttl_usage": "", // tweak Usage for sessions timing-out, not defined by default
// "session_indexes": [], // index sessions based on these fields for GetActiveSessions API
// },
// "sm_freeswitch": {
// "enabled": false, // starts SessionManager service: <true|false>
// "enabled": false, // starts SessionManager service: <true|false>
// "rals_conns": [
// {"address": "*internal"} // address where to reach the Rater <""|*internal|127.0.0.1:2013>
// {"address": "*internal"} // address where to reach the Rater <""|*internal|127.0.0.1:2013>
// ],
// "cdrs_conns": [
// {"address": "*internal"} // address where to reach CDR Server, empty to disable CDR capturing <*internal|x.y.z.y:1234>
// {"address": "*internal"} // address where to reach CDR Server, empty to disable CDR capturing <*internal|x.y.z.y:1234>
// ],
// "rls_conns": [], // address where to reach the ResourceLimiter service, empty to disable stats functionality: <""|*internal|x.y.z.y:1234>
// "create_cdr": false, // create CDR out of events and sends them to CDRS component
// "extra_fields": [], // extra fields to store in auth/CDRs when creating them
// "debit_interval": "10s", // interval to perform debits on.
@@ -270,10 +295,10 @@
// "enabled": false, // starts SessionManager service: <true|false>
// "listen_udp": "127.0.0.1:2020", // address where to listen for datagram events coming from OpenSIPS
// "rals_conns": [
// {"address": "*internal"} // address where to reach the Rater <""|*internal|127.0.0.1:2013>
// {"address": "*internal"} // address where to reach the Rater <""|*internal|127.0.0.1:2013>
// ],
// "cdrs_conns": [
// {"address": "*internal"} // address where to reach CDR Server, empty to disable CDR capturing <*internal|x.y.z.y:1234>
// {"address": "*internal"} // address where to reach CDR Server, empty to disable CDR capturing <*internal|x.y.z.y:1234>
// ],
// "reconnects": 5, // number of reconnects if connection is lost
// "create_cdr": false, // create CDR out of events and sends it to CDRS component
@@ -356,6 +381,14 @@
// },
// "rls": {
// "enabled": false, // starts ResourceLimiter service: <true|false>.
// "cdrstats_conns": [], // address where to reach the cdrstats service, empty to disable stats functionality: <""|*internal|x.y.z.y:1234>
// "cache_dump_interval": "0s", // dump cache regularly to dataDB, 0 - dump at start/shutdown: <""|*never|$dur>
// "usage_ttl": "3h", // expire usage records if older than this duration <""|*never|$dur>
// },
// "mailer": {
// "server": "localhost", // the server to use when sending emails out
// "auth_user": "cgrates", // authenticate to email server using this user