Compare Revisions

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

Ignore whitespace Rev 121 → Rev 122

/trunk/ttcn/LibIms_Steps.ttcn
1036,7 → 1036,7
vc_contact.contactBody.contactAddresses[0].contactParams := {{"expires",int2str(3600)}};
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,f_initSipUrl(c_userProfile_SCSCFwithHomeUE),v_passociated_url));
 
vc_DeregDone := false;
}//end function f_awaitingRegistration_IMS_gm
 
 
1349,5 → 1349,170
}
group defaults {
altstep a_clearRegistration_IMSuser() runs on SipComponent
{
var Response v_response;
var Request v_request;
[] any timer.timeout
{
setverdict(fail);
all timer.stop;
//TODO check how to solve release of call
//f_SendCANCEL(m_CANCEL_Request(vc_callId, vc_cSeq, vc_from, vc_cancel_To, vc_reqHostPort, vc_via )); // difference between registration state or transaction state
vc_callId := vc_callIdReg;
action("Please de-register");
f_IMS_awaitDeRegistration();
f_componentStop();
}
// allow repeated INVITEs
[vc_ignore_invite] SIPP.receive(mw_INVITE_Request_Base)
{
repeat
}
// allow repeated BYEs after ack of the first BYE
[vc_ignore_bye] SIPP.receive (mw_BYE_Request_Base(?))
{
repeat
}
[] SIPP.receive (mw_ACK_Request_Base(?))
{
repeat
}
// allow 100 replies
[] SIPP.receive(mw_Response_Base(c_statusLine100,?, ?))
{
repeat
}
// ignore 181 if flag is set (following TS 183004 §4.5.2.1)
[vc_ignore181] SIPP.receive(mw_Response_Base(c_statusLine181,vc_callId, vc_cSeq))-> value v_response sender vc_sent_label
{
f_setHeadersOnReceiptOfResponse(v_response.msgHeader.cSeq, v_response);
repeat;
}
// according to SIP chap.8.1.3.2
[] SIPP.receive(mw_Response_Base(c_statusLine183,vc_callId, vc_cSeq))
{
repeat;
}
 
// ignore 484 if flag is set
[vc_ignore484] SIPP.receive(mw_Response_Base(c_statusLine484,vc_callId, vc_cSeq))
{
repeat
}
[vc_ignore4xx] SIPP.receive(mw_Response_Base(mw_statusLine4xx,vc_callId, ?))-> value v_response sender vc_sent_label
{
f_setHeadersOnReceiptOfResponse(v_response.msgHeader.cSeq, v_response);
f_SendACK(m_ACK_Request_route(vc_requestUri, vc_callId, v_response.msgHeader.cSeq, vc_from, vc_to, vc_via, vc_route));
repeat
}
[vc_ignore200OKinv] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callId, ?))
{
repeat
}
[] SIPP.receive(mw_INFO_Request_Base(vc_callId))->value v_request sender vc_sent_label
{
f_setHeadersOnReceiptOfRequest(v_request);
f_send200OK();
repeat
}
// awaiting of Notify
[] SIPP.receive(mw_NOTIFY_Request_Base(vc_callId))->value v_request sender vc_sent_label
{
f_setHeadersOnReceiptOfRequest(v_request);
f_send200OK();
repeat
}
// awaiting of subscribe from UE
[vc_ignore_subscribe] SIPP.receive(mw_SUBSCRIBE_Request_Base)-> value v_request sender vc_sent_label
{
f_setHeadersOnReceiptOfSUBSCRIBE(v_request);
f_send200OK();
repeat;
}
//awaiting of subscribe on proxy
[] 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));
//f_setHeadersGeneral(vc_cSeq, "NOTIFY"); // cseq, contact, branch, via
//f_SendNOTIFY(m_NOTIFY_Request_contact(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_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
}
// unexpected BYE is acknowledged to avoid retransmissions
[] SIPP.receive(mw_BYE_Request_Base(?))-> value v_request sender vc_sent_label
{
setverdict(fail);
f_setHeadersOnReceiptOfRequest(v_request);
f_send200OK();
action("Please de-register");
f_IMS_awaitDeRegistration();
f_componentStop();
}
// unexpected CANCEL is acknowledged to avoid retransmissions
[] SIPP.receive(mw_CANCEL_Request_Base(?))-> value v_request sender vc_sent_label
{
setverdict(fail);
f_setHeadersOnReceiptOfRequest(v_request);
//Answer to the CANCEL
f_send200OK();
action("Please de-register");
f_IMS_awaitDeRegistration();
f_componentStop();
}
// catch 4xx response
[] SIPP.receive(mw_Response_Base(mw_statusLine4xx, vc_callId, ?))-> value v_response sender vc_sent_label
{
setverdict(fail);
f_setHeadersOnReceiptOfResponse(v_response.msgHeader.cSeq, v_response);
LibSip_Steps.f_setHeadersACK();
f_SendACK(m_ACK_Request_route(vc_requestUri, vc_callId, v_response.msgHeader.cSeq, vc_from, vc_to, vc_via, vc_route));
action("Please de-register");
f_IMS_awaitDeRegistration();
f_componentStop();
}
// catch 5xx response
[] SIPP.receive(mw_Response_Base(mw_statusLine5xx, vc_callId, ?))-> value v_response sender vc_sent_label
{
setverdict(fail);
f_setHeadersOnReceiptOfResponse(v_response.msgHeader.cSeq, v_response);
LibSip_Steps.f_setHeadersACK();
f_SendACK(m_ACK_Request_route(vc_requestUri, vc_callId, v_response.msgHeader.cSeq, vc_from, vc_to, vc_via, vc_route));
action("Please de-register");
f_IMS_awaitDeRegistration();
f_componentStop();
}
// catch invalid REGISTER
[] SIPP.receive(mw_REGISTER_Request_Base)-> value v_request sender vc_sent_label
{
setverdict(fail);
f_componentStop();
}
// any
[] SIPP.receive
{
setverdict(fail);
all timer.stop;
// f_setHeadersCANCEL(vc_cSeq);
// f_SendCANCEL(m_CANCEL_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_cancel_To, vc_via )); // difference between registration state or transaction state
action("Please de-register");
f_IMS_awaitDeRegistration();
f_componentStop();
}
}
}
} // module LibIms_Steps