mothermachine

Browse / Invoicing and finance

CGRateS

Real-time charging and rating engine for telecom and ISPs, driven entirely by JSON-RPC APIs.

AdaptableOperable Business appAPI / service Deterministic Go API License: AGPL-3.0

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.

Use it when
  • 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
Gotchas
  • 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.

Editions

Free · Free open source

  • Clonegit clone https://github.com/cgrates/cgrates
  • Installapt-get install cgrates

For agents: JSON · Markdown

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.json data/tariffplans/*.csv
Prompt files
none
Accounts you need
none

Source

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.

Docs
cgrates.readthedocs.io/en/latest/

Reach

Complete coverage. 9 of 9 jobs reachable through the stated interface.

JobThrough the interfaceEvidence
Rate calls and events (RALs)ReachableAPIerS exposes rating profiles and rates; docs 'Rating engine'
Real-time session charging with reservationReachableSessionS service over JSON-RPC (docs subsystems list)
Account balances and bundlesReachableAPIerS account and balance calls; README 'Account Balances Management with bundle support'
CDR logging and exportReachableCDRs service; README 'CDR logging with support for Interim Records'
Least-cost routingReachableRouteS service; README 'QoS LCR and LCR over Bundles'
Fraud thresholds and automatic mitigationReachableThresholdS service; README 'Fraud detection with automatic mitigation'
Statistics and pattern monitoringReachableStatS, TrendS, RankingS services
Load tariff plansReachablecgr-loader CLI and APIerS load calls documented in tutorials
Switch integration (FreeSWITCH, Kamailio, Asterisk)Reachableagents 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

FieldWhere it was seenConfidence
formFactormicro-services with 'rich set of RPC APIs' (README)90%
executionModelrating engine, no model at runtime95%
operabilityJSON-RPC APIs documented at cgrates.readthedocs.io by the Builder; apier package on pkg.go.dev90%
effortcgrates.json config and tariff-plan CSVs per docs tutorials75%
editionsREADME: open source, commercial support available; no paid edition seen90%
activeGitHub pushedAt 2026-08-28–
reach70%

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