Compare Revisions

The credentials to download the source code are:
 Username: svnusers
 Password: svnusers

Ignore whitespace Rev 193 → Rev 194

/branches/v3/ttcn/LibIms_Interface.ttcn
4,21 → 4,12
* @desc This module provides the types used by the test component for SIP-IMS tests. Module become from STF306 and STF334-336 This module is part of LibImsV2.
*/
module LibIms_Interface {
// 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_Templates all;
import from LibSip_PIXITS all;
import from LibSip_Interface all;
// LibIms
import from LibIms_SIPTypesAndValues all;
 
group AdressTypes {
group adressTypes {
 
type component ImsComponent extends SipComponent {
// general variables
/branches/v3/ttcn/LibIms_SIPTypesAndValues.ttcn
4,65 → 4,7
* @desc This module provides the types and constants used by the test component for SIP tests. This module is part of LibImsV3.
*/
module LibIms_SIPTypesAndValues {
// SipAts
import from LibSip_SDPTypes all;
import from LibSip_XMLTypes all;
 
group Constants {
 
const integer c_ISUP_HOP_COUNT := 31; // TODO replace this value with appropriate PIXIT parameter
group UserProfileConstants {
// number of user profile (RESERVED: from 1-10 for SIP profile)
const integer c_userProfile_UE1atSUThome := 11; // location is SUT domain
const integer c_userProfile_UE2atSUThome := 12; // location is SUT domain
const integer c_userProfile_UE3atSUThome := 13; // location is SUT domain
const integer c_userProfile_UE4atSUThome := 14; // location is SUT domain
const integer c_userProfile_UE1atSUTvisiting := 21; // location is SUT domain
const integer c_userProfile_IBCFwithUnknownUE := 28; // location is IMS1 domain
const integer c_userProfile_IBCFwithHomeUE := 29; // location is IMS1 domain
const integer c_userProfile_IBCFwithVisitingUE := 31; // location is IMS1 domain
const integer c_userProfile_PCSCFwithHomeUE := 41; // location is IMS1 domain
const integer c_userProfile_PCSCFwithVisitingUE := 42; // location is IMS1 domain
const integer c_userProfile_PCSCFwithVisitingUE2 := 43; // location is IMS1 domain
const integer c_userProfile_PCSCFwithUnknownVisitingUE := 44; // location is IMS1 domain
const integer c_userProfile_ICSCFwithHomeUE := 45; // location is IMS1 domain
const integer c_userProfile_SCSCFwithHomeUE := 46; // location is IMS1 domain
const integer c_userProfile_SCSCFwithHomeUE_domain := 55;
const integer c_userProfile_ECSCFwithHomeUE := 47; // location is IMS1 domain
const integer c_userProfile_ISUP := 49;
const integer c_userProfile_AS1 := 51; // Isc userProfile at AS1
const integer c_userProfile_AS2 := 52; // Isc userProfile at AS2
// number of interface profile
const integer c_interfaceProfile_IMS_SUT_IBCF1 := 100; // Ic interface at IBCF1 located in SUT
const integer c_interfaceProfile_IMS_SUT_IBCF2 := 101; // Ic interface at IBCF2 located in SUT
const integer c_interfaceProfile_IMS_SUT_PCSCF1 := 110; // Gm interface towards UE1 located in SUT
const integer c_interfaceProfile_IMS_SUT_PCSCF2 := 111; // Gm interface towards UE2 located in SUT
const integer c_interfaceProfile_IMS_SUT_PCSCF := 112; // Mw interface at P-CSCF located in SUT
const integer c_interfaceProfile_IMS_SUT_SCSCF := 113; // Mw interface at S-CSCF located in SUT
const integer c_interfaceProfile_IMS_SUT_ICSCF := 114; // Mw interface at I-CSCF located in SUT
const integer c_interfaceProfile_IMS_SUT_MGCF := 115; // Mw interface at MGCF located in SUT
const integer c_interfaceProfile_IMS_SUT_AS := 116; // Isc interface at AS located in SUT
const integer c_interfaceProfile_IMS_SUT_ECSCF := 117; // Mw interface at E-CSCF located in SUT
// number of conference profile
const integer c_conferenceProfile_factoryURI := 800; // confernece factory URI
//NOTE STF471 added
const integer c_conferenceProfile_predefinedURI := 801; // confernece factory URI
// number of service profile
const integer c_serviceProfile_EMERGENCY := 911;
const integer c_serviceProfile_EMERGENCY_INVALID := 912;
 
// number of SIPURL identifiers
const integer c_interfaceSIPURL_IMS_SUT_PCSCF1_domain := 1101;
const integer c_interfaceSIPURL_IMS_SUT_PCSCF1_ip := 1102;
} // end group UserProfileConstants
 
 
 
} // end group Constants
 
 
group otherTypes {
type record ImsInterfaceProfile {
/**
/branches/v3/ttcn/LibIms_Steps.ttcn
6,12 → 6,10
module LibIms_Steps {
// LibSip
import from LibSip_SIPTypesAndValues all;
import from LibSip_SDPTypes all;
import from LibSip_Templates all;
import from LibSip_Steps all;
import from LibSip_PIXITS all;
import from LibSip_Interface all;
import from LibSip_XMLTypes all;
import from LibSip_MessageBodyTypes all;
// LibIms
import from LibIms_Templates all;
25,11 → 23,9
/**
* @desc Adds new Via parameter
* @param p_message (request) SIP message to be used to prepair via header
* @param p_userprofile The user profile
*/
function f_addNewViaParameter(
in Request p_message,
in integer p_userprofile
in Request p_message
) runs on ImsComponent {
var integer v_intVia;
var integer i := 0;
55,12 → 51,13
) runs on ImsComponent {
var integer v_intVia;
var Via v_via := c_empty_Via;
var integer i := 0;
 
if (ispresent(p_message.msgHeader.via)) {
 
v_intVia := lengthof(p_message.msgHeader.via.viaBody) - 1;
 
for (var integer i := 0; i < v_intVia; i := i + 1) {
for (i := 0; i < v_intVia; i := i + 1) {
v_via.viaBody[i] := p_message.msgHeader.via.viaBody[i + 1];
}
vc_via := v_via;
76,7 → 73,6
) runs on ImsComponent {
var integer v_intRoute, v_intRecordRoute;
var integer i := 1;
var integer j := 0;
var RouteBody v_route1;
var Route v_newRoute;
v_newRoute.fieldName := ROUTE_E;
93,7 → 89,7
if (isvalue(p_message.msgHeader.recordRoute)) {
 
v_intRecordRoute := lengthof(p_message.msgHeader.recordRoute.routeBody);
while (j < v_intRecordRoute) {
while (0 < v_intRecordRoute) {
p_message.msgHeader.recordRoute.routeBody[v_intRecordRoute] := p_message.msgHeader.recordRoute.routeBody[v_intRecordRoute - 1];
v_intRecordRoute := v_intRecordRoute - 1;
}
110,14 → 106,12
in RecordRoute p_rr
) runs on ImsComponent
return template RecordRoute {
template RecordRoute v_recordRoute := omit;
var integer v_intRecordRoute;
var integer i := 1;
var integer j := 0;
var template RecordRoute v_recordRoute := omit;
 
v_intRecordRoute := lengthof(p_rr.routeBody);
if (v_intRecordRoute > 0) {
while (j < v_intRecordRoute) {
while (0 < v_intRecordRoute) {
p_rr.routeBody[v_intRecordRoute] := p_rr.routeBody[v_intRecordRoute - 1];
v_intRecordRoute := v_intRecordRoute - 1;
}
177,7 → 171,7
vc_requestUri2 := v_request.requestLine.requestUri;
vc_to := v_request.msgHeader.toField;
vc_contact := v_request.msgHeader.contact;
f_addNewViaParameter(v_request, c_userProfile_AS1);
f_addNewViaParameter(v_request);
f_addNewRecordRouteAndRemoveRoutParameter(v_request);
}
else {
192,10 → 186,8
 
/**
* @desc Sets header fields for forward request from AS in case if AS acts as Proxy
* @param p_cSeq_s The current cSeq
*/
function f_setHeadersForwardResponseFromAS(
inout CSeq p_cSeq_s
) runs on ImsComponent {
var Response v_response;
v_response := vc_response;
359,7 → 351,7
in boolean p_orginatingSide,
in SipUrl p_to_user
) runs on ImsComponent {
var integer v_tmp, v_i, v_j, v_nbroute;
var integer v_tmp, i, j, v_nbroute;
var Request v_request;
v_request := vc_request;
 
382,9 → 374,9
vc_recordRoute := valueof(v_request.msgHeader.recordRoute);
v_nbroute := lengthof(vc_recordRoute.routeBody);
// copy and reverse the order of the routes in route header
for (v_i := 0; v_i <= (v_nbroute - 1); v_i := v_i + 1) {
v_j := v_nbroute - 1 - v_i;
vc_route.routeBody[v_j] := vc_recordRoute.routeBody[v_i];
for (i := 0; i <= (v_nbroute - 1); i := i + 1) {
j := v_nbroute - 1 - i;
vc_route.routeBody[j] := vc_recordRoute.routeBody[i];
}
vc_route.fieldName := ROUTE_E;
vc_boo_recordRoute := true;
411,8 → 403,6
inout CSeq p_cSeq_s,
in charstring p_method
) runs on SipComponent {
var SemicolonParam_List v_params;
 
p_cSeq_s.fieldName := CSEQ_E;
p_cSeq_s.seqNumber := p_cSeq_s.seqNumber + 1;
p_cSeq_s.method := p_method;
426,8 → 416,8
vc_via := {
fieldName := VIA_E,
viaBody := {
valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile)),
valueof(m_ViaBody_virtualUEinPCSCF(vc_branch_ICSCF, vc_userprofile))
valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile)),
valueof(m_ViaBody_virtualUEinPCSCF(vc_branch_ICSCF, vc_userprofile))
}
};
} // end function f_setHeadersGeneral_ICSCF
559,27 → 549,27
* @param p_mb The message body of the PRACK message
* @param p_rack_cseq The cSeq of the PRACK message
*/
function f_SendPRACK_sdp(
function f_sendPRACK_sdp(
template(value) MessageBody p_mb,
CSeq p_rack_cseq
) runs on SipComponent {
var integer responseNum := 1;
var template(value) PRACK_Request prackReq;
var integer v_responseNum := 1;
var template(value) PRACK_Request v_prackReq;
 
f_setHeadersGeneral(vc_cSeq, "PRACK"); // cseq, contact, branch, via
if (isvalue(vc_response.msgHeader.rSeq.responseNum)) {
responseNum := vc_response.msgHeader.rSeq.responseNum;
v_responseNum := vc_response.msgHeader.rSeq.responseNum;
}
vc_rAck := m_RAck(responseNum, p_rack_cseq.seqNumber, p_rack_cseq.method);
vc_rAck := m_RAck(v_responseNum, p_rack_cseq.seqNumber, p_rack_cseq.method);
 
prackReq := m_PRACK_Request_sdp(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, vc_rAck, p_mb);
v_prackReq := m_PRACK_Request_sdp(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, vc_rAck, p_mb);
 
// added route header if required
if (isvalue(vc_response.msgHeader.recordRoute)) {
prackReq.msgHeader.route := f_route();
v_prackReq.msgHeader.route := f_route();
}
 
SIPP.send(prackReq) to vc_sent_label;
SIPP.send(v_prackReq) to vc_sent_label;
}
 
}
587,17 → 577,17
 
//NOTE STF471: removed function f_init_userprofile, have to move up to specific ATS
 
/**
* @desc Initializes the To header
* @param p_user Identifies the selected user's SIP URL
* @return The To header
/**
* @desc Initializes the To header
* @param p_user Identifies the selected user's SIP URL
* @return The To header
*/
function f_initToHeader(
in SipUrl p_user
) runs on ImsComponent
return To {
var To p_to := c_empty_To;
p_to := {
var To v_to := c_empty_To;
v_to := {
fieldName := TO_E,
addressField := {
nameAddr := {
607,14 → 597,14
}, // end addressField
toParams := omit
};
return (p_to);
return (v_to);
}
 
/**
* @desc Initializes the From header
* @param p_user Identifies the selected user' SIP URL
* @param p_tag_str The string value of the tag id
* @return The From header
/**
* @desc Initializes the From header
* @param p_user Identifies the selected user' SIP URL
* @param p_tag_str The string value of the tag id
* @return The From header
*/
function f_initFromHeader(
in SipUrl p_user,
740,7 → 730,7
}
[] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callId, p_cSeq_s)) {
tc_ack.stop;
log("Authorization was not requested as expected");
log("*** " & __SCOPE__ & ": INCONC: Authorization was not requested as expected ***");
setverdict(inconc);
}
}
772,7 → 762,7
)
) runs on ImsComponent {
var SipUrl v_passociated_url;
var Authorization p_authorization;
// Awaiting 1st REGISTER
f_awaitingREGISTER(mw_REGISTER_unauthorizedRequest_IMS);
 
781,7 → 771,7
m_Response_WWWauthenticate_IMS(
c_statusLine401,
vc_callId,
vc_cSeq,
p_cSeq_s,
vc_caller_From,
vc_caller_To,
vc_via,
808,7 → 798,7
};
}
v_passociated_url := vc_caller_From.addressField.nameAddr.addrSpec;
f_sendResponse(m_Response_2xxonREGISTER_IMS(c_statusLine200, vc_callId, vc_cSeq, vc_callee_From, vc_callee_To, vc_via, vc_contact, p_to_user, v_passociated_url));
f_sendResponse(m_Response_2xxonREGISTER_IMS(c_statusLine200, vc_callId, p_cSeq_s, vc_callee_From, vc_callee_To, vc_via, vc_contact, p_to_user, v_passociated_url));
} // end function f_awaitingRegistration_IMS
 
/**
835,18 → 825,16
* @param p_host TODO formerly PX_IMS_TS_PCSCF_HOME_DOMAIN
* @param p_port TODO formerly PX_IMS_TS_PCSCF_PORT
*/
function f_RemoveRegistration_IMS(
inout CSeq p_cSeq,
function f_removeRegistration_IMS(
inout CSeq p_cSeq_s,
template(value) charstring p_host,
template(value) integer p_port
) runs on SipComponent {
var CommaParam_List v_challenge;
var Credentials v_credentials;
var template(value) REGISTER_Request v_request;
 
if (PX_SIP_REGISTRATION) {
f_setHeaders_deREGISTER(p_cSeq);
v_request := m_REGISTER_Request_expires_IMS(vc_requestUri, vc_callIdReg, p_cSeq, vc_from, vc_to, vc_via, vc_contact, vc_authorization, p_host, p_port, "0");
f_setHeaders_deREGISTER(p_cSeq_s);
v_request := m_REGISTER_Request_expires_IMS(vc_requestUri, vc_callIdReg, p_cSeq_s, vc_from, vc_to, vc_via, vc_contact, vc_authorization, p_host, p_port, "0");
v_request.msgHeader.route := f_route();
 
f_SendREGISTER(v_request);
855,26 → 843,26
// and Re-send REGISTER request with Authorization header
tc_ack.start(PX_SIP_TACK);
alt {
[] SIPP.receive(mw_Response_Base(c_statusLine401, vc_callIdReg, p_cSeq)) -> value vc_response {
[] SIPP.receive(mw_Response_Base(c_statusLine401, vc_callIdReg, p_cSeq_s)) -> value vc_response {
tc_ack.stop;
// set headers via, cseq and authorization
f_setHeaders_2ndREGISTER(p_cSeq);
v_request := m_REGISTER_Request_expires_IMS(vc_requestUri, vc_callIdReg, p_cSeq, vc_from, vc_to, vc_via, vc_contact, vc_authorization, p_host, p_port, "0");
f_setHeaders_2ndREGISTER(p_cSeq_s);
v_request := m_REGISTER_Request_expires_IMS(vc_requestUri, vc_callIdReg, p_cSeq_s, vc_from, vc_to, vc_via, vc_contact, vc_authorization, p_host, p_port, "0");
v_request.msgHeader.route := f_route();
// Re-send protected REGISTER
f_SendREGISTER(v_request); // LibSip
// awaiting 200 OK REGISTER
f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callIdReg, p_cSeq));
f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callIdReg, p_cSeq_s));
}
[] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callIdReg, p_cSeq)) -> value vc_response {
[] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callIdReg, p_cSeq_s)) -> value vc_response {
tc_ack.stop;
f_setHeadersOnReceiptOfResponse(vc_cSeq, vc_response);
log("Authorization was not requested as expected");
log("*** " & __SCOPE__ & ": INFO: Authorization was not requested as expected ***");
}
}
}
else {
f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callIdReg, p_cSeq));
f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callIdReg, p_cSeq_s));
}
}
} // end f_RemoveRegistration_IMS
1060,9 → 1048,9
* @param p_cSeq_s The current cseq
*/
function f_IMS_postamble_withDeRegistration(
CSeq p_CSeq
CSeq p_cSeq_s
) runs on ImsComponent {
f_RemoveRegistration(p_CSeq); // TODO check if applicable for IMS
f_RemoveRegistration(p_cSeq_s); // TODO check if applicable for IMS
f_terminate_component();
}
 
1173,47 → 1161,40
f_sendResponse(m_Response_2xxonREGISTER_IMS(c_statusLine200, vc_callId, vc_cSeq, vc_callee_From, vc_callee_To, vc_via, vc_contact, p_to_user, v_passociated_url));
}
 
//NOTE STF471: renamed f_SIP_postamble_UE(1|2)_withoutRegistration to f_SIP_postamble_UE_withoutRegistration
/**
* @desc Terminates component without registration
*/
function f_SIP_postamble_UE1_withoutRegistration(
function f_SIP_postamble_UE_withoutRegistration(
) runs on ImsComponent {
f_terminate_component();
}
 
/**
* @desc Terminates component without registration
*/
function f_SIP_postamble_UE2_withoutRegistration(
) runs on ImsComponent {
f_terminate_component();
}
 
/**
* @desc Sends BYE and awaits response (IMS)
* @param p_requestUri The Request URI
* @param p_CallId CallId parameter for outgoing BYE
* @param p_cSeq CSeq parameter for outgoing BYE
* @param p_callId CallId parameter for outgoing BYE
* @param p_cSeq_s CSeq parameter for outgoing BYE
* @param p_from From parameter for outgoing BYE
* @param p_to To parameter for outgoing BYE
*/
function f_terminateCall_IMS(
SipUrl p_requestUri,
CallId p_CallId,
inout CSeq p_cSeq,
CallId p_callId,
inout CSeq p_cSeq_s,
From p_from,
template(value) To p_to
) runs on ImsComponent {
LibSip_Steps.f_setHeadersBYE(p_cSeq);
LibSip_Steps.f_setHeadersBYE(p_cSeq_s);
// Sending of a BYE request to release the call and expect a final response
f_SendBYE(m_BYE_Request_IMS(p_requestUri, p_CallId, p_cSeq, p_from, p_to, vc_via, vc_route));
f_SendBYE(m_BYE_Request_IMS(p_requestUri, p_callId, p_cSeq_s, p_from, p_to, vc_via, vc_route));
 
tc_resp.start(PX_SIP_TRESP);
alt {
[] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_CallId, p_cSeq)) {
[] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_callId, p_cSeq_s)) {
repeat;
}
[] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_CallId, p_cSeq)) {
[] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_callId, p_cSeq_s)) {
tc_resp.stop;
}
// timeout should be handled in default_alt_step
1223,8 → 1204,8
/**
* @desc Sends BYE and awaits response (UE)
* @param p_requestUri The Request URI
* @param p_CallId CallId parameter for outgoing BYE
* @param p_cSeq CSeq parameter for outgoing BYE
* @param p_callId CallId parameter for outgoing BYE
* @param p_cSeq_s CSeq parameter for outgoing BYE
* @param p_from From parameter for outgoing BYE
* @param p_to To parameter for outgoing BYE
* @param p_recordRoute RecordRoute parameter for outgoing BYE - default: omit
1231,28 → 1212,29
*/
function f_terminateCall_UE(
SipUrl p_requestUri,
CallId p_CallId,
inout CSeq p_cSeq,
CallId p_callId,
inout CSeq p_cSeq_s,
From p_from,
template(value) To p_to,
template RecordRoute p_recordRoute := omit
) runs on ImsComponent {
LibSip_Steps.f_setHeadersBYE(p_cSeq);
var Route v_route;
LibSip_Steps.f_setHeadersBYE(p_cSeq_s);
// Sending of a BYE request to release the call and expect a final response
if (ispresent(p_recordRoute)) {
var Route v_route := {ROUTE_E, valueof(p_recordRoute.routeBody)};
f_SendBYE(m_BYE_Request_UE(p_requestUri, p_CallId, p_cSeq, p_from, valueof(p_to), vc_via, v_route));
v_route := {ROUTE_E, valueof(p_recordRoute.routeBody)};
f_SendBYE(m_BYE_Request_UE(p_requestUri, p_callId, p_cSeq_s, p_from, valueof(p_to), vc_via, v_route));
}
else {
f_SendBYE(m_BYE_Request_UE(p_requestUri, p_CallId, p_cSeq, p_from, valueof(p_to), vc_via, vc_route));
f_SendBYE(m_BYE_Request_UE(p_requestUri, p_callId, p_cSeq_s, p_from, valueof(p_to), vc_via, vc_route));
}
 
tc_resp.start(PX_SIP_TRESP);
alt {
[] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_CallId, p_cSeq)) {
[] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_callId, p_cSeq_s)) {
repeat;
}
[] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_CallId, p_cSeq)) {
[] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_callId, p_cSeq_s)) {
tc_resp.stop;
}
// timeout should be handled in default_alt_step
1262,8 → 1244,8
/**
* @desc Sends BYE and awaits response and De-registration
* @param p_requestUri The Request URI
* @param p_CallId CallId parameter for outgoing BYE
* @param p_cSeq CSeq parameter for outgoing BYE
* @param p_callId CallId parameter for outgoing BYE
* @param p_cSeq_s CSeq parameter for outgoing BYE
* @param p_from From parameter for outgoing BYE
* @param p_to To parameter for outgoing BYE
* @param p_qop of the peer UE (alternatively)
1270,22 → 1252,22
*/
function f_terminateCall_UE_withDeReg(
SipUrl p_requestUri,
CallId p_CallId,
inout CSeq p_cSeq,
CallId p_callId,
inout CSeq p_cSeq_s,
From p_from,
template(value) To p_to,
in charstring p_qop
) runs on ImsComponent {
LibSip_Steps.f_setHeadersBYE(p_cSeq);
LibSip_Steps.f_setHeadersBYE(p_cSeq_s);
// Sending of a BYE request to release the call and expect a final response
f_SendBYE(m_BYE_Request_UE(p_requestUri, p_CallId, p_cSeq, p_from, p_to, vc_via, vc_route));
f_SendBYE(m_BYE_Request_UE(p_requestUri, p_callId, p_cSeq_s, p_from, p_to, vc_via, vc_route));
 
tc_resp.start(PX_SIP_TRESP);
alt {
[] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_CallId, p_cSeq)) {
[] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_callId, p_cSeq_s)) {
repeat;
}
[] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_CallId, p_cSeq)) {
[] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_callId, p_cSeq_s)) {
tc_resp.stop;
}
// timeout should be handled in default_alt_step
1297,10 → 1279,10
}
group defaults {
 
/**
/**
* @desc Altstep for clearing registration (IMS user)
* @param p_to_user The selected user's SIP URL
* @param p_qop of the peer UE (alternatively)
* @param p_qop of the peer UE (alternatively)
* @verdict fail for all unexpected branches
*/
altstep a_clearRegistration_IMSuser(
1311,6 → 1293,7
var Request v_request;
var CSeq v_cSeq;
[] any timer.timeout {
log("*** " & testcasename() & ": FAIL: Timeout while waiting for message. ***");
setverdict(fail);
all timer.stop;
// TODO check how to solve release of call
1379,7 → 1362,6
[] SIPP.receive(mw_SUBSCRIBE_Request_Base) -> value v_request sender vc_sent_label {
f_setHeadersOnReceiptOfRequest(v_request);
f_sendResponse(m_Response_Contact(c_statusLine200, vc_callId, vc_cSeq, vc_callee_From, vc_callee_To, vc_via, vc_contact));
log(v_request.msgHeader.contact.contactBody.contactAddresses[0].addressField.nameAddr.addrSpec);
f_SendNOTIFY(m_NOTIFY_Request_contact(v_request.msgHeader.contact.contactBody.contactAddresses[0].addressField.nameAddr.addrSpec, vc_callId, vc_cSeq, vc_callee_From, vc_callee_To, vc_via, vc_contact));
f_awaitingOkResponse(vc_cSeq);
repeat;
1386,6 → 1368,7
}
// unexpected BYE is acknowledged to avoid retransmissions
[] SIPP.receive(mw_BYE_Request_Base(?)) -> value v_request sender vc_sent_label {
log("*** " & testcasename() & ": FAIL: Unexpected BYE message received. ***");
setverdict(fail);
f_setHeadersOnReceiptOfRequest(v_request);
f_send200OK();
1395,6 → 1378,7
}
// unexpected CANCEL is acknowledged to avoid retransmissions
[] SIPP.receive(mw_CANCEL_Request_Base(?)) -> value v_request sender vc_sent_label {
log("*** " & testcasename() & ": FAIL: Unexpected CANCEL message received. ***");
setverdict(fail);
f_setHeadersOnReceiptOfRequest(v_request);
// Answer to the CANCEL
1405,6 → 1389,7
}
// catch 4xx response
[] SIPP.receive(mw_Response_Base(mw_statusLine4xx, vc_callId, ?)) -> value v_response sender vc_sent_label {
log("*** " & testcasename() & ": FAIL: Unexpected 4xx response received. ***");
setverdict(fail);
v_cSeq := valueof(v_response.msgHeader.cSeq);
f_setHeadersOnReceiptOfResponse(v_cSeq, v_response);
1416,6 → 1401,7
}
// catch 5xx response
[] SIPP.receive(mw_Response_Base(mw_statusLine5xx, vc_callId, ?)) -> value v_response sender vc_sent_label {
log("*** " & testcasename() & ": FAIL: Unexpected 5xx response received. ***");
setverdict(fail);
v_cSeq := valueof(v_response.msgHeader.cSeq);
f_setHeadersOnReceiptOfResponse(v_cSeq, v_response);
1427,11 → 1413,13
}
// catch invalid REGISTER
[] SIPP.receive(mw_REGISTER_Request_Base) -> value v_request sender vc_sent_label {
log("*** " & testcasename() & ": FAIL: Unexpected REGISTER received. ***");
setverdict(fail);
f_componentStop();
}
// any
[] SIPP.receive {
log("*** " & testcasename() & ": FAIL: Unexpected message received. ***");
setverdict(fail);
all timer.stop;
action("Please de-register");
1446,9 → 1434,9
*/
altstep a_altstep_AS(
) runs on SipComponent {
var Response v_response;
var Request v_request;
[] any timer.timeout {
log("*** " & testcasename() & ": FAIL: Timeout while waiting for message. ***");
setverdict(fail);
all timer.stop;
}
1469,6 → 1457,7
}
// unexpected CANCEL is acknowledged to avoid retransmissions
[] SIPP.receive(mw_CANCEL_Request_Base(?)) -> value v_request sender vc_sent_label {
log("*** " & testcasename() & ": FAIL: Unexpected CANCEL message received. ***");
setverdict(fail);
f_setHeadersOnReceiptOfRequest(v_request);
f_send200OK();
1475,17 → 1464,19
}
// unexpected BYE is acknowledged to avoid retransmissions
[] SIPP.receive(mw_BYE_Request_Base(?)) -> value v_request sender vc_sent_label {
log("*** " & testcasename() & ": FAIL: Unexpected BYE message received. ***");
setverdict(fail);
f_setHeadersOnReceiptOfRequest(v_request);
f_send200OK();
}
[] SIPP.receive(mw_Response_Base(?, vc_callId, vc_cSeq)) -> value vc_response {
log("Response matched in DEFAULT!!!");
log("*** " & testcasename() & ": FAIL: Unexpected response message in " & __SCOPE__ & " received. ***");
setverdict(fail);
repeat;
}
// any
[] SIPP.receive {
log("*** " & testcasename() & ": FAIL: Unexpected message received. ***");
setverdict(fail);
all timer.stop;
}
/branches/v3/ttcn/LibIms_Templates.ttcn
9,7 → 9,6
 
// LibSip
import from LibSip_SIPTypesAndValues all;
import from LibSip_SDPTypes all;
import from LibSip_Templates all;
import from LibSip_Steps all;
import from LibSip_PIXITS all;
101,7 → 100,7
}
}
 
group Subfields {
group subfields {
 
template(value) SipUrl m_SipUrl_currIpaddr_CSCF(
template(value) SipUserProfile p_userprofile
175,7 → 174,7
}
}
 
group HeaderFieldTemplates {
group headerFieldTemplates {
 
template(value) MinSE m_minSE(
template(value) DeltaSec p_ds
721,11 → 720,11
}
 
 
} // end group HeaderFieldTemplates
} // end group headerFieldTemplates
 
group MessageBodyTemplates {
group messageBodyTemplates {
 
group XMLTemplates {
group xmlTemplates {
 
template(value) XmlBody m_XmlBody_ConfInfo(
template(value) Conference_type p_confInfo
871,9 → 870,9
}
 
 
} // end group XMLTemplates
} // end group xmlTemplates
 
group ACR_CBTemplates {
group acrCbTemplates {
 
template(value) Incoming_communication_barring m_ICB(
template(value) RuleType p_ruleType
928,9 → 927,9
}
 
 
} // end group ACR_CBTemplates
} // end group acr_cbTemplates
 
group CUGTemplates {
group cugTemplates {
 
template(value) Cug m_CUG(
template(omit) CugRequestType p_crt := omit,
976,9 → 975,9
cugIndex := p_cugIndex
}
 
} // end group CUGTemplates
} // end group cugTemplates
 
group CWTemplates {
group cwTemplates {
 
template(value) Ims_cw m_CW(
template(value) TEmptyType p_cwi
996,9 → 995,9
elem_list := ?
}
 
} // end group CWTemplates
} // end group cwTemplates
 
group MCIDTemplates {
group mcidTemplates {
 
template(value) Mcid m_mcid_request_mcidIndicatorTrue := {
choice := {
1063,9 → 1062,9
}
}
 
} // end group MCIDTemplates
} // end group mcidTemplates
 
group PSTNTemplates {
group pstnTemplates {
 
template(value) PSTN_transit m_PSTN_transit_BC1(
template(value) BearerCapabilityType p_bct
1316,9 → 1315,9
hLOctet4Audio := *
}
 
} // end group PSTNTemplates
} // end group pstnTemplates
 
group CDIVNTemplates {
group cdivnTemplates {
 
/* general CDIVN subscription */
template(value) Comm_div_info_type m_CDIVN_sub := {
1342,9 → 1341,9
elem_list := {}
}
 
} // end grouup CDIVNTemplates
} // end group cdivnTemplates
 
group ResourceListsTemplates {
group resourceListsTemplates {
 
template(value) Resource_lists m_ResourceList_2Users(
template(value) EntryType p_user1,
1386,9 → 1385,9
elem_list := {}
}
 
} // end grouup ResourceListsTemplates
} // end group resourceListsTemplates
 
group Ims3gppTemplates {
group ims3gppTemplates {
 
template(present) TIMS3GPP mw_Ims_3gpp_CW := {
version := 1.0,
1404,9 → 1403,9
elem_list := ?
}
 
} // end group Ims3gpp
} // end group ims3gppTemplates
 
group CONFTemplates {
group confTemplates {
 
template(value) XSD.Boolean boolXSD_true := true;
1440,7 → 1439,7
status := p_epStatus,
joining_method := p_joinMethod,
joining_info := omit,
disconnection_method := omit,
disconnection_method := p_discMethod,
disconnection_info := omit,
media_list := {p_mediastatus}, // optional,
call_info := omit,
1558,13 → 1557,13
}
}
 
} // end group MessageBodyTemplates
} // end group messageBodyTemplates
 
group MessageTemplates {
group messageTemplates {
 
group modified_templates {
group modifiedTemplates {
 
group request_send {
group requestSend {
 
template(value) ACK_Request m_ACK_Request_IMS(
template(value) SipUrl p_requestUri,
1650,7 → 1649,7
route := p_route,
recordRoute := p_recordRoute // used in case of AS as TS - for ISC interface
}
} // End of temlate m_BYE_Request_IMS
} // end of temlate m_BYE_Request_IMS
 
template(value) BYE_Request m_BYE_Request_Reason_IMS(
template(value) SipUrl p_requestUri,
2922,9 → 2921,9
}
}
 
} // end group request_send
} // end group requestSend
 
group request_receive {
group requestReceive {
 
template(present) ACK_Request mw_ACK_Request_noPaccessNetworkInfo(
template CallId p_callId
3428,6 → 3427,7
toField := p_to,
event := m_Event_reg,
pAccessNetworkInfo := *,
pAssertedID := p_pAssertedID,
pChargingVector := p_pChargingVector
}
}
3442,11 → 3442,11
}
}
 
} // end group request_receive
} // end group requestReceive
 
group response_send {
group responseSend {
group response_1xx {
group responseSend1xx {
 
// Status-Line [7.2 ]
type record StatusLine_18x {
3775,9 → 3775,9
}
}
 
} // end group response1xx
} // end group responseSend1xx
 
group response_2xx {
group responseSend2xx {
 
// Status-Line [7.2 ]
type record StatusLine_2xx {
4198,9 → 4198,9
messageBody := p_mb
}
 
} // end group response_2xx
} // end group responseSend2xx
 
group response_3xx {
group responseSend3xx {
 
// Status-Line [7.2 ]
type record StatusLine_3xx {
4244,9 → 4244,9
}
}
 
} // end group response_3xx
} // end group responseSend3xx
 
group response_4xx {
group responseSend4xx {
 
// Status-Line [7.2 ]
type record StatusLine_4xx {
4304,7 → 4304,7
}
}
 
} // end group response_4xx
} // end group responseSend4xx
 
template(value) Response m_Response_onCANCEL(
template(value) StatusLine p_statusLine,
4373,11 → 4373,11
}
}
 
} // end group response_send
} // end group responseSend
 
group response_receive {
group responseReceive {
group response_2xx {
group responseReceive2xx {
 
// NOTE STF471: removed statusline parameter as it is fixed 200 status code
template(present) Response mw_Response_200onINVITE_noPChargingVector_UE(
4494,9 → 4494,9
}
}
 
} // end group response_2xx
} // end group responseReceive2xx
 
group response_4xx {
group responseReceive4xx {
 
// NOTE STF471: removed statusline parameter as it is a fixed 401 status code
template(present) Response mw_Response_401onREGISTER_securityServer_UE(
4530,7 → 4530,7
}
}
 
} // end group response_4xx
} // end group responseReceive4xx
 
// NOTE STF471: changed statusline parameter to statusCode parameter
template(present) Response mw_Response_SecServer_WWWAuth_UE(
4631,10 → 4631,10
}
}
 
} // end response_receive
} // end group responseReceive
 
} // end modified_templates
} // end group modifiedTemplates
 
} // end Message_templates
} // end group messageTemplates
} // end module LibIms_Templates