Difference between revisions of "Charging interfaces of YateUCN"

From YateBTS
Jump to: navigation, search
(PGW: enable PCRF/OCS)
(PGW: enable PCRF/OCS)
Line 66: Line 66:
 
  pcrf_monitoring_session_replace=yes
 
  pcrf_monitoring_session_replace=yes
  
==== OCS ====
+
==== OCS: Data charging using Diameter Ro ====
 
Example of config used during a-billing-company interconnect tests:<br>
 
Example of config used during a-billing-company interconnect tests:<br>
 
ap.conf
 
ap.conf

Revision as of 14:32, 21 September 2018

PGW: 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

regexroute.conf example:

[extra]
user.auth=10

[user.auth]
${component}PGW=if ${called}internet={
   ${imsi}^00101=return true;pcc_rules=dns,http,everything-else
}

${called} = APN name, condition to enable charging functions on a certain APN (any regular expression can be used. Ex: if ${called}^internet$={ )

policies.conf example:

  • The DNS service is not charged
  • HTTP/non HTTP traffic is charged separately
  • 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: enable 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.

PCRF

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

OCS: Data charging using Diameter Ro

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

[00101:internet]
ocs=yes
ocs_service_context=32251@3gpp.org
ocs_diam_node=epc.mnc001.mcc001.3gppnetwork.org/ucn1.epc.mnc001.mcc001.3gppnetwork.org
ocs_diam_realm=a-billing-company.com
session_ocs_key=session
session_ocs_cdr_service_id=1
session_ocs_cdr_rating_group=1

UCN SCF PPS: Voice charging using Diameter Ro

yateucn.conf example:

[scf_pps]
camel_key=1
camel_int=30
authorize=yes
charging=ocs
authorize_cdrwrite_ocs=true
authorize_diam_node=epc.mnc099.mcc460.3gppnetwork.org/ucn1.epc.mnc099.mcc460.3gppnetwork.org
authorize_diam_realm=epc.mnc099.mcc460.3gppnetwork.org
cdr_cdrwrite_ocs=true


UCN EAP: Data charging using Diameter Ro

Enable OCS in netinfo.
netinfo.conf example:

[00101]
ocs=true

yradius.conf example:

[client 192.168.168.50]
secret=test
add:Acct-Session-Id=${billid}
add:NAS-IP-Address=${nas_addr}
add:NAS-Identifier=${nas_id}
add:NAS-Port=${nas_port}
ret-fail:Error-Cause=error

[listener eap]
addr=192.168.168.172
port=1812
rad_auth=true
put:$wlan=route_type
put:EAP-Message=rad_eap
put:State=rad_state
put:Message-Authenticator=rad_auth
add-fail:EAP-Message=${orad_eap}
add-fail:State=${orad_state}
add-fail:Message-Authenticator=${rad_auth}
add-fail:Reply-Message=${orad_text}
add:EAP-Message=${orad_eap}
add:Message-Authenticator=${rad_auth}
add:MS-MPPE-Recv-Key=${orad_msk1}
add:MS-MPPE-Send-Key=${orad_msk2}
;add:Session-Timeout=${expires}
add:Acct-Interim-Interval=${interim}

[listener cdr]
addr=192.168.168.172
port=1813
rad_acct=true
put:$wlan=route_type
put:$WLAN=component
put:NAS-Port-Type=nas_type
put:NAS-Port=nas_port
put:NAS-IP-Address=nas_addr
put:NAS-Identifier=nas_id
put:Connect-Info=conn_info
put:Acct-Authentic=authenticator
put:Acct-Input-Packets=inp_pkt
put:Acct-Output-Packets=out_pkt
put:Acct-Input-Octets=inp_oct
put:Acct-Output-Octets=out_oct
put:Acct-Input-Gigawords=inp_hi32
put:Acct-Output-Gigawords=out_hi32
cisco_format=true
quintum_format=false


Diameter sessions

Diameter:

  • transaction_ttl must be set in ydiameter.conf. This will enable incoming transaction tracking to detect retransmissions

Parameters handled in session start message:

  • diam_node: Local node to use when sending the request
  • diam_realm: Destination realm. If not set the Diameter module will try to select it from local node's realm
  • diam_host: Destination host
  • diam_proxy: Peer of local node to use
  • diam_sess_params.session_flags: Session flags. See Ydiameter for description

NOTES:

  • Destination-Realm AVP is required by Diameter. The module MUST be able to detect one. Session start will fail otherwise

Some setups may require to not put Destination-Host AVP in any session request.

The Diameter module will automatically put it from received answer's origin if not instructed to do otherwise:

diam_sess_params.session_flags=nodesthost