diff --git a/CHANGELOG.md b/CHANGELOG.md index e2ba275..18618c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Documentation: mid-session Gx RAR / `PUT /pcrf/` PCC rule install in `docs/PCRF_Notes.md` - 2G / 3G support via Osmocom GSUP. - Support for running PyHSS services in Docker containers and provide official Docker images. - Database types postgresql and sqlite. diff --git a/docs/PCRF_Notes.md b/docs/PCRF_Notes.md index 14465c4..98e9e29 100644 --- a/docs/PCRF_Notes.md +++ b/docs/PCRF_Notes.md @@ -191,3 +191,17 @@ Now we've created the Charging Rule, we can just add it to the charging_rule_lis In the `charging_rule_list` object wen can add additional comma separated Charging Rule IDs for other defined Charging Rules. (Setting the value to None will result in no Charging Rules being installed in the Credit Control Answer) Then when a subscriber attaches to one of these APNs, the Charging Rules listed in the `charging_rule_list` will be returned in the *Gx Credit Control Answer* and installed into the PCEF in the PGW. + +## Mid-session PCC rule install (Gx RAR) + +PyHSS can **push** an already-defined charging rule to an **active** P-GW session by sending a **Gx Re-Auth-Request (RAR)**. This is used for **policy / QoS changes only** (for example switching to a throttled rule after fair-use). Online charging (Gy) and balances are handled by the **OCS**; PyHSS does **not** implement quota metering. + +**REST API:** `PUT /pcrf/` with JSON body: + +| Field | Description | +|-------|-------------| +| `imsi` | Subscriber IMSI | +| `apn_id` | Numeric APN id in PyHSS (same APN as the active session) | +| `charging_rule_id` | Rule id from `/charging_rule/` to install | + +Requirements: the subscriber must have an active **serving APN** entry with a valid **PCRF session** and **serving PGW** so PyHSS can route the RAR. If there is no live session, the push will not apply as intended. \ No newline at end of file