Commit fd19ddf8 authored by pintar's avatar pintar

corrections due to validation in weeks 4 and 5 - STF467

  -missing parameters added within f_setHeadersForwardResponseFromAS
  -function for top via removal was introduced
  -default altstep for ISC interface was adopted due to validation
parent 9c547e36
......@@ -50,6 +50,28 @@ module LibIms_Steps
}
}
/**
** @desc functions remove own via parameter
* @param p_message (request) SIP message to be used to prepair via header
* @param p_userprofile user profile
*/
function f_removeOwnViaParameter(in Response p_message) runs on ImsComponent
{
var integer v_intVia;
var Via v_via := c_empty_Via;
if (ispresent(p_message.msgHeader.via)) {
v_intVia := sizeof(p_message.msgHeader.via.viaBody)-1;
for (var integer i := 0; i < v_intVia; i := i + 1)
{
v_via.viaBody[i] := p_message.msgHeader.via.viaBody[i+1];
}
vc_via := v_via;
}
}
/**
*
* @desc functions add new via parameter
......@@ -190,11 +212,14 @@ module LibIms_Steps
var Response v_response;
v_response := vc_response;
vc_via:= v_response.msgHeader.via; // TODO via header need to be adapted due to standards
vc_caller_To := v_response.msgHeader.toField;
vc_to := v_response.msgHeader.toField;
vc_contact := v_response.msgHeader.contact;
if (ispresent(v_response.msgHeader.recordRoute)) {
vc_recordRoute:= v_response.msgHeader.recordRoute; // TODO recordRoute header need to be adapted due to standards
vc_recordRoute:= v_response.msgHeader.recordRoute;
}
f_removeOwnViaParameter(v_response);
}// end function f_setHeadersForwardResponse
/*
......@@ -1797,7 +1822,30 @@ module LibIms_Steps
[] SIPP.receive(mw_Response_Base(c_statusLine183,vc_callId, vc_cSeq))
{
repeat;
}
// 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);
f_send200OK();
}
// 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();
}
[] SIPP.receive(mw_Response_Base(? ,vc_callId, vc_cSeq))-> value vc_response
{
log("Response matched in DEFAULT!!!");
setverdict(fail);
repeat;
}
// any
[] SIPP.receive
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment