From 3d0ab9ec85e1683a496b00171861a3dabd3160d2 Mon Sep 17 00:00:00 2001
From: Schmitting <peter.schmitting@fscom.fr>
Date: Thu, 19 Jan 2023 13:35:32 +0100
Subject: [PATCH] E-CSCF Tests for INVITE completed

---
 test_purposes/E_CSCF/TP_E_CSCF.tplan2 | 327 ++++++++++++++++++++++++--
 test_purposes/Sip_Common.tplan2       |   7 +-
 2 files changed, 314 insertions(+), 20 deletions(-)

diff --git a/test_purposes/E_CSCF/TP_E_CSCF.tplan2 b/test_purposes/E_CSCF/TP_E_CSCF.tplan2
index befdf13..4812f21 100644
--- a/test_purposes/E_CSCF/TP_E_CSCF.tplan2
+++ b/test_purposes/E_CSCF/TP_E_CSCF.tplan2
@@ -15,9 +15,10 @@ file and shall not imply any sub-license right.
 
 /* E-CSCF interfaces to
  * EATF: I4
- * LRF:  MI
- * PSAP: Mm/Mx to IBCF/IP multimedia network 
- *   or  Mi/Mg to PSTN via BGCF/MGCF
+ * LRF:  Ml
+ * PSAP: Mm to IP multimedia network for PSAP in the IM CN subsystem of own network
+ *   or  Mx to IBCF for PSAP in other network
+ *   or  Mi to BGCF (and Mg to MGCF) for PSAP in the PSTN
  */
 Package TP_E_CSCF {
     
@@ -32,16 +33,14 @@ Package TP_E_CSCF {
                          and routes the request to the EATF."
         
         Reference 
-            "ETSI TS 124 229 [1], Clauses 5.11.2"
+            "ETSI TS 124 229 [1], Clauses 5.11.2 1)"
         
         Config Id CF_VxLTE_INT
         
         PICS Selection NONE
         
         Initial conditions with {
-            the UE_A entity isEmergencyAttachedTo the EPC_A and
-            the UE_A entity isEmergencyRegisteredTo the IMS_A and
-            the IMS_E_CSCF entity supportRoutingTo the IMS_EATF
+            the IMS_E_CSCF entity supportsRoutingTo the IMS_EATF
         }
         
         Expected behaviour
@@ -67,9 +66,10 @@ Package TP_E_CSCF {
                         CallId indicating value PX_UE_A_CALLID,
                         Via indicating value PX_E_CSCF_VIA,
                         Route indicating value PX_EATF_SERVICE_ROUTE,
+                        Route indicating value PX_E_CSCF_SERVICE_ROUTE_EATF,
                         PChargingVector containing
                            not term_ioi_parameter,
-                           orig_ioi_parameter 
+                           orig_ioi_parameter
                                indicating value "Operator Identifier Of ImsA";,
                         MessageBody;
                      to the IMS_EATF entity
@@ -80,7 +80,7 @@ Package TP_E_CSCF {
 
     Test Purpose {
         
-        TP Id TP_MI_ECSCF_ECO_INVITE_01
+        TP Id TP_ML_ECSCF_ECO_INVITE_01
         /* MI interface at E-CSCF/LRF */
 
         Test objective  "Verify that the E-CSCF successfully processes an initial INVITE from the P-CSCF
@@ -94,9 +94,7 @@ Package TP_E_CSCF {
         PICS Selection NONE
         
         Initial conditions with {
-            the UE_A entity isEmergencyAttachedTo the EPC_A and
-            the UE_A entity isEmergencyRegisteredTo the IMS_A and
-            the IMS_E_CSCF entity supportRoutingTo the IMS_EATF
+            the IMS_E_CSCF entity supportsRoutingTo the IMS_LRF
         }
         
         Expected behaviour
@@ -109,9 +107,6 @@ Package TP_E_CSCF {
                         Via indicating value PX_P_CSCF_A_VIA,
                         Route indicating value PX_E_CSCF_SERVICE_ROUTE, // 5.2.10.3 1B) option is assumed
                         PAssertedIdentity,
-                        Contact containing
-                           instanceid_feature_tag
-                              indicating value IMEIURN;,
                         MessageBody;
                     from the IMS_P_CSCF_A entity
                 }
@@ -121,18 +116,312 @@ Package TP_E_CSCF {
                         To indicating value PX_SIP_EMERGENCY_SERVICE_URN,
                         CallId indicating value PX_UE_A_CALLID,
                         Via indicating value PX_E_CSCF_VIA,
-                        Route indicating value PX_EATF_SERVICE_ROUTE,
+                        Route indicating value PX_LRF_SERVICE_ROUTE,
                         PChargingVector containing
                            not term_ioi_parameter,
-                           orig_ioi_parameter 
+                           orig_ioi_parameter
                                indicating value "Operator Identifier Of ImsA";,
                         MessageBody;
-                     to the IMS_EATF entity
+                     to the IMS_LRF entity
+                }
+            }
+            
+    } // End of TP_ML_ECSCF_ECO_INVITE_01
+
+    Test Purpose {
+        
+        TP Id TP_MM_ECSCF_ECO_INVITE_01
+        /* Mm interface at E-CSCF/IM CN subsystem of own network */
+
+        Test objective  "Verify that the E-CSCF successfully processes an initial INVITE from the P-CSCF
+                         and routes the request to the PSAP in the IM CN subsystem of own network."
+        
+        Reference 
+            "ETSI TS 124 229 [1], Clauses 5.11.2"
+        
+        Config Id CF_VxLTE_INT
+        
+        PICS Selection NONE
+        
+        Initial conditions with {
+            the IMS_E_CSCF entity supportsRoutingTo the IM_CN
+        }
+        
+        Expected behaviour
+            ensure that {
+                when {
+                    the IMS_E_CSCF entity receives an INVITE containing
+                        From indicating value PX_UE_A_SIP_URI,
+                        To indicating value PX_SIP_EMERGENCY_SERVICE_URN,
+                        CallId indicating value PX_UE_A_CALLID,
+                        Via indicating value PX_P_CSCF_A_VIA,
+                        Route indicating value PX_E_CSCF_SERVICE_ROUTE, // 5.2.10.3 1B) option is assumed
+                        PAssertedIdentity,
+                        MessageBody;
+                    from the IMS_P_CSCF_A entity
+                }
+                then {
+                    the IMS_E_CSCF entity sends an INVITE containing
+                        From indicating value PX_UE_A_SIP_URI,
+                        To indicating value PX_SIP_EMERGENCY_SERVICE_URN,
+                        CallId indicating value PX_UE_A_CALLID,
+                        Via indicating value PX_E_CSCF_VIA,
+                        Route indicating value PX_PSAP_SERVICE_ROUTE_IM_CN,
+                        RecordRoute PX_E_CSCF_SERVICE_ROUTE,
+                        PChargingVector,
+                        MessageBody;
+                     to the IM_CN entity
+                }
+            }
+            
+    } // End of TP_MM_ECSCF_ECO_INVITE_01
+
+    Test Purpose {
+        
+        TP Id TP_MM_ECSCF_ECO_INVITE_02
+        /* Mm interface at E-CSCF/IM CN subsystem of own network */
+
+        Test objective  "Verify that the E-CSCF successfully processes an initial INVITE from the P-CSCF
+                         and routes the request to the PSAP in the IM CN subsystem of own network
+                         and includes the LRF provided URI in the Route header."
+        
+        Reference 
+            "ETSI TS 124 229 [1], Clauses 5.11.2 and 5.11.3"
+        
+        Config Id CF_VxLTE_INT
+        
+        PICS Selection NONE
+        
+        Initial conditions with {
+            the IMS_E_CSCF entity supportsRoutingTo the IMS_LRF and
+            the IMS_E_CSCF entity hasSentINVITETo the IMS_LRF and
+            the IMS_E_CSCF entity supportsRoutingTo the IM_CN
+        }
+        
+        Expected behaviour
+            ensure that {
+                when {
+                    the IMS_E_CSCF entity receives an r_3xx_Any containing
+                        Contact indicating value LRF_provided_SIP_URI;
+                    from the IMS_LRF entity
+                }
+                then {
+                    the IMS_E_CSCF entity sends an INVITE containing
+                        From indicating value PX_UE_A_SIP_URI,
+                        To indicating value PX_SIP_EMERGENCY_SERVICE_URN,
+                        CallId indicating value PX_UE_A_CALLID,
+                        Via indicating value PX_E_CSCF_VIA,
+                        Route indicating value LRF_provided_SIP_URI,
+                        RecordRoute PX_E_CSCF_SERVICE_ROUTE,
+                        PChargingVector,
+                        MessageBody;
+                     to the IM_CN entity
+                }
+            }
+            
+    } // End of TP_MM_ECSCF_ECO_INVITE_02
+
+    Test Purpose {
+        
+        TP Id TP_MX_ECSCF_ECO_INVITE_01
+        /* Mx interface at E-CSCF/IBCF */
+
+        Test objective  "Verify that the E-CSCF successfully processes an initial INVITE from the P-CSCF
+                         and routes the request to the IBCF for a PSAP in another network."
+        
+        Reference 
+            "ETSI TS 124 229 [1], Clauses 5.11.2"
+        
+        Config Id CF_VxLTE_INT
+        
+        PICS Selection NONE
+        
+        Initial conditions with {
+            the IMS_E_CSCF entity supportsRoutingTo the IMS_IBCF_A
+        }
+        
+        Expected behaviour
+            ensure that {
+                when {
+                    the IMS_E_CSCF entity receives an INVITE containing
+                        From indicating value PX_UE_A_SIP_URI,
+                        To indicating value PX_SIP_EMERGENCY_SERVICE_URN,
+                        CallId indicating value PX_UE_A_CALLID,
+                        Via indicating value PX_P_CSCF_A_VIA,
+                        Route indicating value PX_E_CSCF_SERVICE_ROUTE, // 5.2.10.3 1B) option is assumed
+                        PAssertedIdentity,
+                        MessageBody;
+                    from the IMS_P_CSCF_A entity
+                }
+                then {
+                    the IMS_E_CSCF entity sends an INVITE containing
+                        From indicating value PX_UE_A_SIP_URI,
+                        To indicating value PX_SIP_EMERGENCY_SERVICE_URN,
+                        CallId indicating value PX_UE_A_CALLID,
+                        Via indicating value PX_E_CSCF_VIA,
+                        Route indicating value PX_IBCF_A_SERVICE_ROUTE,
+                        Route indicating value PX_PSAP_SERVICE_ROUTE_IBCF,
+                        RecordRoute PX_E_CSCF_SERVICE_ROUTE,
+                        PChargingVector containing
+                           not term_ioi_parameter,
+                           orig_ioi_parameter
+                               indicating value "Operator Identifier Of ImsA";,
+                        MessageBody;
+                     to the IMS_IBCF_A entity
+                }
+            }
+            
+    } // End of TP_MX_ECSCF_ECO_INVITE_01
+
+    Test Purpose {
+        
+        TP Id TP_MX_ECSCF_ECO_INVITE_02
+        /* Mx interface at E-CSCF/IBCF */
+
+        Test objective  "Verify that the E-CSCF successfully processes an initial INVITE from the P-CSCF
+                         and routes the request to the IBCF for a PSAP in another network
+                         and includes the LRF provided URI in the Route header."
+        
+        Reference 
+            "ETSI TS 124 229 [1], Clauses 5.11.2"
+        
+        Config Id CF_VxLTE_INT
+        
+        PICS Selection NONE
+        
+        Initial conditions with {
+            the IMS_E_CSCF entity supportsRoutingTo the IMS_LRF and
+            the IMS_E_CSCF entity hasSentINVITETo the IMS_LRF and
+            the IMS_E_CSCF entity supportsRoutingTo the IMS_IBCF_A
+        }
+        
+        Expected behaviour
+            ensure that {
+                when {
+                    the IMS_E_CSCF entity receives an r_3xx_Any containing
+                        Contact indicating value LRF_provided_SIP_URI;
+                    from the IMS_LRF entity
+                }
+                then {
+                    the IMS_E_CSCF entity sends an INVITE containing
+                        From indicating value PX_UE_A_SIP_URI,
+                        To indicating value PX_SIP_EMERGENCY_SERVICE_URN,
+                        CallId indicating value PX_UE_A_CALLID,
+                        Via indicating value PX_E_CSCF_VIA,
+                        Route indicating value PX_IBCF_A_SERVICE_ROUTE,
+                        Route indicating value LRF_provided_SIP_URI,
+                        RecordRoute PX_E_CSCF_SERVICE_ROUTE,
+                        PChargingVector containing
+                           not term_ioi_parameter,
+                           orig_ioi_parameter
+                               indicating value "Operator Identifier Of ImsA";,
+                        MessageBody;
+                     to the IMS_IBCF_A entity
+                }
+            }
+            
+    } // End of TP_MX_ECSCF_ECO_INVITE_02
+
+    Test Purpose {
+        
+        TP Id TP_MI_ECSCF_ECO_INVITE_01
+        /* Mx interface at E-CSCF/BGCF */
+
+        Test objective  "Verify that the E-CSCF successfully processes an initial INVITE from the P-CSCF
+                         and routes the request to the BGCF for a PSAP in the PSTN."
+        
+        Reference 
+            "ETSI TS 124 229 [1], Clauses 5.11.2"
+        
+        Config Id CF_VxLTE_INT
+        
+        PICS Selection NONE
+        
+        Initial conditions with {
+            the IMS_E_CSCF entity supportsRoutingTo the BGCF
+        }
+        
+        Expected behaviour
+            ensure that {
+                when {
+                    the IMS_E_CSCF entity receives an INVITE containing
+                        From indicating value PX_UE_A_SIP_URI,
+                        To indicating value PX_SIP_EMERGENCY_SERVICE_URN,
+                        CallId indicating value PX_UE_A_CALLID,
+                        Via indicating value PX_P_CSCF_A_VIA,
+                        Route indicating value PX_E_CSCF_SERVICE_ROUTE, // 5.2.10.3 1B) option is assumed
+                        PAssertedIdentity,
+                        MessageBody;
+                    from the IMS_P_CSCF_A entity
+                }
+                then {
+                    the IMS_E_CSCF entity sends an INVITE containing
+                        RequestLine indicating value PX_PSAP_TEL_URI, // see 5.11.2 6) b)
+                        From indicating value PX_UE_A_SIP_URI,
+                        To indicating value PX_SIP_EMERGENCY_SERVICE_URN,
+                        CallId indicating value PX_UE_A_CALLID,
+                        Via indicating value PX_E_CSCF_VIA,
+                        Route indicating value PX_BGCF_SERVICE_ROUTE,
+                        RecordRoute PX_E_CSCF_SERVICE_ROUTE,
+                        PChargingVector containing
+                           not term_ioi_parameter,
+                           orig_ioi_parameter
+                               indicating value "Operator Identifier Of ImsA";,
+                        MessageBody;
+                     to the IMS_IBCF_A entity
                 }
             }
             
     } // End of TP_MI_ECSCF_ECO_INVITE_01
 
+    Test Purpose {
+        
+        TP Id TP_MI_ECSCF_ECO_INVITE_02
+        /* Mx interface at E-CSCF/BGCF */
+
+        Test objective  "Verify that the E-CSCF successfully processes an initial INVITE from the P-CSCF
+                         and routes the request to the BGCF for a PSAP in the PSTN
+                         and includes the LRF provided URI in the Request-URI."
+        
+        Reference 
+            "ETSI TS 124 229 [1], Clauses 5.11.2"
+        
+        Config Id CF_VxLTE_INT
+        
+        PICS Selection NONE
+        
+        Initial conditions with {
+            the IMS_E_CSCF entity supportsRoutingTo the IMS_LRF and
+            the IMS_E_CSCF entity hasSentINVITETo the IMS_LRF and
+            the IMS_E_CSCF entity supportsRoutingTo the BGCF
+        }
+        
+        Expected behaviour
+            ensure that {
+                when {
+                    the IMS_E_CSCF entity receives an r_3xx_Any containing
+                        Contact indicating value LRF_provided_SIP_URI;
+                    from the IMS_LRF entity
+                }
+                then {
+                    the IMS_E_CSCF entity sends an INVITE containing
+                        RequestLine indicating value LRF_provided_SIP_URI, // see 5.11.3 2) b)
+                        From indicating value PX_UE_A_SIP_URI,
+                        To indicating value PX_SIP_EMERGENCY_SERVICE_URN,
+                        CallId indicating value PX_UE_A_CALLID,
+                        Via indicating value PX_E_CSCF_VIA,
+                        Route indicating value PX_BGCF_SERVICE_ROUTE,
+                        RecordRoute PX_E_CSCF_SERVICE_ROUTE,
+                        PChargingVector containing
+                           not term_ioi_parameter,
+                           orig_ioi_parameter
+                               indicating value "Operator Identifier Of ImsA";,
+                        MessageBody;
+                     to the IMS_IBCF_A entity
+                }
+            }
+            
+    } // End of TP_MI_ECSCF_ECO_INVITE_02
 
-} // End of Package TP_MW_PS
+} // End of Package TP_E_CSCF
 
diff --git a/test_purposes/Sip_Common.tplan2 b/test_purposes/Sip_Common.tplan2
index 8653c3f..63ab6e5 100644
--- a/test_purposes/Sip_Common.tplan2
+++ b/test_purposes/Sip_Common.tplan2
@@ -42,6 +42,7 @@ Package Sip_Common {
             - EPC_MME_A
             - EPC_MME_B
             - IMS_EATF
+            - IMS_LRF
             - IMS_E_CSCF
             - IMS_P_CSCF_A
             - IMS_I_CSCF_A
@@ -54,6 +55,8 @@ Package Sip_Common {
             - IMS_S_CSCF_B
             - IMS_IBCF_B
             - IMS_HSS_B
+            - IM_CN // IM CN subsystem of own network
+            - BGCF
         ;
         events:
             - receives
@@ -97,7 +100,8 @@ Package Sip_Common {
             - hasResponded486INVITE
             - hasAchievedInitialINVITE
             - hasAchievedINVITE
-            - supportRoutingTo
+            - hasSentINVITETo
+            - supportsRoutingTo
         ;
     } // End of Domain section
 
@@ -146,6 +150,7 @@ Package Sip_Common {
         SipMessage r_180_Ringing;
         SipMessage r_200_Ok;
         SipMessage r_2xx_Any;
+        SipMessage r_3xx_Any;
         SipMessage r_401_Unauthorized;
         SipMessage r_403_Forbidden;
         SipMessage r_404_NotFound;
-- 
GitLab