basitengr

cgrates.json

Nov 9th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 17.43 KB | None | 0 0
  1. {
  2.  
  3. // Real-time Charging System for Telecom & ISP environments
  4. // Copyright (C) ITsysCOM GmbH
  5. //
  6. // This file contains the default configuration hardcoded into CGRateS.
  7. // This is what you get when you load CGRateS with an empty configuration file.
  8.  
  9. "general": {
  10.     "instance_id": "",
  11.     "log_level": 7,                                         // control the level of messages logged (0-emerg to 7-debug)
  12. //  "http_skip_tls_verify": false,          // if enabled Http Client will accept any TLS certificate
  13. //  "rounding_decimals": 10,                // system level precision for floats
  14. //  "dbdata_encoding": "msgpack",           // encoding used to store object data in strings: <msgpack|json>
  15. //  "tpexport_dir": "/var/log/cgrates/tpe", // path towards export folder for offline Tariff Plans
  16. //  "poster_attempts": 3,                   // number of attempts before considering post request failed (eg: *call_url, CDR replication)
  17. //  "failed_posts_dir": "/var/spool/cgrates/failed_posts",  // directory path where we store failed requests
  18. //  "default_reqtype": "*rated",            // default request type to consider when missing from requests: <""|*prepaid|*postpaid|*pseudoprepaid|*rated>
  19. //  "default_category": "call",             // default Type of Record to consider when missing from requests
  20. //  "default_tenant": "cgrates.org",        // default Tenant to consider when missing from requests
  21. //  "default_subject": "cgrates",           // default rating Subject to consider when missing from requests
  22. //  "default_timezone": "Local",            // default timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
  23. //  "connect_attempts": 3,                  // initial server connect attempts
  24.     "connect_timeout": "1s",                // consider connection unsuccessful on timeout, 0 to disable the feature
  25.     "reply_timeout": "2s",                  // consider connection down for replies taking longer than this value
  26.     "locking_timeout": "5s",
  27.     "response_cache_ttl": "3s",             // the life span of a cached response
  28.     "reconnects": -1,                       // number of retries in case of connection lost
  29.     "internal_ttl": "2m",                   // maximum duration to wait for internal connections before giving up
  30. },
  31.  
  32. //"listen": {
  33. //  "rpc_json": "127.0.0.1:2012",           // RPC JSON listening address
  34. //  "rpc_gob": "127.0.0.1:2013",            // RPC GOB listening address
  35. //  "http": "127.0.0.1:2080",               // HTTP listening address
  36. // },
  37.  
  38. //"http": {                                 // HTTP server configuration
  39. //  "json_rpc_url": "/jsonrpc",             // JSON RPC relative URL ("" to disable)
  40. //  "ws_url": "/ws",                        // WebSockets relative URL ("" to disable)
  41. //  "use_basic_auth": false,                // use basic authentication
  42. //  "auth_users": {}                        // basic authentication usernames and base64-encoded passwords (eg: { "username1": "cGFzc3dvcmQ=", "username2": "cGFzc3dvcmQy "})
  43. // },
  44.  
  45. "tariffplan_db": {                        // database used to store active tariff plan configuration
  46.   "db_type": "redis",                     // tariffplan_db type: <redis>
  47.   "db_host": "127.0.0.1",                 // tariffplan_db host address
  48.   "db_port": 6379,                        // port to reach the tariffplan_db
  49.   "db_name": "11",                        // tariffplan_db name to connect to
  50. //  "db_user": "",                          // sername to use when connecting to tariffplan_db
  51. //  "db_passwd": "",                        // password to use when connecting to tariffplan_db
  52. },
  53.  
  54. "data_db": {                                // database used to store runtime data (eg: accounts, cdr stats)
  55.     "db_type": "redis",                     // data_db type: <redis|mongo>
  56.     "db_host": "127.0.0.1",                 // data_db host address
  57.     "db_port": 6379,                        // data_db port to reach the database
  58.     "db_name": "11",                        // data_db database name to connect to
  59. //  "db_user": "cgrates",                   // username to use when connecting to data_db
  60. //  "db_password": "",                      // password to use when connecting to data_db
  61. //  "load_history_size": 10,                // Number of records in the load history
  62. },
  63.  
  64. "stor_db": {                                // database used to store offline tariff plans and CDRs
  65.     "db_type": "postgres",                      // stor database type to use: <mongo|mysql|postgres>
  66.     "db_host": "127.0.0.1",                 // the host to connect to
  67.     "db_port": 5432,                        // the port to reach the stordb
  68.     "db_name": "cgrates",                   // stor database name
  69.     "db_user": "cgrates",                   // username to use when connecting to stordb
  70.     "db_password": "CGRateS.org",                       // password to use when connecting to stordb
  71. //  "max_open_conns": 100,                  // maximum database connections opened, not applying for mongo
  72. //  "max_idle_conns": 10,                   // maximum database connections idle, not applying for mongo
  73. //  "conn_max_lifetime": 0,                 // maximum amount of time in seconds a connection may be reused (0 for unlimited), not applying for mongo
  74.     "cdrs_indexes": [],                     // indexes on cdrs table to speed up queries, used only in case of mongo
  75. },
  76.  
  77. //"balancer": {
  78. //  "enabled": false,                       // start Balancer service: <true|false>
  79. //},
  80.  
  81. "rater": {
  82.     "enabled": true,                        // enable Rater service: <true|false>
  83. //  "balancer": "",                         // register to balancer as worker: <""|internal|x.y.z.y:1234>
  84.     "cdrstats": "internal",     // address where to reach the cdrstats service, empty to disable stats functionality<""|internal|x.y.z.y:1234>
  85.     "historys": "internal",     // address where to reach the history service, empty to disable history functionality: <""|internal|x.y.z.y:1234>
  86.     "pubsubs": "internal",      // address where to reach the pubusb service, empty to disable pubsub functionality: <""|internal|x.y.z.y:1234>
  87.     "users": "internal",        // address where to reach the user service, empty to disable user profile functionality: <""|internal|x.y.z.y:1234>
  88.     "aliases": "internal"
  89. },
  90.  
  91. "scheduler": {
  92.     "enabled": true,                        // start Scheduler service: <true|false>
  93. },
  94.  
  95. "cdrs": {
  96.     "enabled": true,                       // start the CDR Server service:  <true|false>
  97. //  "extra_fields": [],                     // extra fields to store in CDRs for non-generic CDRs
  98. //  "store_cdrs": true,                     // store cdrs in storDb
  99.     "rater": "internal",                    // address where to reach the Rater for cost calculation, empty to disable functionality: <""|internal|x.y.z.y:1234>
  100. //  "pubsubs": "",                          // address where to reach the pubusb service, empty to disable pubsub functionality: <""|internal|x.y.z.y:1234>
  101. //  "users": "",                            // address where to reach the user service, empty to disable user profile functionality: <""|internal|x.y.z.y:1234>
  102. //  "aliases": "",                          // address where to reach the aliases service, empty to disable aliases functionality: <""|internal|x.y.z.y:1234>
  103. //  "cdrstats": "internal",                 // address where to reach the cdrstats service, empty to disable stats functionality: <""|internal|x.y.z.y:1234>
  104. //  "cdr_replication":[],                   // replicate the raw CDR to a number of servers
  105. },
  106.  
  107. "cdrstats": {
  108.   "enabled": true,                       // starts the cdrstats service: <true|false>
  109. //  "save_interval": "1m",                  // interval to save changed stats into dataDb storage
  110. },
  111.  
  112. "cdre": {
  113.     "*default": {
  114.         "cdr_format": "csv",                            // exported CDRs format <csv>
  115.         "field_separator": ",",
  116.         "data_usage_multiply_factor": 1,                // multiply data usage before export (eg: convert from KBytes to Bytes)
  117.         "sms_usage_multiply_factor": 1,                 // multiply data usage before export (eg: convert from SMS unit to call duration in some billing systems)
  118.         "generic_usage_multiply_factor": 1,             // multiply data usage before export (eg: convert from GENRIC unit to call duration in some billing systems)
  119.         "cost_multiply_factor": 1,                      // multiply cost before export, eg: add VAT
  120.         "cost_rounding_decimals": -1,                   // rounding decimals for Cost values. -1 to disable rounding
  121.         "cost_shift_digits": 0,                         // shift digits in the cost on export (eg: convert from EUR to cents)
  122.         "mask_destination_id": "MASKED_DESTINATIONS",   // destination id containing called addresses to be masked on export
  123.         "mask_length": 0,                               // length of the destination suffix to be masked
  124.         "export_dir": "/tmp/cgr_kamevapi/cgrates/cdre", // path where the exported CDRs will be placed, default path /var/log/cgrates/cdre
  125.         "header_fields": [],                            // template of the exported header fields
  126.         "content_fields": [                             // template of the exported content fields
  127.             {"tag": "CgrId", "cdr_field_id": "cgrid", "type": "cdrfield", "value": "cgrid"},
  128.             {"tag":"RunId", "cdr_field_id": "mediation_runid", "type": "cdrfield", "value": "mediation_runid"},
  129.             {"tag":"Tor", "cdr_field_id": "tor", "type": "cdrfield", "value": "tor"},
  130.             {"tag":"AccId", "cdr_field_id": "accid", "type": "cdrfield", "value": "accid"},
  131.             {"tag":"ReqType", "cdr_field_id": "reqtype", "type": "cdrfield", "value": "reqtype"},
  132.             {"tag":"Direction", "cdr_field_id": "direction", "type": "cdrfield", "value": "direction"},
  133.             {"tag":"Tenant", "cdr_field_id": "tenant", "type": "cdrfield", "value": "tenant"},
  134.             {"tag":"Category", "cdr_field_id": "category", "type": "cdrfield", "value": "category"},
  135.             {"tag":"Account", "cdr_field_id": "account", "type": "cdrfield", "value": "account"},
  136.             {"tag":"Subject", "cdr_field_id": "subject", "type": "cdrfield", "value": "subject"},
  137.             {"tag":"Destination", "cdr_field_id": "destination", "type": "cdrfield", "value": "destination"},
  138.             {"tag":"SetupTime", "cdr_field_id": "setup_time", "type": "cdrfield", "value": "setup_time", "layout": "2006-01-02T15:04:05Z07:00"},
  139.             {"tag":"AnswerTime", "cdr_field_id": "answer_time", "type": "cdrfield", "value": "answer_time", "layout": "2006-01-02T15:04:05Z07:00"},
  140.             {"tag":"Usage", "cdr_field_id": "usage", "type": "cdrfield", "value": "usage"},
  141.             {"tag":"Cost", "cdr_field_id": "cost", "type": "cdrfield", "value": "cost"},
  142.         ],
  143.         "trailer_fields": [],                           // template of the exported trailer fields
  144.     },
  145.     "customer_tpl": {
  146.         "cdr_format": "csv",                            // exported CDRs format <csv>
  147.         "field_separator": ";",
  148.         "data_usage_multiply_factor": 1,                // multiply data usage before export (eg: convert from KBytes to Bytes)
  149.         "sms_usage_multiply_factor": 1,                 // multiply data usage before export (eg: convert from SMS unit to call duration in some billing systems)
  150.         "generic_usage_multiply_factor": 1,             // multiply data usage before export (eg: convert from GENERIC unit to call duration in some billing systems)
  151.         "cost_multiply_factor": 1,                      // multiply cost before export, eg: add VAT
  152.         "cost_rounding_decimals": -1,                   // rounding decimals for Cost values. -1 to disable rounding
  153.         "cost_shift_digits": 0,                         // shift digits in the cost on export (eg: convert from EUR to cents)
  154.         "mask_destination_id": "MASKED_DESTINATIONS",   // destination id containing called addresses to be masked on export
  155.         "mask_length": 0,                               // length of the destination suffix to be masked
  156.         "export_dir": "/tmp/cgr_kamevapi/cgrates/cdre", // path where the exported CDRs will be placed, default path /var/log/cgrates/cdre
  157.         "header_fields": [],                            // template of the exported header fields
  158.         "content_fields": [                             // template of the exported content fields
  159.             {"tag": "CgrId", "cdr_field_id": "cgrid", "type": "cdrfield", "value": "cgrid"},
  160.             {"tag":"AccId", "cdr_field_id": "accid", "type": "cdrfield", "value": "accid"},
  161.             {"tag":"ReqType", "cdr_field_id": "reqtype", "type": "cdrfield", "value": "reqtype"},
  162.             {"tag":"Tenant", "cdr_field_id": "tenant", "type": "cdrfield", "value": "tenant"},
  163.             {"tag":"Category", "cdr_field_id": "category", "type": "cdrfield", "value": "category"},
  164.             {"tag":"Subject", "cdr_field_id": "account", "type": "cdrfield", "value": "account"},
  165.             {"tag":"Destination", "cdr_field_id": "destination", "type": "cdrfield", "value": "~destination:s/^1(\\d+)/+$1/:s/^\\+(\\d+)/00$1/"},
  166.             {"tag":"AnswerTime", "cdr_field_id": "answer_time", "type": "cdrfield", "value": "answer_time", "layout": "2006-01-02T15:04:05Z07:00"},
  167.             {"tag":"Usage", "cdr_field_id": "usage", "type": "cdrfield", "value": "usage"},
  168.             {"tag":"Cost", "cdr_field_id": "cost", "type": "cdrfield", "value": "cost"},
  169.         ],
  170.         "trailer_fields": [],                           // template of the exported trailer fields
  171.     }
  172. },
  173.  
  174. //"cdrc": {
  175. //  "*default": {
  176. //      "enabled": false,                           // enable CDR client functionality
  177. //      "dry_run": false,                           // do not send the CDRs to CDRS, just parse them
  178. //      "cdrs": "internal",                         // address where to reach CDR server. <internal|x.y.z.y:1234>
  179. //      "cdr_format": "csv",                        // CDR file format <csv|freeswitch_csv|fwv|opensips_flatstore>
  180. //      "field_separator": ",",                     // separator used in case of csv files
  181. //      "timezone": "",                             // timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
  182. //      "run_delay": 0,                             // sleep interval in seconds between consecutive runs, 0 to use automation via inotify
  183. //      "max_open_files": 1024,                     // maximum simultaneous files to process, 0 for unlimited
  184. //      "data_usage_multiply_factor": 1024,         // conversion factor for data usage
  185. //      "cdr_in_dir": "/var/log/cgrates/cdrc/in",   // absolute path towards the directory where the CDRs are stored
  186. //      "cdr_out_dir": "/var/log/cgrates/cdrc/out", // absolute path towards the directory where processed CDRs will be moved
  187. //      "failed_calls_prefix": "missed_calls",      // used in case of flatstore CDRs to avoid searching for BYE records
  188. //      "cdr_source_id": "freeswitch_csv",          // free form field, tag identifying the source of the CDRs within CDRS database
  189. //      "cdr_filter": "",                           // filter CDR records to import
  190. //      "partial_record_cache": "10s",              // duration to cache partial records when not pairing
  191. //      "header_fields": [],                        // template of the import header fields
  192. //      "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
  193. //          {"tag": "tor", "cdr_field_id": "tor", "type": "cdrfield", "value": "2", "mandatory": true},
  194. //          {"tag": "accid", "cdr_field_id": "accid", "type": "cdrfield", "value": "3", "mandatory": true},
  195. //          {"tag": "reqtype", "cdr_field_id": "reqtype", "type": "cdrfield", "value": "4", "mandatory": true},
  196. //          {"tag": "direction", "cdr_field_id": "direction", "type": "cdrfield", "value": "5", "mandatory": true},
  197. //          {"tag": "tenant", "cdr_field_id": "tenant", "type": "cdrfield", "value": "6", "mandatory": true},
  198. //          {"tag": "category", "cdr_field_id": "category", "type": "cdrfield", "value": "7", "mandatory": true},
  199. //          {"tag": "account", "cdr_field_id": "account", "type": "cdrfield", "value": "8", "mandatory": true},
  200. //          {"tag": "subject", "cdr_field_id": "subject", "type": "cdrfield", "value": "9", "mandatory": true},
  201. //          {"tag": "destination", "cdr_field_id": "destination", "type": "cdrfield", "value": "10", "mandatory": true},
  202. //          {"tag": "setup_time", "cdr_field_id": "setup_time", "type": "cdrfield", "value": "11", "mandatory": true},
  203. //          {"tag": "answer_time", "cdr_field_id": "answer_time", "type": "cdrfield", "value": "12", "mandatory": true},
  204. //          {"tag": "usage", "cdr_field_id": "usage", "type": "cdrfield", "value": "13", "mandatory": true},
  205. //      ],
  206. //      "trailer_fields": [],                           // template of the import trailer fields
  207. //  }
  208. //},
  209.  
  210. "sm_kamailio": {
  211.   "enabled": true,               // starts SessionManager service: <true|false>
  212. //  "rater": "internal",            // address where to reach the Rater <""|internal|127.0.0.1:2013>
  213.   "cdrs": "internal",             // address where to reach CDR Server, empty to disable CDR capturing <""|internal|x.y.z.y:1234>
  214.   "create_cdr": true,            // create CDR out of events and sends them to CDRS component
  215. //  "debit_interval": "10s",        // interval to perform debits on.
  216. //  "min_call_duration": "0s",      // only authorize calls with allowed duration higher than this
  217. //  "max_call_duration": "3h",      // maximum call duration a prepaid call can last
  218. //  "connections":[                 // instantiate connections to multiple Kamailio servers
  219. //      {"evapi_addr": "127.0.0.1:8448", "reconnects": 5}
  220. //  ],
  221. },
  222.  
  223. "historys": {
  224.   "enabled": true,                           // starts History service: <true|false>.
  225. //  "history_dir": "/tmp/cgr_kamevapi/cgrates/history",  // location on disk where to store history files, default location /var/log/cgrates/history
  226. //  "save_interval": "1s",                      // interval to save changed cache into .git archive
  227. },
  228.  
  229. "pubsubs": {
  230.     "enabled": true,                // starts PubSub service: <true|false>.
  231. },
  232.  
  233. "aliases": {
  234.     "enabled": true,                // starts PubSub service: <true|false>.
  235. },
  236.  
  237. "users": {
  238.     "enabled": true,                // starts User service: <true|false>.
  239.     "indexes": ["Uuid"],            // user profile field indexes
  240. },
  241.  
  242. //"mailer": {
  243. //  "server": "localhost",                              // the server to use when sending emails out
  244. //  "auth_user": "cgrates",                             // authenticate to email server using this user
  245. //  "auth_passwd": "CGRateS.org",                       // authenticate to email server with this password
  246. //  "from_address": "[email protected]"  // from address used when sending emails out
  247. //},
  248.  
  249.  
  250. }
Add Comment
Please, Sign In to add comment