Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- // Real-time Charging System for Telecom & ISP environments
- // Copyright (C) ITsysCOM GmbH
- //
- // This file contains the default configuration hardcoded into CGRateS.
- // This is what you get when you load CGRateS with an empty configuration file.
- "general": {
- "instance_id": "",
- "log_level": 7, // control the level of messages logged (0-emerg to 7-debug)
- // "http_skip_tls_verify": false, // if enabled Http Client will accept any TLS certificate
- // "rounding_decimals": 10, // system level precision for floats
- // "dbdata_encoding": "msgpack", // encoding used to store object data in strings: <msgpack|json>
- // "tpexport_dir": "/var/log/cgrates/tpe", // path towards export folder for offline Tariff Plans
- // "poster_attempts": 3, // number of attempts before considering post request failed (eg: *call_url, CDR replication)
- // "failed_posts_dir": "/var/spool/cgrates/failed_posts", // directory path where we store failed requests
- // "default_reqtype": "*rated", // default request type to consider when missing from requests: <""|*prepaid|*postpaid|*pseudoprepaid|*rated>
- // "default_category": "call", // default Type of Record to consider when missing from requests
- // "default_tenant": "cgrates.org", // default Tenant to consider when missing from requests
- // "default_subject": "cgrates", // default rating Subject 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
- "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
- "locking_timeout": "5s",
- "response_cache_ttl": "3s", // the life span of a cached response
- "reconnects": -1, // number of retries in case of connection lost
- "internal_ttl": "2m", // maximum duration to wait for internal connections before giving up
- },
- //"listen": {
- // "rpc_json": "127.0.0.1:2012", // RPC JSON listening address
- // "rpc_gob": "127.0.0.1:2013", // RPC GOB listening address
- // "http": "127.0.0.1:2080", // HTTP listening address
- // },
- //"http": { // HTTP server configuration
- // "json_rpc_url": "/jsonrpc", // JSON RPC relative URL ("" to disable)
- // "ws_url": "/ws", // WebSockets relative URL ("" to disable)
- // "use_basic_auth": false, // use basic authentication
- // "auth_users": {} // basic authentication usernames and base64-encoded passwords (eg: { "username1": "cGFzc3dvcmQ=", "username2": "cGFzc3dvcmQy "})
- // },
- "tariffplan_db": { // database used to store active tariff plan configuration
- "db_type": "redis", // tariffplan_db type: <redis>
- "db_host": "127.0.0.1", // tariffplan_db host address
- "db_port": 6379, // port to reach the tariffplan_db
- "db_name": "11", // tariffplan_db name to connect to
- // "db_user": "", // sername to use when connecting to tariffplan_db
- // "db_passwd": "", // password to use when connecting to tariffplan_db
- },
- "data_db": { // database used to store runtime data (eg: accounts, cdr stats)
- "db_type": "redis", // data_db type: <redis|mongo>
- "db_host": "127.0.0.1", // data_db host address
- "db_port": 6379, // data_db port to reach the database
- "db_name": "11", // data_db database name to connect to
- // "db_user": "cgrates", // username to use when connecting to data_db
- // "db_password": "", // password to use when connecting to data_db
- // "load_history_size": 10, // Number of records in the load history
- },
- "stor_db": { // database used to store offline tariff plans and CDRs
- "db_type": "postgres", // stor database type to use: <mongo|mysql|postgres>
- "db_host": "127.0.0.1", // the host to connect to
- "db_port": 5432, // the port to reach the stordb
- "db_name": "cgrates", // stor database name
- "db_user": "cgrates", // username to use when connecting to stordb
- "db_password": "CGRateS.org", // password to use when connecting to stordb
- // "max_open_conns": 100, // maximum database connections opened, not applying for mongo
- // "max_idle_conns": 10, // maximum database connections idle, not applying for mongo
- // "conn_max_lifetime": 0, // maximum amount of time in seconds a connection may be reused (0 for unlimited), not applying for mongo
- "cdrs_indexes": [], // indexes on cdrs table to speed up queries, used only in case of mongo
- },
- //"balancer": {
- // "enabled": false, // start Balancer service: <true|false>
- //},
- "rater": {
- "enabled": true, // enable Rater service: <true|false>
- // "balancer": "", // register to balancer as worker: <""|internal|x.y.z.y:1234>
- "cdrstats": "internal", // address where to reach the cdrstats service, empty to disable stats functionality<""|internal|x.y.z.y:1234>
- "historys": "internal", // address where to reach the history service, empty to disable history functionality: <""|internal|x.y.z.y:1234>
- "pubsubs": "internal", // address where to reach the pubusb service, empty to disable pubsub functionality: <""|internal|x.y.z.y:1234>
- "users": "internal", // address where to reach the user service, empty to disable user profile functionality: <""|internal|x.y.z.y:1234>
- "aliases": "internal"
- },
- "scheduler": {
- "enabled": true, // start Scheduler service: <true|false>
- },
- "cdrs": {
- "enabled": true, // 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
- "rater": "internal", // address where to reach the Rater for cost calculation, empty to disable functionality: <""|internal|x.y.z.y:1234>
- // "pubsubs": "", // address where to reach the pubusb service, empty to disable pubsub functionality: <""|internal|x.y.z.y:1234>
- // "users": "", // address where to reach the user service, empty to disable user profile functionality: <""|internal|x.y.z.y:1234>
- // "aliases": "", // address where to reach the aliases service, empty to disable aliases functionality: <""|internal|x.y.z.y:1234>
- // "cdrstats": "internal", // address where to reach the cdrstats service, empty to disable stats functionality: <""|internal|x.y.z.y:1234>
- // "cdr_replication":[], // replicate the raw CDR to a number of servers
- },
- "cdrstats": {
- "enabled": true, // starts the cdrstats service: <true|false>
- // "save_interval": "1m", // interval to save changed stats into dataDb storage
- },
- "cdre": {
- "*default": {
- "cdr_format": "csv", // exported CDRs format <csv>
- "field_separator": ",",
- "data_usage_multiply_factor": 1, // multiply data usage before export (eg: convert from KBytes to Bytes)
- "sms_usage_multiply_factor": 1, // multiply data usage before export (eg: convert from SMS unit to call duration in some billing systems)
- "generic_usage_multiply_factor": 1, // multiply data usage before export (eg: convert from GENRIC unit to call duration in some billing systems)
- "cost_multiply_factor": 1, // multiply cost before export, eg: add VAT
- "cost_rounding_decimals": -1, // rounding decimals for Cost values. -1 to disable rounding
- "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_dir": "/tmp/cgr_kamevapi/cgrates/cdre", // path where the exported CDRs will be placed, default path /var/log/cgrates/cdre
- "header_fields": [], // template of the exported header fields
- "content_fields": [ // template of the exported content fields
- {"tag": "CgrId", "cdr_field_id": "cgrid", "type": "cdrfield", "value": "cgrid"},
- {"tag":"RunId", "cdr_field_id": "mediation_runid", "type": "cdrfield", "value": "mediation_runid"},
- {"tag":"Tor", "cdr_field_id": "tor", "type": "cdrfield", "value": "tor"},
- {"tag":"AccId", "cdr_field_id": "accid", "type": "cdrfield", "value": "accid"},
- {"tag":"ReqType", "cdr_field_id": "reqtype", "type": "cdrfield", "value": "reqtype"},
- {"tag":"Direction", "cdr_field_id": "direction", "type": "cdrfield", "value": "direction"},
- {"tag":"Tenant", "cdr_field_id": "tenant", "type": "cdrfield", "value": "tenant"},
- {"tag":"Category", "cdr_field_id": "category", "type": "cdrfield", "value": "category"},
- {"tag":"Account", "cdr_field_id": "account", "type": "cdrfield", "value": "account"},
- {"tag":"Subject", "cdr_field_id": "subject", "type": "cdrfield", "value": "subject"},
- {"tag":"Destination", "cdr_field_id": "destination", "type": "cdrfield", "value": "destination"},
- {"tag":"SetupTime", "cdr_field_id": "setup_time", "type": "cdrfield", "value": "setup_time", "layout": "2006-01-02T15:04:05Z07:00"},
- {"tag":"AnswerTime", "cdr_field_id": "answer_time", "type": "cdrfield", "value": "answer_time", "layout": "2006-01-02T15:04:05Z07:00"},
- {"tag":"Usage", "cdr_field_id": "usage", "type": "cdrfield", "value": "usage"},
- {"tag":"Cost", "cdr_field_id": "cost", "type": "cdrfield", "value": "cost"},
- ],
- "trailer_fields": [], // template of the exported trailer fields
- },
- "customer_tpl": {
- "cdr_format": "csv", // exported CDRs format <csv>
- "field_separator": ";",
- "data_usage_multiply_factor": 1, // multiply data usage before export (eg: convert from KBytes to Bytes)
- "sms_usage_multiply_factor": 1, // multiply data usage before export (eg: convert from SMS unit to call duration in some billing systems)
- "generic_usage_multiply_factor": 1, // multiply data usage before export (eg: convert from GENERIC unit to call duration in some billing systems)
- "cost_multiply_factor": 1, // multiply cost before export, eg: add VAT
- "cost_rounding_decimals": -1, // rounding decimals for Cost values. -1 to disable rounding
- "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_dir": "/tmp/cgr_kamevapi/cgrates/cdre", // path where the exported CDRs will be placed, default path /var/log/cgrates/cdre
- "header_fields": [], // template of the exported header fields
- "content_fields": [ // template of the exported content fields
- {"tag": "CgrId", "cdr_field_id": "cgrid", "type": "cdrfield", "value": "cgrid"},
- {"tag":"AccId", "cdr_field_id": "accid", "type": "cdrfield", "value": "accid"},
- {"tag":"ReqType", "cdr_field_id": "reqtype", "type": "cdrfield", "value": "reqtype"},
- {"tag":"Tenant", "cdr_field_id": "tenant", "type": "cdrfield", "value": "tenant"},
- {"tag":"Category", "cdr_field_id": "category", "type": "cdrfield", "value": "category"},
- {"tag":"Subject", "cdr_field_id": "account", "type": "cdrfield", "value": "account"},
- {"tag":"Destination", "cdr_field_id": "destination", "type": "cdrfield", "value": "~destination:s/^1(\\d+)/+$1/:s/^\\+(\\d+)/00$1/"},
- {"tag":"AnswerTime", "cdr_field_id": "answer_time", "type": "cdrfield", "value": "answer_time", "layout": "2006-01-02T15:04:05Z07:00"},
- {"tag":"Usage", "cdr_field_id": "usage", "type": "cdrfield", "value": "usage"},
- {"tag":"Cost", "cdr_field_id": "cost", "type": "cdrfield", "value": "cost"},
- ],
- "trailer_fields": [], // template of the exported trailer fields
- }
- },
- //"cdrc": {
- // "*default": {
- // "enabled": false, // enable CDR client functionality
- // "dry_run": false, // do not send the CDRs to CDRS, just parse them
- // "cdrs": "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/log/cgrates/cdrc/in", // absolute path towards the directory where the CDRs are stored
- // "cdr_out_dir": "/var/log/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_source_id": "freeswitch_csv", // free form field, tag identifying the source of the CDRs within CDRS database
- // "cdr_filter": "", // filter CDR records to import
- // "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
- // {"tag": "tor", "cdr_field_id": "tor", "type": "cdrfield", "value": "2", "mandatory": true},
- // {"tag": "accid", "cdr_field_id": "accid", "type": "cdrfield", "value": "3", "mandatory": true},
- // {"tag": "reqtype", "cdr_field_id": "reqtype", "type": "cdrfield", "value": "4", "mandatory": true},
- // {"tag": "direction", "cdr_field_id": "direction", "type": "cdrfield", "value": "5", "mandatory": true},
- // {"tag": "tenant", "cdr_field_id": "tenant", "type": "cdrfield", "value": "6", "mandatory": true},
- // {"tag": "category", "cdr_field_id": "category", "type": "cdrfield", "value": "7", "mandatory": true},
- // {"tag": "account", "cdr_field_id": "account", "type": "cdrfield", "value": "8", "mandatory": true},
- // {"tag": "subject", "cdr_field_id": "subject", "type": "cdrfield", "value": "9", "mandatory": true},
- // {"tag": "destination", "cdr_field_id": "destination", "type": "cdrfield", "value": "10", "mandatory": true},
- // {"tag": "setup_time", "cdr_field_id": "setup_time", "type": "cdrfield", "value": "11", "mandatory": true},
- // {"tag": "answer_time", "cdr_field_id": "answer_time", "type": "cdrfield", "value": "12", "mandatory": true},
- // {"tag": "usage", "cdr_field_id": "usage", "type": "cdrfield", "value": "13", "mandatory": true},
- // ],
- // "trailer_fields": [], // template of the import trailer fields
- // }
- //},
- "sm_kamailio": {
- "enabled": true, // starts SessionManager service: <true|false>
- // "rater": "internal", // address where to reach the Rater <""|internal|127.0.0.1:2013>
- "cdrs": "internal", // address where to reach CDR Server, empty to disable CDR capturing <""|internal|x.y.z.y:1234>
- "create_cdr": true, // create CDR out of events and sends them to CDRS component
- // "debit_interval": "10s", // interval to perform debits on.
- // "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
- // "connections":[ // instantiate connections to multiple Kamailio servers
- // {"evapi_addr": "127.0.0.1:8448", "reconnects": 5}
- // ],
- },
- "historys": {
- "enabled": true, // starts History service: <true|false>.
- // "history_dir": "/tmp/cgr_kamevapi/cgrates/history", // location on disk where to store history files, default location /var/log/cgrates/history
- // "save_interval": "1s", // interval to save changed cache into .git archive
- },
- "pubsubs": {
- "enabled": true, // starts PubSub service: <true|false>.
- },
- "aliases": {
- "enabled": true, // starts PubSub service: <true|false>.
- },
- "users": {
- "enabled": true, // starts User service: <true|false>.
- "indexes": ["Uuid"], // user profile field indexes
- },
- //"mailer": {
- // "server": "localhost", // the server to use when sending emails out
- // "auth_user": "cgrates", // authenticate to email server using this user
- // "auth_passwd": "CGRateS.org", // authenticate to email server with this password
- // "from_address": "[email protected]" // from address used when sending emails out
- //},
- }
Add Comment
Please, Sign In to add comment