Policy & SBI Deep Dive¶
All Callflows / Policy and SBI sequence diagrams from Level ∞
Scope of the diagrams
These sequence diagrams and their surrounding explanations and caveats are reproduced from the existing lessons. They include simplified and conditional examples, not every specification branch. Read the original explanations for applicability, omitted steps, implementation-dependent details, TS and clause references, and any qualifications marked as requiring verification.
PCF / SM Policy Association / PCC Rule — How Policy Reaches the UE, gNB and UPF¶
Diagram 1 — Call Flow (inside PDU Session Establishment)¶
Original explanation, assumptions and specification references
In TS 23.502 Clause 4.3.2.2.1, the SMF establishes the SM Policy Association after PCF selection (steps 7a / 7b), and supplements the information with an SMF-initiated Modification after UE IP address allocation (step 9). Step numbers differ by release in both cases (to be confirmed). Simplified together with the contents of Clause 4.16.4, it looks like this.
NAS is shown logically between UE and AMF, omitting RAN forwarding. For UDR policy data and subscription resources, see TS 29.519 Clause 5.2.5 and Clause 5.2.10.
sequenceDiagram
participant UE
participant AMF
participant SMF
participant PCF
participant UDR
participant UPF
UE->>AMF: UL NAS Transport<br/>(PDU Session Establishment Request)
AMF->>SMF: Nsmf_PDUSession_CreateSMContext<br/>POST /nsmf-pdusession/v1/sm-contexts
SMF-->>AMF: Nsmf_PDUSession_CreateSMContext response<br/>HTTP 201 Created + Location
Note over SMF: Get SM subscription data from UDM<br/>(subscribed Session-AMBR / default QoS)
Note over SMF: PCF Selection (NRF Discovery, etc.)
SMF->>PCF: Npcf_SMPolicyControl_Create<br/>POST /npcf-smpolicycontrol/v1/sm-policies<br/>(SUPI, DNN, S-NSSAI, RAT, ULI, subscribed QoS)
PCF->>UDR: Nudr_DM_Query<br/>GET /nudr-dr/v2/policy-data/ues/{ueId}/sm-data
UDR-->>PCF: Nudr_DM_Query response<br/>HTTP 200 OK (SM Policy Data)
PCF->>UDR: Nudr_DM_Subscribe<br/>POST /nudr-dr/v2/policy-data/subs-to-notify
UDR-->>PCF: Nudr_DM_Subscribe response<br/>HTTP 201 Created + Location
Note over PCF: Policy Decision
PCF-->>SMF: Npcf_SMPolicyControl_Create response<br/>HTTP 201 Created + SmPolicyDecision
Note over SMF: UPF Selection and UE IP allocation
SMF->>PCF: Npcf_SMPolicyControl_Update<br/>POST /npcf-smpolicycontrol/v1/sm-policies/{smPolicyId}/update<br/>(PCRT: UE IP allocation)
PCF-->>SMF: Npcf_SMPolicyControl_Update response<br/>HTTP 200 OK (SmPolicyDecision)
Note over SMF: QoS Flow binding and QFI allocation<br/>(translate PCC Rules)
SMF->>UPF: PFCP Session Establishment Request<br/>(PDR / FAR / QER / URR)
UPF-->>SMF: PFCP Session Establishment Response
SMF->>AMF: Namf_Communication_N1N2MessageTransfer<br/>POST /namf-comm/v1/ue-contexts/{ueContextId}/n1-n2-messages<br/>(N1: QoS Rules / N2: QoS Flow)
AMF-->>SMF: Namf_Communication_N1N2MessageTransfer response<br/>HTTP 200 OKSignal Flow¶
| # | Message | Segment | Meaning | Specification |
|---|---|---|---|---|
| 1 | PCF Selection | SMF (⇔ NRF) | Select a PCF by DNN / S-NSSAI, etc. The SMF may also receive a PCF ID from the AMF | TS 23.501 Clause 6.3.7.1 |
| 2 | Npcf_SMPolicyControl_Create | SMF → PCF | Request to establish the SM Policy Association | TS 23.502 Clause 4.16.4 |
| 3 | Nudr_DM_Query / Subscribe | PCF → UDR | Retrieve Policy Data and subscribe to change notifications (if the PCF does not already hold it) | TS 23.502 Clause 4.16.4 |
| 4 | Create Response (SmPolicyDecision) | PCF → SMF | Return Session Rules / PCC Rules / PCRTs | TS 23.502 Clause 4.16.4, TS 29.512 Clause 4.2.2 (to be confirmed) |
| 5 | Npcf_SMPolicyControl_Update | SMF → PCF | Report that a PCRT condition is met (e.g., UE IP allocation) | TS 23.502 Clause 4.16.5.1 |
| 6 | PFCP Session Establishment | SMF → UPF | Translate PCC Rules into PDR / QER / URR / FAR and configure them | TS 29.244 Clause 7.5.2 |
| 7 | N1N2MessageTransfer → NGAP / NAS | SMF → AMF → gNB / UE | QoS Flow information (N2) and QoS Rules (N1) | PDU Session Establishment deep dive |
If a BSF is deployed, the PCF registers binding information for the SM Policy Association in the BSF (Nbsf_Management_Register; TS 23.502 Clause 5.2.13.2.2. The trigger for registration (when the UE IP / MAC is determined; Clause 4.16.4 / Clause 4.16.5.1) is to be confirmed). This is the mechanism by which an AF finds "the PCF serving this UE's session"; details are covered in BSF / PCF Binding.
The SMF's behavior when Create fails is implementation dependent
When PCF selection fails or Create returns an error response, whether the SMF rejects the PDU Session or continues with local policy depends on operator configuration and implementation. The symptom "the PCF was down but the session was still established (yet the QoS is not as expected)" can sometimes be explained by this fallback.
Diagram 2 — Network requested PDU Session Modification (TS 23.502 Clause 4.3.3.2)¶
Original explanation, assumptions and specification references
On receiving an UpdateNotify from the PCF, the SMF initiates a PDU Session Modification as needed. In TS 23.502 Clause 4.3.3.2, the PCF-initiated case is positioned as step 1b (step numbers to be confirmed).
sequenceDiagram
participant UE
participant gNB
participant AMF
participant SMF
participant PCF
participant UPF
Note over PCF: Trigger: AF request / Policy Data change, etc.
PCF->>SMF: Npcf_SMPolicyControl_UpdateNotify<br/>POST {notificationUri}/update (PCC Rules)
SMF-->>PCF: Npcf_SMPolicyControl_UpdateNotify response<br/>HTTP 204 No Content
Note over SMF: Re-evaluate QoS Flow binding<br/>add to existing Flow or create new Flow
SMF->>AMF: Namf_Communication_N1N2MessageTransfer<br/>POST /namf-comm/v1/ue-contexts/{ueContextId}/n1-n2-messages<br/>(N1: PDU Session Modification Command, N2 SM)
AMF-->>SMF: Namf_Communication_N1N2MessageTransfer response<br/>HTTP 200 OK
AMF->>gNB: NGAP PDU Session Resource Modify Request
gNB->>UE: RRC DLInformationTransfer<br/>(DL NAS Transport: PDU Session Modification Command)
gNB-->>AMF: NGAP PDU Session Resource Modify Response
AMF->>SMF: Nsmf_PDUSession_UpdateSMContext<br/>POST /nsmf-pdusession/v1/sm-contexts/{smContextRef}/modify (N2 SM)
SMF-->>AMF: Nsmf_PDUSession_UpdateSMContext response<br/>HTTP 204 No Content
SMF->>UPF: PFCP Session Modification Request<br/>(Create/Update PDR, QER, URR)
UPF-->>SMF: PFCP Session Modification Response
UE->>gNB: RRC ULInformationTransfer<br/>(UL NAS Transport: PDU Session Modification Complete)
gNB->>AMF: NGAP Uplink NAS Transport<br/>(UL NAS Transport: PDU Session Modification Complete)
AMF->>SMF: Nsmf_PDUSession_UpdateSMContext<br/>POST /nsmf-pdusession/v1/sm-contexts/{smContextRef}/modify (N1 SM)
SMF-->>AMF: Nsmf_PDUSession_UpdateSMContext response<br/>HTTP 204 No Content
Note over SMF: Update the UPF again if needed and<br/>report the result to the PCF (Npcf_SMPolicyControl_Update)- If the UE is in CM-IDLE, a Network Triggered Service Request (Paging) is needed before N1/N2 can be delivered (TS 23.502 Clause 4.2.3.3; the conditions within Clause 4.3.3.2 are to be confirmed).
- The diagram is a representative example following the basic flow of TS 23.502 Clause 4.3.3.2 (N4 is updated after the N2 response is received; step numbers to be confirmed). Some implementations pre-configure N4 first (implementation dependent). See PDU Session Modification / Release for the full picture.
- When the change is completed in the UPF alone (pattern A below), the SMF may not send N1 / N2 at all. How far it goes depends on the change and on the SMF implementation.
- The NAS side of PDU Session Modification is TS 24.501 Clause 6.3.2 (Network-requested PDU session modification, to be confirmed), and the NGAP side is TS 38.413 Clause 8.2.3 (PDU Session Resource Modify).
n7-sbi.en¶
Diagram 1 — The SM Policy Association during PDU Session establishment¶
Original explanation, assumptions and specification references
When dynamic PCC is used, the SMF establishes the SM Policy Association during PDU Session Establishment (TS 23.502 Clause 4.3.2.2.1, Clause 4.16.4).
sequenceDiagram
participant AMF
participant SMF
participant NRF
participant PCF
AMF->>SMF: Nsmf_PDUSession_CreateSMContext<br/>POST /nsmf-pdusession/v1/sm-contexts
SMF-->>AMF: Nsmf_PDUSession_CreateSMContext response<br/>HTTP 201 Created + Location
opt PCF address unknown
SMF->>NRF: Nnrf_NFDiscovery_Request<br/>GET /nnrf-disc/v1/nf-instances?target-nf-type=PCF&requester-nf-type=SMF
NRF-->>SMF: Nnrf_NFDiscovery_Request response<br/>HTTP 200 OK (PCF NF profiles)
end
Note over SMF,PCF: TCP / TLS / HTTP/2 connection (reused if it exists)
SMF->>PCF: Npcf_SMPolicyControl_Create<br/>POST /npcf-smpolicycontrol/v1/sm-policies<br/>SmPolicyContextData
Note over PCF: Policy decision using subscriber policy from UDR, etc.
PCF-->>SMF: Npcf_SMPolicyControl_Create response<br/>HTTP 201 Created + Location, SmPolicyDecision
Note over SMF: N4 Session Establishment (SMF⇔UPF) follows but is omitted here
Note over SMF: Map the policy to N1 QoS rules / N2 QoS profile / N4 QER
SMF->>AMF: Namf_Communication_N1N2MessageTransfer<br/>POST /namf-comm/v1/ue-contexts/{ueContextId}/n1-n2-messages
AMF-->>SMF: Namf_Communication_N1N2MessageTransfer response<br/>HTTP 200 OKSignal flow table¶
| # | Direction | Message / operation | Method and URI (after apiRoot) | Main contents | Reference |
|---|---|---|---|---|---|
| 1 | SMF→NRF | NFDiscover | GET /nnrf-disc/v1/nf-instances?target-nf-type=PCF&requester-nf-type=SMF |
service-names, etc. can also be supplied | TS 29.510 Clause 6.2.3.2.3.1 |
| 2 | SMF→PCF | Npcf_SMPolicyControl_Create | POST /npcf-smpolicycontrol/v1/sm-policies |
SmPolicyContextData | TS 29.512 Clause 4.2.2 |
| 3 | PCF→SMF | Create response | 201 Created + Location | SmPolicyDecision | TS 29.512 Clause 4.2.2 |
| 4 | SMF→PCF | Npcf_SMPolicyControl_Update | POST .../sm-policies/{smPolicyId}/update |
SmPolicyUpdateContextData (triggers that occurred, etc.) | TS 29.512 Clause 4.2.4 (to be confirmed) |
| 5 | PCF→SMF | Npcf_SMPolicyControl_UpdateNotify | POST {notificationUri}/update |
SmPolicyNotification | TS 29.512 Clause 4.2.3 (to be confirmed) |
| 6 | SMF→PCF | Npcf_SMPolicyControl_Delete | POST .../sm-policies/{smPolicyId}/delete |
SmPolicyDeleteData | TS 29.512 Clause 4.2.5 (to be confirmed) |
As procedures, SM Policy Association Establishment / Modification / Termination are specified in TS 23.502 Clause 4.16.4 / Clause 4.16.5 / Clause 4.16.6 (sub-clauses to be confirmed).
AF / N5 / Application Session — How an Application Request Becomes a QoS Flow¶
Diagram 1 — Call Flow¶
Original explanation, assumptions and specification references
A representative example combining TS 23.502 Clause 4.16.5.2 (PCF-initiated SM Policy Association Modification) and Clause 4.3.3.2 (network-requested PDU Session Modification) (step numbers and order differ between versions, so to be confirmed).
sequenceDiagram
participant AF
participant BSF
participant PCF
participant SMF
participant AMF
participant gNB
participant UE
participant UPF
AF->>BSF: Nbsf_Management_Discovery<br/>GET /nbsf-management/v1/pcfBindings?ipv4Addr=...
BSF-->>AF: Nbsf_Management_Discovery response<br/>HTTP 200 OK (PcfBinding)
AF->>PCF: Npcf_PolicyAuthorization_Create<br/>POST /npcf-policyauthorization/v1/app-sessions (medComponents, evSubsc)
Note over PCF: Session Binding<br/>PCC Rule authorization and generation
PCF-->>AF: Npcf_PolicyAuthorization_Create response<br/>HTTP 201 Created + Location
PCF->>SMF: Npcf_SMPolicyControl_UpdateNotify<br/>POST {notificationUri}/update (PCC Rule)
SMF-->>PCF: Npcf_SMPolicyControl_UpdateNotify response<br/>HTTP 204 No Content
Note over SMF: QoS Flow binding<br/>new QFI or existing QoS Flow
SMF->>AMF: Namf_Communication_N1N2MessageTransfer<br/>POST /namf-comm/v1/ue-contexts/{ueContextId}/n1-n2-messages<br/>(N1: PDU Session Modification Command, N2 SM)
AMF-->>SMF: Namf_Communication_N1N2MessageTransfer response<br/>HTTP 200 OK
AMF->>gNB: NGAP PDU Session Resource Modify Request
gNB->>UE: RRC DLInformationTransfer<br/>(DL NAS Transport: PDU Session Modification Command)
gNB-->>AMF: NGAP PDU Session Resource Modify Response
AMF->>SMF: Nsmf_PDUSession_UpdateSMContext<br/>POST /nsmf-pdusession/v1/sm-contexts/{smContextRef}/modify (N2 SM)
SMF-->>AMF: Nsmf_PDUSession_UpdateSMContext response<br/>HTTP 204 No Content
SMF->>UPF: PFCP Session Modification Request<br/>(Create PDR / QER)
UPF-->>SMF: PFCP Session Modification Response
UE->>gNB: RRC ULInformationTransfer<br/>(UL NAS Transport: PDU Session Modification Complete)
gNB->>AMF: NGAP Uplink NAS Transport<br/>(UL NAS Transport: PDU Session Modification Complete)
AMF->>SMF: Nsmf_PDUSession_UpdateSMContext<br/>POST /nsmf-pdusession/v1/sm-contexts/{smContextRef}/modify (N1 SM)
SMF-->>AMF: Nsmf_PDUSession_UpdateSMContext response<br/>HTTP 204 No Content
Note over SMF: Report the PCC Rule outcome
SMF->>PCF: Npcf_SMPolicyControl_Update<br/>POST /npcf-smpolicycontrol/v1/sm-policies/{smPolicyId}/update
PCF-->>SMF: Npcf_SMPolicyControl_Update response<br/>HTTP 200 OK
PCF->>AF: Npcf_PolicyAuthorization_Notify<br/>POST {evSubsc.notifUri}/notify (SUCCESSFUL_RESOURCES_ALLOCATION)
AF-->>PCF: Npcf_PolicyAuthorization_Notify response<br/>HTTP 204 No Content201 Created does not mean the QoS Flow has been created
The 201 Created that the PCF returns to the AF only shows that the App Session has been created and the request authorized. Application at the SMF, gNB, UE and UPF happens afterwards and can fail. To learn the outcome, the AF needs to subscribe to events such as SUCCESSFUL_RESOURCES_ALLOCATION / FAILED_RESOURCES_ALLOCATION (event names and the details of the Policy Control Request Triggers used for the SMF → PCF report are in TS 29.514 Clause 5.6.3 / TS 29.512 Clause 4.2.4, to be confirmed).
- In TS 23.502 Clause 4.3.3.2, N4 Session Modification appears conditionally in several steps (after the N2 response, after the UE's Complete, etc.; step numbers to be confirmed), so there are options for when N4 is updated. Which timing is actually used is implementation-dependent. If the UE is CM-IDLE, paging is needed before N1/N2 can be delivered (TS 23.502 Clause 4.2.3.3).
- Whether the PCF returns its response to the AF before or after UpdateNotify should be checked against both the specified order and the implementation (to be confirmed).
Signal Flow¶
| # | Message | Segment | Meaning | Specification |
|---|---|---|---|---|
| 1 | Nbsf_Management_Discovery | AF → BSF | Searching for the serving PCF (deployment-dependent; omitted in some configurations) | TS 29.521 Clause 4.2.4 |
| 2 | Npcf_PolicyAuthorization_Create | AF → PCF | Creating the App Session. Media information, callback, subscribed events | TS 29.514 Clause 4.2.2 |
| 3 | 201 Created | PCF → AF | Returns the App Session ID (Location) | TS 29.514 Clause 4.2.2 (to be confirmed) |
| 4 | Npcf_SMPolicyControl_UpdateNotify | PCF → SMF | Applies the added / changed PCC Rule to the SM Policy Association | TS 23.502 Clause 4.16.5.2 / TS 29.512 Clause 4.2.3 (to be confirmed) |
| 5 | N1N2MessageTransfer → NGAP Modify / NAS Modification Command | SMF → AMF → gNB / UE | New QoS Flow (QFI, 5QI, GFBR/MFBR) and QoS Rule | TS 23.502 Clause 4.3.3.2 / TS 38.413 Clause 8.2.3 / TS 24.501 Clause 6.3.2 (to be confirmed) |
| 6 | PFCP Session Modification | SMF → UPF | PDR with SDF Filter; QER with QFI, GBR/MBR and gate | TS 29.244 Clause 7.5.4 / Clause 7.5.5 |
| 7 | Npcf_SMPolicyControl_Update | SMF → PCF | Outcome of applying the PCC Rule (ruleReports on failure) | TS 29.512 Clause 4.2.4 (to be confirmed) |
| 8 | Npcf_PolicyAuthorization_Notify | PCF → AF | Event notification such as success or failure of resource allocation | TS 29.514 Clause 4.2.5 |
Diagram 2 — How — seen through the VoNR P-CSCF¶
Original explanation, assumptions and specification references
In VoNR, the IMS P-CSCF uses N5 as a trusted AF. Building Media Components from the SIP SDP is the P-CSCF's job.
sequenceDiagram
participant UE
participant PCSCF as P-CSCF (AF)
participant PCF
participant SMF
UE->>PCSCF: SIP INVITE (SDP offer)
Note over PCSCF: Receives the SDP answer from the far end<br/>(e.g. 183 Session Progress)
PCSCF->>PCF: Npcf_PolicyAuthorization_Create<br/>POST /npcf-policyauthorization/v1/app-sessions<br/>(ueIpv4, dnn=ims, AUDIO, fDescs RTP/RTCP)
PCF-->>PCSCF: Npcf_PolicyAuthorization_Create response<br/>HTTP 201 Created
PCF->>SMF: Npcf_SMPolicyControl_UpdateNotify<br/>POST {notificationUri}/update (5QI=1 GBR)
SMF-->>PCF: Npcf_SMPolicyControl_UpdateNotify response<br/>HTTP 204 No Content
Note over SMF: Adds a new QoS Flow (5QI=1)<br/>updates N1 / N2 / N4
PCF->>PCSCF: Npcf_PolicyAuthorization_Notify<br/>POST {evSubsc.notifUri}/notify (SUCCESSFUL_RESOURCES_ALLOCATION)
PCSCF-->>PCF: Npcf_PolicyAuthorization_Notify response<br/>HTTP 204 No Content
PCSCF->>UE: SIP 183 Session Progress
Note over UE,PCSCF: Call ends (BYE)
PCSCF->>PCF: Npcf_PolicyAuthorization_Delete<br/>POST /npcf-policyauthorization/v1/app-sessions/{appSessionId}/delete
PCF-->>PCSCF: Npcf_PolicyAuthorization_Delete response<br/>HTTP 204 No Content
PCF->>SMF: Npcf_SMPolicyControl_UpdateNotify<br/>POST {notificationUri}/update (PCC Rule)
SMF-->>PCF: Npcf_SMPolicyControl_UpdateNotify response<br/>HTTP 204 No Content
Note over SMF: Releases the 5QI=1 QoS Flow| SDP information | Mapping to the Media Component (conceptual) |
|---|---|
m=audio 50000 RTP/AVP ... (which m= line it is) |
medCompN (order of the m= line), medType=AUDIO |
Address in c= and port in m= |
UE-side / peer-side addresses and ports in fDescs |
| RTP port + 1 (RTCP) | A separate Media Sub-Component (flowUsage=RTCP) |
b=AS: / codecs |
marBwUl / marBwDl, codecs |
a=sendrecv / a=sendonly etc. |
fStatus (ENABLED / ENABLED-UPLINK etc.) |
(The rules for converting SDP to Media Components are in TS 29.513 Clause 7.2 etc.; the timing at which the P-CSCF issues the N5 request (on the SDP offer or the answer) depends on TS 29.513 / TS 23.228 and the P-CSCF configuration. All to be confirmed.)
The IMS signalling QoS Flow (5QI=5) exists even without N5
The 5QI=5 QoS Flow is normally the default QoS Flow of the IMS PDU Session (the flow associated with the default QoS rule). It is created at PDU Session establishment with the subscribed default QoS from the UDM subscription data, as authorized or modified by the PCF (authorized default QoS) (TS 23.501 Clause 5.7.2.7 / TS 23.503 Clause 6.4, sub-clauses to be confirmed). Separately, there is also a method in which the P-CSCF explicitly requests a flow for SIP signalling over N5 with flowUsage=AF_SIGNALLING (sub-clause on provisioning of signalling flow information in TS 29.514 Clause 4.2.2, to be confirmed; whether it is used is configuration-dependent). Where N5 takes the lead role is the 5QI=1 voice QoS Flow created and removed per call.
NEF / N33 / Event Exposure — How Much of the 5GC to Show an External AF¶
Diagram 1 — How — Call Flow ①: an external AF requests QoS (AF session with required QoS)¶
Original explanation, assumptions and specification references
This is the procedure in which an external AF requests "apply the pre-agreed QoS to this flow of this UE" (TS 23.502 Clause 4.15.6.6 Setting up an AF session with required QoS, to be confirmed). The following is a conceptual diagram of the case where the NEF identifies the PCF through the BSF and works directly with the PCF.
The N33 creation resources are specified in TS 29.122 Clause 5.14.3.2 (QoS) and Clause 5.3.3.2 (Monitoring Event). Notify is a POST to the callback URI supplied in the subscription.
sequenceDiagram
participant AF as External AF
participant NEF
participant BSF
participant PCF
participant SMF
participant AMF
participant RAN as gNB
participant UPF
AF->>NEF: CreateASSessionWithQoSSubscription<br/>POST /3gpp-as-session-with-qos/v1/{scsAsId}/subscriptions<br/>(UE IP, flow, QoS Reference, notificationDestination)
Note over NEF: AF authorization / input check<br/>Assign Transaction Reference ID
NEF->>BSF: Nbsf_Management_Discovery<br/>GET /nbsf-management/v1/pcfBindings?ipv4Addr=...
BSF-->>NEF: Nbsf_Management_Discovery response<br/>HTTP 200 OK (PcfBinding)
NEF->>PCF: Npcf_PolicyAuthorization_Create<br/>POST /npcf-policyauthorization/v1/app-sessions
Note over PCF: Authorize request / decide PCC Rule
PCF-->>NEF: Npcf_PolicyAuthorization_Create response<br/>HTTP 201 Created + Location
NEF-->>AF: CreateASSessionWithQoSSubscription response<br/>HTTP 201 Created + Location
PCF->>SMF: Npcf_SMPolicyControl_UpdateNotify<br/>POST {notificationUri}/update
SMF-->>PCF: Npcf_SMPolicyControl_UpdateNotify response<br/>HTTP 204 No Content
SMF->>AMF: Namf_Communication_N1N2MessageTransfer<br/>POST /namf-comm/v1/ue-contexts/{ueContextId}/n1-n2-messages
AMF-->>SMF: Namf_Communication_N1N2MessageTransfer response<br/>HTTP 200 OK
AMF->>RAN: NGAP PDU Session Resource Modify Request
RAN-->>AMF: NGAP PDU Session Resource Modify Response
AMF->>SMF: Nsmf_PDUSession_UpdateSMContext<br/>POST /nsmf-pdusession/v1/sm-contexts/{smContextRef}/modify (N2 SM)
SMF-->>AMF: Nsmf_PDUSession_UpdateSMContext response<br/>HTTP 204 No Content
SMF->>UPF: PFCP Session Modification Request
UPF-->>SMF: PFCP Session Modification Response
Note over SMF,RAN: Add / modify QoS Flow, RAN admission control
Note over SMF: Other reporting conditions and procedures,<br/>including UE completion, are omitted
SMF->>PCF: Npcf_SMPolicyControl_Update<br/>POST /npcf-smpolicycontrol/v1/sm-policies/{smPolicyId}/update
PCF-->>SMF: Npcf_SMPolicyControl_Update response<br/>HTTP 200 OK
PCF->>NEF: Npcf_PolicyAuthorization_Notify<br/>POST {evSubsc.notifUri}/notify
NEF-->>PCF: Npcf_PolicyAuthorization_Notify response<br/>HTTP 204 No Content
NEF->>AF: Nnef_AFsessionWithQoS_Notify<br/>POST {notificationDestination}
AF-->>NEF: Nnef_AFsessionWithQoS_Notify response<br/>HTTP 204 No ContentResponse ordering and branches differ by Release and implementation
The diagram above is simplified for understanding. Whether the response to the AF is returned before or after the PCF's decision, the steps by which the NEF subscribes to PCF notifications, and the branch via the TSCTSF should be checked against TS 23.502 Clause 4.15.6.6 of the target Release and the implementation (to be confirmed). From PCF → SMF onward, it is the PDU Session Modification procedure.
Signal flow¶
| # | Segment | Message (SBI) | Key points |
|---|---|---|---|
| 1 | AF → NEF | Create AsSessionWithQoS (Nnef_AFsessionWithQoS_Create) | UE IP, Flow description or External Application Identifier, QoS Reference (individual QoS parameters depending on the Release), notification URI |
| 2 | Inside the NEF | Authorization, assignment of Transaction Reference ID | Whether the AF may use this API and this UE/DNN (the policy is implementation/contract dependent) |
| 3 | NEF → BSF | Nbsf_Management_Discovery (TS 29.521) | Identifies the serving PCF from the UE IP. It stops here if there is no binding |
| 4 | NEF → PCF | Npcf_PolicyAuthorization_Create (TS 29.514) | The NEF creates an App Session as an AF |
| 5 | PCF → SMF | Npcf_SMPolicyControl_UpdateNotify (TS 29.512) | Reflects PCC Rules into the SM Policy Association (PCF-initiated SM Policy Association modification, TS 23.502 Clause 4.16.5.2, to be confirmed) |
| 6 | SMF → AMF → gNB / SMF → UPF | Namf_Communication_N1N2MessageTransfer → NGAP PDU Session Resource Modify (N2 goes via the AMF), PFCP Session Modification (N4) | Add / modify QoS Flow (QFI / 5QI), PDR / QER |
| 7 | PCF → NEF → AF | Npcf_PolicyAuthorization_Notify → Nnef_AFsessionWithQoS_Notify | Notifications of resource allocation outcome and whether QoS can be guaranteed (only for subscribed events) |
Correlation information — correlation keys per segment¶
Each time you move to the next segment AF → NEF → PCF → SMF → gNB/UPF, the identifiers in use change. Having a table of which key to follow where speeds up cross-trace analysis.
| Segment | Correlation key | Notes |
|---|---|---|
| AF ⇔ NEF | scsAsId (AF Identifier), URI of the created subscription (equivalent to the Transaction Reference ID, to be confirmed), notificationDestination |
The AF later uses the subscription URI for Update / Revoke |
| NEF ⇔ BSF | UE IP address (+ IP Domain / DNN / S-NSSAI) | IP Domain etc. are needed for overlapping private IP spaces |
| NEF ⇔ PCF | App Session ID (resource URI returned in the Location header), notification URI | The NEF maps it internally to the Transaction Reference ID (implementation dependent) |
| PCF ⇔ SMF | SM Policy Association (SM Policy ID), PCC Rule ID | PCF / PCC |
| SMF ⇔ gNB | PDU Session ID, QFI | QoS Flow / QFI / 5QI |
| SMF ⇔ UPF | SEID, PDR ID / QER ID | PDR / PDI |
Analogy: It is like a parcel whose tracking number is replaced each time it passes to another carrier. The AF's receipt number (Transaction Reference ID) → the PCF's slip number (App Session ID) → the SMF's control numbers (PCC Rule / QFI). If you do not know which number to look at in which segment, you lose the parcel along the way.
201 Created does not mean \"QoS took effect\"
A 201 Created on AF→NEF only shows that the subscription (AF session) resource was created. Reflection from the PCF to the SMF, admission control in the RAN and PDR matching in the UPF happen separately afterwards. To know the outcome, the AF needs to subscribe to notifications of resource allocation outcome (Successful / Failed resources allocation, etc.; event names to be confirmed) and receive the Notify.
Diagram 2 — Call flow¶
Original explanation, assumptions and specification references
sequenceDiagram
participant AF as External AF
participant NEF
participant UDM
participant AMF
AF->>NEF: CreateMonitoringEventSubscription<br/>POST /3gpp-monitoring-event/v1/{scsAsId}/subscriptions<br/>(External ID / MSISDN, UE_REACHABILITY,<br/>notificationDestination, max reports, expiry)
Note over NEF: AF authorization / input check
NEF->>UDM: Nudm_EventExposure_Subscribe<br/>POST /nudm-ee/v1/{ueIdentity}/ee-subscriptions
Note over UDM: GPSI to SUPI translation / check subscriber authorization
UDM->>AMF: Namf_EventExposure_Subscribe<br/>POST /namf-evts/v1/subscriptions (eventNotifyUri=NEF)
AMF-->>UDM: Namf_EventExposure_Subscribe response<br/>HTTP 201 Created
UDM-->>NEF: Nudm_EventExposure_Subscribe response<br/>HTTP 201 Created
NEF-->>AF: CreateMonitoringEventSubscription response<br/>HTTP 201 Created + Location
Note over AMF: The UE becomes reachable via Registration / Service Request, etc.
AMF->>NEF: Namf_EventExposure_Notify<br/>POST {eventNotifyUri}
NEF-->>AMF: Namf_EventExposure_Notify response<br/>HTTP 204 No Content
Note over NEF: Map internal subscription to the AF subscription<br/>Translate to external-facing identifier
NEF->>AF: Nnef_EventExposure_Notify<br/>POST {notificationDestination}
AF-->>NEF: Nnef_EventExposure_Notify response<br/>HTTP 204 No ContentSignal flow¶
| # | Segment | Message | Key points |
|---|---|---|---|
| 1 | AF → NEF | Create MonitoringEvent (Nnef_EventExposure_Subscribe) | The UE is specified by GPSI (External ID / MSISDN) or External Group ID |
| 2 | NEF → UDM | Nudm_EventExposure_Subscribe (TS 29.503) | Passes the NEF's URI as the notification target |
| 3 | UDM → AMF | Namf_EventExposure_Subscribe (TS 29.518) | The UDM translates the GPSI into the SUPI and creates a subscription at the serving AMF |
| 4 | Responses | 201 Created returns AMF → UDM → NEF → AF | Depending on the event, the state at subscription time may be returned as an immediate report (to be confirmed) |
| 5 | AMF → NEF | Namf_EventExposure_Notify | Because the notification target is the NEF, it reaches the NEF directly without going via the UDM (TS 23.502 Clause 4.15.3.2.3, to be confirmed) |
| 6 | NEF → AF | MonitoringEvent notification (Nnef_EventExposure_Notify) | The NEF reports with an external-facing identifier, not the SUPI |
The path changes with the type of event
Events detected by the UDM itself (such as Roaming Status) are notified from the UDM to the NEF, and events detected by the SMF involve a subscription on the SMF side. The AMF notifying the NEF directly is also a result of "the UDM specifying the NEF as the notification target at subscription time." The diagram above is a simplified diagram for UE Reachability (detected by the AMF).
A successful Subscribe and a successfully received Notify are different things
Even if the subscription is created with 201, notifications do not arrive when (1) the event condition has not yet been met, (2) the subscription has ended because it expired or reached the maximum number of reports, (3) the internal (UDM→AMF) subscription was later removed, or its transfer failed on an AMF change (on an AMF change, Event Subscriptions are transferred to the new AMF as part of the UE Context transfer: TS 23.502 Clause 4.2.2.2.2 at registration, Clause 4.9.1.3 etc. for N2 handover with AMF change, to be confirmed), or (4) the AF's callback (notificationDestination) cannot be reached.
BSF / PCF Binding — Finding "the PCF of this Session" Among Multiple PCFs¶
Diagram 1 — Call Flow — register → discover → apply policy¶
Original explanation, assumptions and specification references
The following is the conceptual order for the case where, after the PDU Session is established and PCF-B is selected, an external AF requests QoS via the NEF. The actual timing and additional messages differ by scenario and Release.
The external AF creation resource is specified in TS 29.122 Clause 5.14.3.2; BSF registration, discovery and deregistration are described in TS 29.521 Clause 4.2.2–Clause 4.2.4.
sequenceDiagram
participant SMF
participant PCFB as PCF-B
participant BSF
participant NRF
participant NEF
participant AF
participant UPF
SMF->>PCFB: Npcf_SMPolicyControl_Create<br/>POST /npcf-smpolicycontrol/v1/sm-policies<br/>(SUPI, DNN, S-NSSAI, UE IPv4)
PCFB-->>SMF: Npcf_SMPolicyControl_Create response<br/>HTTP 201 Created (SmPolicyDecision)
PCFB->>BSF: Nbsf_Management_Register<br/>POST /nbsf-management/v1/pcfBindings (PcfBinding)
BSF-->>PCFB: Nbsf_Management_Register response<br/>HTTP 201 Created, Location
Note over SMF,UPF: Some time later, a QoS request from the application side
AF->>NEF: CreateASSessionWithQoSSubscription<br/>POST /3gpp-as-session-with-qos/v1/{scsAsId}/subscriptions
NEF->>NRF: Nnrf_NFDiscovery_Request<br/>GET /nnrf-disc/v1/nf-instances?target-nf-type=BSF&requester-nf-type=NEF
NRF-->>NEF: Nnrf_NFDiscovery_Request response<br/>HTTP 200 OK (NF Profile / BsfInfo)
NEF->>BSF: Nbsf_Management_Discovery<br/>GET /nbsf-management/v1/pcfBindings?ipv4Addr=...&dnn=...&snssai=...
BSF-->>NEF: Nbsf_Management_Discovery response<br/>HTTP 200 OK (PcfBinding)
NEF->>PCFB: Npcf_PolicyAuthorization_Create<br/>POST /npcf-policyauthorization/v1/app-sessions
PCFB-->>NEF: Npcf_PolicyAuthorization_Create response<br/>HTTP 201 Created
NEF-->>AF: CreateASSessionWithQoSSubscription response<br/>HTTP 201 Created + Location
PCFB->>SMF: Npcf_SMPolicyControl_UpdateNotify<br/>POST {notificationUri}/update (PCC Rule)
SMF-->>PCFB: Npcf_SMPolicyControl_UpdateNotify response<br/>HTTP 204 No Content
SMF->>UPF: PFCP Session Modification Request
UPF-->>SMF: PFCP Session Modification Response
Note over PCFB,BSF: At PDU Session Release
PCFB->>BSF: Nbsf_Management_Deregister<br/>DELETE /nbsf-management/v1/pcfBindings/{bindingId}
BSF-->>PCFB: Nbsf_Management_Deregister response<br/>HTTP 204 No ContentThe key point of the figure is that the PCF registers the binding and the NEF / AF (or the SCP) looks it up. The SMF does not register with the BSF. A trusted AF can find the serving PCF without going through the NEF and send the request directly over N5 (N5). It can find it by Discovery towards the BSF, via the SCP, through the BSF acting as Diameter proxy / redirect for an AF using Rx, or by local configuration; which one is used is deployment dependent. For details of the request flow via the NEF, see NEF / N33.
NF Set / Binding Indication / SCP Routing — Preserving Policy Continuity When a PCF Fails¶
Diagram 1 — Call Flow (via the SCP, conceptual)¶
Original explanation, assumptions and specification references
sequenceDiagram
participant SMF
participant NEF
participant BSF
participant SCP
participant PCFA as PCF-A
participant PCFB as PCF-B
SMF->>SCP: Npcf_SMPolicyControl_Create<br/>POST /npcf-smpolicycontrol/v1/sm-policies
SCP->>PCFA: Npcf_SMPolicyControl_Create<br/>POST /npcf-smpolicycontrol/v1/sm-policies
PCFA-->>SCP: Npcf_SMPolicyControl_Create response<br/>HTTP 201 Created + Location + 3gpp-Sbi-Binding
SCP-->>SMF: Npcf_SMPolicyControl_Create response<br/>HTTP 201 Created + Location + 3gpp-Sbi-Binding
PCFA->>BSF: Nbsf_Management_Register<br/>POST /nbsf-management/v1/pcfBindings<br/>(pcfId, pcfSetId, bindLevel)
BSF-->>PCFA: Nbsf_Management_Register response<br/>HTTP 201 Created + Location
NEF->>BSF: Nbsf_Management_Discovery<br/>GET /nbsf-management/v1/pcfBindings?ipv4Addr=...
BSF-->>NEF: Nbsf_Management_Discovery response<br/>HTTP 200 OK (PcfBinding)
NEF->>SCP: Npcf_PolicyAuthorization_Create<br/>POST /npcf-policyauthorization/v1/app-sessions<br/>3gpp-Sbi-Routing-Binding
SCP-xPCFA: Npcf_PolicyAuthorization_Create<br/>POST /npcf-policyauthorization/v1/app-sessions
Note over SCP,PCFA: Transmission to PCF-A fails (no HTTP response)
Note over SCP: Reselects an alternative in the same PCF Set<br/>within the scope the Binding Level allows
SCP->>PCFB: Npcf_PolicyAuthorization_Create<br/>POST /npcf-policyauthorization/v1/app-sessions
Note over PCFB: Looks up the SM Policy Association<br/>from the shared context
PCFB-->>SCP: Npcf_PolicyAuthorization_Create response<br/>HTTP 201 Created + Location + 3gpp-Sbi-Binding
SCP-->>NEF: Npcf_PolicyAuthorization_Create response<br/>HTTP 201 Created + Location + 3gpp-Sbi-Binding
PCFB->>SMF: Npcf_SMPolicyControl_UpdateNotify<br/>POST {notificationUri}/update
SMF-->>PCFB: Npcf_SMPolicyControl_UpdateNotify response<br/>HTTP 204 No Content
opt When required
PCFB->>BSF: Nbsf_Management_Update<br/>PATCH /nbsf-management/v1/pcfBindings/{bindingId}
BSF-->>PCFB: Nbsf_Management_Update response<br/>HTTP 200 OK
endThis is a conceptual diagram for understanding. The actual reselection conditions, error responses, retry counts and how context is taken over depend on the procedures in the specifications and on the implementation and configuration. Going through the SCP does not automatically recover from every failure.
Signal Flow¶
| # | Direction | Message (HTTP) | Binding-related points | Reference |
|---|---|---|---|---|
| 1 | SMF → PCF | Npcf_SMPolicyControl_Create (POST /npcf-smpolicycontrol/v1/sm-policies) |
The SMF may indicate the binding for its own notification target with 3gpp-Sbi-Binding |
TS 29.512, TS 29.500 Clause 5.2.3.2.6 |
| 2 | PCF → SMF | 201 Created (Location, 3gpp-Sbi-Binding) |
The PCF may return the binding of the SM Policy resource it created (optional) | TS 29.500 Clause 6.12 (sub-clause to be confirmed) |
| 3 | PCF → BSF | Nbsf_Management_Register (POST /nbsf-management/v1/pcfBindings) |
Registers PCF Instance ID / PCF Set ID / Binding Level | TS 29.521 Clause 4.2.2 (to be confirmed) |
| 4 | NEF → BSF | Nbsf_Management_Discovery (GET /nbsf-management/v1/pcfBindings?...) |
Obtains the PCF in charge, PCF Set and Binding Level | TS 29.521 Clause 4.2.4 (sub-clause to be confirmed) |
| 5 | NEF → SCP → PCF | Npcf_PolicyAuthorization_Create (POST /npcf-policyauthorization/v1/app-sessions) |
Indicates the target scope to the SCP with 3gpp-Sbi-Routing-Binding / 3gpp-Sbi-Target-apiRoot |
TS 29.514, TS 29.500 Clause 5.2.3.2.5 |
| 6 | SCP → PCF-B | (forwarded after reselection) | Reselection within the scope allowed by the Binding Level. The response may reveal which producer processed it (Producer-Id / Location; inclusion conditions to be confirmed) | TS 23.501 Clause 6.3.1.0, TS 29.500 Clause 6.10 (to be confirmed) |
| 7 | PCF → SMF | Npcf_SMPolicyControl_UpdateNotify (POST {notificationUri}/update) |
The notification is delivered based on the SMF's binding (step 1) | TS 29.512 |
| 8 | PCF → BSF | Nbsf_Management_Update (PATCH) | Updates the binding, e.g., when a new PCF instance has been selected | TS 23.503 Clause 6.1.1.2.2 / TS 29.521 Clause 4.2.5 (to be confirmed) |
SBI Communication Models A–D / SCP — Discovery and Routing Are Different Jobs¶
Diagram 1 — Call Flow — creating the SMF → PCF SM Policy Association with Model D¶
Original explanation, assumptions and specification references
During PDU Session Establishment, the SMF establishes an SM Policy Association (TS 23.502 Clause 4.16.4; Npcf_SMPolicyControl_Create is TS 29.512 Clause 4.2.2; both to be confirmed). The flow when this Create is done with Model D is as follows.
sequenceDiagram
participant SMF
participant SCP
participant NRF
participant PCF as PCF-B
SMF->>SCP: (1) Npcf_SMPolicyControl_Create<br/>POST /npcf-smpolicycontrol/v1/sm-policies<br/>authority=SCP, discovery-target-nf-type=PCF<br/>discovery-service-names, snssais, dnn
alt SCP has no valid cache
SCP->>NRF: (2) Nnrf_NFDiscovery_Request<br/>GET /nnrf-disc/v1/nf-instances?target-nf-type=PCF&requester-nf-type=SMF
NRF-->>SCP: (3) Nnrf_NFDiscovery_Request response<br/>HTTP 200 OK SearchResult<br/>nfInstances = PCF-A, PCF-B
end
Note over SCP: (4) Select PCF-B<br/>considering Priority, Capacity, Load etc.
SCP->>PCF: (5) Npcf_SMPolicyControl_Create<br/>POST /npcf-smpolicycontrol/v1/sm-policies<br/>authority=PCF-B
PCF-->>SCP: (6) Npcf_SMPolicyControl_Create response<br/>HTTP 201 Created, Location, SmPolicyDecision
SCP-->>SMF: (7) Npcf_SMPolicyControl_Create response<br/>HTTP 201 Created, 3gpp-sbi-producer-id=PCF-B
Note over SCP,SMF: Who adds producer-id and when is to be confirmed
Note over SMF: SM Policy Association established<br/>from then on, use the apiRoot of Location<br/>as target-apiroot
SMF->>SCP: (8) Npcf_SMPolicyControl_Update<br/>POST /npcf-smpolicycontrol/v1/sm-policies/abc123/update<br/>target-apiroot=PCF-B, routing-binding
SCP->>PCF: (9) Npcf_SMPolicyControl_Update<br/>POST /npcf-smpolicycontrol/v1/sm-policies/abc123/update
PCF-->>SCP: (10) Npcf_SMPolicyControl_Update response<br/>HTTP 200 OK
SCP-->>SMF: (11) Npcf_SMPolicyControl_Update response<br/>HTTP 200 OKSignal Flow table¶
| # | Segment | Message | Headers / IEs to look at | Check points |
|---|---|---|---|---|
| 1 | SMF → SCP | POST /npcf-smpolicycontrol/v1/sm-policies (SmPolicyContextData) |
:authority, 3gpp-sbi-discovery-*, body supi / pduSessionId / dnn / sliceInfo |
Are the discovery conditions as intended? Is target-apiroot absent? |
| 2 | SCP → NRF | GET /nnrf-disc/v1/nf-instances (Nnrf_NFDiscovery_Request) |
query: target-nf-type, requester-nf-type, service-names, snssais, dnn |
Are the conditions of ① carried over correctly? |
| 3 | NRF → SCP | 200 OK (SearchResult) | nfStatus, nfServices, sNssais, priority, capacity, load in nfInstances[] |
Is the target PCF among the candidates? Is the array non-empty? |
| 4 | Inside the SCP | Producer selection | — | The selection algorithm is implementation dependent (using priority / capacity etc. from the NF Profile is common) |
| 5 | SCP → PCF | POST /npcf-smpolicycontrol/v1/sm-policies |
:authority = PCF-B |
Can the TLS / HTTP/2 of connection ② be established? |
| 6 | PCF → SCP | 201 Created (SmPolicyDecision) | location, (optionally) 3gpp-sbi-binding |
Did the PCF create the resource? |
| 7 | SCP → SMF | 201 Created | 3gpp-sbi-producer-id (who adds it is to be confirmed), location |
Did the SMF retain the producer and the Location? |
| 8–9 | SMF → SCP → PCF | Update | 3gpp-sbi-target-apiroot, 3gpp-sbi-routing-binding |
Does the subsequent request reach the same PCF (or the same NF Set)? |
| 10–11 | PCF → SCP → SMF | Update response: HTTP 200 OK | SmPolicyDecision | Did the response to the subsequent request arrive? |
The correspondence to follow is a single line: the SMF's discovery conditions → the NF Profiles returned by the NRF → the PCF chosen by the SCP → the PCF's response → the association (Location) retained by the SMF.