[Experimental] SBI API message flow
Important
This feature is experimental and can only be used with Session Management Controller (SMC) that supports 5G SBIs. The new behaviour is disabled by default to preserve backward compatibility with the previous versions of TPOSS. CDMP and Diameter must be disabled if SBI is enabled. You can disable them using the scg.diameter.enabled and cdmp.enabled configuration options.
Note
This feature can be used only within the same Kubernetes cluster as Session Management Controller (SMC).
TPOSS supports service-based interfacesOpens in a new tab (SBI) APIs to establish service sessions, manage them, and execute charging operations. The procedures are similar to Diameter NASREQ, Gx, and Gy requests described in the Diameter message flow guide, but SBI Nnas, Npcf, and Nchf HTTP2 API calls are used instead.
TPOSS supports the following SBI APIs:
- Npcf API (TS 29.512Opens in a new tab) - to allocate PCC rules. For more information, see the Npcf API document.
- Nchf API (TS 32.291Opens in a new tab) - to execute charging operations. For more information, see the Nchf API document.
- Internal Nnas API for authorization and NAT binding. For more information, see the Nnas API document.
TPOSS can create a service session only after the related network session exists for the given subscriber. For more information about the network sessions creation and management, read the Network session flows guide.
After a network session is successfully established, SMF initiates a service session to apply policy rules and charging conditions for the services available for the user.
Service sessions can be created based on one of the following protocols:
- Diameter
- SBI
- CDMP
The general TPOSS architecture and request flows are presented in the General architecture document. This document describes the request flow only based on the SBI. For more information about other protocols, read the Diameter and CDMP architecture documents.
For more information on how to configure the SBI interface that TPOSS provides, read the SBI configuration guide.
Creation of service sessions
The process of creating a service session is similar to the Diameter or CDMP flows, but uses SBI API calls instead. It consists of the following stages:
- The initial session is created based on the SBI
Nnas Authorizationrequest. - After the initial service session is created, TPOSS allocates PCC rules based on the SBI
Npcf Createmessage. - After PCC rules are set for the service session, the available quota is allocated based on the SBI
Nchf Createmessage. - TPOSS handles the SBI
Nnas Accounting-Startrequest to apply a NAT binding.
The following diagram describes this flow:
Charging procedures
After a service session is fully established, the user can start to consume services. The resources (like Internet traffic) that the user consumed must be periodically charged. Since both network and service sessions are established for the newly attached device, TPOSS waits for periodical charging reports sent through SBI Nchf Update messages.
The following diagram describes this flow:
In addition to the usual reporting of used resources from SMF to TPOSS, TPOSS may trigger a change of charging rules when certain events appear. Such events are:
- A valid balance provisioned for the active user which does not have one
- A balance was deleted for the active user
In this case, TPOSS may send outgoing SBI requests towards SMF. The request type depends on the event which triggered the message and the current state of the user's session. If the user's balance was deleted, but there is another valid balance which can be used, TPOSS sends a SBI Nchf RAR message to SMF to notify it that the current balance is not valid anymore, and the session switches to another quota. For all other events, TPOSS sends a SBI Npcf RAR message to notify SMF about the change in the charging rules.
The following diagram describes this flow:
Note
If the SMF response indicates any failure on these requests or there is no response at all, TPOSS terminates the service session.
Service sessions termination
As soon as the device is detached, TPOSS receives a RADIUS Accounting-Stop request from a packet gateway as described in the Network session flows document. During a network session termination process, TPOSS notifies SMF using the SBI Nchf ASR message to trigger a service session termination. After the SBI message is sent, TPOSS waits to receive SBI Npcf release and Nchf release requests from SMF to terminate the service session.
The following diagram describes this flow:
Note
If the SMF response for ASR messages indicates any failure or there is no response at all, TPOSS terminates the service session.