Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Data loaded using cgr-loader from "/usr/share/cgrates/tariffplans/tutorial"
- cgr-loader -datadb_host 127.0.0.1 -datadb_port 27017 -datadb_type mongo -datadb_name 10 -datadb_user cgrdata -datadb_passwd cgrates -verbose
- where logs of
- "cgr-engine -config_dir=/usr/share/cgrates/tutorials/kamevapi/cgrates/etc/cgrates -log_level=7 -logger=*stdout"
- are
- 2017/12/11 20:46:14 [INFO]<Scheduler> executing task TOPUP_RST_10 on account cgrates.org:1004
- 2017/12/11 20:46:14 [INFO]<Scheduler> executing task TOPUP_RST_10 on account cgrates.org:1002
- 2017/12/11 20:46:14 [INFO]<Scheduler> executing task TOPUP_RST_10 on account cgrates.org:1003
- 2017/12/11 20:46:14 [INFO]<Scheduler> executing task TOPUP_RST_5 on account
- 2017/12/11 20:46:14 [WARNING]Could not get account id: . Skipping!
- 2017/12/11 20:46:14 [WARNING]Error executing action plan: NOT_FOUND
- 2017/12/11 20:46:14 [INFO]<Scheduler> executing task TOPUP_RST_SHARED_5 on account
- 2017/12/11 20:46:14 [WARNING]Could not get account id: . Skipping!
- 2017/12/11 20:46:14 [WARNING]Error executing action plan: NOT_FOUND
- 2017/12/11 20:46:14 [INFO]<Scheduler> executing task SHARED_A_0 on account cgrates.org:1007
- 2017/12/11 20:46:14 [INFO]<Scheduler> executing task TOPUP_RST_5 on account cgrates.org:1001
- 2017/12/11 20:46:14 [INFO]<Scheduler> executing task TOPUP_RST_SHARED_5 on account cgrates.org:1001
- 2017/12/11 20:46:14 [INFO]Threshold hit, Balance: {"ID":"cgrates.org:1007","BalanceMap":{"*monetary":[{"Uuid":"a10d3cb5-4503-49a6-a568-653ef06b0cde","ID":"","Value":0,"Directions":{"*out":true},"ExpirationDate":"0001-01-01T00:00:00Z","Weight":10,"DestinationIDs":{},"RatingSubject":"","Categories":{},"SharedGroups":{"SHARED_A":true},"Timings":[],"TimingIDs":{},"Disabled":false,"Factor":{},"Blocker":false}]},"UnitCounters":{"*monetary":[{"CounterType":"*event","Counters":[{"Value":0,"Filter":{"Uuid":null,"ID":"520d391b-3d06-4c7e-95a9-d7e69217af43","Type":"*monetary","Value":null,"Directions":{"*out":true},"ExpirationDate":null,"Weight":null,"DestinationIDs":{"FS_USERS":true},"RatingSubject":null,"Categories":null,"SharedGroups":null,"TimingIDs":null,"Timings":null,"Disabled":null,"Factor":null,"Blocker":null}}]}]},"ActionTriggers":[{"ID":"STANDARD_TRIGGERS","UniqueID":"863a57a9-7901-4d47-b405-292c21b95e54","ThresholdType":"*min_balance","ThresholdValue":2,"Recurrent":false,"MinSleep":0,"ExpirationDate":"0001-01-01T00:00:00Z","ActivationDate":"0001-01-01T00:00:00Z","Balance":{"Uuid":null,"ID":null,"Type":"*monetary","Value":null,"Directions":{"*out":true},"ExpirationDate":null,"Weight":null,"DestinationIDs":null,"RatingSubject":null,"Categories":null,"SharedGroups":null,"TimingIDs":null,"Timings":[],"Disabled":null,"Factor":null,"Blocker":null},"Weight":10,"ActionsID":"LOG_WARNING","MinQueuedItems":0,"Executed":true,"LastExecutionTime":"2017-12-11T20:46:14.687863878Z"},{"ID":"STANDARD_TRIGGERS","UniqueID":"520d391b-3d06-4c7e-95a9-d7e69217af43","ThresholdType":"*max_event_counter","ThresholdValue":5,"Recurrent":false,"MinSleep":0,"ExpirationDate":"0001-01-01T00:00:00Z","ActivationDate":"0001-01-01T00:00:00Z","Balance":{"Uuid":null,"ID":null,"Type":"*monetary","Value":null,"Directions":{"*out":true},"ExpirationDate":null,"Weight":null,"DestinationIDs":{"FS_USERS":true},"RatingSubject":null,"Categories":null,"SharedGroups":null,"TimingIDs":null,"Timings":[],"Disabled":null,"Factor":null,"Blocker":null},"Weight":10,"ActionsID":"LOG_WARNING","MinQueuedItems":0,"Executed":false,"LastExecutionTime":"0001-01-01T00:00:00Z"},{"ID":"STANDARD_TRIGGERS","UniqueID":"119f4474-c0b7-4d8e-bb44-eac6283ce699","ThresholdType":"*max_balance","ThresholdValue":20,"Recurrent":false,"MinSleep":0,"ExpirationDate":"0001-01-01T00:00:00Z","ActivationDate":"0001-01-01T00:00:00Z","Balance":{"Uuid":null,"ID":null,"Type":"*monetary","Value":null,"Directions":{"*out":true},"ExpirationDate":null,"Weight":null,"DestinationIDs":null,"RatingSubject":null,"Categories":null,"SharedGroups":null,"TimingIDs":null,"Timings":[],"Disabled":null,"Factor":null,"Blocker":null},"Weight":10,"ActionsID":"LOG_WARNING","MinQueuedItems":0,"Executed":false,"LastExecutionTime":"0001-01-01T00:00:00Z"},{"ID":"STANDARD_TRIGGERS","UniqueID":"9d9559cb-562e-477c-bdc5-fb88b74022d5","ThresholdType":"*max_balance","ThresholdValue":100,"Recurrent":false,"MinSleep":0,"ExpirationDate":"0001-01-01T00:00:00Z","ActivationDate":"0001-01-01T00:00:00Z","Balance":{"Uuid":null,"ID":null,"Type":"*monetary","Value":null,"Directions":{"*out":true},"ExpirationDate":null,"Weight":null,"DestinationIDs":null,"RatingSubject":null,"Categories":null,"SharedGroups":null,"TimingIDs":null,"Timings":[],"Disabled":null,"Factor":null,"Blocker":null},"Weight":10,"ActionsID":"DISABLE_AND_LOG","MinQueuedItems":0,"Executed":false,"LastExecutionTime":"0001-01-01T00:00:00Z"}],"AllowNegative":false,"Disabled":false}
- 2017/12/11 20:46:14 [INFO]<Scheduler> executing task TOPUP_120_DST1003 on account cgrates.org:1001
- 2017/12/11 20:46:14 [INFO]<Scheduler> executing task TOPUP_RST_DATA_100 on account cgrates.org:1001
- 2017/12/11 20:46:14 [INFO]<Scheduler> processing 4 action plans
- 2017/12/11 20:46:14 [INFO]<Scheduler> queued 0 action plans
- 2017/12/11 20:46:14 [INFO]Threshold hit, Balance: {"ID":"cgrates.org:1001","BalanceMap":{"*data":[{"Uuid":"76988717-2d61-41fa-b192-597db2d556ab","ID":"","Value":102400,"Directions":{"*out":true},"ExpirationDate":"0001-01-01T00:00:00Z","Weight":10,"DestinationIDs":{},"RatingSubject":"","Categories":{},"SharedGroups":{},"Timings":[],"TimingIDs":{},"Disabled":false,"Factor":{},"Blocker":false}],"*monetary":[{"Uuid":"9abcb18f-8051-476f-a6b9-6c8ed765ca61","ID":"","Value":5,"Directions":{"*out":true},"ExpirationDate":"0001-01-01T00:00:00Z","Weight":20,"DestinationIDs":{},"RatingSubject":"","Categories":{},"SharedGroups":{},"Timings":[],"TimingIDs":{},"Disabled":false,"Factor":{},"Blocker":false},{"Uuid":"666bb8f0-392c-4927-89a0-6ea8b0f0d05e","ID":"","Value":40,"Directions":{"*out":true},"ExpirationDate":"0001-01-01T00:00:00Z","Weight":10,"DestinationIDs":{},"RatingSubject":"","Categories":{},"SharedGroups":{"SHARED_A":true},"Timings":[],"TimingIDs":{},"Disabled":false,"Factor":{},"Blocker":false}],"*voice":[{"Uuid":"e4a52fc9-f816-4443-baab-6b985cae6023","ID":"","Value":90,"Directions":{"*out":true},"ExpirationDate":"0001-01-01T00:00:00Z","Weight":20,"DestinationIDs":{"DST_1002":true},"RatingSubject":"SPECIAL_1002","Categories":{},"SharedGroups":{},"Timings":[],"TimingIDs":{},"Disabled":false,"Factor":{},"Blocker":false},{"Uuid":"5796a039-b92c-460a-b5a9-89f51226156f","ID":"","Value":120,"Directions":{"*out":true},"ExpirationDate":"0001-01-01T00:00:00Z","Weight":20,"DestinationIDs":{"DST_1003":true},"RatingSubject":"","Categories":{},"SharedGroups":{},"Timings":[],"TimingIDs":{},"Disabled":false,"Factor":{},"Blocker":false}]},"UnitCounters":{"*monetary":[{"CounterType":"*event","Counters":[{"Value":0,"Filter":{"Uuid":null,"ID":"520d391b-3d06-4c7e-95a9-d7e69217af43","Type":"*monetary","Value":null,"Directions":{"*out":true},"ExpirationDate":null,"Weight":null,"DestinationIDs":{"FS_USERS":true},"RatingSubject":null,"Categories":null,"SharedGroups":null,"TimingIDs":null,"Timings":null,"Disabled":null,"Factor":null,"Blocker":null}}]}]},"ActionTriggers":[{"ID":"STANDARD_TRIGGERS","UniqueID":"863a57a9-7901-4d47-b405-292c21b95e54","ThresholdType":"*min_balance","ThresholdValue":2,"Recurrent":false,"MinSleep":0,"ExpirationDate":"0001-01-01T00:00:00Z","ActivationDate":"0001-01-01T00:00:00Z","Balance":{"Uuid":null,"ID":null,"Type":"*monetary","Value":null,"Directions":{"*out":true},"ExpirationDate":null,"Weight":null,"DestinationIDs":null,"RatingSubject":null,"Categories":null,"SharedGroups":null,"TimingIDs":null,"Timings":[],"Disabled":null,"Factor":null,"Blocker":null},"Weight":10,"ActionsID":"LOG_WARNING","MinQueuedItems":0,"Executed":false,"LastExecutionTime":"0001-01-01T00:00:00Z"},{"ID":"STANDARD_TRIGGERS","UniqueID":"520d391b-3d06-4c7e-95a9-d7e69217af43","ThresholdType":"*max_event_counter","ThresholdValue":5,"Recurrent":false,"MinSleep":0,"ExpirationDate":"0001-01-01T00:00:00Z","ActivationDate":"0001-01-01T00:00:00Z","Balance":{"Uuid":null,"ID":"520d391b-3d06-4c7e-95a9-d7e69217af43","Type":"*monetary","Value":null,"Directions":{"*out":true},"ExpirationDate":null,"Weight":null,"DestinationIDs":{"FS_USERS":true},"RatingSubject":null,"Categories":null,"SharedGroups":null,"TimingIDs":null,"Timings":[],"Disabled":null,"Factor":null,"Blocker":null},"Weight":10,"ActionsID":"LOG_WARNING","MinQueuedItems":0,"Executed":false,"LastExecutionTime":"0001-01-01T00:00:00Z"},{"ID":"STANDARD_TRIGGERS","UniqueID":"119f4474-c0b7-4d8e-bb44-eac6283ce699","ThresholdType":"*max_balance","ThresholdValue":20,"Recurrent":false,"MinSleep":0,"ExpirationDate":"0001-01-01T00:00:00Z","ActivationDate":"0001-01-01T00:00:00Z","Balance":{"Uuid":null,"ID":null,"Type":"*monetary","Value":null,"Directions":{"*out":true},"ExpirationDate":null,"Weight":null,"DestinationIDs":null,"RatingSubject":null,"Categories":null,"SharedGroups":null,"TimingIDs":null,"Timings":[],"Disabled":null,"Factor":null,"Blocker":null},"Weight":10,"ActionsID":"LOG_WARNING","MinQueuedItems":0,"Executed":true,"LastExecutionTime":"2017-12-11T20:46:14.691141171Z"},{"ID":"STANDARD_TRIGGERS","UniqueID":"9d9559cb-562e-477c-bdc5-fb88b74022d5","ThresholdType":"*max_balance","ThresholdValue":100,"Recurrent":false,"MinSleep":0,"ExpirationDate":"0001-01-01T00:00:00Z","ActivationDate":"0001-01-01T00:00:00Z","Balance":{"Uuid":null,"ID":null,"Type":"*monetary","Value":null,"Directions":{"*out":true},"ExpirationDate":null,"Weight":null,"DestinationIDs":null,"RatingSubject":null,"Categories":null,"SharedGroups":null,"TimingIDs":null,"Timings":[],"Disabled":null,"Factor":null,"Blocker":null},"Weight":10,"ActionsID":"DISABLE_AND_LOG","MinQueuedItems":0,"Executed":false,"LastExecutionTime":"0001-01-01T00:00:00Z"}],"AllowNegative":false,"Disabled":false}
- Including default cgrates.json below
- {
- // 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": {
- "log_level": 7,
- },
- "data_db": { // database used to store runtime data (eg: accounts, cdr stats)
- "db_type": "mongo", // data_db type: <redis|mongo>
- "db_host": "127.0.0.1", // data_db host address
- "db_port": 27017, // data_db port to reach the database redis<6379>, mong <27017>
- "db_name": "10", // data_db database name to connect to
- "db_user": "cgrdata", // username to use when connecting to data_db
- "db_password": "cgrates", // 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": "mongo", // stor database type to use: <mongo|mysql|postgres>
- "db_host": "127.0.0.1", // the host to connect to
- "db_port": 27017, // the port to reach the stordb
- "db_name": "11", // stor database name
- "db_user": "cgrstor", // username to use when connecting to stordb
- "db_password": "cgrates", // 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
- },
- "rals": {
- "enabled": true,
- "cdrstats_conns": [
- {"address": "*internal"}
- ],
- "historys_conns": [
- {"address": "*internal"}
- ],
- "pubsubs_conns": [
- {"address": "*internal"}
- ],
- "users_conns": [
- {"address": "*internal"}
- ],
- "aliases_conns": [
- {"address": "*internal"}
- ],
- },
- "scheduler": {
- "enabled": true,
- },
- "cdrs": {
- "enabled": true,
- "cdrstats_conns": [
- {"address": "*internal"}
- ],
- },
- "cdrstats": {
- "enabled": true,
- },
- "cdre": {
- "*default": {
- "cdr_format": "csv",
- "field_separator": ",",
- "data_usage_multiply_factor": 1,
- "sms_usage_multiply_factor": 1,
- "generic_usage_multiply_factor": 1,
- "cost_multiply_factor": 1,
- "cost_rounding_decimals": -1,
- "cost_shift_digits": 0,
- "mask_destination_id": "MASKED_DESTINATIONS",
- "mask_length": 0,
- "export_dir": "/tmp/cgr_kamevapi/cgrates/cdre",
- "header_fields": [],
- "content_fields": [
- {"tag": "CgrId", "type": "*composed", "value": "CGRID"},
- {"tag":"RunId", "type": "*composed", "value": "RunID"},
- {"tag":"Tor", "type": "*composed", "value": "ToR"},
- {"tag":"AccId", "type": "*composed", "value": "OriginID"},
- {"tag":"ReqType", "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": "*datetime", "value": "SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
- {"tag":"AnswerTime", "type": "*datetime", "value": "AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
- {"tag":"Usage", "type": "*composed", "value": "usage"},
- {"tag":"Cost", "type": "*composed", "value": "cost"},
- ],
- "trailer_fields": [],
- },
- "customer_tpl": {
- "cdr_format": "csv",
- "field_separator": ";",
- "data_usage_multiply_factor": 1,
- "sms_usage_multiply_factor": 1,
- "generic_usage_multiply_factor": 1,
- "cost_multiply_factor": 1,
- "cost_rounding_decimals": -1,
- "cost_shift_digits": 0,
- "mask_destination_id": "MASKED_DESTINATIONS",
- "mask_length": 0,
- "export_dir": "/tmp/cgr_kamevapi/cgrates/cdre",
- "header_fields": [],
- "content_fields": [
- {"tag": "CgrId", "type": "*composed", "value": "CGRID"},
- {"tag":"AccId", "type": "*composed", "value": "OriginID"},
- {"tag":"ReqType", "type": "*composed", "value": "RequestType"},
- {"tag":"Tenant", "type": "*composed", "value": "Tenant"},
- {"tag":"Category", "type": "*composed", "value": "Category"},
- {"tag":"Subject", "type": "*composed", "value": "Account"},
- {"tag":"Destination", "type": "*composed", "value": "~Destination:s/^1(\\d+)/+$1/:s/^\\+(\\d+)/00$1/"},
- {"tag":"AnswerTime", "type": "*datetime", "value": "AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
- {"tag":"Usage", "type": "*composed", "value": "Usage"},
- {"tag":"Cost", "type": "*composed", "value": "Cost"},
- ],
- "trailer_fields": [],
- }
- },
- "sm_kamailio": {
- "enabled": true,
- "create_cdr": true,
- },
- "historys": {
- "enabled": true,
- "history_dir": "/tmp/cgr_kamevapi/cgrates/history",
- },
- "pubsubs": {
- "enabled": true,
- },
- "aliases": {
- "enabled": true,
- },
- "users": {
- "enabled": true,
- "indexes": ["Uuid"],
- },
- }
Add Comment
Please, Sign In to add comment