STR

Session-Termination-Request

Protocol
Introduced in Rel-11
Session-Termination-Request (STR) is a Diameter command used in 3GPP networks to explicitly request the termination of an established Diameter session, such as an IP-CAN session or a credit control session. It is a critical component of the Diameter base protocol for proper session cleanup, resource release, and final accounting.

Description

The Session-Termination-Request (STR) is a specific Diameter command-code (275) defined within the Diameter base protocol (RFC 6733) and profiled extensively in 3GPP specifications for various interfaces. It is part of the Diameter session state machine and is used by a Diameter client or server to signal the intentional termination of a Diameter application session. In 3GPP contexts, these sessions often correspond to high-level service sessions like an IP Connectivity Access Network (IP-CAN) session in the Packet Data Network Gateway (PGW) or a Policy and Charging Control (PCC) session in the Policy and Charging Rules Function (PCRF).

The STR command is typically initiated by the node that is terminating the service (e.g., the PGW when a user detaches) and is sent to its peer Diameter node (e.g., the PCRF or Online Charging System). The command carries the Session-Id Attribute-Value Pair (AVP) to uniquely identify the session to be terminated. It also includes other relevant AVPs, such as the Termination-Cause AVP, which indicates the reason for termination (e.g., "DIAMETER_LOGOUT", "DIAMETER_SERVICE_NOT_PROVIDED", "DIAMETER_BAD_ANSWER"). Upon receiving an STR, the recipient must perform all necessary cleanup procedures associated with that session. This includes releasing any internally held resources, updating charging records, and revoking any active policy rules that were provisioned for the session.

The recipient of the STR must respond with a Session-Termination-Answer (STA) command. The STA confirms the session termination and may include final accounting data or other result information. This request-answer exchange ensures both sides of the Diameter dialogue have a synchronized view of session state, preventing resource leaks, billing errors, or stale policy enforcement. The STR/STA mechanism is essential for the reliable operation of online charging, policy control, and mobility management in 4G (EPC) and 5G core networks.

Purpose & Motivation

The STR command exists to provide a reliable, explicit, and standardized mechanism for session termination within the Diameter protocol framework. Prior to Diameter, protocols like RADIUS lacked robust session state management and explicit termination signaling, which could lead to issues such as "session staleness," where network resources remained allocated after a user had disconnected, or inaccurate charging where sessions were not properly closed. The Diameter protocol, and by extension the STR command, was designed to address these shortcomings for complex, stateful network services.

In 3GPP architectures, especially with the introduction of the Policy and Charging Control (PCC) framework, sessions became more complex, involving multiple network functions (PCRF, PCEF, OCS) that needed to coordinate state. An implicit session timeout was insufficient for accurate real-time charging and dynamic policy enforcement. The STR provides a deterministic signal that allows all involved nodes to synchronously perform final accounting calculations, apply any termination-triggered policies, and log the precise reason for session end. This is crucial for prepaid services, where the final deduction must be accurate, and for post-paid services where detailed session records are needed for billing.

Its introduction and profiling in 3GPP (notably from Release 11 onwards for interfaces like Gx, Gy, and S9) was driven by the need for greater reliability in LTE/EPC networks handling high-value data services. It solved the problem of ambiguous session endings, ensuring network resources are promptly freed and financial transactions are correctly settled, which is foundational for commercial mobile broadband operations.

Key Features

  • Diameter command-code 275 used for explicit session termination signaling
  • Carries the Session-Id AVP to uniquely identify the session to be terminated
  • Includes a Termination-Cause AVP to specify the reason for session end (e.g., user logout, administrative action)
  • Triggers cleanup procedures including resource release and policy revocation in the recipient node
  • Requires a mandatory Session-Termination-Answer (STA) for confirmation
  • Essential for accurate final accounting and charging in Online Charging System (OCS) interactions

Evolution Across Releases

Rel-11 Initial

Formally profiled the use of the STR command within key 3GPP Diameter interfaces, including Gx (PCRF-PCEF) and Gy (PCEF-OCS). Established its role in the PCC architecture for reliable termination of IP-CAN sessions and associated charging sessions.

Enhanced STR usage for more complex scenarios like sponsored data connectivity and traffic steering, ensuring proper termination and accounting when alternative charging models or routing policies were applied.

Defined the transition and interworking procedures for STR between 4G EPC (Diameter-based) and 5G Core (HTTP-based) networks. While 5GC uses HTTP/2 RESTful services (e.g., Nchf_ConvergedCharging), the STR concept was mapped to appropriate service operations for backward compatibility and session management.

Further refined STR procedures for edge computing and network slicing scenarios, ensuring session termination properly releases resources allocated to specific network slice instances and edge applications.

Defining Specifications

SpecificationTitle
TS 29.213 3GPP TS 29.213
TS 29.219 3GPP TS 29.219