Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 14 additions & 0 deletions docs/PCRF_Notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Loading