Commit 672606d6 authored by pintar's avatar pintar
Browse files

Renaming due to RX functionality

parent 8e6cfd5c
Loading
Loading
Loading
Loading
+144 −0
Original line number Original line Diff line number Diff line
/**
 *	@author 	STF 434
 *  @version    $Id: DiameterRx_ImsGm_TCFunctions.ttcn 389 2012-01-12 08:35:41Z schmitting $
 *	@desc		This module provides GM/UE test functions used by the test cases
 *              for IMS-DIAMETER tests.
 */
module DiameterRx_ImsGm_TCFunctions {
	// LibCommon
	import from LibCommon_Sync {function f_selfOrClientSyncAndVerdict; 
	    						const c_prDone, c_tbDone, c_poDone;}
	// LibSip
	import from LibSip_SIPTypesAndValues {type REGISTER_Request, CSeq; 
	    								  const c_statusLine200;}
	import from LibSip_Templates all;
	import from LibSip_Steps all;
	// LibIms
	import from LibIms_Templates all;
	import from LibIms_Steps all;
	import from LibIms_SIPTypesAndValues all;
	import from LibIms_Interface all;
	


	group TP_BasicCall{

	/*
	*  @desc	This is the test case function (SIP originating side - UE1) for TC_IMST2_GM_INI_04_UE1
	*  @param	p_cSeq_s
	*/
			function f_TC_IMST2_GM_INI_04_UE1(in CSeq p_cSeq_s)
			runs on ImsComponent {

				var template REGISTER_Request v_register;

				v_register :=
					valueof(m_REGISTER_Request_Base(vc_requestUri, vc_callId,
													p_cSeq_s, vc_from, vc_to,
													vc_via_REG, vc_contact,
													vc_authorization));
				// preamble with send REGISTER, await 401, send REGISTER, await
				// 200 OK and user profile setting
				f_IMS_preamble_withRegistration(c_userProfile_UE1atSUThome,
												p_cSeq_s, v_register);
				f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync
				// point
				// preamble
				// done
				// TESTBODY
				// prepare and send INVITE UE2
				// @SUT
				LibIms_Steps
				.f_setHeadersINVITE(p_cSeq_s, c_userProfile_UE2atSUThome);
				f_SendINVITE(m_INVITE_Request_UE(vc_requestUri, vc_callId,
												 p_cSeq_s, vc_from, vc_to,
												 vc_via, vc_contact, omit,
												 vc_route_REG, omit,
												 m_MBody_SDP(vc_sdp_local)));

				// await response - 200 ...
				f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId,
													vc_cSeq));
				// send ACK
				LibSip_Steps.f_setHeadersACK();
				f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq,
											 vc_from, vc_to, vc_via));

				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); // sync
				// point
				// test
				// body
				// done
				// POSTAMBLE
				// SendBYE and await response
				f_terminateCall_UE(vc_requestUri, vc_callId, vc_cSeq,
								   vc_caller_From, vc_caller_To);

				// send REGISTER, await 401, send REGISTER, await 200 OK
				f_RemoveRegistration(vc_cSeq); // deregistration in SUT
				f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync
				// point
				// postamble
				// done
				f_SIP_postamble_UE1_withoutRegistration();
			} // end function f_Sip_TC_IMST2_GM_INI_04_UE1

	/*
	*  @desc	This is the test case function (SIP terminating side - UE2) for TC_IMST2_GM_INI_04_UE2
	*  @param	loc_CSeq_s
	*/
			function f_TC_IMST2_GM_INI_04_UE2(in CSeq p_cSeq_s)
			runs on ImsComponent {

				var template REGISTER_Request v_register;

				v_register :=
					valueof(m_REGISTER_Request_Base(vc_requestUri, vc_callId,
													p_cSeq_s, vc_from, vc_to,
													vc_via_REG, vc_contact,
													vc_authorization));

				// IMS1 component interface initialization
				f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_PCSCF2);
				// preamble with send REGISTER, await 401, send REGISTER, await
				// 200 OK and user profile setting
				f_IMS_preamble_withRegistration(c_userProfile_UE2atSUThome,
												p_cSeq_s, v_register);

				f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync
				// point
				// preamble
				// done
				// TESTBODY
				// Awaiting INVITE
				f_awaitingINVITE(mw_INVITE_Request_Base);
				f_sendResponse(m_Response_2xxonINVITE_UE(c_statusLine200,
														 vc_callId, vc_cSeq,
														 vc_caller_From,
														 vc_caller_To, vc_via,
														 vc_contact, f_recordroute(),
														 valueof(m_MBody_SDP(
																	 vc_sdp_local
																 ))));

				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); // sync
				// point
				// test
				// body
				// done
				// POSTAMBLE
				// await BYE and send 200OK
				f_awaitingBYE_sendReply(mw_BYE_Request_Base(vc_callId));

				// send REGISTER, await 401, send REGISTER, await 200 OK
				f_RemoveRegistration(vc_cSeq);

				f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync
				// point
				// postamble
				// done
				f_SIP_postamble_UE2_withoutRegistration();
			} // end function f_Sip_TC_IMST2_GM_INI_04_UE2

	} //end group TP_BasicCall
} // end module AtsIms_Gm_TCFunctions
 No newline at end of file
+34 −0
Original line number Original line Diff line number Diff line
/**
 *	@author 	STF 434
 *  @version    $Id: DiameterRx_PICS.ttcn 389 2012-01-12 08:35:41Z schmitting $
 *	@desc		This module provides the PICS used for the SIP-IMS-DIAMETER tests.
*/

module DiameterRx_PICS
{
	/* ****************************************************************************************************
		PICS used for test case selection
		*************************************************************************************************** */

	/** @desc	Does AF support SPONSORED_DATA_CONNECTIVITY 
	 *  @remark	PICS ref: Table 2, Item 1
	 *			True, if SPONSORED_DATA_CONNECTIVITY is supported
	*/
	modulepar boolean PC_AF_SPONSORED_DATA_CONNECTIVITY_SUPPORTED;

    /** @desc	Does AF support SUBSCRIBE_TO_NOTIFICATION 
     *  @remark	PICS ref: Table 2, Item 2
     *			True, if SUBSCRIBE_TO_NOTIFICATION is supported
    */
    modulepar boolean PC_AF_SUBSCRIBE_TO_NOTIFICATION_SUPPORTED;
	
	
    
    
    /** @desc	Does PCRF support SPONSORED_DATA_CONNECTIVITY 
     *  @remark	PICS ref: Table 3, Item 1
 	 *	        True, if SPONSORED_DATA_CONNECTIVITY is supported
    */
    modulepar boolean PC_PCRF_SPONSORED_DATA_CONNECTIVITY_SUPPORTED;
    
} // end module AtsIms_PICS
 No newline at end of file
+160 −0
Original line number Original line Diff line number Diff line
/**
 *	@author 	STF 434
 *  @version    $Id: DiameterRx_PIXITS.ttcn 389 2012-01-12 08:35:41Z schmitting $
 *	@desc		This module provides the PIXIT used for the SIP-IMS-DIAMETER tests.
 */

module DiameterRx_PIXITS
{
    
    import from LibDiameter_TypesAndValues all;
    import from LibCommon_BasicTypesAndValues all;

// SUT specific implementation variants

	/** @desc	boolean (This is an operator option, not a protocol option), 
				True, if SUT/S-CSCF rejects INVITE requests indicating services that are not subscribed to by the called subscriber,
				service may be requested in SDP or in a P-Asserted-Service header
				Ref: ES 283 033 5-4-3-3
	*/
	modulepar boolean PX_XXXXXXXXXXX 	:= true; 
	
    /** @desc	boolean (This is an operator option, not a protocol option), 
                True, if IPv6 addresses are used
    */
    modulepar boolean PX_IPv6 	:= true; 
	
	
    /** @desc	octetstring (This is an operator option, not a protocol option), 
                UE IP address:
                 
                   The Framed-IP-Address AVP (AVP Code 8) [RADIUS] is of type
   OctetString and contains an IPv4 address of the type specified in the
   attribute value to be configured for the user.  It MAY be used in an
   authorization request as a hint to the server that a specific address
   is desired, but the server is not required to honor the hint in the
   corresponding response.

   Two values have special significance: 0xFFFFFFFF and 0xFFFFFFFE.  The
   value 0xFFFFFFFF indicates that the NAS should allow the user to
   select an address (i.e., negotiated).  The value 0xFFFFFFFE indicates
   that the NAS should select an address for the user (e.g., assigned
   from a pool of addresses kept by the NAS).


                Ref: TS 129 214 5-4, table 5-4-1
    */
	modulepar octetstring PX_UE_framedIpAddress := 'ffffffff'O;
	
    /** @desc	octetstring (This is an operator option, not a protocol option), 
                UE IP6 address:
                 
   The Framed-IPv6-Prefix AVP (AVP Code 97) is of type OctetString and
   contains the IPv6 prefix to be configured for the user.  One or more
   AVPs MAY be used in authorization requests as a hint to the server
   that specific IPv6 prefixes are desired, but the server is not
   required to honor the hint in the corresponding response.


                Ref: TS 129 214 5-4, table 5-4-1
    */
    modulepar octetstring PX_UE_framedIp6Address := 'ffffffff'O;


	
    /** @desc	UTF8String 
                 
   The Session-Id AVP (AVP Code 263) is of type UTF8String and is used
   to identify a specific session (see Section 8).  All messages
   pertaining to a specific session MUST include only one Session-Id AVP
   and the same value MUST be used throughout the life of a session.
   When present, the Session-Id SHOULD appear immediately following the
   Diameter Header (see Section 3).

                Ref: RFC 3588 section 8-8
    */
    modulepar UTF8String PX_SessionID := "pcscf.metaswitch.com;1317059245;52;21823490";


	
    /** @desc	charstring 
                 
   The Origin-Host AVP (AVP Code 264) is of type DiameterIdentity, and
   MUST be present in all Diameter messages.  This AVP identifies the
   endpoint that originated the Diameter message.  Relay agents MUST NOT
   modify this AVP.

   The value of the Origin-Host AVP is guaranteed to be unique within a
   single host.

                Ref: RFC 3588 section 6-3
    */
    modulepar charstring PX_OriginHost := "pcscf.metaswitch.com";


	
    /** @desc	charstring 
                 
   The Origin-Realm AVP (AVP Code 296) is of type DiameterIdentity.
   This AVP contains the Realm of the originator of any Diameter message
   and MUST be present in all messages.

                Ref: RFC 3588 section 6-4
    */
    modulepar charstring PX_OriginRealm := "metaswitch.com";


	
    /** @desc	charstring 
                 
   The Destination-Host AVP (AVP Code 293) is of type DiameterIdentity.
   This AVP MUST be present in all unsolicited agent initiated messages,
   MAY be present in request messages, and MUST NOT be present in Answer
   messages.

                Ref: RFC 3588 section 6-5
    */
    modulepar charstring PX_DestinationHost := "af.metaswitch.com";


	
    /** @desc	charstring 
                 
   The Destination-Realm AVP (AVP Code 283) is of type DiameterIdentity,
   and contains the realm the message is to be routed to.  The
   Destination-Realm AVP MUST NOT be present in Answer messages.
   Diameter Clients insert the realm portion of the User-Name AVP.
   Diameter servers initiating a request message use the value of the
   Origin-Realm AVP from a previous message received from the intended
   target host (unless it is known a priori).  When present, the
   Destination-Realm AVP is used to perform message routing decisions.

                Ref: RFC 3588 section 6-6
    */
    modulepar charstring PX_DestinationRealm := "myalupcrf.vf.de";


	
    /** @desc	charstring 
                 
   The Auth-Application-Id AVP (AVP Code 258) is of type Unsigned32 and
   is used in order to advertise support of the Authentication and
   Authorization portion of an application (see Section 2.4).  The
   Auth-Application-Id MUST also be present in all Authentication and/or
   Authorization messages that are defined in a separate Diameter
   specification and have an Application ID assigned.

                Ref: RFC 3588 section 6-8
    */
    modulepar UInt32 PX_AuthApplicationId := 16777236;  // 3GPP Rx ('01000014'H)
    
    /** @desc	charstring 
                 
   The ANCA (Access-Network-Charging-Address) is of type IPv4Addr or
   IPv6Addr depending on the IP version used

    */
    modulepar IPv4Addr PX_ANCA_ipv4 := {1,2,3,4};
    modulepar IPv6Addr PX_ANCA_ipv6 := {1,2,3,4,5,6,7,8}

} // end module AtsIms_PIXITS
 No newline at end of file
+374 −0

File added.

Preview size limit exceeded, changes collapsed.

+56 −0
Original line number Original line Diff line number Diff line
/**
 *	@author 	STF 434
 *  @version    $Id: DiameterRx_Steps.ttcn 385 2012-01-10 12:31:08Z rennoch $
 *	@desc		This module provides ATS specific templates used by the test cases
 *              for IMS-DIAMETER tests.
 */
 module DiameterRx_Steps {

	//LibCommon    
    import from LibCommon_DataStrings {type Bit1, Bit4, Bit5, Bit8;}//all;
    import from LibCommon_BasicTypesAndValues {type UInt8;};
    
    //LibDiameter
    import from LibDiameter_TypesAndValues all;
    import from LibDiameter_Templates all;
    
    //AtsCommon
    import from DiameterRx_PIXITS all;	
    

    function f_framedIpAddress4 ()
        return template Framed_IP_Address_AVP
        {if (PX_IPv6)
            {return(omit)}
            else {return(mw_framedIpAddress(PX_UE_framedIpAddress))}}
    function f_framedIpAddress6 ()
        return template Framed_IPv6_Prefix_AVP
        {if (PX_IPv6)
            {return(mw_framedIp6Address(PX_UE_framedIp6Address))}
            else {return(omit)}}
            
    function f_framedIpAddress4_send ()
         return template Framed_IP_Address_AVP
         {if (PX_IPv6)
             {return(omit)}
             else {return(m_framedIpAddress(PX_UE_framedIpAddress))}}
    function f_framedIpAddress6_send ()
         return template Framed_IPv6_Prefix_AVP
         {if (PX_IPv6)
             {return(m_framedIp6Address(PX_UE_framedIp6Address))}
             else {return(omit)}}
             
    function f_IPAdresss ()
    	return template Address
    	{if (PX_IPv6)
    	    {return( {ipv6:= PX_ANCA_ipv6  }  ) }
    	    else {return( {ipv4:= PX_ANCA_ipv4 }   )}
    	}
     function f_IPAdressLength ()
         return integer
         {if (PX_IPv6)
             {return(8) }
             else {return(4) }
         }

} // end module DiameterRx_Steps
 No newline at end of file
Loading