Browse / Invoicing and finance
CGRateS
Real-time charging and rating engine for telecom and ISPs, driven entirely by JSON-RPC APIs.
CGRateS rates sessions and events in real time, keeps account balances and bundles, logs CDRs, and runs routing, thresholds and stats as micro-services. Everything is configured in cgrates.json and tariff-plan CSVs and driven through its RPC APIs, which is why the API is the product. Telecom-specific, long-lived, AGPL.
- I run a VoIP or ISP service and need prepaid balances and per-second rating that my softswitch can call
- I want an agent to set up rates, load tariff plans and query CDRs without a dashboard
- Telecom-specific vocabulary (CDRs, tariff plans, LCR); not a general invoicing tool
- AGPL-3.0
- Sits next to a softswitch; not useful on its own
Last activity Aug 28, 2026. Fit: adaptable 2, operable 3.
Adaptable: what is yours to change
Make it yours
Config only2 things to edit
Everything is a JSON config: enable subsystems, storage backends and switch agents in /etc/cgrates/cgrates.json, then load tariff plans (rates, destinations, accounts) from CSVs with cgr-loader. No code edits for a working deployment; expect to learn telecom charging concepts.
- Env vars
- none
- Config files
/etc/cgrates/cgrates.jsondata/tariffplans/*.csv- Prompt files
- none
- Accounts you need
- none
Source
- github.com/cgrates/cgrates
- AGPL-3.0 license
- Last commit Aug 28, 2026
- 512 stars
Operable: what an agent can drive
Interface
OfficialAPIpublished by the builderlocal
How an agent can drive an Operable Listing, in five levels: native (built for the agent as the primary interface), official (the Builder ships an agent interface), wrapped (a third party wraps the software's API), config (an agent can only drive it by editing files), gui (screen control only). An interface is official only when it is published by the same organization that ships the software. GUI-level Listings are allowed and sorted last.
Reach
Complete coverage. 9 of 9 jobs reachable through the stated interface.
| Job | Through the interface | Evidence |
|---|---|---|
| Rate calls and events (RALs) | Reachable | APIerS exposes rating profiles and rates; docs 'Rating engine' |
| Real-time session charging with reservation | Reachable | SessionS service over JSON-RPC (docs subsystems list) |
| Account balances and bundles | Reachable | APIerS account and balance calls; README 'Account Balances Management with bundle support' |
| CDR logging and export | Reachable | CDRs service; README 'CDR logging with support for Interim Records' |
| Least-cost routing | Reachable | RouteS service; README 'QoS LCR and LCR over Bundles' |
| Fraud thresholds and automatic mitigation | Reachable | ThresholdS service; README 'Fraud detection with automatic mitigation' |
| Statistics and pattern monitoring | Reachable | StatS, TrendS, RankingS services |
| Load tariff plans | Reachable | cgr-loader CLI and APIerS load calls documented in tutorials |
| Switch integration (FreeSWITCH, Kamailio, Asterisk) | Reachable | agents in docs tutorial; configured in cgrates.json |
Code stack
- Languages
- Go
- Frameworks
- none
- Package manager
- go modules
- Database
- RedisMongoDBMySQLPostgreSQL
- Hosting target
- Debian packagesDockerbare metal
- Built
- Human-written (recorded, never ranked)
Evidence and confidence
| Field | Where it was seen | Confidence |
|---|---|---|
| formFactor | micro-services with 'rich set of RPC APIs' (README) | 90% |
| executionModel | rating engine, no model at runtime | 95% |
| operability | JSON-RPC APIs documented at cgrates.readthedocs.io by the Builder; apier package on pkg.go.dev | 90% |
| effort | cgrates.json config and tariff-plan CSVs per docs tutorials | 75% |
| editions | README: open source, commercial support available; no paid edition seen | 90% |
| active | GitHub pushedAt 2026-08-28 | – |
| reach | 70% |
Open questions
- Confirm the exact default config path and whether Docker images are official
- Whether there is a Redis-only minimal deployment for small operators
Sources
- github.com/cgrates/cgrates sourcing:invoicing-finance:curated
- cgrates.readthedocs.io/en/latest/ sourcing:invoicing-finance:curated