Real-time Charging System for Telecom & ISP environments

Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments

Build Status Documentation Status GoDoc

Features

  • Real-time Online/Offline Charging System (OCS).
  • Account Balances Management with bundle support.
  • Session or Event charging with reservation.
  • Rating engine.
  • CDR logging with support for Interim Records.
  • QoS LCR and LCR over Bundles.
  • Fraud detection with automatic mitigation.
  • Call Statistics with pattern monitoring.
  • Performance oriented.
  • Modular architecture.
  • Test driven development.
  • Plug-able/non-intrusive into existing setups.
  • Cloud-ready, built on independent micro-services with rich set of RPC APIs.
  • Agile in developing new features.
  • Very fast (5000+ req/sec on a single machine)
  • Good documentation.
  • Commercial support available

Documentation

Step by steps tutorials

Debian apt-get repository

Installing CGRateS from sources on minimal debian (for devel or testing)

Browsable HTML docs http://readthedocs.org/docs/cgrates/

PDF, Epub, Manpage http://readthedocs.org/projects/cgrates/downloads/

API reference godoc

Also check irc.freenode.net #cgrates (Webchat) and Google group for a more real-time support.

Comments
  • Empty

    Empty "Account" field in PubSubs post requests

    After enabling PubSubs service and subscribing endpoint to receive post requests from it, i received next requests:

    POST /api/warn-point HTTP/1.1. Host: 172.x.x.x:80. User-Agent: Go 1.1 package http. Content-Length: 319. Content-Type: application/json. Accept-Encoding: gzip. . {"Account":"","AccountAllowNegative":"","AccountDisabled":"","Category":"","DestinationIds":"*any","EventName":"ACCOUNT_BALANCE_MODIFIED","ExpirationDate":"0001-01-01 00:00:00 +0000 UTC","Id":"","RatingSubject":"","SharedGroup":"","TimingIDs":"","Uuid":"39e71000-6446-43db-a573-50360104bc64","Value":"-1","Weight":"10"}

    POST /api/warn-point HTTP/1.1. Host: 172.x.x.x:80. User-Agent: Go 1.1 package http. Content-Length: 321. Content-Type: application/json. Accept-Encoding: gzip. . {"Account":"","AccountAllowNegative":"","AccountDisabled":"","Category":"","DestinationIds":"*any","EventName":"ACCOUNT_BALANCE_MODIFIED","ExpirationDate":"0001-01-01 00:00:00 +0000 UTC","Id":"","RatingSubject":"","SharedGroup":"","TimingIDs":"","Uuid":"8f5745f6-82a4-4be3-beee-b46e1772fb94","Value":"62.8","Weight":"10"}

    I received them after I added 1 EUR to balance with Uuid from the second request. But the problem is, that there is no data for the field "Account".

    And also, can you please, explain, why there are two requests? What do the first one mean? Its "Value" equals the sum I added to the balance, which Uuid we can see in the second request.

  • Memory footprint

    Memory footprint

    Hi all,

    Dan and I have been working on our memory footprint and we are thinking it may be due to Docker Swarm garbage collection. Going to compare via a normal baremetal server.

    cgr> status
    {
     "ActiveGoroutines": 79,
     "Footprint": "5.4GiB",
     "GoVersion": "go1.12.4",
     "MemoryUsage": "268.8MiB",
     "NodeID": "xxx.suretec.net",
     "RunningSince": "Wed Jul 17 00:03:14 UTC 2019",
     "Version": "CGRateS 0.9.1~rc8 git+34d7d31 (2019-06-23T17:43:55+02:00)"
    }
    
  • TLS handshake error

    TLS handshake error

    Hi all,

    When I put in TLS config and validate it's all working:

    openssl s_client -showcerts -connect 127.0.0.1:2280
    CONNECTED(00000003)
    depth=2 C = BE, O = GlobalSign nv-sa, OU = Root CA, CN = GlobalSign Root CA
    verify return:1
    depth=1 C = BE, O = GlobalSign nv-sa, CN = AlphaSSL CA - SHA256 - G2
    verify return:1
    depth=0 OU = Domain Control Validated, CN = *.suretec.net
    verify return:1
    ---
    Certificate chain
     0 s:/OU=Domain Control Validated/CN=*.suretec.net
       i:/C=BE/O=GlobalSign nv-sa/CN=AlphaSSL CA - SHA256 - G2
    -----BEGIN CERTIFICATE-----
    <snip>
    -----END CERTIFICATE-----
     1 s:/C=BE/O=GlobalSign nv-sa/CN=AlphaSSL CA - SHA256 - G2
       i:/C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA
    -----BEGIN CERTIFICATE-----
    <snip>
    -----END CERTIFICATE-----
    ---
    Server certificate
    subject=/OU=Domain Control Validated/CN=*.suretec.net
    issuer=/C=BE/O=GlobalSign nv-sa/CN=AlphaSSL CA - SHA256 - G2
    ---
    No client certificate CA names sent
    ---
    SSL handshake has read 3466 bytes and written 415 bytes
    ---
    New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
    Server public key is 2048 bit
    Secure Renegotiation IS supported
    Compression: NONE
    Expansion: NONE
    SSL-Session:
        Protocol  : TLSv1.2
        Cipher    : ECDHE-RSA-AES128-GCM-SHA256
        Session-ID: AC434E0230D52A6E65D73A90DD9473383C96D785FCBBABD4BD95FA96F752204F
        Session-ID-ctx: 
        Master-Key: E4B1F94066212DEAFB956A27CFBB520369338B9315EFF7277975981912D4CF456E404208D24EAD7E3F34AA01C72CC5EA
        Key-Arg   : None
        PSK identity: None
        PSK identity hint: None
        SRP username: None
        TLS session ticket:
        0000 - ba 4a cc 8f 53 a2 84 e1-c4 37 1b 55 e3 6c 56 52   .J..S....7.U.lVR
        0010 - b2 78 45 77 cb cb b8 71-45 7b 35 13 bd 1b 38 28   .xEw...qE{5...8(
        0020 - df c8 8d 96 ef 08 c4 77-36 19 09 0e 70 a4 ca 5a   .......w6...p..Z
        0030 - 9b 25 df eb 1d 1b 87 3a-dc c4 31 ab 52 ae e2 a2   .%.....:..1.R...
        0040 - 81 97 d2 48 0f 09 c2 c2-52 b5 a1 6e 74 1e e4 bd   ...H....R..nt...
        0050 - 89 74 32 94 83 e9 9f 03-a5 3c 48 78 df 23 00 39   .t2......<Hx.#.9
        0060 - 7f b0 70 ce 73 d2 7f a3-fe a2 fc 85 02 bd 56 29   ..p.s.........V)
        0070 - 18 eb 72 75 1e f7 93 f5-                          ..ru....
    
        Start Time: 1538664582
        Timeout   : 300 (sec)
        Verify return code: 0 (ok)
    ---
    

    When a 3rd party remote client connects I see this:

    2018/10/04 16:01:36 http: TLS handshake error from public_ip:25590: EOF

    See this for more:

    https://groups.google.com/forum/#!topic/cgrates/dlbQ0V7vsVo

    My config:

      "listen": {
        "rpc_json": "0.0.0.0:2012",
        "rpc_gob": "0.0.0.0:2013",
        "http": "0.0.0.0:2080",
        "http_tls": "0.0.0.0:2280",
        "tls_server_certificate": "/etc/cgrates/wildcard.suretec.net.with-intermediate.crt",
        "tls_server_key":"/etc/cgrates/wildcard.suretec.net.key"
      },
    
  • Check for relative expiration.

    Check for relative expiration.

    Hello Dear CGRateS Team! We try to use relative date check for triggering action a day before the ExpiryTime. Right now, only *now is implemented at Triggers and Filters.

    The following syntax is not working. *now+24h, *now+5m

    Thanks, Michael

  • High Memory Consumption

    High Memory Consumption

    Hi Guys,

    I am seeing very high memory usage with the cgr-engine and it continues to increase. I took a few samples below.

    This was taken when there were 0 calls on the system. { "footprint": 564717, "memstat": 357878 }

    This was taken when there were 71 calls on the system

    root@cgrtbill:~# cgr-console status { "footprint": 1606842, "memstat": 970407 } pmap -x 12482 | grep total

    total kB 1721548 1151892 1143720

    The System that CGRateS is running on has 8GB Ram.

    CGRates Package:

    -rwxr-xr-x 1 root root 14396928 Apr 7 10:25 cgr-console -rwxr-xr-x 1 root root 18598880 Apr 7 10:25 cgr-engine -rwxr-xr-x 1 root root 15420832 Apr 7 10:25 cgr-loader -rwxr-xr-x 1 root root 14577024 Apr 7 10:25 cgr-tester

    OS: Debian Wheezy 7.9

  • Prefix matching for rating subject

    Prefix matching for rating subject

    Hy.

    Here is a feature request for "Prefix matching for rating subject". The main driver of this request is to allow calls with different CLI + Destination combinations (both with prefix matching) to be billed/LCRed differently by CGRates. You may also hear/see this feature refered to as A-number/CLI billing/pricing and as we understand is becoming an issue for carriers in Europe.

    Thanks for the effort @danbogos, looking forward to hear from you guys about this.

    Best regards.

  • Aliases seems not working with kamailio evapi

    Aliases seems not working with kamailio evapi

    Hi everyone, I'm trying to implement Aliases module ; I'm working with kamailio+evapi ; in cgr-console everything seems working (cgr-console 'aliases Direction="*out" Tenant="evox.it" Category="call" Account="0409811201" Subject="0409811201" Context="*rating"') but when kamailio makes authentication and asks fot "Responder.GetDerivedMaxSessionTime" Cgrates replies : "ACCOUNT_NOT_FOUND"; what could be wrong ?

    tp_aliases

    +----+------+-----------+---------+----------+------------+---------+----------------+---------+---------+----------+------------+--------+------------+
    | id | tpid | direction | tenant  | category | account    | subject | destination_id | context | target  | original | alias      | weight | created_at |
    +----+------+-----------+---------+----------+------------+---------+----------------+---------+---------+----------+------------+--------+------------+
    |  1 | 2    | *out      | evox.it | call     | 0409811201 | *any    |                | *rating | Account | *any     | 0409828031 |  10.00 | NULL       |
    |  2 | 2    | *out      | evox.it | call     | 0409811202 | *any    |                | *rating | Account | *any     | 0409828031 |  10.00 | NULL       |
    +----+------+-----------+---------+----------+------------+---------+----------------+---------+---------+----------+------------+--------+------------+
    

    on RALs ngrep -W byline port 2012

    T 10.32.0.1:46076 -> 10.32.0.236:2012 [AP]
    {"method":"Responder.GetDerivedMaxSessionTime","params":[{"CGRID":"83cef65a7598474fa6f0ed631b59750d952eac55","RunID":"","OrderID":0,"OriginHost":"127.0.0.1","Source":"KAMAILIO_CGR_AUTH_REQUEST","OriginID":";","ToR":"*voice","RequestType":"*prepaid","Direction":"*out","Tenant":"evox.it","Category":"call","Account":"0409811201","Subject":"0409811201","Destination":"0039040123532","SetupTime":"2017-12-06T11:30:36Z","PDD":0,"AnswerTime":"0001-01-01T00:00:00Z","Usage":0,"Supplier":"","DisconnectCause":"","ExtraFields":{"cgr_computelcr":"true","tr_index":"11028","tr_label":"537416753"},"CostSource":"","Cost":-1,"CostDetails":null,"AccountSummary":null,"ExtraInfo":"","Rated":false,"Partial":false}],"id":8}
    
    ##
    T 10.32.0.236:2012 -> 10.32.0.1:46076 [AP]
    {"id":8,"result":null,"error":"ACCOUNT_NOT_FOUND"}
    

    config.json (abstract)

    
     "rals": {
         "enabled": true,                        // enable Rater service: <true|false>
         "aliases_conns": [
    		{"address": "*internal"}
    	]
    },
    ...
     "aliases": {
    	"enabled": true,
    },
    
  • Performance problem

    Performance problem

    I have loaded a rating plan with approximately 12,000 number prefixes, rating queries now seem to take an excessive amount of time. Each json query takes around 3 secs to complete. If I do an identical query immediately afterwards I get a near instant response, presumably because of some caching?? Any ideas? I'm running cgrates and Redis on the same machine, its and 8 core G5 (bare metal, no VMS!) on Centos 6.

  • send warning before call drops

    send warning before call drops

    We need ability to send/play msg during call if user is running out of balance. it may be settings : warning_msg = "some_name_of_voice_msg" - play msg at channel from freeswitch sounds warning_msg_time = 30s - if user have 30s to end of the call , play sound warning msg warning_script = "/usr/local/launch_script.pl UUID" - optional script that will be launched when hit 30s to end of that call

  • Rating problem

    Rating problem

    I have cgrates configured as follows: :::::::::::::: AccountActions.csv ::::::::::::::

    Tenant,Account,Direction,ActionTimingsTag,ActionTriggersTag

    cgrates.org,1001,_out,AT_FS10,STANDARD_TRIGGERS cgrates.org,1002,_out,AT_FS10,STANDARD_TRIGGERS cgrates.org,1003,_out,AT_FS10,STANDARD_TRIGGERS cgrates.org,1004,_out,AT_FS10,STANDARD_TRIGGERS cgrates.org,1005,*out,AT_FS10,STANDARD_TRIGGERS :::::::::::::: Actions.csv ::::::::::::::

    ActionsTag,Action,BalanceType,Direction,Units,ExpirationDate,DestinationTag,RateType,RateValue,MinutesWeight,Weight

    TOPUP_10,_topup_reset,_monetary,_out,10,_unlimited,*any,,,,10 :::::::::::::: ActionTimings.csv ::::::::::::::

    Tag,ActionsTag,TimingTag,Weight

    AT_FS10,TOPUP_10,ASAP,10 :::::::::::::: ActionTriggers.csv ::::::::::::::

    Tag,BalanceTag,Direction,ThresholdType,ThresholdValue,DestinationTag,ActionsTag,Weight

    STANDARD_TRIGGERS,_monetary,_out,_min_balance,2,,LOG_BALANCE,10 STANDARD_TRIGGERS,_monetary,_out,_max_balance,20,,LOG_BALANCE,10 STANDARD_TRIGGERS,_monetary,_out,_max_counter,15,FS_USERS,LOG_BALANCE,10 :::::::::::::: DestinationRates.csv :::::::::::::: DR,PSTN_70,GBP_70 DR,PSTN_71,GBP_71 DR,PSTN_72,GBP_72 :::::::::::::: DestinationRateTimings.csv :::::::::::::: DRT,DR,ALWAYS,10 :::::::::::::: Destinations.csv :::::::::::::: PSTN_70,70 PSTN_71,71 PSTN_72,72 :::::::::::::: Rates.csv :::::::::::::: GBP_70,0.000000,2.22222,1s,1s,0s,_up,4,20 GBP_71,0.000000,5.55555,1s,1s,0s,_up,4,20 GBP_72,0.000000,7.77777,1s,1s,0s,_up,4,20 :::::::::::::: RatingProfiles.csv ::::::::::::::

    Tenant,TOR,Direction,Subject,ActivationTime,DestinationRateTimingTag,RatesFallbackSubject

    cgrates.org,call,_out,_any,2012-01-01T00:00:00Z,DRT, :::::::::::::: Timings.csv ::::::::::::::

    Tag,Years,Months,MonthDays,WeekDays,Time

    ALWAYS,_any,_any,_any,_any,00:00:00 ASAP,_any,_any,_any,_any,*asap

    I have a python script that makes a call of the following form: cd = {"Direction":"*out", "TOR":"call", "Tenant": "cgrates.org", "Subject": "1001", "Destination": "7054567", "TimeStart": "2013-08-07T17:30:00Z", "TimeEnd": "2013-08-07T17:31:00Z"} result = "" result = rpc.call("Responder.GetCost", cd) print(result)

    The output I get is: {u'Direction': u'*out', u'TOR': u'call', u'Destination': u'70', u'Account': u'', u'ConnectFee': 0, u'Cost': 466.6662, u'Timespans': [{u'MinuteInfo': None, u'Interval': {u'RoundingDecimals': 0, u'Weight': 10, u'MonthDays': [], u'Months': [], u'WeekDays': [], u'Years': [], u'ConnectFee': 0, u'RoundingMethod': u'', u'StartTime': u'00:00:00', u'Prices': [{u'RateIncrement': 1000000000, u'GroupIntervalStart': 0, u'RateUnit': 1000000000, u'Value': 2.2222200000000001}, {u'RateIncrement': 1000000000, u'GroupIntervalStart': 0, u'RateUnit': 1000000000, u'Value': 5.5555500000000002}, {u'RateIncrement': 1000000000, u'GroupIntervalStart': 0, u'RateUnit': 1000000000, u'Value': 7.7777700000000003}], u'EndTime': u''}, u'CallDuration': 0, u'TimeEnd': u'2013-08-07T17:31:00Z', u'TimeStart': u'2013-08-07T17:30:00Z', u'Cost': 466.6662, u'ActivationPeriod': {u'Intervals': [{u'RoundingDecimals': 0, u'Weight': 10, u'MonthDays': [], u'Months': [], u'WeekDays': [], u'Years': [], u'ConnectFee': 0, u'RoundingMethod': u'', u'StartTime': u'00:00:00', u'Prices': [{u'RateIncrement': 1000000000, u'GroupIntervalStart': 0, u'RateUnit': 1000000000, u'Value': 2.2222200000000001}, {u'RateIncrement': 1000000000, u'GroupIntervalStart': 0, u'RateUnit': 1000000000, u'Value': 5.5555500000000002}, {u'RateIncrement': 1000000000, u'GroupIntervalStart': 0, u'RateUnit': 1000000000, u'Value': 7.7777700000000003}], u'EndTime': u''}], u'ActivationTime': u'2012-01-01T00:00:00Z'}}], u'Tenant': u'cgrates.org', u'Subject': u'1001'}

    I am confused as to why it identifies the destination as 70, then applies the amount that is applicable to a destination of 72. I also don't understand why it responds with pricing for all 3 destinations.

    If I change the destination to something that matches 71 or 72 I get exactly the same response other than the matched destination changes.

    Am I doing something wrong here?

    Thanks

    Paul Crocodile RCS

  • POST to call_url/call_url_async to include more details

    POST to call_url/call_url_async to include more details

    Hi all,

    When using ThresholdS (I don't think it's really related to that) and a filter to call an action with call_url*, the event is POST'd to the url, but you can't tell what event caused it. You could construct different URLs, but it would be great to have the ActionID/FilterID/ThresholdID or similar as extra data. See:

    https://groups.google.com/d/msg/cgrates/4abheYrhqj4/fxURQN3jBQAJ (use case is to filter based on a balance value to let the customer know their data/sms/voice bundle is at XX% usage).

    This is what comes in:

    User-Agent:Go-http-client/1.1.
    Content-Length:1830.
    Content-Type:application/json.
    Accept-Encoding:gzip.
    .
    {
       "ID":"surevoip:234189200172500",
       "BalanceMap":{
          "*data":[
             {
                "Uuid":"1c9244bb-127b-4a1a-ad7d-035befab92f5",
                "ID":"B_UK_MOBILE_DATA_500",
                "Value":524288000,
                "Directions":{
                   "*out":true
                },
                "ExpirationDate":"0001-01-01T00:00:00Z",
                "Weight":10,
                "DestinationIDs":{
                   "United Kingdom - O2 (UK) Limited":true,
                   "United Kingdom - Orange PCS Ltd":true,
                   "United Kingdom - T-Mobile (UK) Limited":true,
                   "United Kingdom - Vodafone":true
                },
                "RatingSubject":"",
                "Categories":{
                   "m_data":true
                },
                "SharedGroups":{
    
                },
                "Timings":null,
                "TimingIDs":{
    
                },
                "Disabled":false,
                "Factor":null,
                "Blocker":false
             }
          ],
          "*sms":[
             {
                "Uuid":"c9a9064f-ad7f-4358-8add-046aa29330da",
                "ID":"B_UK_SMS_500",
                "Value":498,
                "Directions":{
                   "*out":true
                },
                "ExpirationDate":"0001-01-01T00:00:00Z",
                "Weight":10,
                "DestinationIDs":{
                   "UK EE(T-Mobile) Mobile":true,
                   "United Kingdom - O2 (UK) Limited":true,
                   "United Kingdom - Orange PCS Ltd":true,
                   "United Kingdom - T-Mobile (UK) Limited":true,
                   "United Kingdom - Vodafone":true
                },
                "RatingSubject":"",
                "Categories":{
                   "mo_sms":true
                },
                "SharedGroups":{
    
                },
                "Timings":null,
                "TimingIDs":{
    
                },
                "Disabled":false,
                "Factor":null,
                "Blocker":false
             }
          ],
          "*voice":[
             {
                "Uuid":"d2570560-a6f8-4ef1-b53a-5a6e7c6a783e",
                "ID":"B_UK_MOBILE_UK_LANDLINE_500",
                "Value":30000000000000,
                "Directions":{
                   "*out":true
                },
                "ExpirationDate":"0001-01-01T00:00:00Z",
                "Weight":10,
                "DestinationIDs":{
                   "UK 03 UK wide":true,
                   "UK 3 Mobile":true,
                   "UK EE(Orange) Mobile":true,
                   "UK EE(T-Mobile) Mobile":true,
                   "UK National":true,
                   "UK O2 Mobile":true,
                   "UK Vodafone Mobile":true,
                   "United Kingdom - O2 (UK) Limited":true,
                   "United Kingdom - Orange PCS Ltd":true,
                   "United Kingdom - T-Mobile (UK) Limited":true,
                   "United Kingdom - Vodafone":true
                },
                "RatingSubject":"",
                "Categories":{
                   "mo_call":true
                },
                "SharedGroups":{
    
                },
                "Timings":null,
                "TimingIDs":{
    
                },
                "Disabled":false,
                "Factor":null,
                "Blocker":false
             }
          ]
       },
       "UnitCounters":null,
       "ActionTriggers":null,
       "AllowNegative":false,
       "Disabled":false
    }
    

    Thanks!

  • Freeswitch Agent didn't try to reconnect to Freeswitch with headers reading error.

    Freeswitch Agent didn't try to reconnect to Freeswitch with headers reading error.

    I'm on master branch. (My config file is attached.) A few days ago I noticed we must have had a temporary network connection error between CGRateS and Freeswitch (they are in separate DCs), and these were in the log file:

    Error reading headers: <read tcp 172.20.223.41:40368->172.20.223.24:8021: read: connection timed out> Disconnecting from FreeSWITCH! Error reading headers: <read tcp 172.20.223.41:40362->172.20.223.24:8021: read: connection timed out> Disconnecting from FreeSWITCH!

    After the second disconnect, no reconnection attempt was made, even though the network was restored, and CGRateS had to be restarted. When restarted it connected back up as normal.

    My FS agent reconnection attempts are set to -1 in the config file, which is supposed to be unlimited.

    So, I'm wondering why the reconnection attempt was abandoned?

    Please let me know anything I can do to assist in diagnosing.

    cgrates.json.txt

  • Call categories tmo CDRs are not found

    Call categories tmo CDRs are not found

    Hi Dan,

    In t-mobile cdrs there are categories which in old version is something that was being filtered on in the json loading profiles like /etc/ipbxcgr/TMO/data/import_TMO_int_data_0001.json. This one specificly (on rate02) filters on INTB. INTB is Internet Abroad, but can be many from countries, not clear if it is all EU or so.

    You will find these in /var/spool/cgrates/cdrc_tmo/out# cat calldetails_5.10662.00.00.100326_901477306366_202210281513.csv |grep INTB: "5.10662.00.00.100326","Gamma inzake Krinkels B.V.","901477306366","499","20221028000000","37171211","3197032167916","INTB","Internet in het buitenland","20221006000000","Internet","234","17925","KB","0","0","België" "5.10662.00.00.100326","Gamma inzake Krinkels B.V.","901477306366","499","20221028000000","37171211","3197032167916","INTB","Internet in het buitenland","20221007000000","Internet","20402","11582","KB","0","0","België" "5.10662.00.00.100326","Gamma inzake Krinkels B.V.","901477306366","779","20221028000000","37180903","31622417258","INTB","Internet in het buitenland","20221021000000","Internet","2121","620","KB","0","0","Duitsland"

    When processing these CDRs in 0.10 they show up as open issues, as INTB can't be found. For 0.10 we probably need to set it somewhere and load them by Attributes into CGRates?

    We have this issue on categories INTB;TZNB;INMTC;INMOC;MSGFI

    any suggestion how/where these categories can be set so CGRates processes them correctly?

    rgds Wouter

  • [v0.11] EventExporterService (ees) - opts for aws variables not working for SQS and S3

    [v0.11] EventExporterService (ees) - opts for aws variables not working for SQS and S3

    Dear Team,

    I am having issues using SQS / S3 with latestv0.11 (<[email protected]~dev-20220929065834-6907428eb6ee>)

    I thought it was a misconfiguration from my side but I have just also tested this sample cdrexport config here --> https://raw.githubusercontent.com/cgrates/cgrates/master/data/conf/samples/cdrsexport_internal/cgrates.json

    and CGRateS can't read the awsRegion/awsKey/awsSecret variables

    logs:

    / # /go/bin/cgr-engine -config_path /etc/cgrates/
    2022/10/05 16:36:58 CGRateS <22e29c3> [INFO] <CoreS> starting version <[email protected]~dev-20220929065834-6907428eb6ee><go1.19.1>
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsRegion present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsKey present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsSecret present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsRegion present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsKey present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsSecret present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsRegion present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsKey present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsSecret present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsRegion present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsKey present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsSecret present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsRegion present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsKey present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsSecret present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsRegion present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsKey present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsSecret present for AWS for exporter with ID : <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <S3Poster> No awsRegion present for AWS for exporter with ID : <s3_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <S3Poster> No awsKey present for AWS for exporter with ID : <s3_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <S3Poster> No awsSecret present for AWS for exporter with ID : <s3_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsRegion present for AWS for exporter with ID: <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsKey present for AWS for exporter with ID: <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <SQSPoster> No awsSecret present for AWS for exporter with ID: <sqs_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <S3Poster> No awsRegion present for AWS for exporter with ID: <s3_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <S3Poster> No awsKey present for AWS for exporter with ID: <s3_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] <S3Poster> No awsSecret present for AWS for exporter with ID: <s3_test_file>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [INFO] <CoreS> starting <CoreS> subsystem
    2022/10/05 16:36:58 CGRateS <22e29c3> [INFO] <CoreS> starting <CDRs> subsystem
    2022/10/05 16:36:58 CGRateS <22e29c3> [WARNING] WARNING: missing TLS certificate/key file!
    2022/10/05 16:36:58 CGRateS <22e29c3> [INFO] <HTTP> enabling handler for JSON-RPC
    2022/10/05 16:36:58 CGRateS <22e29c3> [INFO] <HTTP> enabling handler for WebSocket connections
    2022/10/05 16:36:58 CGRateS <22e29c3> [INFO] <HTTP> start listening at <127.0.0.1:2080>
    2022/10/05 16:36:58 CGRateS <22e29c3> [INFO] <CoreS> starting <ChargerS> subsystem
    2022/10/05 16:36:58 CGRateS <22e29c3> [INFO] <CoreS> starting <AttributeS> subsystem
    2022/10/05 16:36:58 CGRateS <22e29c3> [INFO] <CoreS> starting <ApierS> subsystem
    2022/10/05 16:36:58 CGRateS <22e29c3> [INFO] <CoreS> starting <EEs> subsystem
    2022/10/05 16:36:58 CGRateS <22e29c3> [INFO] Registering CDRS HTTP Handlers.
    2022/10/05 16:36:58 CGRateS <22e29c3> [INFO] Registering CDRS RPC service.
    2022/10/05 16:36:58 CGRateS <22e29c3> [INFO] Starting CGRateS GOB server at <127.0.0.1:2013>.
    2022/10/05 16:36:58 CGRateS <22e29c3> [INFO] Starting CGRateS JSON server at <127.0.0.1:2012>.
    

    Thank you in advance for your support.

    Vasilios Tzanoudakis

  • Defer being called inside the loop

    Defer being called inside the loop

    Greetings,

    Wondering if this needs to be fixed or warning can be simply ignored.

    https://github.com/cgrates/cgrates/blob/engine/calldesc.go#L865 https://github.com/cgrates/cgrates/blob/master/engine/calldesc.go#L934

    Please, close the issue if no big deal.

  • Redis cluster support broken with redis-7

    Redis cluster support broken with redis-7

    Hello,

    Redis v7 produces slightly different output for the 'CLUSTER SLOTS' command which breaks cluster support in CGR. Upgrading the mediocregopher/radix dependency to v3.8.1 should resolve this issue.

  • Set Capabilities in Diameter CER/CEA

    Set Capabilities in Diameter CER/CEA

    Hi CGrateS team,

    I'm playing with CGrateS and Open5GS to setup online charging for mobile data.

    One thing I've noticed is when CGrateS responds to the Capabilities Exchange Request, there's a lot of Diameter applications contained within the Capabilities Exchange Answer: image

    Is it possible to limit / restrict the advertised capabilities?

    With this current long list of other Diameter applications, when my PGW is looking for other Diameter peers to handle certain applications (Like Gx) these are getting routed to CGrateS to use as the PCRF, even though I'm only trying to use CGrateS as an OCS.

    Thanks, Nick

State observer - StateObserver used to synchronize the local(cached) state of the remote object with the real state

state observer StateObserver used to synchronize the local(cached) state of the

Jan 19, 2022
traning helper. Reading real METARs

pptrain Train reading real METARs Example: $ pptrain

Jan 23, 2022
A toolkit for replaying time series data.

Replay Toolkit The replay package provides some simple tools for replaying captured data at realtime. I use this in various tools that take logged dat

Aug 13, 2019
A simple Cron library for go that can execute closures or functions at varying intervals, from once a second to once a year on a specific date and time. Primarily for web applications and long running daemons.

Cron.go This is a simple library to handle scheduled tasks. Tasks can be run in a minimum delay of once a second--for which Cron isn't actually design

Dec 17, 2022
Visualize plant growth over time with Go, WebDAV and WASM; @pojntfx's entry for #growlab.

Growlapse Visualize plant growth over time with Go, WebDAV and WASM; @pojntfx's entry for #growlab. Installation Containerized You can get the Docker

Feb 21, 2022
An effective time-series data compression/decompression method based on Facebook's Gorilla.

Gorilla This package provides the effective time-series data compression method based on Facebook's Gorilla.. In a nutshell, it uses delta-of-delta ti

Sep 26, 2022
Code snippets by first time open source contributors

Introduction Golang code snippets by first time open source contributors Rules How to contribute Add a folder and create your desired code snippet fil

Oct 6, 2021
Solution to elevator test problem but this time recursive and in go

Synopsis A multi-floor building has a Lift in it. People are queued on different floors waiting for the Lift. Some people want to go up. Some people w

Nov 8, 2021
Typesafe lazy instantiation to improve service start time

Package lazy is a light wrapper around sync.Once providing support for return values. It removes the burden of capturing return values via closures from the caller.

May 30, 2022
FlameScope is a visualization tool for exploring different time ranges as Flame Graphs.
FlameScope is a visualization tool for exploring different time ranges as Flame Graphs.

FlameScope FlameScope is a visualization tool for exploring different time ranges as Flame Graphs, allowing quick analysis of performance issues such

Dec 27, 2022
Advent of Code 2021 - Time to learn Go

aoc2021 Advent of Code 2021 - Time to learn Go Will contain my solutions for aoc2021, so avoid reading the files in .src/aoc2021/ unless you want spoi

Dec 22, 2021
Advent of Code 2021, this time in Go

Go Lang Notes Advent of Code Day 3 The distinction between chars and bytes is a bit annoying. I got tripped up by doing: int(str[pos]) which gives yo

Dec 10, 2022
You could leverage Alfred and Google Sheets to track your time with ease.
You could leverage Alfred and Google Sheets to track your time with ease.

You could leverage Alfred and Google Sheets to track your time with ease. The goal is to track your time in a way that is easy to understand how much time you spend on.

Dec 25, 2022
Solver for wordle hard mode - achieves 5 attempts or less 100% of the time

wordier Solver for wordle hard mode - achieves 5 attempts or less 100% of the time Example - Spoiler ➜ wordier git:(master) ✗ go run main.go scamp ➜

Jan 12, 2022
:chart_with_upwards_trend: Monitors Go MemStats + System stats such as Memory, Swap and CPU and sends via UDP anywhere you want for logging etc...

Package stats Package stats allows for gathering of statistics regarding your Go application and system it is running on and sent them via UDP to a se

Nov 10, 2022
Cross-platform file system notifications for Go.

File system notifications for Go fsnotify utilizes golang.org/x/sys rather than syscall from the standard library. Ensure you have the latest version

Dec 30, 2022
go language generics system

Gotgo This document describes the third iteration of my attempt at a reasonable implementation of generics for go based on the idea of template packag

Dec 31, 2022
File system event notification library on steroids.

notify Filesystem event notification library on steroids. (under active development) Documentation godoc.org/github.com/rjeczalik/notify Installation

Jan 7, 2023
Mobile Blogging System

Mobile Blogging System

Mar 3, 2022