6.6 Detach Function

03.603GPPGeneral Packet Radio Service (GPRS)Release 1998Service descriptionStage 2TS

The Detach function allows an MS to inform the network that it wants to make a GPRS and/or IMSI detach, and it allows the network to inform an MS that it has been GPRS-detached or IMSI-detached by the network. The different types of detach are:

– IMSI detach;

– GPRS detach; and

– combined GPRS / IMSI detach (MS-initiated only).

The MS is detached from GPRS either explicitly or implicitly:

– Explicit detach: The network or the MS explicitly requests detach.

– Implicit detach: The network detaches the MS, without notifying the MS, a configuration-dependent time after the mobile reachable timer expired, or after an irrecoverable radio error causes disconnection of the logical link.

In the explicit detach case, a Detach Request (Cause) is sent by the SGSN to the MS, or by the MS to the SGSN.

The MS can make an IMSI detach in one of two ways depending on if it is GPRS-attached or not:

– A GPRS-attached MS sends a Detach Request message to the SGSN, indicating an IMSI detach. This can be made in combination with GPRS detach.

– An MS not attached to the GPRS makes the IMSI detach as already defined in GSM.

In the MO Detach Request message there is an indication to tell if the detach is due to switch off or not. The indication is needed to know whether a Detach Accept message should be returned or not.

In the network-originated Detach Request message there may be an indication to tell the MS that it is requested to initiate GPRS Attach and PDP Context Activation procedures for the previously activated PDP contexts.

6.6.1 MS-Initiated Detach Procedure

The MS-Initiated Detach procedure when initiated by the MS is illustrated in Figure 19. Each step is explained in the following list.

Figure 19: MS-Initiated Combined GPRS / IMSI Detach Procedure

1) The MS detaches by sending Detach Request (Detach Type, Switch Off) to the SGSN. Detach Type indicates which type of detach that is to be performed, i.e., GPRS Detach only, IMSI Detach only or combined GPRS and IMSI Detach. Switch Off indicates whether the detach is due to a switch off situation or not.

2) If GPRS detach, the active PDP contexts in the GGSNs regarding this particular MS are deactivated by the SGSN sending Delete PDP Context Request (TID) to the GGSNs. The GGSNs acknowledge with Delete PDP Context Response (TID).

3) If IMSI detach, the SGSN sends IMSI Detach Indication (IMSI) to the VLR.

4) If the MS wants to remain IMSI-attached and is doing a GPRS detach, the SGSN sends a GPRS Detach Indication (IMSI) message to the VLR. The VLR removes the association with the SGSN and handles paging and location update without going via the SGSN.

5) If Switch Off indicates that the detach is not due to a switch off situation, the SGSN sends a Detach Accept to the MS.

6.6.2 Network-Initiated Detach Procedure

6.6.2.1 SGSN-Initiated Detach Procedure

The SGSN-Initiated Detach procedure when initiated by the SGSN is illustrated in Figure 20. Each step is explained in the following list.

Figure 20: SGSN-Initiated GPRS Detach Procedure

1) The SGSN informs the MS that it has been detached by sending Detach Request (Detach Type) to the MS. Detach Type indicates if the MS is requested to make a new attach and PDP context activation for the previously activated PDP contexts. If so, the attach procedure shall be initiated when the detach procedure is completed.

2) The active PDP contexts in the GGSNs regarding this particular MS are deactivated by the SGSN sending Delete PDP Context Request (TID) messages to the GGSNs. The GGSNs acknowledge with Delete PDP Context Response (TID) messages.

3) If the MS was both IMSI- and GPRS-attached, the SGSN sends a GPRS Detach Indication (IMSI) message to the VLR. The VLR removes the association with the SGSN and handles paging and location update without going via the SGSN.

4) The MS sends a Detach Accept message to the SGSN any time after step 1.

6.6.2.2 HLR-Initiated Detach Procedure

The HLR-Initiated Detach procedure is initiated by the HLR. The HLR uses this procedure for operator-determined purposes to request the removal of a subscriber’s MM and PDP contexts at the SGSN. The HLR-Initiated Detach Procedure is illustrated in Figure 21. Each step is explained in the following list.

Figure 21: HLR-Initiated GPRS Detach Procedure

1) If the HLR wants to request the immediate deletion of a subscriber’s MM and PDP contexts from the SGSN, the HLR shall send a Cancel Location (IMSI, Cancellation Type) message to the SGSN with Cancellation Type set to Subscription Withdrawn.

2) The SGSN informs the MS that it has been detached by sending Detach Request (Detach Type) to the MS. Detach Type shall indicate that the MS is not requested to make a new attach and PDP context activation.

3) The active PDP contexts in the GGSNs regarding this particular MS are deactivated by the SGSN sending Delete PDP Context Request (TID) messages to the GGSNs. The GGSNs acknowledge with Delete PDP Context Response (TID) messages.

4) If the MS was both IMSI- and GPRS-attached, the SGSN sends a GPRS Detach Indication (IMSI) message to the VLR. The VLR removes the association with the SGSN and handles paging and location update without going via the SGSN.

5) The MS sends a Detach Accept message to the SGSN any time after step 2.

6) The SGSN shall confirm the deletion of the MM and PDP contexts with a Cancel Location Ack (IMSI) message.