6.2.3 Monitor request procedure for open ProSe direct discovery
24.3343GPPProximity-services (ProSe) User Equipment (UE) to ProSe function protocol aspectsRelease 17Stage 3TS
6.2.3.1 General
The purpose of the monitor request procedure for open ProSe direct discovery is to allow a UE:
– to receive and process PC5_DISCOVERY messages upon a request for monitoring from upper layers as defined in 3GPP TS 23.303 [2]; or
– to inform the ProSe Function that the UE wants to stop using Discovery Filters for direct discovery monitoring as defined in 3GPP TS 23.303 [2].
The UE shall only initiate the monitor request procedure if it has been authorised for open ProSe direct discovery monitoring at least in one PLMN based on the service authorisation 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 T4002 for each Discovery Filter indicating the time during which the filter is valid.
6.2.3.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 authorised to perform open 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 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 T4002 assigned by the ProSe Function 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 ProSe Function 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 T4002 assigned by the ProSe Function for a Discovery Filter expires.
The UE initiates the monitor request procedure for open ProSe direct discovery by sending a DISCOVERY_REQUEST message with:
– a new transaction ID;
the ProSe Application ID set to the ProSe Application ID received from upper layers;
– the command set to "monitor"
– the UE identity set to the UE’s IMSI;
– the Application Identity set to the Application Identity of the upper layer application that requested the monitoring;
– 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;
– the Discovery Entry ID set to 0 if this is a new request or set to the Discovery Entry ID received from the ProSe Function if the monitor request is to update a previously sent monitor request;
– optionally, the Requested Timer set to 0 only when the UE wants to stop using Discovery Filters for direct discovery monitoring; and
– optionally the PC5_tech set to the PC5 radio technology that the UE wishes to use for monitoring. PC5_tech may include more than one PC5 radio technology.
If open 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.3.2.1 illustrates the interaction between the UE and the ProSe Function in the monitor request procedure.
Figure 6.2.3.2.1: Monitor request procedure
6.2.3.3 Monitor request procedure accepted by the ProSe Function
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 ProSe Function 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 ProSe Function 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 ProSe Function belongs, the ProSe Function shall inform the ProSe Function in the PLMN indicated by the ProSe Application ID to remove the corresponding discovery entry as specified in 3GPP TS 29.345 [5]. Then the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-monitor> element with:
– the transaction ID set to the value of the transaction ID received in the DISCOVERY_REQUEST message;
– the Discovery Entry ID set to the value of the Discovery Entry ID received in the DISCOVERY_REQUEST message; and
– optionally the PC5_tech set to the value of the PC5_tech if it was 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 ProSe Function shall perform the following procedure.
The ProSe Function shall check that the application corresponding to the Application Identity contained in the DISCOVERY_REQUEST message is authorised for open ProSe direct discovery monitoring. If the application is authorised for open ProSe direct discovery monitoring, the ProSe Function 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 ProSe Function checks with the HSS whether the UE is authorised for open ProSe direct discovery monitoring as described in 3GPP TS 29.344 [3]. The HSS provides to the ProSe Function the PLMN ID of the PLMN in which the UE is currently registered. If the subscription check indicates that the UE is authorised, the ProSe Function 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 ProSe Function shall check whether the UE is authorised to use ACE. If the UE is authorised for ACE, the ProSe Function shall also use the procedure described in 3GPP TS 29.343 [31] 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 ProSe Function belongs, then the ProSe Function executes the procedures defined in 3GPP TS 29.345 [5] to obtain the Discovery Filter(s) for the ProSe Application ID. Otherwise, the ProSe Function shall allocate one or more Discovery Filters for the requested ProSe Application ID if it is known to the ProSe Function.and at least one corresponding valid ProSe Application Code or ProSe Application Code Prefix is available in the ProSe Function. Each Discovery Filter consists of a ProSe Application Code, one or more ProSe Application Masks, and a TTL timer T4002. If application-controlled extension is used, the allocated Discovey 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 subclause 24.2 of 3GPP TS 23.003 [4], the ProSe Function 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 subclause 24.3 of 3GPP TS 23.003 [4]. If the requested ProSe Application ID is PLMN-specific, the ProSe Function 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 ProSe Function then associates the Discovery Filters with the new discovery entry in the UE context and starts timer T4003 assigned for each Discovery Filter. For a given Discovery Filter timer T4003 shall be longer than timer T4002. By default, the value of timer T4003 is 4 minutes greater than the value of timer T4002.
If there is an existing context for the UE that contains the UE’s subscription parameters obtained from the HSS, but no discovery entry identified by the Discovery Entry ID contained in the DISCOVERY_REQUEST message, the ProSe Function shall check whether the UE is authorised for ProSe direct discovery monitoring. If the UE is authorised, the ProSe Function shall allocate the Discovery Filter as specified above.
After the Discovery Filter is allocated, the ProSe Function 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 T4003 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 ProSe Function updates the content of Discovery Filter(s), associate the discovery entry with the updated Discovery Filter(s) and restart timer T4003 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 ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-monitor> element with:
– the transaction ID set to the value of the transaction ID received in the DISCOVERY_REQUEST message from the UE;
– the Discovery Entry ID set to the identifier associated with the discovery entry; and
– if the ACE Enabled Indicator was included by the UE in the DISCOVERY_REQUEST message, the ACE Enabled Indicator set to:
– "application-controlled extension enabled" if application-controlled extension is used; or
– "normal" if application-controlled extension is not used;
– one or more Discovery Filters allocated by the ProSe Function(s) for the ProSe Application ID received in the DISCOVERY_REQUEST message from the UE; and
– optionally the PC5_tech set to the one or more PC5 radio technologies that may be used for the Discovery Filters allocated by the ProSe Function(s).
If timer T4003 expires, the ProSe Function shall remove the UE’s association with the corresponding Discovery Filter. Furthermore, the ProSe Function shall remove the discovery entry from the UE’s context if there is no Discovery Filter corresponding to the ProSe Application ID.
6.2.3.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:
– stop TTL timer T4002 for each Discovery Filter in the discovery entry identified by the Discovery Entry ID;
– remove the discovery entry identified by the Discovery Entry ID; and
– 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 ProSe Function, stop TTL timer T4002 if running and start TTL timer T4002 with the received value. Otherwise the UE shall discard the DISCOVERY_RESPONSE message and shall not perform the procedures below.
The UE may perform open ProSe direct discovery monitoring for discovery messages received over the PC5 interface as described below.
For a ProSe Application ID requested by the monitoring UE, the ProSe Function may have assigned one or more Discovery Filters. If application-controlled extension is used, the UE may further apply additional filtering on the part corresponding to the ProSe Application Code Suffix. The UE should apply all assigned Discovery Filters to its monitoring operation. Using these Discovery Filters may result in a match event. In case of a match event, the UE shall consider that the ProSe Application ID it seeks to monitor has been discovered. A match event for open ProSe direct discovery is defined as follows:
There is a match event when, for any of the ProSe Application Masks in a Discovery Filter, the output of a bitwise AND operation between the ProSe Application Code contained in the received PC5_DISCOVERY message and the ProSe Application Mask, matches the output of a bitwise AND operation between the ProSe Application Mask and the ProSe Application Code contained in the same Discovery Filter.
NOTE: A ProSe Application Mask with all bits set to "1" is assigned by the ProSe Function for full matching.
The UE may instruct the lower layers to start monitoring if all of the following conditions are met:
– the UE is currently authorized to perform E-UTRA-based open ProSe direct discovery monitoring in at least one PLMN or the UE is currently authorized to perform WLAN-based open ProSe direct discovery monitoring;
– the UE has obtained at least one Discovery Filter and their respective TTL timer T4002(s) have not expired; and
– a request from upper layers to monitor for the ProSe Application ID associated with an authorised Application Identity is still in place.
In case of E-UTRA-based open ProSe direct discovery monitoring, if the UE is in EMM-CONNECTED mode, the monitoring UE shall also trigger the corresponding procedure in lower layers as specified in 3GPP TS 36.331 [12].
During the monitoring operation, the UE receives all PC5_DISCOVERY messages and associated UTC times from the lower layers. The UE shall generate the UTC-based counter corresponding to the UTC time associated with a PC5_DISCOVERY message and only process the PC5_DISCOVERY message if the UTC-based counter is within Max Offset of the time shown by the clock used for ProSe by the UE.
During the monitoring operation, if one of the above conditions is no longer met, the UE may instruct the lower layers to stop monitoring. When the UE stops monitoring, in case of E-UTRA-based open ProSe direct discovery monitoring if the UE is in EMM-CONNECTED mode, the UE shall trigger the corresponding procedure in lower layers as specified in 3GPP TS 36.331 [12].
6.2.3.5 Monitor request procedure not accepted by the ProSe Function
If the DISCOVERY_REQUEST message is not accepted by the ProSe Function, the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-reject> element to the UE including an appropriate PC3 Control Protocol cause value.
If the application corresponding to the Application Identity contained in the DISCOVERY_REQUEST message is not authorised for open ProSe direct discovery monitoring, the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 Control Protocol cause value #1 "Invalid application".
If the ProSe Application ID contained in the DISCOVERY_REQUEST message is unknown to the ProSe Function, the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 Control Protocol cause value #2 "Unknown ProSe Application ID".
If the UE is not authorised for open ProSe direct discovery monitoring, the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 Control Protocol cause value #3 "UE authorisation 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 ProSe Function has not authorized the UE to monitor in that country, it shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 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 ProSe Function has no agreement to access the country-specific ProSe Application ID database of that country, the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 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 ProSe Function and the Requested Timer is set to 0, the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 Control Protocol cause value #10 "Unknown or invalid Discovery Entry ID ".
If the ProSe Function cannot retrieve a valid ProSe Application Code corresponding to the ProSe Application ID contained in the DISCOVERY_REQUEST message, the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 Control Protocol cause value #17 "No Valid ProSe Application Code".
If the UE is not authorised to use ACE, but the DISCOVERY_REQUEST message contains the ACE Enabled Indicator set to "application-controlled extension enabled", the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 Control Protocol cause value #12 "UE unauthorised 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 ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 Control Protocol cause value #1 "Invalid Application".
6.2.3.6 Abnormal cases
6.2.3.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 ProSe Function, establish a new secure connection and then restart the monitor request procedure.
b) No response from the ProSe Function 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: 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 ProSe Function 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.3.6.2 Abnormal cases in the ProSe Function
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 ProSe Function shall abort the procedure, and stop any associated timer(s) T4003, if running.