PGW: Enabling pre-defined PCC rules

PCC rules are used by PGW when returned in first session user.auth message in pcc_rules parameter (comma separated list).
PCRF enabled: Predefined PCC rules are installed on PCRF request only. There is no support for pre-defined PCC rules to be installed automatically (unknown by PCRF).
PCRF not enabled: Predefined PCC rules are installed from start.
PCC rule parameters are documented in yate-ucn/conf/policies.conf.sample

low_qos will be used as a pre-defined PCC rule activated by PCRF when subscriber's balance depletes. Service is allowed at a very low speed

[dns]
flow.1.filter=permit out udp from any 53 to any
flow.2.filter=permit in udp from any to any 53
flow.3.filter=permit out tcp from any 53 to any
flow.4.filter=permit in tcp from any to any 53
[http]
ocs=true
cdr_service_id=1001
cdr_rating_group=1001
flow.1.filter=permit out tcp from any 80 to any
flow.2.filter=permit in tcp from any to any 80
flow.3.filter=permit out tcp from any 443 to any
flow.4.filter=permit in tcp from any to any 443
[everything-else]
ocs=true
cdr_service_id=2000
cdr_rating_group=2000
flow.1.filter=permit out ip from any to any
flow.2.filter=permit in ip from any to any
[low_qos]
flow.1.filter=permit out ip from any to any
flow.2.filter=permit in ip from any to any
kbps_ul=100
kbps_dl=200

PGW: Enabling PCRF/OCS

PCRF or OCS may be enabled from AP config.
There is no support for PCRF and OCS usage at the same time (for the same data session). This would require dynamic credit key management: add/remove credit key(s) as PCC rules are added or removed.
The Diameter OCS implementation expects all known keys to be given when session starts.

NOTES:

In the following examples the AP named 'internet' is configured for specific PLMN prefix

Any other AP setup parameters MUST be configured also: NO OTHER PARAMETER IS TAKEN FROM AN EXITING [internet] SECTION

PCRF: Enabling Diameter Gx

Example of config used during a-billing-company interconnect tests:
ap.conf

[00101:internet]
pcrf=yes
pcrf_diam_node=epc.mnc001.mcc001.3gppnetwork.org/ucn1.epc.mnc001.mcc001.3gppnetwork.org
pcrf_diam_realm=a-billing-company.com
; If a-billing-company has issues with session level monitoring removal. Force replace when receiving a new one
pcrf_monitoring_session_replace=yes

NOTE: All other AP parameters MUST be set. The section is not inheriting internet AP's parameters.

OCS: Data charging using Diameter Gy/Ro

Example of config used during a-billing-company interconnect tests:
ap.conf

NOTE: All other AP parameters MUST be set. The section is not inheriting internet AP's parameters.

OCS: Enabling data session traffic redirect support on Diameter Gy/Ro

You must set the redirect DSCP to enable data traffic redirect support.

[00101:internet]
redir_dscp=0xfc

NOTE: All other AP parameters MUST be set. The section is not inheriting internet AP's parameters.
This will enable support for Final-Unit-Indication AVP with Final-Unit-Action indicating redirect.
On OCS request traffic is redirected using iptables.
See Configure traffic redirect for data session on how to setup and configure.