Compare Revisions

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

Ignore whitespace Rev 621 → Rev 622

/branches/v3/ttcn/LibSip_Interface.ttcn
111,7 → 111,6
// SIP message header fields (for building next message)
var template(omit) CallId vc_callId := c_empty_CallId;
var template(omit) CallId vc_callIdReg := c_empty_CallId;
// TODO: STF471 added
var template(omit) CallId vc_callIdSub := c_empty_CallId;
var From vc_from := c_empty_From;
var To vc_to := c_empty_To;
199,14 → 198,9
var boolean vc_DeregDone := false; // true after first DeREGISTRATION trail (avoid loop)
var boolean vc_interface_isc := false; // true if isc interface is in use
var boolean vc_white_space := false; // MRO
// TODO: TT change
var boolean vc_subscribed := false;
// ETS address
var address vc_ets_label; /*STF471 removed assignment, should be performed in specific ATS
:= {
host := PX_SIP_TS1_IPADDR,
portField := PX_SIP_TS1_PORT
};*/
var address vc_ets_label; //This value should be initialized in specific ATS
 
// // used for communication with the operator
// port OperatorPort_SIP opPort;
/branches/v3/ttcn/LibSip_PIXITS.ttcn
125,7 → 125,6
 
} // group SIP_Timers
 
// TODO STF471 addition
group MimePart {
/**
* @desc charstring for delimiter value used in mime multipart message to separate message body parts
/branches/v3/ttcn/LibSip_SIPTypesAndValues.ttcn
75,7 → 75,6
const charstring c_xmlresourcelistApplication := "application/resource-lists+xml";
 
// MIME name application
// TODO TT change: added boundary delimiter
const charstring c_mimeMultipart := "multipart/mixed;boundary=""" & PX_SIP_MIME_BOUNDARY & """";
 
// IMS 3GPP name application
1355,7 → 1354,6
// [3455/5.6 ]
type record PChargingVector {
FieldName fieldName (P_CHARGING_VECTOR_E) ,
// TODO STF471 change: icidValue is mandatory
charstring icidValue,
SemicolonParam_List chargeParams optional
}
1450,7 → 1448,6
 
type record of HistoryInfoEntry HistoryInfo_List;
 
// TODO STF471 change
type record of integer IntegerList;
 
type record HistoryInfoEntry {
/branches/v3/ttcn/LibSip_Steps.ttcn
88,32 → 88,32
var charstring v_uri := c_sipScheme & ":" & p_userprofile.registrarDomain;
var CommaParam_List v_digestResponse := {};
// Construct credentials for an Authorization field of a request.
v_digestResponse[0] := {
v_digestResponse := f_addParameter(v_digestResponse, {
id := "username",
paramValue := { quotedString := v_username }
};
v_digestResponse[1] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "realm",
paramValue := { quotedString := v_realm }
};
v_digestResponse[2] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "uri",
paramValue := { quotedString := v_uri }
};
v_digestResponse[3] := {
id := "nonce=""""",
paramValue := omit
}; // already enclosed to " characters
v_digestResponse[4] := {
id := "response=""""",
paramValue := omit
}; // already enclosed to " characters
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "nonce",
paramValue := { quotedString := "" }
}); // already enclosed to " characters
v_digestResponse := f_addParameter(v_digestResponse, {
id := "response",
paramValue := { quotedString := "" }
}); // already enclosed to " characters
 
if (p_algorithm) {
v_digestResponse[5] := {
v_digestResponse := f_addParameter(v_digestResponse, {
id := "algorithm",
paramValue := { tokenOrHost := PX_AUTH_ALGORITHM }
}; // already enclosed to " characters
}); // already enclosed to " characters
}
v_result := {digestResponse := v_digestResponse};
 
149,12 → 149,8
var charstring v_passwd := p_userprofile.passwd;
var charstring v_algorithm;
 
// TODO STF471 change: needs to be checked!!!
// correct way would be to increase c_nonceCount depending on used nonce value
// see RFC 2617, where it is stated, that nonce-count has to be incremented
// every time UE uses the same nonce
// SPEC: for every request with the same nonce used, nonce-count has to be incremented,
// to detect request replay attacks
// a new pseudo-random cnonce value is used every time
// that assumes it is only used once
const charstring cl_nonceCount := "00000001";
var charstring v_qop := p_userprofile.qop;
var charstring v_uri := c_sipScheme & ":" & p_userprofile.registrarDomain;
176,47 → 172,47
v_response := fx_calculateDigestResponse(v_nonce, v_cnonce, v_username, v_realm, v_passwd, v_algorithm, cl_nonceCount, p_method, v_qop, v_uri, cl_hEntity);
 
// Construct credentials for an Authorization field of a request.
v_digestResponse[0] := {
v_digestResponse := f_addParameter(v_digestResponse, {
id := "username",
paramValue := { quotedString := v_username }
};
v_digestResponse[1] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "realm",
paramValue := { quotedString := v_realm }
};
v_digestResponse[2] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "nonce",
paramValue := { quotedString := v_nonce }
};
v_digestResponse[3] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "uri",
paramValue := { quotedString := v_uri }
};
v_digestResponse[4] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "response",
paramValue := { quotedString := v_response }
};
v_digestResponse[5] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "algorithm",
paramValue := { tokenOrHost := "md5" }
}; // algorithm is not enclosed to " characters
v_digestResponse[6] := {
}); // algorithm is not enclosed to " characters
v_digestResponse := f_addParameter(v_digestResponse, {
id := "cnonce",
paramValue := { quotedString := v_cnonce }
};
v_digestResponse[7] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "qop",
paramValue := { tokenOrHost := v_qop }
}; // qop
v_digestResponse[8] := {
}); // qop
v_digestResponse := f_addParameter(v_digestResponse, {
id := "nc",
paramValue := { tokenOrHost := cl_nonceCount }
}; // nonceCount
}); // nonceCount
if (v_opaque != "") {
v_digestResponse[9] := {
v_digestResponse := f_addParameter(v_digestResponse, {
id := "opaque",
paramValue := { quotedString := v_opaque }
}; // already enclosed to " characters
}); // already enclosed to " characters
}
v_result := {digestResponse := v_digestResponse};
 
238,8 → 234,6
) return Credentials {
var Credentials v_result;
var charstring v_nonce := "";
 
// TODO STF471 change: different cnonce value, e.g. in register and de-register
var charstring v_cnonce := int2str(float2int(int2float(13172657659 - 1317266) * rnd()) + 1317265);
 
// RFC 2617 3.2.2 username:
254,10 → 248,8
var charstring v_algorithm;
 
 
// TODO STF471 change: needs to be checked!!!
// correct way would be to increase c_nonceCount depending on used nonce value
// see RFC 2617, where it is stated, that nonce-count has to be incremented
// every time UE uses the same nonce
// a new pseudo-random cnonce value is used every time
// that assumes it is only used once
const charstring cl_nonceCount := "00000001";
var charstring v_qop := p_userprofile.qop;
var charstring v_uri := c_sipScheme & ":" & p_userprofile.registrarDomain;
277,43 → 269,43
// calculate a digest response for the Authorize header
v_response := fx_calculateDigestResponse(v_nonce, v_cnonce, v_username, v_realm, v_passwd, v_algorithm, cl_nonceCount, p_method, v_qop, v_uri, cl_hEntity);
 
v_digestResponse[0] := {
v_digestResponse := f_addParameter(v_digestResponse, {
id := "username",
paramValue := { quotedString := v_username }
};
v_digestResponse[1] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "realm",
paramValue := { quotedString := v_realm }
};
v_digestResponse[2] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "nonce",
paramValue := { quotedString := v_nonce }
};
v_digestResponse[3] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "uri",
paramValue := { quotedString := v_uri }
};
v_digestResponse[4] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "algorithm",
paramValue := { tokenOrHost := "md5" }
}; // algorithm is not enclosed to " characters
v_digestResponse[5] := {
}); // algorithm is not enclosed to " characters
v_digestResponse := f_addParameter(v_digestResponse, {
id := "cnonce",
paramValue := { quotedString := v_cnonce }
};
v_digestResponse[6] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "qop",
paramValue := { tokenOrHost := v_qop }
}; // qop
v_digestResponse[7] := {
}); // qop
v_digestResponse := f_addParameter(v_digestResponse, {
id := "nc",
paramValue := { tokenOrHost := cl_nonceCount }
}; // nonceCount
}); // nonceCount
if (v_opaque == "") {
v_digestResponse[6] := {
v_digestResponse := f_addParameter(v_digestResponse, {
id := "opaque",
paramValue := { quotedString := v_opaque }
}; // already enclosed to " characters
}); // already enclosed to " characters
}
v_result := {digestResponse := v_digestResponse};
 
385,8 → 377,11
id := "ik",
paramValue := { quotedString := "ffeeddccbbaa99887766554433221100" }
}, // already enclosed to " characters
// TODO STF471 change: check why v_qop was not a paramValue!!!
{
/**
* This directive is optional, but is made so only for backward compatibility with RFC 2069
* it SHOULD be used by all implementations compliant with this version of the Digest scheme
*/
id := "qop",
paramValue := { tokenOrHost := v_qop }
} // qop
411,8 → 406,6
) return Credentials {
var Credentials v_result;
var charstring v_nonce := "";
 
// TODO STF471 change: different cnonce value, e.g. in register and de-register
var charstring v_cnonce := int2str(float2int(int2float(13172657659 - 1317266) * rnd()) + 1317265);
 
// RFC 2617 3.2.2 username:
427,10 → 420,8
var charstring v_algorithm;
 
 
// TODO STF471 change: needs to be checked!!!
// correct way would be to increase c_nonceCount depending on used nonce value
// see RFC 2617, where it is stated, that nonce-count has to be incremented
// every time UE uses the same nonce
// a new pseudo-random cnonce value is used every time
// that assumes it is only used once
const charstring cl_nonceCount := "00000001";
var charstring v_qop := p_userprofile.qop;
var charstring v_uri := c_sipScheme & ":" & p_userprofile.registrarDomain;
453,47 → 444,47
v_response := fx_calculateDigestResponse(v_nonce, v_cnonce, v_username, v_realm, v_passwd, v_algorithm, cl_nonceCount, p_method, v_qop, v_uri, cl_hEntity);
 
// Construct credentials for an Authorization field of a request.
v_digestResponse[0] := {
v_digestResponse := f_addParameter(v_digestResponse, {
id := "username",
paramValue := { quotedString := "DifferentToPrivateUser" }
};
v_digestResponse[1] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "realm",
paramValue := { quotedString := v_realm }
};
v_digestResponse[2] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "nonce",
paramValue := { quotedString := v_nonce }
};
v_digestResponse[3] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "uri",
paramValue := { quotedString := v_uri }
};
v_digestResponse[4] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "response",
paramValue := { quotedString := v_response }
};
v_digestResponse[5] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "algorithm",
paramValue := { tokenOrHost := "md5" }
}; // algorithm is not enclosed to " characters
v_digestResponse[6] := {
}); // algorithm is not enclosed to " characters
v_digestResponse := f_addParameter(v_digestResponse, {
id := "cnonce",
paramValue := { quotedString := v_cnonce }
};
v_digestResponse[7] := {
});
v_digestResponse := f_addParameter(v_digestResponse, {
id := "qop",
paramValue := { tokenOrHost := v_qop }
}; // qop
v_digestResponse[8] := {
}); // qop
v_digestResponse := f_addParameter(v_digestResponse, {
id := "nc",
paramValue := { tokenOrHost := cl_nonceCount }
};
});
if (v_opaque != "") {
v_digestResponse[9] := {
v_digestResponse := f_addParameter(v_digestResponse, {
id := "opaque",
paramValue := { quotedString := "" }
}; // already enclosed to " characters
}); // already enclosed to " characters
}
v_result := {digestResponse := v_digestResponse};
 
547,7 → 538,6
return (false);
}
 
// TODO STF471 change: use this function, e.g. in calculateCredentials...!!!
/**
* @desc Function to remove a parameter from SemicolonParam_List
* @param p_param_l SemicolonParam_List
574,7 → 564,6
return v_newParamList;
}
 
// TODO STF471 change: use this function, e.g. in calculateCredentials...!!!
/**
* @desc Function to add a parameter to SemicolonParam_List
* @param p_param_l SemicolonParam_List
583,12 → 572,11
function f_addParameter(
SemicolonParam_List p_param_l,
GenericParam p_genparam
) runs on SipComponent
)
return SemicolonParam_List {
var SemicolonParam_List v_newParamList := p_param_l;
var integer v_numberOfParams := lengthof(p_param_l);
v_newParamList[v_numberOfParams] := p_genparam;
 
return v_newParamList;
}
 
663,7 → 651,6
return (v_via);
}
 
// TODO STF471 added, check location
/**
* @desc Return the updated component variable of route header
* @return component variable of route header
687,7 → 674,6
return (v_route);
}
 
// TODO STF471 added, check location
/**
* @desc Return the updated component variable of record route header
* @return component variable of record route header
1014,12 → 1000,11
 
// received parameter has to be addded to the via hader field
// Be careful it could be an Host name and not an IP Address
// TODO STF471 change: check this!!!
// The error probably occurs if no DNS server is available
// we have re-added the check, because if no DNS server is available it is possible to adapt the configuration
// on the local machine the test suite is running on (e.g. under Windows the following file could be configured:
// One of the reasons this error can occur is if no DNS server is available.
// As a workaround, it is possible to adapt the configuration on the local machine the test
// suite is running on (e.g. under Windows the following file could be configured:
// C:\WINDOWS\system32\drivers\etc\hosts).
// TODO produce an error because of unkown host exception
// Check if host address can be rosolved
if (not f_equivalentHostAddr(valueof(v_viaBody.sentBy.host), valueof(p_source_address.host))) {
f_addParameterIfNotPresent(c_receivedId, { tokenOrHost := valueof(p_source_address.host) }, v_viaBody);
}
1260,7 → 1245,7
inout CSeq p_cSeq_s,
boolean p_emergency := false
) runs on SipComponent {
var SemicolonParam_List v_params;
var SemicolonParam_List v_params := {};
 
f_setHeadersGeneral(p_cSeq_s, "REGISTER"); // cseq, contact, branch, via
vc_requestUri := {
1287,14 → 1272,13
vc_callIdReg := vc_callId; // remember callId for de-registration
vc_to := valueof(m_To(m_SipUrl_currDomain(vc_userprofile)));
vc_cancel_To := vc_to;
v_params := {
v_params := f_addParameter(v_params,
{
id := c_tagId,
paramValue := {
tokenOrHost := f_getRndTag()
}
}
};
});
vc_from := {
fieldName := FROM_E,
addressField := vc_to.addressField,
1466,10 → 1450,9
function f_setHeaders_deREGISTER(
inout CSeq p_cSeq_s
) runs on SipComponent {
var SemicolonParam_List v_params;
var SemicolonParam_List v_params := {};
 
f_setHeadersGeneral(p_cSeq_s, "REGISTER"); // cseq, contact, branch, via
// TODO STF471 change: to be checked!!! Related to increase nonce count
// reset authorization header to not use nonce from registration (otherwise we have to increase nc)
vc_authorization := {
fieldName := AUTHORIZATION_E,
1490,14 → 1473,13
headers := omit
};
vc_to := valueof(m_To(m_SipUrl_currDomain(vc_userprofile)));
v_params := {
v_params := f_addParameter(v_params,
{
id := c_tagId,
paramValue := {
tokenOrHost := f_getRndTag()
}
}
};
});
vc_from := {
fieldName := FROM_E,
addressField := vc_to.addressField,
1625,7 → 1607,7
function f_setHeaders_SUBSCRIBE(
inout CSeq p_cSeq_s
) runs on SipComponent {
var SemicolonParam_List v_params;
var SemicolonParam_List v_params := {};
 
f_setHeadersGeneral(p_cSeq_s, "SUBSCRIBE"); // cseq, contact, branch, via
vc_requestUri := valueof(m_SipUrl_currDomain(vc_userprofile));
1637,20 → 1619,18
callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr
};
 
// TODO STF471 change
// store callId from Subscribe message
vc_callIdSub := vc_callId;
 
vc_to := valueof(m_To(m_SipUrl_currDomain(vc_userprofile)));
vc_cancel_To := vc_to;
v_params := {
v_params := f_addParameter(v_params,
{
id := c_tagId,
paramValue := {
tokenOrHost := f_getRndTag()
}
}
};
});
vc_from := {
fieldName := FROM_E,
addressField := vc_to.addressField,
2571,7 → 2551,7
// c) simplification: assume no SDP_attribute_conf
ischosen(vc_sdp_local.media_list[i].attributes[j].conf)
) {
// todo: handle SDP_attribute_conf
// handle SDP_attribute_conf
}
}
}
2665,7 → 2645,6
{
v_mediaAttributes[k] := vc_sdp_local.media_list[i].attributes[j];
}
// TODO STF471 change: review!!!
k := k + 1;
}
 
2902,7 → 2881,6
return false;
}
}
// v_result := true; // TODO This is a shortcut since direction attributes are not decoded
}
}
}
3562,7 → 3540,6
tc_wait.stop;
f_setHeadersOnReceiptOfRequest(v_MSG);
// Answer to the PRACK
// TODO STF471 changed: To include message body in 200OK on PRACK
if (isvalue(vc_request.messageBody) and ischosen(vc_request.messageBody.sdpMessageBody)) {
f_sendResponse(m_Response_mbody(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, omit, f_recordroute(), m_MBody_SDP(vc_sdp_local)));
}
3573,7 → 3550,6
}
} // end of f_awaitingPRACK_sendReply
 
// TODO STF471 added: check!!!
function f_awaitingPRACK(
in template(present) PRACK_Request p_MSG := ?
) runs on SipComponent {
3638,7 → 3614,6
tc_wait.stop;
f_setHeadersOnReceiptOfRequest(v_MSG);
// Answer to the UPDATE
// TODO STF471 changed: To include message body in 200OK on UPDATE
if (isvalue(vc_request.messageBody) and ischosen(vc_request.messageBody.sdpMessageBody)) {
f_sendResponse(m_Response_mbody(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, omit, f_recordroute(), m_MBody_SDP(vc_sdp_local)));
}
3737,49 → 3712,21
*/
function f_SendPRACK(
) runs on SipComponent {
 
var integer responseNum := 1;
var PRACK_Request prackReq;
if (isvalue(vc_response.msgHeader.rSeq) and
isvalue(vc_response.msgHeader.rSeq.responseNum)){
responseNum := vc_response.msgHeader.rSeq.responseNum;
}
vc_rAck := valueof(m_RAck(vc_response.msgHeader.rSeq.responseNum, vc_cSeq.seqNumber, vc_cSeq.method));
f_setHeadersGeneral(vc_cSeq, "PRACK"); // cseq, contact, branch, via
SIPP.send(m_PRACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, vc_rAck)) to vc_sent_label;
prackReq := m_PRACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, vc_rAck);
if (isvalue(vc_response.msgHeader.recordRoute)){
prackReq.msgHeader.route := f_route();
}
SIPP.send(prackReq) to vc_sent_label;
}
 
// TODO STF471 for further study!!!
// /**
// *
// *
// @desc send PRACK message
// *
// @param p_request template of the message to be sent
// */
// // TODO: added parameter for cseq to be used in RAck -> CR?
// function f_SendPRACK(CSeq p_rack_cseq) runs on SipComponent
// {
// var integer responseNum := 1;
// var PRACK_Request prackReq;
// f_setHeadersGeneral(vc_cSeq, "PRACK"); // cseq, contact, branch, via
// // TODO: CR?
// if (isvalue(vc_response.msgHeader.rSeq) and
// isvalue(vc_response.msgHeader.rSeq.responseNum)){
// responseNum := vc_response.msgHeader.rSeq.responseNum;
// }
// vc_rAck := valueof(m_RAck(responseNum, p_rack_cseq.seqNumber, p_rack_cseq.method));
//
// prackReq := m_PRACK_Request_Base(
// vc_requestUri,
// vc_callId,
// vc_cSeq,
// vc_from,
// vc_to,
// vc_via,
// vc_rAck);
//
// // TODO: added route header if required -> CR?
// //if (isvalue(vc_response.msgHeader.recordRoute)){
// prackReq.msgHeader.route := f_route();
// //}
//
// SIPP.send(prackReq) to vc_sent_label;
// }
/**
* @desc send PUBLISH message
* @param p_request template of the message to be sent
3873,8 → 3820,7
function f_sendResponse(
template(value) Response p_response
) runs on SipComponent {
// p_response.msgHeader.route := f_route(); // update the route header field depending on vc_boo_route//TODO check if route header is needed in
// responses
p_response.msgHeader.route := f_route(); // update the route header field depending on vc_boo_route
p_response.msgHeader.recordRoute := f_recordroute(); // update the route header field depending on vc_boo_route
SIPP.send(p_response) to vc_sent_label;
}
3897,10 → 3843,6
// Defaults
vc_def_catchSyncStop := activate(a_Sip_catchSyncStop());
vc_default := activate(a_clearRegistration());
// TODO STF471 for further study!!!
// // TODO: CR?
// // vc_default := activate (a_clearRegistration());
// vc_default := activate (a_clearRegistration(p_cSeq_s));
}
 
/**
3996,7 → 3938,7
in boolean p_emergency := false
) runs on SipComponent {
if (PX_SIP_REGISTRATION) {
f_setHeaders_REGISTER(p_cSeq_s, p_emergency); // TODO need if p_register not set
f_setHeaders_REGISTER(p_cSeq_s, p_emergency);
p_register := m_REGISTER_Request_Base(vc_requestUri, vc_callId, p_cSeq_s, vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization);
f_SendREGISTER(p_register); // LibSip
// awaiting of 401 and sending 2nd REGISTER and awaiting 200 OK REGISTER
4044,8 → 3986,10
in boolean p_auth
) runs on SipComponent {
if (PX_SIP_REGISTRATION) {
// f_setHeaders_REGISTER(p_cSeq_s); TODO need if p_register not set
// p_register := m_REGISTER_Request_Base(vc_requestUri, vc_callId, p_cSeq_s, vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization);
if(not isbound(p_register)){
f_setHeaders_REGISTER(p_cSeq_s);
p_register := m_REGISTER_Request_Base(vc_requestUri, vc_callId, p_cSeq_s, vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization);
}
f_SendREGISTER(p_register); // LibSip
// awaiting of 401 and sending 2nd REGISTER and awaiting 200 OK REGISTER
if (p_auth) {
4105,8 → 4049,6
}
 
if (PX_SIP_REGISTRATION) {
// TODO STF471 added to receive Notify in case of Subcription and before 200OK for de-register
// v_notifyDef := activate(a_awaitNotify(mw_NOTIFY_Request_Base(vc_callIdSub), v_receivedNotify));
f_setHeaders_deREGISTER(p_cSeq);
v_request := m_REGISTER_Request_expires(vc_requestUri, vc_callIdReg, p_cSeq, vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization, "0");
 
4118,11 → 4060,9
alt {
[] SIPP.receive(mw_Response_Base(c_statusLine401, vc_callIdReg, p_cSeq)) -> value vc_response {
tc_resp.stop;
// TODO STF471 changed
f_setHeadersOnReceiptOfResponse(vc_response);
// set headers via, cseq and authorization
f_setHeaders_2ndREGISTER(p_cSeq);
// TODO STF471 changed
v_request := m_REGISTER_Request_expires(vc_requestUri, vc_callIdReg, p_cSeq, vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization, "0");
// v_request.msgHeader.route := f_route();
// Re-send protected REGISTER
4149,7 → 4089,6
}
}
 
// TODO STF471 changed
// await NOTIFY and send reply 200 OK
if (vc_subscribed and v_receivedNotify == false) {
f_awaitingNOTIFY_sendReply_postamble(mw_NOTIFY_Request_Base(vc_callIdReg));
4177,7 → 4116,6
 
group Subscription {
 
// TODO STF471 check the difference to f_SubscriptionWithNotification!!! - here no setHeaders!!!
/**
* @desc UE send subscrbe, await on 200 OK, await notify and send 200 OK
* @param p_cSeq_s cseq parameter
4187,10 → 4125,8
inout CSeq p_cSeq_s,
template(value) SUBSCRIBE_Request p_subscribe
) runs on SipComponent {
// f_setHeaders_SUBSCRIBE(p_cSeq_s);
// send SUBSCRIBE
f_SendSUBSCRIBE(p_subscribe);
// TODO STF471 changed
// awaiting 200 OK SUBSCRIBE
// await NOTIFY and send reply 200 OK
f_awaitingOkResponseAndNOTIFY_sendReply(p_cSeq_s, mw_NOTIFY_Request_Base(vc_callId));
4210,7 → 4146,6
f_setHeaders_SUBSCRIBE(p_cSeq_s);
// send SUBSCRIBE
f_SendSUBSCRIBE(p_subscribe);
// TODO STF471 changed
// awaiting 200 OK SUBSCRIBE
// await NOTIFY and send reply 200 OK
f_awaitingOkResponseAndNOTIFY_sendReply(p_cSeq_s, p_notify);
4242,7 → 4177,6
setverdict(pass);
}
}
// TODO check how to solve sending of NOTIFY on SUBSCRIBE
} // end function f_awaitingSubscription
 
 
4750,7 → 4684,6
[] syncPort.receive(m_syncServerStop) {
tc_sync.stop;
log("*** a_Sip_catchSyncStop: INFO: Test component received STOP signal from MTC - going to IDLE state *** ");
// TODO complete postamble
syncPort.send(m_syncClientStop);
// in case if deregistration was not done
// f_RemoveRegistration(vc_cSeq);
4768,8 → 4701,6
*/
altstep a_clearRegistration(
) runs on SipComponent {
// TODO STF471 do we need an update here???
// altstep a_clearRegistration(inout CSeq p_cSeq_s) runs on SipComponent
var Response v_response;
var Request v_request;
var CSeq v_cSeq;
4776,13 → 4707,10
[] 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;
f_RemoveRegistration(vc_cSeq);
// TODO STF471 do we need an update here???
// f_RemoveRegistration(p_cSeq_s);
}
// allow repeated INVITEs
[vc_ignore_invite] SIPP.receive(mw_INVITE_Request_Base) {
4854,8 → 4782,6
setverdict(fail);
f_setHeadersOnReceiptOfRequest(v_request);
f_send200OK();
// TODO STF471 do we need an update here???
// f_RemoveRegistration(p_cSeq_s);
f_RemoveRegistration(vc_cSeq);
}
// unexpected CANCEL is acknowledged to avoid retransmissions
4864,8 → 4790,6
f_setHeadersOnReceiptOfRequest(v_request);
// Answer to the CANCEL
f_send200OK();
// TODO STF471 do we need an update here???
// f_RemoveRegistration(p_cSeq_s);
f_RemoveRegistration(vc_cSeq);
}
// catch 4xx response
4876,8 → 4800,6
f_setHeadersOnReceiptOfResponse(v_response); // CSeq is mandatory
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));
// TODO STF471 do we need an update here???
// f_RemoveRegistration(p_cSeq_s);
}
f_RemoveRegistration(vc_cSeq);
}
4889,8 → 4811,6
f_setHeadersOnReceiptOfResponse(v_response); // CSeq is mandatory
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));
// TODO STF471 do we need an update here???
// f_RemoveRegistration(p_cSeq_s);
}
f_RemoveRegistration(vc_cSeq);
}
4906,8 → 4826,6
// 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
// TODO STF471 do we need an update here???
// f_RemoveRegistration(p_cSeq_s);
f_RemoveRegistration(vc_cSeq);
}
}
/branches/v3/ttcn/LibSip_Templates.ttcn
302,7 → 302,6
}
}
 
// TODO: this temlate is possibly incorrectly defined, or "p_urlParameters" parameter name is incorrect, since it is assigned to "headers"
template(value) SipUrl m_SipUrl_NumberHostHeader(
template(value) charstring p_number,
template(value) charstring p_host,
383,9 → 382,7
components := {
sip := {
userInfo := {
userOrTelephoneSubscriber := "unavailable",
password :=
omit // TODO STF471: shall be omit or *. If *, remove them die to modifies mw_BasicSipUrl
userOrTelephoneSubscriber := "unavailable"
},
hostPort := {
host := "anonymous.invalid",
392,16 → 389,10
portField := c_defaultSipPort
}
}
},
urlParameters := omit, // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
headers :=
omit // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
}
}
template(present) SipUrl mw_TelSip_unavailableInvalidUri2 modifies mw_TelUrl := {
components := {tel := {subscriber := "unavailable"}},
urlParameters := omit, // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
headers :=
omit // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
components := {tel := {subscriber := "unavailable"}}
}
 
template(present) SipUrl mw_TelSip_unavailableUri(
409,10 → 400,7
) := (mw_TelSip_unavailableUri1, mw_TelSip_unavailableUri2(p_host));
 
template(present) SipUrl mw_TelSip_unavailableUri1 modifies mw_TelUrl := {
components := {tel := {subscriber := "unavailable"}},
urlParameters := omit, // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
headers :=
omit // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
components := {tel := {subscriber := "unavailable"}}
}
 
template(present) SipUrl mw_TelSip_unavailableUri2(
421,9 → 409,7
components := {
sip := {
userInfo := {
userOrTelephoneSubscriber := "unavailable",
password :=
omit // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
userOrTelephoneSubscriber := "unavailable"
},
hostPort := {
host := p_host,
430,10 → 416,7
portField := c_defaultSipPort
}
}
},
urlParameters := omit, // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
headers :=
omit // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
}
}
 
template(present) SipUrl mw_SipUrl_Number(
496,9 → 479,7
components := {
sip := {
userInfo := {
userOrTelephoneSubscriber := pattern "[a,A][n,N][o,O][n,N][y,Y][m,M][o,O][u,U][s,s]", //* charstring
password :=
omit // TODO STF471: shall be omit or *. If *, remove them die to modifies mw_BasicSipUrl
userOrTelephoneSubscriber := pattern "[a,A][n,N][o,O][n,N][y,Y][m,M][o,O][u,U][s,s]" //* charstring
},
hostPort := {
host :=
643,7 → 624,6
body := {p_credentials}
}
 
// TODO: CR
template(value) Authorization m_Authorization_digest(
template(value) CommaParam_List p_commaParam_List
) := {
665,11 → 645,6
fieldName := AUTHORIZATION_E,
body := {{digestResponse := f_merge_CommaParam_List(p_auth.body[0].digestResponse, p_commaParam_List)}}
}
// TODO: STF471 this template contains matching symbol, but name suggests it is send template
template(present) Authorization m_Authorization_other := {
fieldName := AUTHORIZATION_E,
body := {{otherResponse := ?}}
}
 
template(present) Authorization mw_Authorization_other := {
fieldName := AUTHORIZATION_E,
970,7 → 945,6
}
}
 
// TODO STF471 addition
template(value) RecordRoute m_recordRoute_currIpAddr_params(
template(value) SipUserProfile p_userprofile,
template(value) SemicolonParam_List p_urlParameters
1854,7 → 1828,6
}
}
 
// TODO STF471 added
template(value) ACK_Request m_ACK_Request_withRecordRoute(
template(value) SipUrl p_requestUri,
template(omit) CallId p_callId := omit,
2034,8 → 2007,6
messageBody := omit
}
 
// TODO: parameters "p_RAck" is not used, intentional or
// bug?
template(value) PUBLISH_Request m_PUBLISH_Request_Base(
template(value) SipUrl p_requestUri,
template(omit) CallId p_callId := omit,
2070,7 → 2041,7
// method:=
// "PUBLISH"},
event := p_event,
rAck := p_RAck, // TODO: added by STF471
rAck := p_RAck,
fromField := p_from,
toField := p_to,
via := p_via
3601,8 → 3572,7
template(value) SDP_attribute m_attribute_PCMA_DPT(//"0 PCMA/8000"
template(value) SDP_attribute_rtpmap p_attr_value := {"0", {"PCMA", "8000", omit}}
) := m_attribute_base(p_attr_value);
// TODO: STF471 template name suggests that this is a send
// template, while it contains matching mechanisms
 
template(present) SDP_attribute mw_attribute_T38 := {
unknown := {
name := ?,
3771,7 → 3741,6
sipfrag := p_sipfrag
}
 
// TODO STF471 check fixed values vs. PIXITs
template(value) MessageBody m_MBody_MIMESdpXml(
template(value) SDP_Message p_sdp,
template(value) XmlBody p_xmlBody
4596,7 → 4565,7
}
else {
return (v_recordRoute);
} //* TODO: RecordRoute is not OPTIONAL!!! Check IT!
}
}
 
/**
4608,12 → 4577,11
return template(omit) Route {
var template(omit) Route v_route := omit;
if (vc_boo_route) {
return v_route;
} //* TODO: Route header need to be in reverse order than
//* RecordRoute, question of return value - RecordRoute
return vc_route;
}
else {
return (v_route);
} //* TODO: Route is not OPTIONAL!!! Check IT!
}
}