Advertisement
Guest User

Untitled

a guest
May 7th, 2021
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.65 KB | None | 0 0
  1. {
  2. // CGRateS Configuration file
  3. "general": {
  4. "logger":"*stdout",
  5. "log_level": 7,
  6. "node_id": "*env:NODE_ID",
  7. },
  8.  
  9. "listen": {
  10. "rpc_json": ":2012",
  11. "rpc_gob": ":2013",
  12. "http": ":2080",
  13. },
  14.  
  15. "data_db": {
  16. "db_type": "*env:DATADB_TYPE",
  17. "db_host": "*env:DATADB_HOST",
  18. "db_port": *env:DATADB_PORT,
  19. "db_name": "*env:DATADB_NAME",
  20. "db_password": "*env:DATADB_PASSWORD",
  21. "replication_conns": ["ReplicateAccounts"],
  22. "items":{
  23. "*accounts":{"remote":false,"replicate":true},
  24. "*reverse_destinations": {"remote":false,"replicate":false},
  25. "*destinations": {"remote":false,"replicate":false},
  26. "*rating_plans": {"remote":false,"replicate":false},
  27. "*rating_profiles":{"remote":false,"replicate":false},
  28. "*actions":{"remote":false,"replicate":false},
  29. "*action_plans": {"remote":false,"replicate":false},
  30. "*account_action_plans":{"remote":false,"replicate":false},
  31. "*action_triggers":{"remote":false,"replicate":false},
  32. "*shared_groups":{"remote":false,"replicate":false},
  33. "*timings": {"remote":false,"replicate":false},
  34. "*resource_profiles":{"remote":false,"replicate":false},
  35. "*resources":{"remote":false,"replicate":false},
  36. "*statqueue_profiles": {"remote":false,"replicate":false},
  37. "*statqueues": {"remote":false,"replicate":false},
  38. "*threshold_profiles": {"remote":false,"replicate":false},
  39. "*thresholds": {"remote":false,"replicate":false},
  40. "*filters": {"remote":false,"replicate":false},
  41. "*supplier_profiles":{"remote":false,"replicate":false},
  42. "*attribute_profiles":{"remote":false,"replicate":false},
  43. "*charger_profiles": {"remote":false,"replicate":false},
  44. "*dispatcher_profiles":{"remote":false,"replicate":false},
  45. "*dispatcher_hosts":{"remote":false,"replicate":false},
  46. "*filter_indexes" :{"remote":false,"replicate":false},
  47. "*load_ids":{"remote":false,"replicate":false}
  48. }
  49. },
  50.  
  51. "stor_db": {
  52. "db_type": "*internal",
  53. },
  54.  
  55. "caches":{
  56. "*dispatcher_routes": {"limit": -1, "ttl": "2s"}
  57. },
  58.  
  59. "rpc_conns": {
  60. "*localhost": {
  61. "conns": [{"address": "127.0.0.1:2012", "transport":"*json"}],
  62. },
  63. "ReplicateSessions": {
  64. "strategy": "*broadcast_sync",
  65. "conns": [{"address": "127.0.0.1:2012", "transport": "*json"}],
  66. },
  67. "ReplicateAccounts": {
  68. "strategy": "*broadcast",
  69. "conns": [
  70. {"address": "127.0.0.1:2012", "transport":"*json"},
  71. {"address": "*env:MASTER_TARRIF_TCP", "transport":"*json"}
  72. ]
  73. },
  74. "RalsConnections": {
  75. "strategy": "*first",
  76. "conns": [
  77. {"address": "*env:RALS1", "transport":"*json"},
  78. {"address": "*env:RALS2", "transport":"*json"}
  79. ]
  80. }
  81. },
  82.  
  83. "schedulers": {
  84. "enabled": false,
  85. },
  86.  
  87. "cdrs": {
  88. "enabled": true,
  89. "store_cdrs": false,
  90. "chargers_conns":["*localhost"],
  91. "rals_conns":["*localhost"],
  92. "attributes_conns": ["*localhost"],
  93. "thresholds_conns": ["*localhost"],
  94. "stats_conns": ["*localhost"],
  95. "online_cdr_exports": ["aws_sqs"]
  96. },
  97.  
  98. "chargers": {
  99. "enabled": true,
  100. "attributes_conns": ["*localhost"],
  101. },
  102.  
  103. "resources": {
  104. "enabled": true,
  105. "store_interval": "-1",
  106. },
  107.  
  108. "attributes": {
  109. "enabled": true,
  110. },
  111.  
  112. "thresholds": {
  113. "enabled": true,
  114. "store_interval": "-1",
  115. },
  116.  
  117. "stats": {
  118. "enabled": true,
  119. "store_interval": "-1",
  120. "thresholds_conns": ["*internal"],
  121. },
  122.  
  123. "suppliers": {
  124. "enabled": true,
  125. "indexed_selects":true,
  126. //"string_indexed_fields": [],
  127. "prefix_indexed_fields": [],
  128. "nested_fields": false,
  129. "attributes_conns": ["*internal"],
  130. "resources_conns": ["*internal"],
  131. "stats_conns": ["*internal"],
  132. "rals_conns": ["RalsConnections"],
  133. //"default_ratio":1
  134. },
  135.  
  136. "sessions": {
  137. "enabled": true,
  138. "listen_bijson": "127.0.0.1:2014",
  139. "chargers_conns": ["*localhost"],
  140. "rals_conns": ["RalsConnections"],
  141. "cdrs_conns": ["*localhost"],
  142. "resources_conns": ["*localhost"],
  143. "thresholds_conns": ["*localhost"],
  144. "stats_conns": ["*localhost"],
  145. "suppliers_conns": ["*localhost"],
  146. "attributes_conns": ["*localhost"],
  147. //"replication_conns": ["ReplicateSessions"],
  148. "debit_interval": "5s",
  149. //"store_session_costs": true,
  150. //"min_call_duration": "0s",
  151. //"max_call_duration": "3h",
  152. //"session_ttl": "50ms", // time after a session with no updates is terminated, not defined by default
  153. //"channel_sync_interval": "0",
  154. },
  155.  
  156. "dispatchers":{
  157. "enabled": true
  158. },
  159.  
  160. //TODO add IAM Permissions
  161. "cdre": {
  162. "aws_sqs": {
  163. "export_format": "*sqs_json_map",
  164. "export_path": "http://sqs.eu-central-1.amazonaws.com/?aws_region=eu-central-1&aws_key=XXXXXXXXXXX&aws_secret=XXXXXXXXXXX&queue_id=cdrs-cgrates",
  165. "fields": [
  166. {"path": "*exp.CDRType", "type": "*composed", "value": "~*req.CDRType"},
  167. {"path": "*exp.RunID", "type": "*composed", "value": "~*req.RunID"},
  168. {"path": "*exp.ToR", "type": "*composed", "value": "~*req.ToR"},
  169. {"path": "*exp.OriginID", "type": "*composed", "value": "~*req.OriginID"},
  170. {"path": "*exp.OriginHost", "type": "*composed", "value": "~*req.OriginHost"},
  171. {"path": "*exp.RequestType", "type": "*composed", "value": "~*req.RequestType"},
  172. {"path": "*exp.Tenant", "type": "*composed", "value": "~*req.Tenant"},
  173. {"path": "*exp.Category", "type": "*composed", "value": "~*req.Category"},
  174. {"path": "*exp.Account", "type": "*composed", "value": "~*req.Account"},
  175. {"path": "*exp.Subject", "type": "*composed", "value": "~*req.Subject"},
  176. {"path": "*exp.Destination", "type": "*composed", "value": "~*req.Destination"},
  177. {"path": "*exp.SetupTime", "type": "*composed", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z"},
  178. {"path": "*exp.AnswerTime", "type": "*composed", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z"},
  179. {"path": "*exp.Usage", "type": "*composed", "value": "~*req.Usage"},
  180. {"path": "*exp.UsageSecs", "type": "*composed", "value": "~*req.Usage{*duration_seconds}"},
  181. {"path": "*exp.Cost", "type": "*composed", "value": "~*req.Cost", "rounding_decimals": 3},
  182. {"path": "*exp.OriginCLI", "type": "*composed", "value": "~*req.OriginCLI"},
  183. {"path": "*exp.OriginCLD", "type": "*composed", "value": "~*req.OriginCLD"},
  184. {"path": "*exp.OriginIP", "type": "*composed", "value": "~*req.OriginIP"},
  185. {"path": "*exp.DisconnectCause", "type": "*composed", "value": "~*req.DisconnectCause"},
  186. {"path": "*exp.UserAgent", "type": "*composed", "value": "~*req.UserAgent"},
  187. {
  188. "path": "*exp.ID",
  189. "type": "*composed",
  190. "value": "~*ec.Charges[0].Increments[0].Accounting.Balance.ID"
  191. },
  192. {
  193. "path": "*exp.RatePlanID",
  194. "type": "*composed",
  195. "value": "~*req.CostDetails.RatingFilters:s/RatingPlanID\\\"\\s?\\:\\s?\\\"([^\\\"]*)\\\".*/$1/"
  196. },
  197. {
  198. "path": "*exp.DestinationPrefix",
  199. "type": "*composed",
  200. "value": "~*req.CostDetails.RatingFilters:s/DestinationPrefix\\\"\\s?\\:\\s?\\\"([^\\\"]*)\\\".*/$1/"
  201. },
  202. {
  203. "path": "*exp.DestinationID",
  204. "type": "*composed",
  205. "value": "~*req.CostDetails.RatingFilters:s/DestinationID\\\"\\s?\\:\\s?\\\"([^\\\"]*)\\\".*/$1/"
  206. },
  207. {
  208. "path": "*exp.RPSubject",
  209. "type": "*composed",
  210. "value": "~*req.CostDetails.RatingFilters:s/Subject\\\"\\s?\\:\\s?\\\"([^\\\"]*)\\\".*/$1/"
  211. },
  212. ],
  213. },
  214. },
  215.  
  216.  
  217. // "apiers": {
  218. // "enabled": true,
  219. // "scheduler_conns": ["*internal"],
  220. // },
  221.  
  222. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement