6.2.3A Monitor request procedure for restricted ProSe direct discovery model A

24.3343GPPProximity-services (ProSe) User Equipment (UE) to ProSe function protocol aspectsRelease 17Stage 3TS

6.2.3A.1 General

The purpose of the monitor request procedure for restricted ProSe direct discovery model A is:

– to allow a UE participating in restricted ProSe direct discovery model A 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 Restricted Discovery Filter(s) for direct discovery monitoring as defined in 3GPP TS 23.303 [2].

The UE shall only initiate the restricted ProSe direct discovery model A monitor request procedure if it has been authorised for restricted ProSe direct discovery model A monitoring in 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 Restricted Discovery Filters, along with a TTL (Time-To-Live) timer T4009 for each Restricted Discovery Filter indicating the time during which the filter is valid.

6.2.3A.2 Monitor request procedure Initiation

Before initiating the monitor request procedure, the user sets the permissions for the restricted discovery using application layer mechanisms. The application client in the UE retrieves the PDUID provisioned to the UE as part of the service authorisation procedure as specified in clause 5, and obtains an RPAUID associated with the UE’s PDUID and the target RPAUID(s) to be monitored from the ProSe Application Server. This step is performed using mechanisms that are out of scope of the present specification.

If the UE is authorised to perform ProSe direct discovery model A 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 restricted ProSe direct discovery model A monitoring corresponding to at least one RPAUID, and the UE has no valid Restricted Discovery Filters corresponding to the requested RPAUID for that upper layer application; or

b) when the TTL timer T4009 assigned by the ProSe Function to a Restricted Discovery Filter has expired and the request from upper layers to monitor that RPAUID is still in place; or

NOTE 1: To ensure service continuity if the UE needs to keep monitoring the same Restricted Discovery Filter, the UE can initiate the monitor request procedure before the TTL timer T4009 assigned by the ProSe Function for a Restricted Discovery Filter expires.

c) when the UE needs to update a previously sent restricted ProSe direct discovery model A monitoring request.

The UE initiates the monitor request procedure by sending a DISCOVERY_REQUEST message with:

– a new transaction ID;

– the RPAUID set to the RPAUID received from upper layers;

– the command set to "monitor";

– the Discovery Type set to "Restricted discovery"

– 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 Application Level Container set to the target RPAUIDs to monitor;

– the Discovery Entry ID set to 0 if the monitoring request is a new request, and set to the Discovery Entry ID received from the ProSe Function if the monitoring request is to update a previously sent monitoring request;

– optionally, the Requested Timer set to 0 only when the UE wants to stop using Restricted Discovery Filter(s) 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 restricted direct discovery model A with application-controlled extension is requested by upper layers, the Application Level Container included in the DISCOVERY_ REQUEST also contains information corresponding to the ProSe Restricted 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 different monitoring targets, 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.3A.2.1 illustrates the interaction between the UE and the ProSe Function in the monitor request procedure.

Figure 6.2.3A.2.1: Monitor request procedure for restricted ProSe direct discovery model A

6.2.3A.3 Monitor request procedure accepted by the ProSe Function

Upon receiving a DISCOVERY_REQUEST message with the command set to "monitor" and the Discovery Type set to "Restricted discovery", 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. For each of the PDUIDs corresponding to the target RPAUIDs contained the Restricted Discovery Filters in the discovery entry, if the PDUID is PLMN-specific and that PLMN ID indicated by the PDUID 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 PDUID 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 <restricted-monitor-response> 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" and the Discovery Type set to "Restricted discovery", 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 ProSe direct discovery model A monitoring. If the application is authorised for restricted ProSe direct discovery model A monitoring, the ProSe Function shall check whether there is an existing UE context.

If there is no associated UE context, the ProSe Function checks with the HSS whether the UE is authorised for restricted ProSe direct discovery model A 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 UE context containing the UE’s subscription parameters obtained from the HSS.

If the Discovery Entry ID included in the DISCOVERY_REQUEST is set to 0 then:

– the ProSe Function shall use the procedure described in 3GPP TS 29.343 [31] to pass the Application Level Container included in the DISCOVERY_REQUEST message to the ProSe Application Server and obtain a list of PDUID(s) , an Application Level Container and optionally Metadata Indicator(s) corresponding to the authorised target RPAUID(s) from the ProSe Application Server;

– if the ACE Enabled Indicator in the DISCOVERY_REQUEST message is set to "application-controlled extension enabled" and the requested application uses application-controlled extension, the ProSe Function shall check whether the UE is authorized to use ACE. If the UE is authorized for ACE, the ProSe Function shall also use the procedure described in 3GPP TS 29.343 [31] to obtain the mask(s) for monitoring a ProSe Restricted Suffix Pool corresponding to each of the Target RPAUIDs.

NOTE 1: The ProSe Application Server can reject the request for some of the target RPAUIDs included in the Application Level Container in the DISCOVERY_REQUEST message because they are ineligible to be monitored by the requesting UE. Depending on the operator policy and application layer permissions, it is possible that only a subset of valid RPAUIDs are authorised by the ProSe Application Server.

– for each of the PDUIDs corresponding to an authorised target RPAUID, if the PLMN ID of the PDUID 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 ProSe Restricted Code or ProSe Restricted Code Prefix for the target RPAUID and creates Restricted Discovery Filter(s). Otherwise, for each target RPAUID, the ProSe Function shall allocate one or more Restricted Discovery Filter(s). If the ACE Enabled Indicator in the DISCOVERY_REQUEST message does not match the ACE configuration in the ProSe Function or ProSe Application Server for this application, the ACE configuration in the ProSe Function or ProSe Application Server shall be used to create Restricted Discovery Filter(s). Each Restricted Discovery Filter consists of a ProSe Restricted Code, one or more masks, a TTL timer T4009, optionally the target RPAUID, optionally a metadata indicator and optionally metadata associated with this RPAUID;

– the ProSe Function associates the Restricted Discovery Filters with a new discovery entry in the UE’s context; and

– the ProSe Function starts timer T4010 assigned for each Restricted Discovery Filter. For a given Restricted Discovery Filter, timer T4010 shall be longer than timer T4009. By default, the value of timer T4010 is 4 minutes greater than the value of timer T4009.

NOTE 2: For each target RPAUID, the ProSe Function either allocates one Restricted Discovery Filter for full-matching the ProSe Restricted Code assigned to this RPAUID, or allocates one or more Restricted Discovery Filter(s) for matching the ProSe Restricted Code Prefix and Suffix Pool assigned to this RPAUID.

If the Discovery Entry ID included in the DISCOVERY_REQUEST message is not set to 0 and if there is an existing discovery entry for this Discovery Entry ID in the UE’s context, the ProSe Function shall check whether the UE is authorised for restricted ProSe direct discovery model A monitoring. If the UE is authorised, the ProSe Function shall process the request as above-mentioned and update this discovery entry with the contents of the Restricted Discovery Filter(s) associated with this discovery entry and restart timer T4010(s) for each filter. The update of a Restricted Discovery Filter content includes setting new TTL timer(s) and if necessary, obtaining new ProSe Restricted Code and ProSe Restricted Mask(s) via the procedure defined in 3GPP TS 29.345 [5].

If the Discovery Entry ID contained in the DISCOVERY_REQUEST message is not found in the UE context or there is no UE context in the ProSe Function, the ProSe Function shall behave as if the Discovery Entry ID included in the DISCOVERY_REQUEST message was set to 0, and the ProSe Function shall allocate a new non-zero Discovery Entry ID for this entry.

Then the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <restricted-monitor-response> element with:

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

– one or more Restricted Discovery Filter(s) allocated by the ProSe Function(s) for the authorised target RPAUID(s);

– 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;

– the Discovery Entry ID set to the ID of the discovery entry associated with this monitor request;

– the Application Level Container set to the application-level data received from the ProSe Application Server; and

– optionally the PC5_tech set to the one or more PC5 radio technologies that may be used for the Restricted Discovery Filters allocated by the ProSe Function(s).

If T4010 expires, the ProSe Function shall remove the corresponding Restricted Discovery Filter from the discovery entry in the UE’s context. Furthermore, if there are no valid Restricted Discovery Filters associated with the discovery entry (e.g, all Restricted Discovery Filters have expired), the ProSe Function shall delete the discovery entry from the UE’s context.

6.2.3A.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 <restricted-monitor-response> element and the transaction ID and the Discovery Entry ID match the corresponding values sent by the UE in a DISCOVERY_REQUEST message with the command set to "monitor", the UE shall:

– stop TTL timer T4009 for each Restricted 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 <restricted-monitor-response> element matches the value sent by the UE in a DISCOVERY_REQUEST message with the command set to "monitor" and, the UE shall process as follow:

– If the DISCOVERY_RESPONSE creates a new discovery entry, start the TTL timer T4009 with the received value for each Restricted Discovery Filter information element received in the DISCOVERY_RESPONSE message.

– If the DISCOVERY_RESPONSE updates an existing discovery entry, the UE shall

– stop the T4009 timer(s) of any Restricted Discovery Filter in this discovery entry which are no longer authorized by the ProSe Function, ask lower layers to stop using those filters in monitoring operation, and remove the corresponding Restricted Discovery Filter from the discovery entry;

– restart the T4009 timer(s) for those remain eligible; and

– start the T4009 timer(s) for any new Restricted Discovery Filter(s) included in the DISCOVERY_RESPONSE message.

Otherwise the UE shall discard the DISCOVERY_RESPONSE message and shall not perform the procedures below.

The UE may perform monitoring for discovery messages received over the PC5 interface as described below.

The UE provides the Application Level Container, which contains the authorised Target RPAUID(s), to the upper layer applications. For each authorised target RPAUID , the ProSe Function may have assigned one or more Restricted Discovery Filters. If application-controlled extension is used, the UE may further apply additional filtering on the part corresponding to the ProSe Restricted Code Suffix. The UE should then apply all Restricted Discovery Filters to its monitoring operation. Using these Restricted Discovery Filters may result in a match event. In case of a match event, the UE shall consider that the target RPAUID it seeks to monitor has been discovered. A match event is defined as follows:

There is match event when, for any of the masks in a Restricted Discovery Filter, the output of a bitwise AND operation between the ProSe Restricted Code contained in the received PC5_DISCOVERY message and the mask, matches the output of a bitwise AND operation between the mask and the code contained in the same Restricted Discovery Filter.

NOTE: In a Restricted Discovery Filter, a mask with all bits set to "1" is assigned by the ProSe Function for full matching of a ProSe Restricted Code.

When applying a Restricted Discovery Filter to a received PC5_DISCOVERY message for the above-mentioned bitwise AND operation, the UE shall use the DUSK, if received as part of the filter in the DISCOVERY_RESPONSE message, and the UTC-based counter generated during the monitoring operation, to unscramble the PC5_DISCOVERY message as described in 3GPP TS 33.303 [6]. Then, if a DUCK is included as part of the filter, the UE shall use the DUCK and the UTC-based counter to decrypt the message-specific confidentiality protected portion identified by the Encrypted Bitmask, as described in 3GPP TS 33.303 [6];

NOTE: The UE can look for a match on the unencrypted bits first before applying DUCK, to minimise the amount of processing performed before finding a match.

If a DUIK is received as part of the filter, the UE shall use the DUIK and the UTC-based counter to verify the MIC field in the unscrambled PC5_DISCOVERY message. If a MIC Check Indicator parameter is included instead, the UE shall use the match report procedure described in subclause 6.2.4A to trigger checking of the MIC of the PC5_DISCOVERY message containing the ProSe Restricted Code by the ProSe Function.

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 restricted ProSe direct discovery model A monitoring in at least one PLMN or the UE is currently authorized to perform WLAN-based restricted ProSe direct discovery model A monitoring;

– the UE has obtained at least one Restricted Discovery Filter and their respective TTL timer T4009(s) have not expired; and

– a request from upper layers to monitor for the RPAUID(s) associated with an authorised Application Identity is still in place.

In case of E-UTRA-based restricted ProSe direct discovery model A 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 restricted ProSe direct discovery model A 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.3A.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 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 RPAUID contained in the DISCOVERY_REQUEST message is unknown to the ProSe Application Server, the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 Control Protocol cause value #9 "Unknown RPAUID".

If none of the RPAUID(s) contained in the Application Level Container in the DISCOVERY_REQUEST message is eligible to be discovered by the requesting RPAUID, the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 Control Protocol cause value #11 "Invalid Discovery Target".

If the RPAUID contained in the DISCOVERY_REQUEST message does not match the stored RPAUID for the requested Discovery Entry ID, 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 UE is not authorised for restricted 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 RPAUID contained in the DISCOVERY_REQUEST message is not associated with a PDUID belonging to the requesting UE, 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 is not authorized 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 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".

6.2.3A.6 Abnormal cases

6.2.3A.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 targets contained in Application Level Container 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.3A.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 DISCOVERY_RESPONSE message has not been successfully acknowledged, the ProSe Function shall abort the procedure, and stop any associated timer(s) T4010, if running.