Commit b9c525a6 authored by filatov's avatar filatov
Browse files

Release v3.1.1

parents
Loading
Loading
Loading
Loading
+406 −0
Original line number Diff line number Diff line
module IMS_SS_Functions {
    
    import from SS_Ims_PIXITS all;

    import from LibSip_SDPTypes all;

    import from LibSip_Steps all;

    import from LibSip_Templates all;

    import from LibIms_Templates all;

    import from LibIms_SIPTypesAndValues all;

    import from LibIms_Interface all;

    import from LibIms_Steps all;

    import from LibSip_SIPTypesAndValues all;

    group interfaceInitiation {
        
        function f_init_gm_ue(CSeq p_CSeq) runs on ImsComponent {
            var template REGISTER_Request v_register :=
             valueof(m_REGISTER_Request_Base(vc_requestUri, vc_callId,
            		p_CSeq, vc_from, vc_to,
                     vc_via_REG, vc_contact,
                     vc_authorization));
            f_IMS_preamble_withRegistration(c_userProfile_UE1atSUThome, p_CSeq,v_register);
        }
     	
     	function f_init_gm_pcscf(CSeq p_CSeq) runs on ImsComponent {
            f_IMS_preamble_woRegistration(c_userProfile_PCSCFwithHomeUE, p_CSeq);
     	}
     	
        function f_init_mw_pcscf(CSeq p_CSeq) runs on ImsComponent {
            f_IMS_preamble_woRegistration(c_userProfile_PCSCFwithHomeUE, p_CSeq);
        }
     	
     	function f_init_ics_scscf(CSeq p_CSeq) runs on ImsComponent {
            f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_AS);
            vc_interface_isc := true; //isc interface is used - used to handle procedure for wrong invite,...
            f_IMS_preamble_woRegistration(c_userProfile_SCSCFwithHomeUE_domain, p_CSeq);
     	}
     	
        function f_init_ics_as(CSeq p_CSeq) runs on ImsComponent {
            f_IMS_preamble_woRegistration(c_userProfile_AS1, p_CSeq);
        }
     	
    }
    
    group preabmels {
    	
    	function f_gm_pcscf_preamble(CSeq p_CSeq) runs on ImsComponent {
            if(PX_UE_REGISTRATION) {
                f_gm_pcscf_registration(p_CSeq);
    			if(PX_UE_REG_EVENT_SUBSCRIPTION) {
                    f_gm_pcscf_reg_event_subscription(p_CSeq);
    			}
    			if(PX_UE_REG_EVENT_NOTIFICATION) {
                	f_gm_pcscf_reg_event_notification(p_CSeq);
            	}
            }
    	}   
    }//end group preabmels
        
    group postambles{
    
            function f_isc_postamble_after_INVITE() runs on ImsComponent {
                //      clear session to send 486 and await ACK
                f_sendResponse(m_Response_Base(
                    c_statusLine486, 
                    vc_callId,
                    vc_cSeq, 
                    vc_caller_From,
                    vc_caller_To, 
                    vc_via
                ));
                f_awaitingACK(mw_ACK_Request_Base(?));
        
                //await 486 which go towards and send ACK        
                f_awaitingResponse(mw_Response_Base(c_statusLine486,?,?));
                f_SendACK(m_ACK_Request_Base(vc_requestUri,vc_callId,vc_cSeq,vc_from,vc_to,vc_via));
            }
    
    }//end group postambles
    
    group messageFunctions {
        
        function f_getInvite(template INVITE_Request p_request) runs on ImsComponent {
            action("Please send INVITE request");
            
            f_awaitingINVITE(p_request);
        }
        
        function f_getUpdate(template UPDATE_Request p_request) runs on ImsComponent {
            action("Please send UPDATE request");
            
            f_awaitingUPDATE(p_request);
        }
        
        function f_getSubscribe(template SUBSCRIBE_Request p_request) runs on ImsComponent {
            action("Please send SUBSCRIBE request");
            
            f_awaitingUPDATE(p_request);
        }
    }//end group messageFunctions
    
    group imsSteps {
    
        function f_gm_pcscf_registration(CSeq p_CSeq) runs on ImsComponent {
            action("Please register your UE");
            f_awaitingRegistration_IMS_gm(p_CSeq);
            activate(a_clearRegistration_IMSuser())
        }
        
//        function f_gm_pcscf_reg_event(CSeq p_CSeq) runs on ImsComponent {
//            var template SipUrl v_sipUrl_From, v_sipUrl_To, v_sipUrlRegInfo;
//            var charstring v_anyUri;
//            
//            action("Please subscribe to Reg-Event"); 
//            
//            // preparation of from and to headers
//            v_sipUrl_From := f_initSipUrl(c_userProfile_UE1atSUThome);
//            v_sipUrl_From.userInfo := *;
//            v_sipUrl_To := f_initSipUrl(c_userProfile_UE1atSUThome);
//            v_sipUrl_To.userInfo := *;
//            
//            v_sipUrlRegInfo:= f_initSipUrl(c_userProfile_UE1atSUThome);
//            v_anyUri := v_sipUrlRegInfo.scheme & ":" & v_sipUrlRegInfo.userInfo.userOrTelephoneSubscriber & "@" & v_sipUrlRegInfo.hostPort.host;
//    
//            f_awaitingSUBSCRIBE(mw_SUBSCRIBE_Request_IMS(
//                mw_From(v_sipUrl_From), 
//                mw_To(v_sipUrl_To),
//                *,
//                *
//            ));
//    
//            f_sendResponse(m_Response_2xxonSUBSCRIBE_IMS(
//                c_statusLine200,
//                vc_callId, vc_cSeq,
//                vc_caller_From,
//                vc_caller_To, 
//                vc_via,
//                vc_contact
//            ));
//    
//            LibIms_Steps.f_setHeadersNOTIFY(
//                p_CSeq, 
//                c_userProfile_PCSCFwithHomeUE
//            );
//    
//            f_SendNOTIFY(m_NOTIFY_Request_Xml_IMS_RegInfo(
//                f_getReqContactURI(vc_request), 
//                vc_callId,
//                vc_cSeq, 
//                vc_callee_From,
//                vc_callee_To, vc_via,
//                vc_contact,
//                m_messageBodyXML(m_XmlBody_Reginfo(m_reginfo(v_anyUri)))
//            ));
//    
//            f_awaitingOkResponse(p_CSeq);   
//        }                
        
        function f_gm_pcscf_reg_event_subscription(CSeq p_CSeq) runs on ImsComponent {
            var template SipUrl v_sipUrl_From, v_sipUrl_To;
            
            action("Please subscribe to Reg-Event"); 
            
            // preparation of from and to headers
            v_sipUrl_From := f_initSipUrl(c_userProfile_UE1atSUThome);
            v_sipUrl_From.userInfo := *;
            v_sipUrl_To := f_initSipUrl(c_userProfile_UE1atSUThome);
            v_sipUrl_To.userInfo := *;
    
            f_awaitingSUBSCRIBE(mw_SUBSCRIBE_Request_IMS(
                mw_From(v_sipUrl_From), 
                mw_To(v_sipUrl_To),
                *,
                *
            ));
    
            f_sendResponse(m_Response_2xxonSUBSCRIBE_IMS(
                c_statusLine200,
                vc_callId, vc_cSeq,
                vc_caller_From,
                vc_caller_To, 
                vc_via,
                vc_contact
            ));  
        }
        
        function f_gm_pcscf_reg_event_notification(CSeq p_CSeq) runs on ImsComponent {
            var template SipUrl v_sipUrlRegInfo;
            var charstring v_anyUri;

            v_sipUrlRegInfo:= f_initSipUrl(c_userProfile_UE1atSUThome);
            v_anyUri := v_sipUrlRegInfo.scheme & ":" & v_sipUrlRegInfo.userInfo.userOrTelephoneSubscriber & "@" & v_sipUrlRegInfo.hostPort.host;
            log(v_anyUri);
            
            LibIms_Steps.f_setHeadersNOTIFY(
                p_CSeq, 
                c_userProfile_PCSCFwithHomeUE
            );
            
            f_SendNOTIFY(m_NOTIFY_Request_Xml_IMS_RegInfo(
                f_getReqContactURI(vc_request), 
                vc_callId,
                vc_cSeq, 
                vc_callee_From,
                vc_callee_To, vc_via,
                vc_contact,
                m_messageBodyXML(m_XmlBody_Reginfo(m_reginfo(v_anyUri)))
            ));  
    
            f_awaitingOkResponse(p_CSeq);  
           
        }
        
        function f_gm_pcscf_subscribe_conf(CSeq p_CSeq) runs on ImsComponent {
            var template SipUrl v_sipUrl_From, v_sipUrl_To;
            
            action("Please subscribe to conference"); 
            
            // preparation of from and to headers
            v_sipUrl_From := f_initSipUrl(c_userProfile_UE1atSUThome);
            v_sipUrl_From.userInfo := *;
            v_sipUrl_To := f_initSipUrl(c_conferenceProfile_factoryURI);
            v_sipUrl_To.userInfo := *;
    
            f_awaitingSUBSCRIBE(mw_SUBSCRIBE_Request_IMS(
                mw_From(v_sipUrl_From), 
                mw_To(v_sipUrl_To),
                *,
                *
            ));
    
            f_sendResponse(m_Response_2xxonSUBSCRIBE_IMS(
                c_statusLine200,
                vc_callId, vc_cSeq,
                vc_caller_From,
                vc_caller_To, 
                vc_via,
                vc_contact
            ));
    
            LibIms_Steps.f_setHeadersNOTIFY(
                p_CSeq, 
                c_userProfile_PCSCFwithHomeUE
            );
    
            f_SendNOTIFY(m_NOTIFY_Request_contact(
                f_getReqContactURI(vc_request), 
                vc_callId,
                vc_cSeq, 
                vc_callee_From,
                vc_callee_To, vc_via,
                vc_contact // TODO may XML message body must be added
            ));
    
            f_awaitingOkResponse(p_CSeq);   
        }

        function f_acceptCall(template SDP_attribute p_direction) runs on ImsComponent {
        	// wait for INVITE
        	f_getInvite(mw_INVITE_Request_MB(?, ?));
        	
            f_SIP_checkMediaDirection(0, p_direction);
            
            // send 200 OK
            f_sendResponse(m_Response_2xxonINVITE_UE(
            	c_statusLine200,
            	vc_callId,
            	vc_cSeq,
            	vc_caller_From,
            	vc_caller_To,
            	vc_via,
            	vc_contact,
            	f_route(),
            	valueof(m_MBody_SDP(vc_sdp_local))
        	));    
           
           // wait for ACK
           f_awaitingACK(mw_ACK_Request_Base(vc_callId));
           //vc_ignore_invite := false;
        }
    }//end group imsSteps
    
    group helperFunctions {
        function f_getReqContactURI(Request p_request) return SipUrl {
            return p_request.msgHeader.contact.contactBody.contactAddresses[0].
                addressField.nameAddr.addrSpec;
        }
    }//end group helperFunctions
    
	
	
    group sessionFunctions {
	
        group sessionTypes {
            
            type record DialogRecords {
                SessionDialog session1 optional,
                SessionDialog session2 optional
            }
            
            type record SessionDialog {
                CallId callId optional,
                From calleeFrom optional,
                To calleeTo optional,
                From callerFrom optional, 
                To callerTo optional,
                CSeq cSeq optional, 
                SipUrl remoteURI optional,
                HostPort remoteTarget optional,
                Route route optional,
                RecordRoute recordRoute optional,
                Via	via optional,
                Contact contact optional,
                SipUserProfile profile optional
            }
        }
        
        template SessionDialog m_sessionEmpty :={
                callId := omit,
                calleeFrom := omit,
                calleeTo := omit,
                callerFrom := omit, 
                callerTo := omit,
                cSeq := omit, 
                remoteURI := omit,
                remoteTarget := omit,
                route := omit,
                recordRoute := omit,
                via := omit,
                contact := omit,
            	profile := omit
            }
    	
        group sessionModification {
    		
            /**
             * @desc This function saves the current dialog infomation
             * @return Dialog infomation
             */
            function f_saveSession() runs on ImsComponent return SessionDialog {
                var SessionDialog v_dialog := {
                    callId := vc_callId,
                    calleeFrom := vc_caller_From,
                    calleeTo := vc_caller_To,
                    callerFrom := vc_caller_From, 
                    callerTo := vc_caller_To, 
                    cSeq := vc_cSeq,
                    remoteURI := vc_requestUri,
                    remoteTarget := vc_reqHostPort,
                    route := valueof(vc_route),
                    recordRoute := valueof(vc_recordRoute),
                    via := vc_via,
                    contact := vc_contact,
                    profile := vc_userprofile
                }
    			
                return v_dialog;
            }
            
            /**
             * @desc This function saves two dialog sessions infomation
             * @return Dialog infomation
             */
            function f_saveDialogRecords(in SessionDialog p_dialog1,in SessionDialog p_dialog2) runs on ImsComponent return DialogRecords {
                var DialogRecords v_dialogRecords :={
                    session1 := p_dialog1,
                    session2 := p_dialog2
                }
                return v_dialogRecords;
            }           
            
            
            /**
             * @desc This function loads a given dialog parameters (previously stored)
             * @param p_dialog dialog parameters
             */
            function f_loadSession(in SessionDialog p_dialog) runs on ImsComponent {
                vc_callId := p_dialog.callId;
                vc_from := p_dialog.calleeFrom;
                vc_to := p_dialog.calleeTo;
                vc_caller_From:= p_dialog.callerFrom;
                vc_caller_To:= p_dialog.callerTo;
                vc_callee_From:= p_dialog.calleeFrom;
                vc_callee_To:= p_dialog.calleeTo; 
                vc_cSeq := p_dialog.cSeq;
                vc_requestUri := p_dialog.remoteURI;
                vc_reqHostPort := p_dialog.remoteTarget;
                vc_route := p_dialog.route;
                vc_recordRoute := p_dialog.recordRoute;
                vc_via := p_dialog.via;
                vc_contact := p_dialog.contact;
                vc_userprofile := p_dialog.profile;
            }
        }
    }
    
    
}
 No newline at end of file
+0 −0

File added.

Preview size limit exceeded, changes collapsed.

+189 −0
Original line number Diff line number Diff line
/*
 *	@author 	STF 366
 *  @version    $Id$
 *	@desc		This module contains the PIXIT parameters 
 */

module SS_Ims_PIXITS {

	import from LibCommon_BasicTypesAndValues all;
	import from LibCommon_DataStrings all;
	
	import from LibSip_SIPTypesAndValues all;

    import from http_uri_etsi_org_ngn_params_xml_simservs_xcap language "XSD" all
    with {
        extension "File:../xsd/SupplementaryServices.xsd"
    }
	

	/*
	** @remark	Reference: XXX
	** @desc	What is the local receive policy for SIP?
	*			Value of PX_LOCAL_POLICY
	*			1: receive no cause due to local policy, 2: receive cause #31 due to local policy
	*/


	/** @desc	integer for testcase variant according to table entry in table to test purpose description, if present
	*/
 	modulepar integer PX_TC_VA:=1;	
	
	/** @desc	float default timer value for PX_Timeout_MCID_BYE (0 - 120s)
    */
	modulepar float	PX_Timeout_MCID_BYE := 100.0;
	
	/** @desc	float default timer value for PX_Timeout_MCID_O_ID (4 - 10s)
				*/
	modulepar float	PX_Timeout_MCID_O_ID := 10.0;
	
    /** @desc	float default timer value for PX_Timeout_CW_AS_CW)
                */
    modulepar float	PX_Timeout_CW_AS_CW := 40.0;
	
	/** @desc	Integer for Cause value used for mapping between 
		*          ISUP: Cause value within CAUI parameter and 
		*          SIP: Q.850 cause value in Reason header
		*          Used in TC_110_001 and TC_110_002
	*/
	//modulepar integer PX_CauseValue:=16;

group CDIV_PIXITS{

	
    /** @desc	float default timer value for PX_Timeout_CFNR 
                */
    modulepar float	PX_Timeout_CFNR := 10.0;
    
    /** @desc	char default start timer value for CDIV subscription 
                */
    modulepar charstring PX_CDIV_Start_Time_Subscribe :="101103120000";
    
    /** @desc	char default end timer value for CDIV subscription 
                */
    modulepar charstring PX_CDIV_End_Time_Subscribe := 	"101103120000";
    
    /** @desc	char default start timer value for CDIV notification  
                */
    modulepar charstring PX_CDIV_Start_Time_Notify := 	"101103120000";
    
    /** @desc	char default end timer value for CDIV notification 
                */
    modulepar charstring PX_CDIV_End_Time_Notify := 	"101103120000";
}

group CUG_PIXITS{
	/** @desc	Integer for PX_CugIndex_Registred_Restrictions_None which refers to value assigned by the network  
		*          to identify a CUG 
		*          integer (0 .. 32767)
		*          Used in CUG group of tests
	*/
	modulepar integer PX_CugIndex_Registred_Restrictions_None:=1000;

	/** @desc	Integer for CugIndex_Registred_Restrictions_OCB which refers to value assigned by the network  
		*          to identify a CUG 
		*          integer (0 .. 32767)
		*          Used in CUG group of tests
	*/
	modulepar integer PX_CugIndex_Registred_Restrictions_OCB:=2000;
	
	/** @desc	Integer for PX_CugIndex_Registred_Restrictions_ICB which refers to value assigned by the network  
		*          to identify a CUG 
		*          integer (0 .. 32767)
		*          Used in CUG group of tests
	*/
	modulepar integer PX_CugIndex_Registred_Restrictions_ICB:=3000;

	/** @desc	Integer for PX_CugIndex_Unregistred_Restrictions_None which refers to value assigned by the network  
		*          to identify a CUG 
		*          integer (0 .. 32767)
		*          Used in CUG group of tests
	*/
	modulepar integer PX_CugIndex_Unregistred_Restrictions_None:=4000;
		
	/** @desc	hexstring for PX_CugNetworkIndicator 
		*          Used in CUG group of tests
		*          
	*/
	modulepar NetworkIdentityType PX_CugNetworkIndicator;

	/** @desc	hexstring for CugInterlockBinaryCode  
		*          Used in CUG group of tests
	*/
	modulepar SixteenbitType PX_CugInterlockBinaryCode;

	/** @desc	hexstring for PX_CugInterlockBinaryCode_RelatedToRegistredCUG_Index  
		*          Used in CUG group of tests
	*/
	modulepar SixteenbitType PX_CugInterlockBinaryCode_RelatedToRegistredCUG_Index;

	/** @desc	hexstring for PX_CugInterlockBinaryCode_RelatedToRegistredCUG_Index  
		*          Used in CUG group of tests
	*/
	modulepar SixteenbitType PX_CugInterlockBinaryCode_NotRelatedToRegistredCUG_Index;
}

group SIPHeadersPIXITS {
	
    /** @desc	NameAddr default value for From field 
     * 			used in groupe 501
    */
	modulepar NameAddr	PX_SIP_NameAddr_From := {displayName := omit, 	 			// optional charstring
										addrSpec :=	{	  
                                            		scheme := c_sipScheme,  			// contains "sip"
                                            		userInfo := {userOrTelephoneSubscriber:= "+491234567", password:=omit},
                                            		hostPort := {host := "ims.net", portField :=omit},
                                            		urlParameters := omit,
                                            		headers := omit}
										}
	/** @desc	NameAddr default value for PAsserted(with sip scheme)
	 * 			
	*/
	modulepar NameAddr	PX_SIP_NameAddr_PAsserted := {displayName := omit, 	 			// optional charstring
										addrSpec :=	{	  
                                                    scheme := c_sipScheme,  			// contains "sip"
                                                    userInfo := {userOrTelephoneSubscriber:= "+491234567", password:=omit},
                                                    hostPort := {host := "ims.net", portField :=omit},
                                                    urlParameters := omit,
                                                    headers := omit}
										}
    /** @desc	NameAddr default value for PAsserted2(with tel scheme)  
     * 			
	*/
	modulepar NameAddr	PX_SIP_NameAddr_PAsserted_Tel_URI := {displayName := omit, 	 			// optional charstring
										addrSpec :=	{	  
													scheme := c_telScheme,  			// contains "tel"
													userInfo := {userOrTelephoneSubscriber:= "+491234567", password:=omit},
													hostPort := omit,
													urlParameters := omit,
													headers := omit}
										}
	/** @desc	NameAddr default value for PPreferred(with sip scheme)
		* 		
	*/
	modulepar NameAddr	PX_SIP_NameAddr_PPreferred := {displayName := omit, 	 			// optional charstring
										addrSpec :=	{	  
										scheme := c_sipScheme,  			// contains "sip"
										userInfo := {userOrTelephoneSubscriber:= "+491234567", password:=omit},
										hostPort := {host := "ims.net", portField :=omit},
										urlParameters := omit,
										headers := omit}
										}
}// end group SIPHeadersPIXITS
	
/**
 * 
 * @desc En-/disable UE registration
 */
modulepar boolean PX_UE_REGISTRATION := true;
    
/**
 * @desc En-/disable UE reg event subscription
 */
modulepar boolean PX_UE_REG_EVENT_SUBSCRIPTION := true;     
/**
 * @desc En-/disable UE reg event notification
 */
modulepar boolean PX_UE_REG_EVENT_NOTIFICATION := true; 

}// end module SS_Ims_PIXITS
+0 −0

File added.

Preview size limit exceeded, changes collapsed.

+41 −0
Original line number Diff line number Diff line
/*
 *	@author 	STF 366
 *  @version 	$Id$
 *	@desc		Specifies component types used by the IPv6 ATS.
 *              Definitions are based on component type definitions
 *              from IPv6, SCOP and common synchronization libraries.
 *
 */
 module SS_Ims_TestSystem {

	//LibCommon
	import from LibCommon_Sync all;
	import from LibCommon_AbstractData all;
	import from LibCommon_BasicTypesAndValues all;
	import from LibCommon_DataStrings all;

	//LibSip
	import from LibSip_Interface all;
	
	/*
	** @desc  The test system interface
	*/
	type component TestAdapter {
		port SipPort UE1, UE2, UE3, AS1, PCSCF, SCSCF ;
        port SipPort Gm;
        port SipPort ICS;  
        port SipPort Mw;  
	}

	
    //type component SipComponent is defined in SipIsup_SIP_TypesAndConf

 	 group CMTypes
    {
      type charstring CM_Message;
    } // end group CMTypes




} // end module SS_Ims_TestSystem