Commit 50a074c8 authored by berge's avatar berge
Browse files

misc fixes + CALL_0016 rewritten

parent a5455a92
Loading
Loading
Loading
Loading
+70 −8
Original line number Diff line number Diff line
@@ -2224,6 +2224,7 @@ group checksTC_IMS_CALL_0009 {
				false
				)
			);

			p_monitorCompRef.done;
						
			// get Record-route header from prev ACK
@@ -2232,7 +2233,6 @@ group checksTC_IMS_CALL_0009 {
				p_recordRoute := v_sip.request.msgHeader.recordRoute;
			}

			
			p_monitorCompRef.start(
			 f_imsIot_receive(
				{mw_SipRequest(mdw_TP_IMS_5052_01_mw(?, v_PCSCF_IMS_A, p_recordRoute))},
@@ -2414,6 +2414,42 @@ group checksTC_IMS_CALL_0014 {

group checksTC_IMS_CALL_0016 {	
	
	/**
	  * @desc Starts monitor component behavior
	  * @param p_monitorCompRef Reference to monitor component
	  */
	function f_mtc_check_TP_IMS_5139_01_gm(
		ImsInterfaceMonitor p_monitorCompRef,
		boolean p_checkMessage
	) runs on ImsTestCoordinator  {
		var template SipUrl v_scscfImsAUrl := mw_SipUrl_Host(f_GetEUTScscfAddress(PX_EUT_A));

		p_monitorCompRef.start(
			f_imsIot_receive(
			{mw_SipRequest(mw_INVITE_Request_Base)},
			{},
			{0, omit},
			"TP_IMS_5139_01",
			true,
			p_checkMessage
			)
		);
		p_monitorCompRef.done;
			
		p_monitorCompRef.start(
			f_imsIot_receive(
			{mw_SipResponse(mw_200OK_Base)},
			{},
			{0, omit},
			"TP_IMS_5139_01",
			true,
			p_checkMessage
			)
		);
		p_monitorCompRef.done;
			
	} //function	
	
	/**
	  * @desc Starts monitor component behavior
	  * @param p_monitorCompRef Reference to monitor component
@@ -2423,10 +2459,35 @@ group checksTC_IMS_CALL_0016 {
		boolean p_checkMessage
	) runs on ImsTestCoordinator  {
		var template SipUrl v_scscfImsAUrl := mw_SipUrl_Host(f_GetEUTScscfAddress(PX_EUT_A));
		var SipMessage v_sip := {request := valueof(m_INVITE_Dummy)};
    	var SipUrl v_UE_URI;
		var To  v_to; 
		var From v_from;
		var CallId v_callId;
		var CSeq v_cSeq;
		var Route v_route;

   		f_getSipMsgFromMonitor(p_monitorCompRef, v_sip);
    	// Get Contact Header from INVITE
		
 		if(ischosen(v_sip.request)) {
 			v_from := valueof(v_sip.request.msgHeader.fromField);		
 			v_callId := valueof(v_sip.request.msgHeader.callId);
		}
    	
   		f_getSipMsgFromMonitor(p_monitorCompRef, v_sip);
    	// Get Contact Header from 200-OK response
  			
 		if(ischosen(v_sip.response)) {
 			if(ispresent(v_sip.response.msgHeader.contact)) {
 				v_UE_URI := valueof(v_sip.response.msgHeader.contact.contactBody.contactAddresses[0].addressField.nameAddr.addrSpec);
 			}
 			v_to := valueof(v_sip.response.msgHeader.toField);		
		}
		
		p_monitorCompRef.start(
			f_imsIot_receive(
			{mw_SipRequest(mdw_TP_IMS_5139_01_mw(?, v_scscfImsAUrl))},
			{mw_SipRequest(mdw_TP_IMS_5139_01_mw(v_callId, v_UE_URI, v_to, v_from, ?, ?))},
			{},
			{0, omit},
			"TP_IMS_5139_01",
@@ -3027,7 +3088,8 @@ group checksTC_IMS_SS_0003 {
    	) runs on ImsTestCoordinator  {
			
			var template SipUrl v_AS_IMS_B := mw_SipUrl_Host(f_GetEUTASServerAddress(PX_EUT_B));
			var template SipUrl v_SCSCF_IMS_B := mw_SipUrl_Host(f_GetEUTScscfAddress(PX_EUT_B));
			var template SipUrl v_SCSCF_IMS_B := (mw_SipUrl_Host(f_GetEUTScscfAddress(PX_EUT_B)),
															 mw_SipUrl_Host(f_GetEUTScscfIpAddress(PX_EUT_B)));
    			
    		p_monitorCompRef.start(
    		 f_imsIot_receive(
@@ -3246,7 +3308,7 @@ group checksTC_IMS_SS_0008 {
			var ImsUserInfo v_user := f_getAnyValidUser(PX_EUT_A);
			var template SipUrl v_UserEutBUrl := mw_SipUrl_Host(v_user.domain);
		   var SipMessage v_sip := {request := valueof(m_INVITE_Dummy)};
		   var template Route v_Route := omit;
		   var Route v_Route;
		   var template Route vt_pcscfRoute := {
					fieldName := ROUTE_E,
					routeBody := {mw_routeBody(v_pcscfEutAUrl), *}  };
+43 −2
Original line number Diff line number Diff line
@@ -977,6 +977,45 @@ module AtsImsIot_Functions {
			}
        }

    	/**
    	 * @desc Get the S-CSCF FQDN address of referenced EUT 
    	 * @return if a S-CSCF is avaiable, the IP Address of the S-CSCF, 
    	 *         otherwise error_string
    	 */
       function f_GetEUTScscfIpAddress(integer p_ProductIdx) return charstring {
			var integer v_size_interfaces := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces);
			var integer v_size_ipinterfaceinfo;
			var integer v_interface := -1;
			var integer v_ipinterfaceinfo := -1;
			var charstring v_domainname;
  
			for(var integer i := 0; i < v_size_interfaces; i := i+1) {
				if (match(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[i].interfaceName, pattern "[Mm][Ww]")){
					v_interface := i;
				}
			}
			if (v_interface > -1) {
				v_size_ipinterfaceinfo := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo);
    			for(var integer i := 0; i < v_size_ipinterfaceinfo; i := i+1) {
					if(ispresent(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName)) {
    				v_domainname := PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName;
    				if (match(substr(v_domainname, 0, 5), pattern "[Ss][Cc][Ss][Cc][Ff]")) {
    					v_ipinterfaceinfo := i;
    				}
				}
    			}
			} else {
				log ("S-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
				return "S-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
			}
			if (v_ipinterfaceinfo > -1) {
				return PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[v_ipinterfaceinfo].IpAddress;
			} else {
				log ("S-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
				return "S-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
			}
        }
        
    	/**
    	 * @desc Get the P-CSCF FQDN address of referenced EUT 
    	 * @return if a PCSCF is avaiable, the domainname of the PCSCF, 
@@ -1104,7 +1143,7 @@ module AtsImsIot_Functions {
            v_size_ipinterfaceinfo := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo);
               for(var integer i := 0; i < v_size_ipinterfaceinfo; i := i+1) {
                v_domainname := PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName;
                if (match(substr(v_domainname, 0, 2), pattern "[Aa][Ss]")) {
                if (match(substr(v_domainname, 0, 2), pattern "[Aa][Ss]") or match(substr(v_domainname, 2, 2), pattern "[Aa][Ss]")) {
                 v_ipinterfaceinfo := i;
                }
               }
@@ -1135,7 +1174,7 @@ module AtsImsIot_Functions {
            timer t_local := PX_MAX_MSG_WAIT;
            t_local.start;            
            alt {
            	[]icpPort.receive (SipMessage:?) from p_monitor -> value p_msg {
            	[]icpPort.receive (SipMessage:?) /*from p_monitor*/ -> value p_msg {
            	   t_local.stop;
            	   setverdict(pass, self, "***f_getMsgFromMonitor: SIP message received***");	
            	}
@@ -1186,6 +1225,7 @@ module AtsImsIot_Functions {
				if(p_forwardMtc) {
					var SipMessage v_msg;
					v_msg.request := v_message;
					log("### Forwarding message to MTC");	
					icpPort.send(v_msg);
				}
			}
@@ -1194,6 +1234,7 @@ module AtsImsIot_Functions {
				if(p_forwardMtc) {
					var SipMessage v_msg;
					v_msg.request := v_message;
					log("### Forwarding message to MTC");
					icpPort.send(v_msg);
				}
			}
+9 −5
Original line number Diff line number Diff line
@@ -929,18 +929,22 @@ module AtsImsIot_Templates {
	  */
	template BYE_Request mdw_TP_IMS_5139_01_mw(
		template CallId p_callId,
		template SipUrl p_UE_URI // must be the IP address
		template SipUrl p_UE_URI,
		template To  p_to, 
		template From  p_from, 
		template CSeq p_cSeq, 
		template Route p_route
	) modifies mw_BYE_Request_Base := {
		requestLine := {
			requestUri := p_UE_URI
		},
		msgHeader := {
			callId := p_callId,
			cSeq := ?,			
			fromField := ?,			
			cSeq := p_cSeq,			
			fromField := p_from,			
			reason := ?,
			route := ?,		
			toField := ?	
			route := p_route,		
			toField := p_to	
		}
	}

+6 −3
Original line number Diff line number Diff line
@@ -850,16 +850,18 @@ module AtsImsIot_TestCases_CALL {
		var IotEquipmentUser v_ueB := f_cf_create_IotEquipmentUser(c_userUE_B);
		var IotEquipmentUser v_imsA := f_cf_create_IotEquipmentUser(c_trigger_A);
		var ImsInterfaceMonitor v_gmA := f_cf_create_monitor(c_gm_A);
		var ImsInterfaceMonitor v_gmB := f_cf_create_monitor(c_gm_B);
		var ImsInterfaceMonitor v_mw := f_cf_create_monitor(c_mw);
		var ImsUserInfo v_userInfoA := f_getSipUserId(PX_EUT_A);
		var ImsUserInfo v_userInfoB := f_getSipUserId(PX_EUT_B);
		var CF_INT_CALL v_config := {v_gmA, v_mw, v_gmB};
				
		// map/connect component ports
		f_cf_adapter_up();
		f_cf_user_up(v_ueA);
		f_cf_user_up(v_ueB);
		f_cf_user_up(v_imsA);
		f_cf_roam_call_up(v_gmA, v_mw);
		f_cf_int_call_up(v_config);
		
		// preamble
		f_mtc_userRegistration(v_ueA, v_userInfoA); 
@@ -874,14 +876,15 @@ module AtsImsIot_TestCases_CALL {
		f_mtc_userCheckCallEstablished(v_ueB); //Test Sequence Step 6		
		f_mtc_imsTriggerUeDeregistration(v_imsA, v_ueA); //Test Sequence Step 7
		
		f_mtc_check_TP_IMS_5139_01_mw(v_mw, true); // Check 1
		f_mtc_check_TP_IMS_5139_01_gm(v_gmB, false); // Check 1
		f_mtc_check_TP_IMS_5139_01_mw(v_mw, false); // Check 1
		
		f_mtc_userCheckCallEnded(v_ueB); //Test Sequence Step 8
		
		// postamble
		f_PO_user_home_deregistration(v_ueA);
		f_PO_user_home_deregistration(v_ueB);
		f_cf_roam_call_down(v_gmA, v_mw);
		f_cf_int_call_down(v_config);
		
		//unmap/disconnet component ports
		f_cf_user_down(v_ueA);
+1 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ module AtsImsIot_TestCases_REG {
		// unmap/disconnect component ports
		f_cf_user_down(v_ueB);
		f_cf_roam_reg_down(v_gmA, v_mw);
		f_cf_adapter_down();
	}
	
	/**
Loading