From 1d6d88532cc2bf46eecdf0b6a4dadabc2403a874 Mon Sep 17 00:00:00 2001
From: Schmitting <peter.schmitting@fscom.fr>
Date: Tue, 17 Jan 2023 16:10:54 +0100
Subject: [PATCH] eCall test added to Gm

---
 test_purposes/Gm/TP_GM.tplan2   | 43 ++++++++++++++++++++++++++++++++-
 test_purposes/Sip_Common.tplan2 |  2 ++
 2 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/test_purposes/Gm/TP_GM.tplan2 b/test_purposes/Gm/TP_GM.tplan2
index c4c2e30..e38e0e6 100644
--- a/test_purposes/Gm/TP_GM.tplan2
+++ b/test_purposes/Gm/TP_GM.tplan2
@@ -169,7 +169,7 @@ Package TP_GM {
                         Via indicating value PX_UE_A_VIA,
                         Route indicating value PX_UE_A_SERVICE_ROUTE,
                         PPreferredIdentity, // one or two instances
-                        // TODO Geolocation header amybe added later, check!
+                        // TODO Geolocation header maybe added later, check!
                         MessageBody;
                     from the UE_A entity
                 }
@@ -217,5 +217,46 @@ Package TP_GM {
             }
     } // End of TP_GM_PCSCF_ECO_INVITE_03
 
+    Test Purpose {
+        
+        TP Id TP_GM_PCSCF_ECO_INVITE_04
+        
+        Test objective  "Verify that the P-CSCF successfully receives an initial eCall type INVITE from an emergency registered UE."
+        
+        Reference 
+            "ETSI TS 124 229 [1], Clauses 5.1.6.11"
+        
+        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
+         }
+        
+        Expected behaviour
+            ensure that {
+                when {
+                    the UE_A entity isRequestedToEstablisheCallTypeEmergencyCall
+                }
+                then {
+                    the IMS_P_CSCF_A entity receives an INVITE containing
+                        From indicating value PX_UE_A_SIP_URI,
+                        To indicating value PX_SIP_ECALL_EMERGENCY_SERVICE_URN, // "urn:service:sos.ecall.manual" or "urn:service:sos.ecall.automatic"
+                        CallId indicating value PX_UE_A_CALLID,
+                        Via indicating value PX_UE_A_VIA,
+                        Route indicating value PX_UE_A_SERVICE_ROUTE,
+                        Accept indicating value "application/EmergencyCallData.Control+xml",
+                        RecvInfo indicating value "EmergencyCallData.eCall.MSD",
+                        PPreferredIdentity, // one or two instances
+                        // TODO Geolocation header maybe added later, check!
+                        MessageBody containing
+                           MIME containing MSD;;; // MIME may contain additional parts e.g., sdp, xml
+                    from the UE_A entity
+                }
+            }
+    } // End of TP_GM_PCSCF_ECO_INVITE_04
+
 } // End of Package TP_GM
 
diff --git a/test_purposes/Sip_Common.tplan2 b/test_purposes/Sip_Common.tplan2
index 054962c..a0846ff 100644
--- a/test_purposes/Sip_Common.tplan2
+++ b/test_purposes/Sip_Common.tplan2
@@ -63,6 +63,7 @@ Package Sip_Common {
             - isNotRegisteredTo
             - hasAchievedFirstRegistration
             - isRegisteredTo
+            - isEmergencyRegisteredTo
             - isNotAttachedTo
             - isAttachedTo
             - isEmergencyAttachedTo
@@ -83,6 +84,7 @@ Package Sip_Common {
             - hasReceivedSubsequentOrTargetRefreshRequestInDialog
             - previouslyEstablishedCallWith
             - isRequestedToSend
+            - isRequestedToEstablishEmergencyCall
             - isRequestedToDeregisterUser
             - isBusy
             - isNoLongerAvailable
-- 
GitLab