A messenger that does not eat into the data package sounds like a billing feature. In the network it is a chain of decisions on every flow: which application is this, which rule applies, which rating group takes the traffic, and what goes to billing. The payload of that flow is encrypted.
BEREC defines zero-rating as an ISP applying "a price of zero to the data traffic associated with a particular application". The 3GPP specifications for policy and charging (TS 23.203, TS 29.212, TS 32.251, TS 32.299) do not define zero-rating as a feature. Operators build it from charging keys and rules, with application detection behind them. This post walks through those pieces and shows where DPI sits among them.
Four decisions on every flow
Three functions take part. The PCEF (Policy and Charging Enforcement Function) applies rules to traffic. The PCRF (Policy and Charging Rules Function) decides which rules apply. The OCS (Online Charging System) keeps balances and controls the rating decisions.
| Decision | Where it happens | What the standard says |
|---|---|---|
| 1. Which application is this | A PCEF enhanced with ADC (Application Detection and Control), or a TDF (Traffic Detection Function) | The standard does not define how applications are detected; this is left to the implementation |
| 2. Which rule applies | The PCRF sends a PCC rule to the PCEF over Gx | The rule points to the detection filter with the TDF-Application-Identifier AVP |
| 3. Which rating group | The charging key in the PCC rule | TS 23.203: the charging key is the reference to the tariff. TS 29.212 writes it as "charging key (i.e. rating group)" |
| 4. How it is rated and reported | The PCEF and the OCS exchange credit control over Gy, per rating group | The OCS controls the rating decisions |
A PCC rule can be predefined on the PCEF or provisioned over Gx, so the four decisions do not always mean four messages. The standard leaves the first one to the implementation, and that is where DPI works.
Recognizing an app when the payload is encrypted
DPI cannot read the encrypted payload, so it relies on unencrypted metadata and behavioral and heuristic analysis. No single method classifies all traffic, so the methods are combined.
TS 23.203 (Release 20) gives one concrete example of matching a domain in encrypted traffic, in an informative annex written for sponsored services. A PCEF or TDF matches domain names against the TLS Server Name Indication (SNI) extension, when available, in the initial HTTPS handshake. If SNI is not available, it falls back to the Subject Alternative Name of the server certificate, and then to the Subject Common Name. IP address ranges are checked first. SNI itself is a field the client sends in the ClientHello at the start of the TLS handshake (RFC 6066). The annex is informative and does not describe zero-rating, and the verification logic stays implementation-specific. Where such a name is not available, DPI also has behavioral and heuristic analysis to work with.
That example is separate from how our engine works. Stingray Service Gateway parses packets up to the 7th level of the OSI model instead of using only standard port numbers, and our DPI platform recognizes traffic by application and by domain. It combines traffic signatures with the domain name, IP addresses and the autonomous system (AS) of the server. The DPI takes the domain name from the SNI in TLS and in QUIC, from the name in the server certificate (CN) and from the Host field in HTTP. For example, when QUIC traffic carries no SNI, the DPI checks the AS. An IP address list alone is not enough: large services sit behind CDNs, their addresses change and are often shared with other sites. Such a list needs constant updating; otherwise the service’s traffic may start eating into the package despite the promise. Built-in signatures are updated together with the software version, which needs a restart of the DPI. Cloud signatures are loaded from VAS Cloud once a day, or more often if the contract says so; this needs active technical support and configured access to VAS Cloud. The operator adds its own signatures through the interface.
From the detected app to a rating group
On Gx the PCRF installs a PCC rule with a Charging-Rule-Definition AVP, carried in a Charging-Rule-Install AVP. A rule can also be predefined on the PCEF and only activated by name from the PCRF. The definition carries either Flow-Information or a TDF-Application-Identifier, and it can carry a Rating-Group. The Online and Offline AVPs switch the online or offline charging interface on or off for that rule.
A simplified example. Field names come from TS 29.212; the values are invented for illustration:
Charging-Rule-Definition ::= {
Charging-Rule-Name "chat-app-free"
TDF-Application-Identifier "chat-app"
Rating-Group 2001
Online ENABLE_ONLINE
}
Rating-Group is a Diameter AVP that contains the identifier of a rating group. It comes from RFC 8506 and TS 29.212 re-uses it. TS 32.299 (Release 19) says the Rating-Group AVP on the charging interface carries the charging key, so the same value that the rule carries on Gx goes into the credit-control requests on Gy. In this pattern the packet carries no "free" flag. The charging key refers to a tariff, and the rating decision stays with the charging system.
The standard also has wording for traffic that is not charged at all. A PCC rule can say that the flow "is not subject to any end user charging", and then the rule carries no charging key. Our solution, described below, works differently: the traffic keeps its own rating group and is counted separately.
How our PCEF does it
Our PCEF is built on our own DPI engine. It supports tariffing at the level of application, traffic category and subscriber profile. For zero-rating, it recognizes a service such as a messenger or a video platform by traffic signatures combined with domain, IP and AS data, not only by an IP address list. The PCEF counts zero-rated traffic under its own rating group and reports it to the OCS over Gy; the zero price for that rating group is set in the OCS. In general, a PCEF can handle such traffic in one of three ways. It does not deduct the traffic from the main bucket, it counts it in a separate bucket, or it passes statistics to billing under a special rule. In our PCEF the main way is the second one.
Each traffic category goes into its own bucket with its own limit and unit of measurement. When one bucket is exhausted, the others are not affected, so an exhausted video package does not touch messengers. All buckets are synchronized with the OCS over Gy. The rule logic for rating groups is defined through the PCRF or configured locally on the PCEF; the PCEF enforces it on traffic. Beyond zero-rating, the same PCEF supports plans split by service, time- and roaming-dependent rules, and daily and hourly promotions.
Testing it in a lab
In our test lab we run charging-exemption scenarios: specific application categories, for example messengers or navigation, must not consume the main data package. DPI identifies the traffic type, and the PCEF applies the charging rule to it.
If you build the same scenario in your own lab, these three checks follow the chain:
- Make sure the application reference in the rule matches an application the DPI knows. In TS 29.212 this reference is the TDF-Application-Identifier; in our PCEF it is the DPI rule name.
- Compare the charging key in the Gx rule with the rating group in the Gy credit-control requests, and check that the rule's Online AVP enables the online charging interface.
- Exhaust the main bucket and send traffic of an exempt category that has its own rating group. Quota exhaustion is handled per bucket, so the exempt category should be unaffected.
Where the tariff meets regulation
Whether an operator may zero-rate a service depends on the rules of its market. BEREC notes that there are different types of zero-rating practices, and in the EU national regulators assess some of them against criteria in BEREC's guidelines. Check the local rules before you design the tariff.
Specifications: 3GPP TS 23.203 and TS 29.212 (Release 20), TS 32.251 and TS 32.299 (Release 19), RFC 6066, RFC 8506. More about our PCEF: vasexperts.com/products/pcef-policy-and-charging-enforcement-function. Other tariff scenarios on PCEF: How have mobile tariffs changed, and where does PCEF fit in?
Top comments (0)