6.2.4 Monitor request procedure for open 5G ProSe direct discovery

24.5543GPPProximity-services (ProSe) in 5G System (5GS) protocol aspectsRelease 17Stage 3TS

6.2.4.1 General

The purpose of the monitor request procedure for open 5G ProSe direct discovery is to allow a UE:

a) to receive and process PROSE PC5 DISCOVERY messages upon a request for monitoring from upper layers as defined in 3GPP TS 23.304 [2]; or

b) to inform the 5G DDNMF that the UE wants to stop using discovery filters for direct discovery monitoring as defined in 3GPP TS 23.304 [2].

The UE shall only initiate the monitor request procedure if it has been authorized for open 5G ProSe direct discovery monitoring at least in one PLMN based on the service authorization procedure.

As a result of the monitor request procedure completing successfully, the UE obtains one or more discovery filters, along with a TTL (Time-To-Live) timer T5064 for each discovery filter indicating the time during which the filter is valid.

6.2.4.2 Monitor request procedure Initiation

Before initiating the monitor request procedure, the UE is configured with the data structure of the ProSe application IDs it wants to monitor. This step is performed using mechanisms that are out of scope of 3GPP.

If the UE is authorized to perform open 5G ProSe direct discovery monitoring in at least one PLMN, it shall initiate a monitor request procedure:

a) when the UE is triggered by an upper layer application to perform open 5G ProSe direct discovery monitoring corresponding to a ProSe application ID and the UE has no valid discovery filters corresponding to the requested ProSe application ID for that upper layer application;

b) when the TTL timer T5064 assigned by the 5G DDNMF to a discovery filter has expired and the request from upper layers to monitor that ProSe application ID is still in place; or

c) when the UE needs to inform the 5G DDNMF that the UE wants to stop using discovery filters for direct discovery monitoring.

NOTE 1: To ensure service continuity if the UE needs to keep monitoring the same discovery filter, the UE can initiate the monitor request procedure before the TTL timer T5064 assigned by the 5G DDNMF for a discovery filter expires.

The UE shall initiate the monitor request procedure for open 5G ProSe direct discovery by sending a DISCOVERY_REQUEST message with:

a) a new transaction ID;

b) the ProSe application ID set to the ProSe application ID received from upper layers;

c) the command set to "monitor";

d) the application identity set to the ProSe identifier of the upper layer application that requested the monitoring as specified in clause 5.2.3;

e) the ACE enabled indicator set to "application-controlled extension enabled" if application-controlled extension is required by the upper layers, or "normal" if application-controlled extension is not used;

f) the discovery entry ID set to 0 if this is a new request or set to the discovery entry ID received from the 5G DDNMF if the monitor request is to update a previously sent monitor request; and

g) optionally, the requested timer set to 0 only when the UE wants to stop using discovery filters for direct discovery monitoring.

If open 5G ProSe direct discovery with application-controlled extension is requested by upper layers, the DISCOVERY_REQUEST message shall also include the application level container, which contains information corresponding to the ProSe application code suffix, e.g., group or user-specific information.

NOTE 2: A UE can include one or multiple transactions in one DISCOVERY_REQUEST message for one or more ProSe application IDs and receive corresponding <response-monitor> element or <response-reject> element in the DISCOVERY_RESPONSE message for each respective transaction. In the following description of the monitor request procedure, only one transaction is included.

Figure 6.2.4.2.1 illustrates the interaction between the UE and the 5G DDNMF in the monitor request procedure.

Figure 6.2.4.2.1: Monitor request procedure

6.2.4.3 Monitor request procedure accepted by the 5G DDNMF

Upon receiving a DISCOVERY_REQUEST message with the command set to "monitor", if the requested timer is included in the DISCOVERY_REQUEST message and the requested timer is set to 0, the 5G DDNMF shall check whether there is an existing UE context containing the discovery entry identified by the discovery entry ID included in the DISCOVERY_REQUEST message. If the discovery entry exists in the UE context, the 5G DDNMF shall remove the discovery entry identified by the discovery entry ID from the UE’s context. When the associated ProSe application ID is PLMN-specific and that PLMN ID indicated by the ProSe application ID is not the same as that of the PLMN to which the 5G DDNMF belongs, the 5G DDNMF shall inform the 5G DDNMF in the PLMN indicated by the ProSe application ID to remove the corresponding discovery entry as specified in 3GPP TS 29.555 [9]. Then the 5G DDNMF shall send a DISCOVERY_RESPONSE message containing a <response-monitor> element with:

a) the transaction ID set to the value of the transaction ID received in the DISCOVERY_REQUEST message; and

b) the discovery entry ID set to the value of the discovery entry ID received in the DISCOVERY_REQUEST message.

Upon receiving a DISCOVERY_REQUEST message with the command set to "monitor", if the requested timer is not included in the DISCOVERY_REQUEST message, the 5G DDNMF shall perform the following procedure.

The 5G DDNMF shall check that the application corresponding to the ProSe identifier contained in the DISCOVERY_REQUEST message is authorized for open 5G ProSe direct discovery monitoring. If the application is authorized for open 5G ProSe direct discovery monitoring, the 5G DDNMF checks whether there is an existing context for the UE associated with the requested ProSe application ID.

If there is no associated UE context, the 5G DDNMF checks with the UDM whether the UE is authorized for open 5G ProSe direct discovery monitoring as described in 3GPP TS 29.503 [10]. The UDM provides to the 5G DDNMF the PLMN ID of the PLMN in which the UE is currently registered. If the subscription check indicates that the UE is authorized, the 5G DDNMF creates a new context for the UE and a new discovery entry identified by a non-zero value discovery entry ID which is associated with the requested ProSe application ID.

If the ACE enabled indicator in the DISCOVERY_REQUEST message is included and set to "application-controlled extension enabled" and the requested application uses application-controlled extension, the 5G DDNMF shall check whether the UE is authorized to use ACE. If the UE is authorized for ACE, the 5G DDNMF shall also use the procedure described in 3GPP TS 29.557 [19] to obtain the mask(s) for monitoring the ProSe application code suffix (es) corresponding to the requested ProSe application ID.

If the PLMN ID indicated in the ProSe application ID is PLMN-Specific and that PLMN ID is not the same as that of the PLMN to which the 5G DDNMF belongs, then the 5G DDNMF executes the procedures defined in 3GPP TS 29.555 [9] to obtain the discovery filter(s) for the ProSe application ID. Otherwise, the 5G DDNMF shall allocate one or more discovery filters for the requested ProSe application ID if it is known to the 5G DDNMF and at least one corresponding valid ProSe application code or ProSe application code prefix is available in the 5G DDNMF. Each discovery filter consists of a ProSe application code, one or more ProSe application masks and a TTL timer T5064. If application-controlled extension is used, the allocated Discovery Filter shall be applicable to match both prefix and suffix portions of the ProSe application code.

If the requested ProSe application ID is country-specific or global or PLMN-specific as defined respectively in clause 24.2 of 3GPP TS 23.003 [12], the 5G DDNMF shall allocate the discovery filter which contains ProSe application code and ProSe application mask(s) in the corresponding scope. If the ProSe application ID is country-specific or global, the ProSe application mask(s) enclosed in the discovery filter hides the PLMN ID part correspondingly and the temporary identity part is taken from the data structure corresponding to the global or country-wide ProSe application ID namespace, as specified in clause 24.3 of 3GPP TS 23.003 [12]. If the requested ProSe application ID is PLMN-specific, the 5G DDNMF shall allocate one or more PLMN-specific discovery filters. Each of these discovery filters shall contain a PLMN-specific Prose application code and the ProSe application mask(s) whose PLMN ID portion shall be set such that when the mask is applied to the ProSe application code, the outcome matches the full PLMN ID of that specific PLMN.

After the discovery filter(s) are allocated, the 5G DDNMF then associates the discovery filters with the new discovery entry in the UE context and starts timer T5065 assigned for each discovery filter. For a given discovery filter timer T5065 shall be longer than timer T5064. By default, the value of timer T5065 is 4 minutes greater than the value of timer T5064.

If there is an existing context for the UE that contains the UE’s subscription parameters obtained from the UDM, but no discovery entry identified by the discovery entry ID contained in the DISCOVERY_REQUEST message, the 5G DDNMF shall check whether the UE is authorized for ProSe direct discovery monitoring. If the UE is authorized, the 5G DDNMF shall allocate the discovery filter as specified above.

After the discovery filter is allocated, the 5G DDNMF then associates the discovery filter with a new discovery entry identified by a non-zero value discovery entry ID in the UE context and starts timer T5065 assigned for each discovery filter.

Similarly, if there is an existing context and a discovery entry identified by the discovery entry ID contained in the DISCOVERY_REQUEST message for the UE associated with the requested ProSe application ID, the 5G DDNMF updates the content of discovery filter(s), associate the discovery entry with the updated discovery filter(s) and restart timer T5065 for each filter. The update of a discovery filter content includes setting new TTL timer(s) and if necessary, assigning new ProSe application code or ProSe application code prefix and ProSe application mask(s).

Then the 5G DDNMF shall send a DISCOVERY_RESPONSE message containing a <response-monitor> element with:

a) the transaction ID set to the value of the transaction ID received in the DISCOVERY_REQUEST message from the UE;

b) the discovery entry ID set to the identifier associated with the discovery entry;

c) if the ACE enabled indicator was included by the UE in the DISCOVERY_REQUEST message, the ACE enabled indicator set to:

1) "application-controlled extension enabled" if application-controlled extension is used; or

2) "normal" if application-controlled extension is not used;

d) one or more discovery filters allocated by the 5G DDNMF(s) for the ProSe application ID received in the DISCOVERY_REQUEST message from the UE; and

e) the current time set to the current UTC-based time at the 5G DDNMF and the max offset.

If timer T5065 expires, the 5G DDNMF shall remove the UE’s association with the corresponding discovery filter. Furthermore, the 5G DDNMF shall remove the discovery entry from the UE’s context if there is no discovery filter corresponding to the ProSe application ID.

The 5G DDNMF uses the information (e.g. application identity) received from the UE in the DISCOVERY_REQUEST message, UE identity in GBA or AKMA information related to TLS tunnel transporting the DISCOVERY_REQUEST message, and other information for charging purposes as specified in 3GPP TS 32.277 [45].

6.2.4.4 Monitor request procedure completion by the UE

Upon receipt of the DISCOVERY_RESPONSE message, if only the transaction ID and the discovery entry ID are contained in the <response-monitor> element and the transaction ID and the discovery entry ID match the corresponding values sent by the UE in a DISCOVERY_REQUEST message, the UE shall:

a) stop TTL timer T5064 for each discovery filter in the discovery entry identified by the discovery entry ID;

b) remove the discovery entry identified by the discovery entry ID; and

c) instruct the lower layers to stop monitoring.

Upon receipt of the DISCOVERY_RESPONSE message, if the transaction ID contained in the <response-monitor> element matches the value sent by the UE in a DISCOVERY_REQUEST message with the command set to "monitor", the UE shall, for each discovery filter assigned by the 5G DDNMF, stop TTL timer T5064 if running and start TTL timer T5064 with the received value. Otherwise, the UE shall discard the DISCOVERY_RESPONSE message and shall not perform the procedures below. The UE shall set a ProSe clock (see 3GPP TS 33.503 [34]) to the value of the received current time parameter and store the received max offset parameter.

The UE may perform open 5G ProSe direct discovery monitoring for discovery messages received over the PC5 interface as described in clause 6.2.14.2.1.4.

6.2.4.5 Monitor request procedure not accepted by the 5G DDNMF

If the DISCOVERY_REQUEST message is not accepted by the 5G DDNMF, the 5G DDNMF shall send a DISCOVERY_RESPONSE message containing a <response-reject> element to the UE including an appropriate PC3a control protocol cause value.

If the application corresponding to the ProSe identifier contained in the DISCOVERY_REQUEST message is not authorized for open 5G ProSe direct discovery monitoring, the 5G DDNMF shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3a control protocol cause value #1 "Invalid application".

If the ProSe application ID contained in the DISCOVERY_REQUEST message is unknown to the 5G DDNMF, the 5G DDNMF shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3a control protocol cause value #2 "Unknown ProSe application ID".

If the UE is not authorized for open 5G ProSe direct discovery monitoring, the 5G DDNMF shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3a control protocol cause value #3 "UE authorization failure".

If the UE requests a country-specific ProSe application ID for a country that does not correspond to the country of its HPLMN and the 5G DDNMF has not authorized the UE to monitor in that country, it shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3a control protocol cause value #8 "Scope violation in Prose application ID".

If the UE requests a country-specific ProSe application ID for a country that does not correspond to the country of its HPLMN and the 5G DDNMF has no agreement to access the country-specific ProSe application ID database of that country, the 5G DDNMF shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3a control protocol cause value #8 "Scope violation in Prose application ID".

If the discovery entry ID contained in the DISCOVERY_REQUEST message is unknown to the 5G DDNMF and the requested timer is set to 0, the 5G DDNMF shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3a control protocol cause value #10 "Unknown or invalid discovery entry ID ".

If the 5G DDNMF cannot retrieve a valid ProSe application code corresponding to the ProSe application ID contained in the DISCOVERY_REQUEST message, the 5G DDNMF shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3a control protocol cause value #17 "No valid ProSe application code".

If the UE is not authorized to use ACE, but the DISCOVERY_REQUEST message contains the ACE enabled indicator set to "application-controlled extension enabled", the 5G DDNMF shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3a control protocol cause value #12 "UE unauthorized for discovery with application-controlled extension".

If the DISCOVERY_REQUEST message does not contain the ACE enabled indicator and the requested application only uses application-controlled extension, the 5G DDNMF shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3a control protocol cause value #1 "Invalid application".

6.2.4.6 Abnormal cases

6.2.4.6.1 Abnormal cases in the UE

The following abnormal cases can be identified:

a) Indication from the transport layer of transmission failure of DISCOVERY_REQUEST message (e.g., after TCP retransmission timeout)

The UE shall close the existing secure connection to the 5G DDNMF, establish a new secure connection and then restart the monitor request procedure.

NOTE 1: The UE can abort this procedure when detecting loss of NG-RAN coverage in its serving PLMN.

b) No response from the 5G DDNMF after the DISCOVERY_REQUEST message has been successfully delivered (e.g., TCP ACK has been received for the DISCOVERY_REQUEST message)

The UE shall retransmit the DISCOVERY_REQUEST message.

NOTE 2: The UE can abort this procedure when detecting loss of NG-RAN coverage in its serving PLMN.

NOTE 3: The timer to trigger retransmission and the maximum number of allowed retransmissions are UE implementation specific.

c) Indication from upper layers that the request to monitor the ProSe application ID is no longer in place after sending the DISCOVERY_REQUEST message, but before the monitor request procedure is completed

The UE shall acknowledge the DISCOVERY_RESPONSE message received from the 5G DDNMF but discard its contents and then abort the procedure.

d) Change of PLMN

If a PLMN change occurs before the monitor request procedure is completed, the procedure shall be aborted. If the UE is authorized to monitor in the new PLMN, the procedures shall be restarted once the UE is registered on the new PLMN.

6.2.4.6.2 Abnormal cases in the 5G DDNMF

The following abnormal cases can be identified:

a) Indication from the lower layer of transmission failure of DISCOVERY_RESPONSE message

After receiving an indication from lower layer that the DISCOVEY_RESPONSE message has not been successfully acknowledged, the 5G DDNMF shall abort the procedure and stop any associated timer(s) T5065, if running.