sigscale/ocs
39.5
Weak · 2 October 2026
67.1k
lines of production code
Erlang
with JavaScript
2
measurements over time
What this system is
This system is the SigScale Online Charging System (OCS), a telecommunications billing platform built on Erlang/OTP that manages real-time credit control and authentication. It processes usage data via Diameter and RADIUS protocols, supporting 3GPP standards and EAP-based network access authentication. The system provides comprehensive monitoring through SNMP MIBs, RESTful APIs aligned with TMF and 3GPP schemas, and a web-based management interface for configuring tariffs and subscriber accounts.
How it got here
2016 — Initial OCS release and scaffolding
7 changes.
This period established the foundational structure for the SigScale Online Charging System, introducing the initial application code, build pipelines, and configuration scaffolding. It implemented core protocol support for Diameter and RADIUS, including native C NIFs for EAP cryptographic operations, and defined the necessary data records and test suites. The release was accompanied by comprehensive documentation, including architecture diagrams and installation guides for various deployment targets.
2017–2021 — OCS feature expansion and modernization
5 changes.
This period focused on expanding the Online Charging System with new SNMP monitoring capabilities, API schema definitions, and comprehensive diagnostic scripts. Concurrently, the web interface underwent a significant modernization, migrating from Polymer 2 to Polymer 3 with a Vite build pipeline to improve maintainability and user experience.
Features
Add SigScale MIB modules for RADIUS, Diameter, and OCS monitoring
This change introduces five new SNMP Management Information Base (MIB) modules to the mibs directory: SIGSCALE-OCS-MIB, RADIUS-AUTH-SERVER-MIB, RADIUS-ACC-SERVER-MIB, SIGSCALE-DIAMETER-BASE-PROTOCOL-MIB, and SIGSCALE-DIAMETER-CC-APPLICATION-MIB. These modules define the managed objects, tables, and notifications required for monitoring the SigScale Online Charging System (OCS), RADIUS authentication and accounting servers, and Diameter base protocol and credit control applications. The commit also adds a Makefile.am to build these MIBs and includes a check target that uses net-snmp's snmptranslate utility to verify the syntax and structure of the defined MIBs.
mibs · high confidence
Add architecture and integration diagrams
Added new SVG and PlantUML diagrams to the documentation to visualize system architecture and protocol interactions. These include the BSS integration hierarchy (showing Product Catalog, Service Inventory, and TMF standards), the Rating Function topology, the CTF-to-OCS DIAMETER Credit-Control sequence, the event log flow to the Elastic Stack, the full OCS/CSE/CHF interface map (Gy, Ro, RADIUS, Nch, CAMEL, INAP), and the Trusted WLAN Access architecture (SWx, S6b).
doc · high confidence
Added example tariff rate and period CSV files
The distribution now includes example data files for tariff rates and periods, specifically \tariff-rates.csv\ and \tariff-periods.csv\, which are registered in the build system via \Makefile.am\. These files provide sample data structures for international calling rates and time-based tariff periods, serving as reference inputs for the application's pricing logic.
priv/examples · high confidence
Initial import of TMF and 3GPP API schema definitions
The \priv/schema\ directory now contains the foundational JSON schema files for the system's API contracts. This includes Swagger/OpenAPI definitions for TMF Open API v4 specifications (Party, Usage, Balance, Product, Service, and Resource Catalog/Inventory Management) and a 3GPP-compliant NRF Rating service schema (v1.3.0). A linkset file (\api-catalog.linkset.jsonld\) maps these schemas to their respective API endpoints, and a Makefile provides validation using \ajv-cli\ to ensure schema integrity.
priv/schema · high confidence
Initial release of SigScale OCS with CI/CD, packaging, and configuration scaffolding
This commit establishes the foundational build and release structure for the SigScale Online Charging System (OCS). It introduces a GitLab CI/CD pipeline to automate building and testing across Erlang/OTP versions 18, 20, and 21, and adds comprehensive documentation (README files) for installing the OCS via Debian, Ubuntu, Red Hat, Docker, and Kubernetes. The release package is now generated using Erlang's systools, ensuring architecture-independent distribution. Configuration is standardized via \sys.config.in\ and \ocs.rel.in\, defining default ports for RADIUS (1812/1813) and DIAMETER (3868/3869), setting up the inets HTTP server on port 8080, and configuring log directories for accounting, authentication, and HTTP access. The build system also integrates systemd service support, installs various operational escripts (e.g., for CDR export, SMS, and cluster joining), and enforces strict dependency checks for Erlang libraries and OpenSSL.
(repo-wide) · high confidence
Initial release of the SigScale Online Charging System (OCS) application
This change introduces the initial build and application specification for the SigScale OCS, replacing the previous placeholder template. The \ocs.app\ and \ocs.appup\ files now define a comprehensive set of modules supporting Diameter (3GPP, IETF, EAP), RADIUS, REST API, and logging subsystems. The application registers as \ocs\, depends on core Erlang/OTP applications (mnesia, crypto, ssl, etc.) as well as protocol libraries (radius, diameter), and includes default environment configurations for authentication, accounting, and log directories.
ebin · high confidence
New C NIFs for EAP-AKA and EAP-pwd cryptographic operations
Added new C source files (ocs\_eap\_aka.c, ocs\_eap\_pwd.c) and a Makefile.am to build native NIF libraries for EAP authentication protocols. The EAP-AKA module implements a NIF for the modified SHA-1 PRF specified in RFC 4187. The EAP-pwd module provides NIFs for the Key Derivation Function (KDF) and Password Element (PWE) computation using ECC (RFC 5931), including scalar and element calculations. These changes introduce new behavioral capabilities for cryptographic processing within the Erlang/OTP environment via the c\_src location.
_c\src · high confidence
New Diameter, EAP, and OCS record definitions
The system now includes new header files defining core data structures for Diameter protocol interactions and OCS accounting. \diameter\_3gpp.hrl\ adds 3GPP-specific error codes, while \ocs\_eap\_codec.hrl\ introduces macros and records for EAP authentication methods (including EAP-PWD, EAP-AKA, and EAP-TTLS) and cryptographic parameters. \ocs\_log.hrl\ defines records for rated usage and IPDR (Inter-Diameter Protocol Record) documents for WLAN and VoIP services. The \ocs.hrl\ file is expanded with new types and records for product offerings, pricing, buckets, and account balances, supporting the underlying data model for these new protocol and logging capabilities.
include · high confidence
New diagnostic, provisioning, and deployment scripts for OCS
This update adds a comprehensive suite of command-line tools to the scripts directory to support testing, administration, and deployment of the Online Charging System. For testing and diagnostics, new escripts allow users to simulate STa authentication sessions (aaa-sta), manage Diameter Ro data sessions with credit control updates (data\_session), send SMS via Diameter Ro (send\_sms), and place voice calls with IMS information (voice\_call). An NRF consumer script (nrf) is included to interact with the Network Repository Function's rating API. For system administration, new tools handle bulk subscriber provisioning (fill\_subs), Mnesia database backups (snapshot), cluster joining (join\_cluster), and table installation (install\_tables). Operational utilities include scripts to export CDR and IPDR logs in various formats (export\_cdr, export\_ipdr), install TLS certificates (install\_certs), configure the SNMP agent (install\_snmp), and manage Erlang/OTP release upgrades (install\_release).
scripts · high confidence
Behavioural changes
4304 commits (159 fixes) modifying src
A change to existing behaviour in src — 4304 commits (159 fixs), 130 files.
src · medium confidence · unverified
Web UI migrated to Polymer 3 and Vite build system
The web interface has been upgraded from the legacy Polymer 2/Bower setup to Polymer 3, utilizing a modern Vite build pipeline and workbox for service worker management. This migration updates the core web components (such as client, bucket, and offer management views) to use Polymer 3 APIs and the Vaadin Grid 6.0.0 component, replacing the previous grid implementation. The build process now relies on npm/yarn instead of Bower, and the application structure has been reorganized into distinct modules for improved maintainability.
priv/www · high confidence
Test coverage
Added test suite for DIAMETER operations
Added the \ocs\_diameter\_SUITE\ test suite to verify DIAMETER protocol operations within the OCS application. The suite includes test cases for accounting and authentication server behaviors, covering TCP and SCTP transport connections, and validates configuration parameters such as origin host and realm.
test · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 41 → 39 (-1.5)
- Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 25 → 25 (-0.4)
- Architecture 90 → 88 (-2.0)
- Maturity 59 → 60 (+0.6)
- Readiness 41 → 36 (-5.3)
- Security 65 → 65 (+0.0)
- Event Sourcing 100 → 100 (+0.0)
- Accessibility 69 → 69 (+0.0)
Resolved (72)
- Change coupling clique: ocs_rest_res_hub_balance.erl, ocs_rest_res_hub_product.erl, ocs_rest_res_hub_resource.erl, ocs_rest_res_hub_service.erl, ocs_rest_res_hub_user.erl (src/ocs_rest_res_hub_balance.erl)
- Documentation: no contributor guidance (README.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (10 lines × 2) (src/ocs_eap_aka_auc_fsm.erl)
- Duplicated block (10 lines × 2) (src/ocs_eap_aka_fsm.erl)
- Duplicated block (10 lines × 7) (src/ocs_rest_res_hub_balance.erl)
- Duplicated block (12 lines × 2) (src/ocs_eap_aka_fsm.erl)
- Duplicated block (12 lines × 3) (src/ocs_diameter_3gpp_ro_nrf_app_cb.erl)
- Duplicated block (13 lines × 2) (src/ocs_diameter_3gpp_ro_nrf_app_cb.erl)
- Duplicated block (14 lines × 2) (src/ocs_diameter_3gpp_ro_application_cb.erl)
- Duplicated block (15 lines × 2) (src/ocs_diameter_acct_service_fsm.erl)
- Duplicated block (16 lines × 2) (src/ocs_diameter_3gpp_sta_application_cb.erl)
- Duplicated block (21 lines × 2) (src/ocs_diameter_acct_service_fsm.erl)
- Duplicated block (22 lines × 2) (src/ocs_deregister_fsm.erl)
- Duplicated block (5 lines × 2) (src/ocs_diameter_acct_service_fsm.erl)
- Duplicated block (5 lines × 2) (src/ocs_diameter_acct_service_fsm.erl)
- Duplicated block (5 lines × 2) (src/ocs_eap_ttls_fsm.erl)
- Duplicated block (5 lines × 2) (src/ocs_event_log_fsm.erl)
- Duplicated block (5 lines × 2) (src/ocs_log.erl)
- …and 52 more
New (82)
- Change coupling clique: ocs_rest_res_hub_balance.erl, ocs_rest_res_hub_product.erl, ocs_rest_res_hub_resource.erl, ocs_rest_res_hub_service.erl, ocs_rest_res_hub_usage.erl, ocs_rest_res_hub_user.erl (src/ocs_rest_res_hub_balance.erl)
- Duplicated block (10 lines × 2) (src/ocs_deregister_fsm.erl)
- Duplicated block (10 lines × 2) (src/ocs_diameter_3gpp_ro_application_cb.erl)
- Duplicated block (10 lines × 2) (src/ocs_eap_aka_auc_fsm.erl)
- Duplicated block (10 lines × 2) (src/ocs_eap_aka_fsm.erl)
- Duplicated block (10 lines × 7) (src/ocs_rest_res_hub_balance.erl)
- Duplicated block (11 lines × 2) (src/ocs_simple_auth_fsm.erl)
- Duplicated block (12 lines × 3) (src/ocs_diameter_3gpp_ro_nrf_app_cb.erl)
- Duplicated block (13 lines × 2) (src/ocs_eap_aka_fsm.erl)
- Duplicated block (13 lines × 2) (src/ocs_log.erl)
- Duplicated block (15 lines × 2) (src/ocs_diameter_acct_service_fsm.erl)
- Duplicated block (15 lines × 2) (src/ocs_log.erl)
- Duplicated block (16 lines × 2) (src/ocs_diameter_3gpp_sta_application_cb.erl)
- Duplicated block (24 lines × 2) (src/ocs_deregister_fsm.erl)
- Duplicated block (3–7 lines × 3) (src/ocs_log.erl)
- Duplicated block (42 lines × 2) (src/ocs_diameter_acct_service_fsm.erl)
- Duplicated block (5 lines × 12) (src/ocs_deregister_fsm_sup.erl)
- Duplicated block (5 lines × 2) (src/ocs_eap_aka_fsm_sup.erl)
- Duplicated block (5 lines × 2) (src/ocs_log.erl)
- Duplicated block (5 lines × 2) (src/ocs_log.erl)
- …and 62 more
Changes since last survey
- 36 commits — 35 feature/other, 1 fixes
By area
- (root) — 18 commits
- priv/www — 7 commits
- src/ocs_log.erl — 5 commits
- scripts/install_release.sh — 3 commits
- src/user_default.erl — 2 commits
- doc/Makefile.am — 1 commit
Notable commits
- fix: Revert "autotools macros for installing files/directories"
- change: absolute paths for release_handler
- change: correct geographic location type coding in cdr
- change: do not include .appup files for otp applications
- change: do not install extra files (.appup) for otp libs
- change: gnodeb id is prefix bit length and value as integers
- change: guard against unknown/missing user location in cdr
- change: handle unknown command in diameter counts
- change: handle unknown diameter command error count
- change: implement all geographic location types in cdr, and some which are not
- change: install polymer-cli with yarn to get polymer command
- change: modernize pwa build with vite and workbox-cli
- change: modernize yarn install (no check engines)
- change: ng-enodeb id is prefix bit length and value as integers
- change: no global install of polymer build dependencies
- change: omit otp applications from release package, needed for cross arch
- change: package for debian 13 (trixie)
- change: package for ubuntu 26.05 lts (resolute)
- change: refactor extrafiles list construction
- change: remove (default) immutable flag from yarn install
- …and 16 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
sigscale/ocs was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit b8d5073d97be9884d669ccd2d1dfb87fb1cd5b1e — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.