Commit fc107aeb authored by Bostjan Pintar's avatar Bostjan Pintar
Browse files

New TC_ISC_SCCAS_SRA_INV_02

parent 72ed8875
Loading
Loading
Loading
Loading
+242 −0
Original line number Diff line number Diff line
@@ -2713,6 +2713,75 @@ module AtsSccas_TCFunctions {
             */
            function f_TC_ISC_SCCAS_SRA_INV_02(in CSeq p_cSeq_s)
            runs on ImsComponent {
                // Local variables
                var CSeq v_cSeq_s := p_cSeq_s;

                // Preamble
                f_registrationAS(v_cSeq_s);
                
                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync

                // Registration
                f_IncCSeq(v_cSeq_s); LibIms_Steps.f_setHeadersINVITE(v_cSeq_s, f_initSipUrl(c_serviceProfile_EMERGENCY), f_initSipUrl(c_userProfile_UE1atSUThome));
                f_SendINVITE(
                             m_sccas_invite_targetDialog(
                                            vc_requestUri,
                                            vc_callId, 
                                            p_cSeq_s, 
                                            vc_from, vc_to, vc_via_REG, 
                                            vc_contact,
                                            -, -, -,
                                            m_MBody_SDP(vc_sdp_local),
                                            -,
                                            -
                                            ));
              
                tc_ack.start;
                alt {
                    [] SIPP.receive(mw_Response_1xx_Base(vc_callId, vc_cSeq)) {
                        repeat
                    }
                    [] SIPP.receive(mw_INVITE_Request_AS(?, ?, ?, ?, *, *)) {
                        tc_ack.stop;
                        log("*** " & __SCOPE__ & ": PASS: INVITE message was received ***");
                        //f_selfOrClientSyncAndVerdict(c_tbDone, e_success); // sync
                        f_sendResponse(m_Response_2xx_mbody(
                                            c_statusLine200,
                                            vc_callId, 
                                            p_cSeq_s, 
                                            vc_from, 
                                            vc_to, 
                                            vc_via_REG,
                                            -,
                                            -,
                                            m_MBody_SDP(vc_sdp_remote)
                                            ));
                    }
                    [] tc_ack.timeout {
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_error); // sync 
                    }
                }
                //var template FcValue fc:= mw_fcValue("g3gppFeatureCapabilityIndicator",-);
                tc_wait.start;
                alt {
                    [] SIPP.receive(mw_Response_StatusCode_Base(
                                        200,
                                        ?,
                                        ?
                                   )) {
                        tc_wait.stop;
                        log("*** " & __SCOPE__ & ": PASS: response 200 was received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success); // sync
                    }
                    [] tc_wait.timeout {
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_error); // sync 
                    }
                }

                // Postamble
                f_deregistrationAS(v_cSeq_s);
                
                f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync
            	
            } // End of function f_TC_ISC_SCCAS_SRA_INV_02
        
@@ -2722,6 +2791,75 @@ module AtsSccas_TCFunctions {
             */
            function f_TC_ISC_SCCAS_SRA_INV_03(in CSeq p_cSeq_s)
            runs on ImsComponent {
                // Local variables
                var CSeq v_cSeq_s := p_cSeq_s;

                // Preamble
                f_registrationAS(v_cSeq_s);
                
                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync

                // Registration
                f_IncCSeq(v_cSeq_s); LibIms_Steps.f_setHeadersINVITE(v_cSeq_s, f_initSipUrl(c_serviceProfile_EMERGENCY), f_initSipUrl(c_userProfile_UE1atSUThome));
                f_SendINVITE(
                             m_sccas_invite_targetDialog(
                                            vc_requestUri,
                                            vc_callId, 
                                            p_cSeq_s, 
                                            vc_from, vc_to, vc_via_REG, 
                                            vc_contact,
                                            -, -, -,
                                            m_MBody_SDP(vc_sdp_local),
                                            -,
                                            -
                                            ));
              
                tc_ack.start;
                alt {
                    [] SIPP.receive(mw_Response_1xx_Base(vc_callId, vc_cSeq)) {
                        repeat
                    }
                    [] SIPP.receive(mw_INVITE_Request_AS(?, ?, ?, ?, *, *)) {
                        tc_ack.stop;
                        log("*** " & __SCOPE__ & ": PASS: INVITE message was received ***");
                        //f_selfOrClientSyncAndVerdict(c_tbDone, e_success); // sync
                        f_sendResponse(m_Response_2xx_mbody(
                                            c_statusLine200,
                                            vc_callId, 
                                            p_cSeq_s, 
                                            vc_from, 
                                            vc_to, 
                                            vc_via_REG,
                                            -,
                                            -,
                                            m_MBody_SDP(vc_sdp_remote)
                                            ));
                    }
                    [] tc_ack.timeout {
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_error); // sync 
                    }
                }
                //var template FcValue fc:= mw_fcValue("g3gppFeatureCapabilityIndicator",-);
                tc_wait.start;
                alt {
                    [] SIPP.receive(mw_Response_StatusCode_Base(
                                        200,
                                        ?,
                                        ?
                                   )) {
                        tc_wait.stop;
                        log("*** " & __SCOPE__ & ": PASS: response 200 was received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success); // sync
                    }
                    [] tc_wait.timeout {
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_error); // sync 
                    }
                }

                // Postamble
                f_deregistrationAS(v_cSeq_s);
                
                f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync
                
            } // End of function f_TC_ISC_SCCAS_SRA_INV_03
        
@@ -2731,6 +2869,91 @@ module AtsSccas_TCFunctions {
             */
            function f_TC_ISC_SCCAS_SRA_INV_04(in CSeq p_cSeq_s)
            runs on ImsComponent {
                        // Local variables
                        var CSeq v_cSeq_s := p_cSeq_s;
                
                        f_registrationAS(v_cSeq_s);
                        f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync

            
                        f_EstablishDialogAS(v_cSeq_s);

                        //reINVITE
                        f_IncCSeq(v_cSeq_s);
                        f_setHeaders_INVITE_AS(v_cSeq_s, f_initSipUrl(c_userProfile_PCSCFwithHomeUE), f_initSipUrl(c_userProfile_SCSCFwithHomeUE));
                        f_SendINVITE(
                                     m_sccas_invite_reason(
                                                    vc_requestUri,
                                                    vc_callId, 
                                                    p_cSeq_s, 
                                                    vc_from, vc_to, vc_via_REG, 
                                                    vc_contact,
                                                    -, -, -,
                                                    m_MBody_SDP(vc_sdp_local),
                                                    m_Reason(487)
                                                    ));
                                  
                        tc_ack.start;
                        alt {
                            [] SIPP.receive(mw_BYE_Request_Base(vc_callId)) {
                                log("*** " & __SCOPE__ & ": FAIL: BYE message was received ***");
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_error); // sync
                            }
                            [] SIPP.receive(mw_Response_1xx_Base(vc_callId, vc_cSeq)) {
                                repeat
                            }
                            [] SIPP.receive(mw_INVITE_Request_AS(?, ?, ?, ?, *, *)) {
                                tc_ack.stop;
                                log("*** " & __SCOPE__ & ": PASS: INVITE message was received ***");

//                                f_sendResponse(
//                                m_Response_18XonINVITE_AS_Featurecaps(
//                                                    c_statusLine183,
//                                                    vc_callId, 
//                                                    p_cSeq_s, 
//                                                    vc_from, 
//                                                    vc_to, 
//                                                    vc_via_REG,
//                                                    -,
//                                                    -
//                                                    ));
                                f_sendResponse(
                                     m_Response_2xx_Base(
                                                    c_statusLine200,
                                                    vc_callId, 
                                                    p_cSeq_s, 
                                                    vc_from, 
                                                    vc_to, 
                                                    vc_via_REG
                                                    ));
                            }
                            [] tc_ack.timeout {
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_error); // sync 
                            }
                        }
                        //var template FcValue fc:= mw_fcValue("g3gppFeatureCapabilityIndicator",-);
                        tc_wait.start;
                        alt {
                            [] SIPP.receive(mw_BYE_Request_Base(vc_callId)) {
                                log("*** " & __SCOPE__ & ": FAIL: BYE message was received ***");
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_error); // sync
                            }
                            [] SIPP.receive(mw_Response_StatusCode_Base(
                                                200,
                                                ?,
                                                ?)) {
                                tc_wait.stop;
                                log("*** " & __SCOPE__ & ": PASS: response 200 OK was received ***");
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_success); // sync
                            }
                            [] tc_wait.timeout {
                                f_selfOrClientSyncAndVerdict(c_tbDone, e_error); // sync 
                            }
                        }                
                
                        f_ReleaseDialogAS(v_cSeq_s);
                        f_deregistrationAS(v_cSeq_s);
                        f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync
                
            } // End of function f_TC_ISC_SCCAS_SRA_INV_04
        
@@ -2740,6 +2963,25 @@ module AtsSccas_TCFunctions {
             */
            function f_TC_ISC_SCCAS_SRA_BYE_01(in CSeq p_cSeq_s)
            runs on ImsComponent {
                        // Local variables
                        var CSeq v_cSeq_s := p_cSeq_s;
                
                        f_registrationAS(v_cSeq_s);
                        f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync

            
                        f_EstablishDialogAS(v_cSeq_s);
                        
                        //Send BYE with reason 503
                        
                        //?? send INVITE
                        
                        //?? do not receive BYE


                        f_deregistrationAS(v_cSeq_s);
                        f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync
                
                
            } // End of function f_TC_ISC_SCCAS_SRA_BYE_01
        
+22 −0
Original line number Diff line number Diff line
@@ -349,6 +349,28 @@ module AtsSccas_Templates
                    messageBody := p_mb
                }
               
                template (omit) INVITE_Request m_sccas_invite_reason(
                                                              in template (value) SipUrl p_requestUri,
                                                              in template (value) CallId p_callId,
                                                              in template (value) CSeq p_cSeq,
                                                              in template (value) From p_from,
                                                              in template (value) To p_to,
                                                              in template (value) LibSip_SIPTypesAndValues.Via p_via,
                                                              in template (value) LibSip_SIPTypesAndValues.Contact p_contact,
                                                              in template (omit) Require p_require := m_require({"tdialog"}),
                                                              in template (omit) Route p_route := omit,
                                                              in template (omit) Supported p_supported := omit,
                                                              in template (value) MessageBody p_mb,
                                                              in template (value) Reason p_reason := m_Reason(487)
                ) modifies m_INVITE_Request_UE := {
                    msgHeader := {
                        contentLength := m_contentLength(f_MessageBodyLength(p_mb)),
                        contentType := m_contentType(c_sdpApplication),
                        reason := p_reason
                    },
                    messageBody := p_mb
                }
                
                
                }