Commit d5c18839 authored by pintar's avatar pintar
Browse files

commited work from week 41 and 42 (year 2009)

first validation of STF346 project on Iskratel IMS
parent fb3afb09
Loading
Loading
Loading
Loading
+183 −0
Original line number Diff line number Diff line
/*
 *	@author 	STF 346, STF366, STF368, STF369
 *  @version    $Id$
 *	@desc		This module provides the types used by the test component 
 *              for SIP-IMS tests. Module become from STF306 and STF334-336
 */

module LibSip_Interface language "TTCN-3:2005"//MRO
{	
	//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_SIPTypesAndValues all;
	import from LibSip_SDPTypes all;
	import from LibSip_XMLTypes all;
	
	import from LibSip_PIXITS all;

	group AdressTypes
	{
	  type record address4SIP
	  {
		//HostPort
		charstring 	        host optional,        // hostname, IPv4 or IPv6
		integer             portField optional    // represented as an integer
	  } with { encode "SIPCodec" }

	  type address4SIP address;

	}// end group AdressTypes

	type port SipPort message {
		  inout Request, 
		  		REGISTER_Request, 
		  		INVITE_Request,
				OPTIONS_Request,
				BYE_Request,
		  		CANCEL_Request, 
		  		ACK_Request, 
		  		PRACK_Request, 
		  		NOTIFY_Request, 
		  		SUBSCRIBE_Request, 
		  		PUBLISH_Request, 
		  		UPDATE_Request,
		  		REFER_Request,
				MESSAGE_Request,
				INFO_Request,
		  		Response, 
		  		Raw } with { extension "address" };
		  		
	signature s_SIP_conversation (in charstring text, out boolean answer);
	signature s_SIP_ringing (in charstring text, out boolean answer);
    signature s_SIP_announcementA (in charstring text, out boolean answer);
	signature s_SIP_announcementB (in charstring text, out boolean answer);
	signature s_SIP_announcement (in charstring text, out boolean answer);
	signature s_SIP_voiceMessage (in charstring text, out boolean answer);
    signature s_SIP_mediastopped (in charstring text, out boolean answer);
 	type port operatorPort procedure {inout s_SIP_conversation; inout s_SIP_ringing; inout s_SIP_announcementA; inout s_SIP_announcementB; inout s_SIP_announcement; inout s_SIP_voiceMessage; inout s_SIP_mediastopped};
		  		
	//	Solution for building error problem. (Important for validation)
	//type component ImsComponent extends SipComponent need to be located in LibIms_Interface and not in LibSip_Interface module
	//With this solution TAU compiler error.
//	type component ImsComponent extends SipComponent
//	{
//		// general variables
//		var ImsInterfaceProfile vc_interfaceprofile 
//	 } // end ImsComponent

	type component SipComponent
	{
	  //port
	  port 	SipPort SIPP;
	  // used for communication with the operator
	  port operatorPort opPort;

	  // current address to send TCP/UDP messages
	  var SipUserProfile vc_userprofile; 		// PIXIT userinformation
	  var address		 vc_sent_label  := {host := PX_SIP_SUT_IPADDR, portField := PX_SIP_SUT_PORT};

	  // last incoming message
	  var Response 	vc_response;	// last incoming response message
	  var boolean	vc_boo_response := false; // to check if response received or not
	  var Request 	vc_request;		// last incoming request message					
	  var boolean	vc_boo_request := false; // to check if request received or not
	  var Request 	vc_requestFor407;	// last INVITE request to be authorized if 407/401 received from Proxy  

	  var SipUrl	vc_requestUri 	:= c_empty_RequestUri;
	  var SipUrl	vc_requestUri2 	:= c_empty_RequestUri;//MRO
	  var charstring vc_branch		:= "";
	  var charstring vc_branch_ICSCF	:= "";
	  var charstring vc_branch_SCSCF	:= "";

	  // SIP message header fields (for building next message)
	  var CallId	vc_callId    	:= c_empty_CallId;
	  var CallId	vc_callIdReg 	:= c_empty_CallId;
	  var From		vc_from      	:= c_empty_From;
	  var To		vc_to        	:= c_empty_To;
	  var To		vc_cancel_To 	:= c_empty_To;	// used for next CANCEL
	  var Via 		vc_via       	:= c_empty_Via;
	  var Via 		vc_via_REG		:= c_empty_Via; // via used in last REGISTER
	  var ContentType vc_contentType:= c_empty_ContentType;//MRO
	  
	  var RecordRoute vc_recordRoute; 			 // value of RecordRoute header
	  var boolean 	vc_boo_recordRoute := false; // boolean indicates valid recordRoute
	  var Route		vc_route; 					 // value of Route header
	  var Route		vc_route_REG;				 // value of Route header from registration ServiceRoute header for initial Requests
	  var boolean 	vc_boo_route 	:= false; 	 // boolean indicates valid Route

	  var Contact	vc_contact; 			// value of Contact header
	  var CSeq		vc_cSeq 		:= c_empty_cSeq;	// value of CSeq header
	  var RAck 		vc_rAck 		:= { fieldName := RACK_E, responseNum := 1, seqNumber := 1, method := "INVITE"}; // value of RAck header
	  var HostPort 	vc_reqHostPort 	:= {host:=PX_SIP_SUT_IPADDR, portField:=PX_SIP_SUT_PORT}; // address to send request
	  var Privacy 	vc_privacy;
	  var HistoryInfo_List vc_historyInfoList := {}; // value of history list according to RFC4244
	  var SipUrl 	  vc_confURI; 	 // conference URI according to TS124147 ch. 5.3.1.3.2
	  var SDP_Message vc_sdp_remote; // incoming SDP offers
	  var SDP_Message vc_sdp_local;  // SDP values to be sent
	  var XmlBody 	vc_xml_remote;	 // incoming XML value
	  var XmlBody 	vc_xml_local;	 //SDP values to be sent
	  
	  var CSeq		vc_iut_CSeq 	:= c_empty_cSeq;	// value of last CSeq header used by the IUT in request
	  // To/From header-fields to be used if the callee will release the session
	  var To 		vc_callee_To 	:= c_empty_To; 
	  var From 		vc_callee_From 	:= c_empty_From;
	  // To/From header-fields to be used if the caller will release the session
	  var To 		vc_caller_To 	:= c_empty_To;
	  var From 		vc_caller_From	:= c_empty_From;
	  var Authorization vc_authorization;
	          
	  // variables for storing default references
	  var default 	vc_default;
	  var default 	vc_def_catchSyncStop;
        
	  // general timers
	  timer tc_T1  	 := PX_SIP_T1;
	  timer tc_Tf    := PX_SIP_TF;
	  timer tc_wait  := PX_SIP_TWAIT;
	  timer tc_ack   := PX_SIP_TACK;
	  timer tc_resp  := PX_SIP_TRESP;
	  timer tc_noAct := PX_SIP_TNOACT; // time for SUT to get idle state
//	  timer TRept;
//	  timer TSync	 := PX_SIP_TSYNC;
	  timer tc_guard   := PX_SIP_TGUARD;//MRO
	  timer tc_tDelay   := 32.0;

	  var float 		vc_tcRESP 				:= PX_SIP_TRESP; // standard value for TRESP (may be modified in particular tests)
		
	// indicators set/used parameter status or state handling in default
	  var boolean 		vc_sdp_remote_is_valid 	:= false; 	// true if there is a value in v_SDP_remote
	  var boolean 		vc_history_is_valid 	:= false; 	// true if there is a HistoryList in response message
	  var boolean 		vc_send_SDP 			:= false; 	// send SDP in the next outgoing message
	  var boolean 		vc_ignore_bye			:= false; 	// enable ignore of repeated bye in default
	  var boolean 		vc_ignore_invite		:= false; 	// enable ignore invite in default
	  var boolean 		vc_ignore181			:= false; 	// enable ignore of 181 in default
	  var boolean 		vc_ignore484			:= false; 	// enable ignore of 484 in default
	  var boolean 		vc_ignore4xx			:= false; 	// enable ignore of 4xx in default
	  var boolean 		vc_ignore200OKinv		:= false; 	// enable ignore of 200OKinv in default
	  var boolean 		vc_supported_100rel		:= false; 	// true if the received invite contains 100rel
	  var boolean 		vc_supported_precondition:= false; 	// true if the received invite contains precondition
	  var boolean 		vc_MESSAGEreceived 		:= false; 	// true if MESSAGE received during altstep
	  var boolean 		vc_first_recv			:= false; 	// true after receipt of first incomming SIP message
	  var boolean 		vc_firstREGISTER_sent	:= false; 	// true after sent of first REGISTER message

	  var boolean v_white_space := false;//MRO

	  // ETS address
      var address v_ets_label := { host := PX_SIP_TS1_IPADDR, portField := PX_SIP_TS1_PORT};

	  // parts needed for Client/SelfSyncComp type compatibility
	  var 	StringStack v_stateStack := c_initStringStack;
	  port 	SyncPort 	syncSendPort;
	  port 	SyncPort 	syncPort;
	  timer tc_sync 	:= PX_TSYNC_TIME_LIMIT;
	  		
//	  // used for communication with the operator
//	  port operatorPort_SIP opPort;

  } // end SipComponent
  
} // end module LibSip_Interface
+364 −0
Original line number Diff line number Diff line
/*
 *	@author 	STF 346, STF366, STF368, STF369
 *  @version    $Id$
 *	@desc		This module provides the types used by the test component 
 *              for SIP-IMS tests. Module become from STF306 and STF334-336
 *  NOTE:		PIXITS in folowing groups can be ignored if this information
 *   			is provided in other modules of the ATS that uses this SIP library
 *				- Ports_and_addresses_of_the_SUT
 *				- PortsAndAddressesOfTheTS1
 *				- PortsAndAddressesOfTheTS2 
 *				- PortsAndAddressesOfTheTS3 
 *				- ParametersForHTTP_Authentication 
 */

module LibSip_PIXITS language "TTCN-3:2005"//MRO
{
	//LibCommon
	import from LibCommon_BasicTypesAndValues all;
	import from LibCommon_DataStrings all;

//	_____________________________ PIXIT-S_______________________________
  group SIP_PIXITparameters{
  group SDPParameter {
	  modulepar {

	  /** @desc	charstring for SDP dynamic port
	  */
	  charstring	PX_SIP_SDP_dyn := "0";

	  /** @desc	charstring for SDP bandwidth modifier
	  */
	  charstring	PX_SIP_SDP_b_modifier := "AS";

	  /** @desc	integer for SDP bandwidth value
	  */
	  integer		PX_SIP_SDP_b_bandwidth := 64;

	  /** @desc	charstring for SDP media attribute encoding supported by the IUT 
	  */
	  charstring	PX_SIP_SDP_encoding := "PCMU/8000";

	  /** @desc	charstring for SDP media attribute encoding unavailable by the IUT 
	  */
	  charstring	PX_SIP_SDP_encoding_unavail := "GSM/8000"; // f_Sip_TC2105_IS___xx__U18

	  /** @desc	charstring for SDP media attribute encoding unsupported by the IUT 
	  */
	  charstring	PX_SIP_SDP_encoding_unsup := "GSM/8000"; // f_Sip_TC2105_IS___xx__U18

	  /** @desc	charstring for SDP media T.38 transport (used in TC2101_IS___AU__09)
	  */
	  charstring	PX_SIP_SDP_transport := "udptl";
	  } //	modulepar
  } //group SDP Parameter
  
  group ISUPinterworkingParameters{
  	  modulepar {
	  /** @desc	charstring for Used CPC language
	  */
	  charstring  PX_SIP_ISUP_LANGUAGE := "English";
	  /** @desc	charstring for Used CPC language
	  */
	  charstring  PX_SIP_ISUP_CPC_VALUE := "prison";
  	  }//modulepar
  } // goup PSTNParameters

  group SupportedOptions{
	  modulepar {
				
	  /** @desc	boolean for  True if 100rel mechanism is supported in SIP
	  */
	  boolean		PX_SIP_100rel := false;

	  /** @desc	boolean for True if precondition mechanism is supported in SIP
	  */
	  boolean		PX_SIP_precondition := false;

	  /** @desc	boolean for True if UDP Transport is used by the IUT to run campaign
	  */
	  boolean		PX_SIP_UDP := true;

	  /** @desc	charstring for Used Transport in upper case "UDP"/"TCP"
	  */
	  charstring  PX_SIP_TRANSPORT := "UDP";
	  }//modulepar
  }// group SupportedOptions{

  // PIXITS in group Ports_and_addresses_of_the_SUT can be ignored if this information is provided in other modules of the ATS that uses this SIP library
  group Ports_and_addresses_of_the_SUT{
	  modulepar{ 

	  /** @desc	integer for SUT port number to exchange SIP messages
	  */
	  integer	  PX_SIP_SUT_PORT := 5060;

	  /** @desc	charstring for SUT IP address to exchange SIP messages
	  */
	  charstring  PX_SIP_SUT_IPADDR := "172.27.16.115";

	  /** @desc	charstring for SUT domain
	  */
	  charstring  PX_SIP_SUT_HOME_DOMAIN := "172.27.16.115";

	  /** @desc	charstring for unknown SUT domain
	  */
	  charstring  PX_SIP_SUT_HOME_DOMAIN_UNKNOWN := "172.88.88.88";

	  }	//modulepar
  }

  // PIXITS in group PortsAndAddressesOfTheTS1 can be ignored if this information is provided in other modules of the ATS that uses this SIP library
  group	PortsAndAddressesOfTheTS1 {
//	 Ports and addresses of the TS1 (tester), first access
	 modulepar {
	  /** @desc	integer for port number used by the TS1 to exchange SIP messages
	  */
	  integer     PX_SIP_TS1_PORT := 5060;

	  /** @desc	charstring for IP address used by the TS1 to exchange SIP messages
	  */
	  charstring  PX_SIP_TS1_IPADDR := "172.27.1.218";

	  /** @desc	charstring for identity of the tester local domain
	  */
	  charstring  PX_SIP_TS1_LOCAL_DOMAIN := "172.27.1.218";

	  /** @desc	charstring for identity of the tester local user
	  */
	  charstring  PX_SIP_TS1_LOCAL_USER := "2910";

	  /** @desc	charstring for identity of the user with active call diversion service
	  */
	  charstring  PX_SIP_TS1_LOCAL_USER_DIV := "2907";

	  /** @desc	charstring for identity of the tester local user (format "+"cc+ndc+sn)
	  */
	  charstring  PX_SIP_TS1_LOCAL_USER_FULL := "+ 33492941111";

	  /** @desc	integer for port number used by the TS to exchange media streams
	  */
	  integer     PX_SIP_TS1_BEARER_PORT := 52000;

	  /** @desc	charstring for port number used by the TS to exchange media streams
	  */
	  integer     PX_SIP_TS1_BEARER_PORT2 := 62000;

	  /** @desc	charstring for IP address used by the TS to exchange media streams
	  */
	  charstring  PX_SIP_TS1_BEARER_IPADDR := "172.27.1.218";
	 }//modulepar
  }//	group	PortsAndAddressesOfTheTS

  // PIXITS in group PortsAndAddressesOfTheTS2 can be ignored if this information is provided in other modules of the ATS that uses this SIP library
  group	PortsAndAddressesOfTheTS2 {
//	 Ports and addresses of the TS2 (tester), second access
	 modulepar {

	  /** @desc	integer for port number used by the TS2 to exchange SIP messages
	  */
	  integer     PX_SIP_TS2_PORT := 5060;

	  /** @desc	charstring for IP address used by the TS2 to exchange SIP messages
	  */
	  charstring  PX_SIP_TS2_IPADDR := "172.27.1.219";

	  /** @desc	charstring for identity of the tester local domain
	  */
	  charstring  PX_SIP_TS2_LOCAL_DOMAIN := "172.27.1.219";

	  /** @desc	charstring for identity of the tester local user
	  */
	  charstring  PX_SIP_TS2_LOCAL_USER := "2911";
	
	  /** @desc	charstring for identity of the user with active call diversion service
	  */
	  charstring  PX_SIP_TS2_LOCAL_USER_DIV := "2011";

	  /** @desc	charstring for identity of the tester local user (format "+"cc+ndc+sn)
	  */
	  charstring  PX_SIP_TS2_LOCAL_USER_FULL := "+ 33 4 92941111";

	  /** @desc	integer for port number used by the TS to exchange media streams
	  */
	  integer     PX_SIP_TS2_BEARER_PORT := 53000;

	  /** @desc	integer for port number used by the TS to exchange media streams
	  */
	  integer     PX_SIP_TS2_BEARER_PORT2 := 63000;

	  /** @desc	charstring for IP address used by the TS to exchange media streams
	  */
	  charstring  PX_SIP_TS2_BEARER_IPADDR := "172.27.1.218";
	
	 } //	modulepar
  }//group	PortsAndAddressesOfTheTS2 
  
  // PIXITS in group PortsAndAddressesOfTheTS3 can be ignored if this information is provided in other modules of the ATS that uses this SIP library
  group	PortsAndAddressesOfTheTS3 {
//	  Ports and addresses of the TS3 (tester), second access
	  modulepar{
	  /** @desc	integer for Port number used by the TS3 to exchange SIP messages
	  */
	  integer     PX_SIP_TS3_PORT := 5060;

	  /** @desc	charstring for IP address used by the TS3 to exchange SIP messages
	  */
	  charstring  PX_SIP_TS3_IPADDR := "172.27.1.220";

	  /** @desc	charstring for identity of the tester local domain
	  */
	  charstring  PX_SIP_TS3_LOCAL_DOMAIN := "172.27.1.220";

	  /** @desc	charstring for identity of the tester local user
	  */
	  charstring  PX_SIP_TS3_LOCAL_USER := "2012";

	  } //modulepar
  } //group	PortsAndAddressesOfTheTS3

  group RegistrationParameters {
	  modulepar {
		
	  /** @desc	boolean for the SIP user if it have to register itself before executing a test case
	  */
	  boolean     PX_SIP_REGISTRATION := false;

	  /** @desc	integer for the minimun SIP user registration expires-value
	  */
	  integer     PX_SIP_REGISTRATION_exp_min := 3600;

	  /** @desc	charstring for REGISTRAR domain
	  */
	  charstring  PX_SIP_SUT_REGISTRAR_DOMAIN := "172.27.16.115";
	  }//	modulepar
  }// group Registration parameters
  
  group ReleaseCause{
	  modulepar {
	  /** @desc	integer for Release cause to be used in BYE and in Failure messages
	  */
	  integer			PX_SIP_BYE_CAUSE := 16;
	  }//modulepar
  }//group ReleaseCause

  group RTPStreamControlAndCheck{
	  modulepar {
	  /** @desc	boolean for True, if conversation check is implemented.
	  */
	  boolean PX_SIP_CheckConversation := false; 

	  /** @desc	boolean for True, if DTMF check is implemented.
	  */
	  boolean PX_SIP_CheckDTMF := false; 

	  /** @desc	boolean for True, if Announcement sending is implemented.
	  */
	  boolean PX_SIP_SendAnnouncement := false; 

	  /** @desc	boolean for True, if ringing check is implemented.
	  */
	  boolean PX_SIP_CheckRinging := false; 
	  }//modulepar
  }//group RTPStreamControlAndCheck
  
  group SwitchToEnableAuthentication {
	modulepar{	
	/** @desc	boolean for option controlling if authentication is enabled/disabled for REGISTER messages 
	*/
	boolean PX_SIP_REGISTER_AUTHENTICATION_ENABLED := true;
	  
	/** @desc	boolean for option controlling if authentication is enabled/disabled for INVITE messages 
	*/
	boolean PX_SIP_INVITE_AUTHENTICATION_ENABLED := false;
	}
  }

  // PIXITS in group ParametersForHTTP_Authentication can be ignored if this information is provided in other modules of the ATS that uses this SIP library 
  group ParametersForHTTP_Authentication {
	  modulepar{

	  /** @desc	charstring for RFC 2617 3.2.1 qop options:
	  * Quoted string of one or more tokens indicating the "quality of protection" values supported by the server. The
	  * value "auth" indicates authentication; the value "auth-int" indicates authentication with integrity protection.
	  */
	  charstring PX_SIP_SUT_UE1_QOP := "auth";

	  /** @desc	charstring for RFC 2617 3.2.2 username
	  * The name of user in the specified realm
	  */
	  charstring PX_SIP_SUT_UE1_USERNAME := "abcd";

	  /** @desc	charstring for RFC 2617 3.2.2.2 passwd: A known shared secret, the password of user of the specified username
	  */
	  charstring PX_SIP_SUT_UE1_PASSWD := "1234";

	  /** @desc	charstring for RFC 2617 3.2.1 qop options:
	  * Quoted string of one or more tokens indicating the "quality of protection" values supported by the server. The
	  * value "auth" indicates authentication; the value "auth-int" indicates authentication with integrity protection.
	  */
	  charstring PX_SIP_SUT_UE2_QOP := "auth";
	  
	  /** @desc	charstring for RFC 2617 3.2.2 username
	  * The name of user in the specified realm
	  */
	  charstring PX_SIP_SUT_UE2_USERNAME := "abcd";

	  /** @desc	charstring for RFC 2617 3.2.2.2 passwd: A known shared secret, the password of user of the specified username
	  */
	  charstring PX_SIP_SUT_UE2_PASSWD := "1234";
	 
	  }//modulepar
  }//group ParametersForHTTP_Authentication

  group SIP_Timers {
	  modulepar {
	  /** @desc	float for T1 RTT estimate (500 ms)
	  */
	  float        PX_SIP_T1 := 0.5;

	  /** @desc	float for T2 Maximum retransmit interval for non-INVITE requests and INVITE response (4000 ms)
	  */
	  float        PX_T2 := 4.0;

	  /** @desc	float for T4 Maximum duration a message will remain in the network
	  */
	  float        PX_T4 := 1.0;

	  /** @desc	float for TDELAY default value for timeout on outgoing SIP request (ie 64*T1)
	  */
	  float        PX_SIP_TF := 32.0;

	  /** @desc	float for TWait default value for waiting an operator action
	  */
	  float        PX_SIP_TWAIT := 30.0;

	  /** @desc	float for TAck  default value for waiting an acknowledgement
	  */
	  float        PX_SIP_TACK := 8.0;

	  /** @desc	float for TResp default value for waiting for a response from the IUT
	  */
	  float        PX_SIP_TRESP := 15.0;

	  /** @desc	float for TNoAct default value for waiting no message from the IUT
	  * Value given for PX_TNOACT should be less than value of 
	  * SHORT_REGISTRATION constant (which is currently "3" (seconds))
	  */
	  float        PX_SIP_TNOACT := 1.0;

	  /** @desc	float for TSYNC default value to synchronise ptc
	  */
	  float        PX_SIP_TSYNC := 10.0;

	  /** @desc	float for TGUARD default value for an extra long timer to limit test execution
	  */
	  float        PX_SIP_TGUARD := 120.0;

	  /** @desc	float for TRespRetention minimum time that a Proxy will wait before sending a final response
	  */
	  float        PX_TRespRetention := 1.0;
	  }//modulepar
  }//group SIP_Timers
  } //group SIP_PIXITparameters
} // end module LibSip_PIXITS
+310 −0

File added.

Preview size limit exceeded, changes collapsed.

+1800 −0

File added.

Preview size limit exceeded, changes collapsed.

ttcn/LibSip_Steps.ttcn

0 → 100644
+3976 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading