Compare Revisions

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

Ignore whitespace Rev 639 → Rev 640

/trunk/ttcn/LibSip_Steps.ttcn
2991,7 → 2991,7
function f_awaitingREGISTER(
in template(present) REGISTER_Request p_register := ?
) runs on SipComponent {
var Request v_request;
var REGISTER_Request v_request;
 
tc_wait.start(PX_SIP_TWAIT);
alt {
3013,7 → 3013,7
function f_awaitingSUBSCRIBE(
in template(present) SUBSCRIBE_Request p_subscribe := ?
) runs on SipComponent {
var Request v_request;
var SUBSCRIBE_Request v_request;
 
tc_wait.start(PX_SIP_TWAIT);
alt {
3038,7 → 3038,7
in template(present) REGISTER_Request p_register := ?,
in boolean p_reply
) runs on SipComponent {
var Request v_request;
var REGISTER_Request v_request;
 
tc_wait.start(PX_SIP_TWAIT);
alt {
3315,7 → 3315,7
in template(present) ACK_Request p_ACK := ?,
in boolean p_setHeaders
) runs on SipComponent {
var Request v_ACK_Request;
var ACK_Request v_ACK_Request;
tc_ack.start;
 
alt {
3728,9 → 3728,9
}
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
prackReq := m_PRACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, vc_rAck);
prackReq := valueof(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();
prackReq.msgHeader.route := valueof(f_route());
}
SIPP.send(prackReq) to vc_sent_label;
}
4167,7 → 4167,7
function f_awaitingSubscription(
template(present) SUBSCRIBE_Request p_subscribe := ?
) runs on SipComponent {
var Request v_request;
var SUBSCRIBE_Request v_request;
 
tc_wait.start(2.0); // awaiting of all SUBSCRIBES
alt {
4711,6 → 4711,12
) runs on SipComponent {
var Response v_response;
var Request v_request;
var INFO_Request v_info_request;
var NOTIFY_Request v_notify_request;
var SUBSCRIBE_Request v_subscribe_request;
var BYE_Request v_bye_request;
var CANCEL_Request v_cancel_request;
var REGISTER_Request v_register_request;
var CSeq v_cSeq;
[] any timer.timeout {
setverdict(fail);
4758,44 → 4764,44
[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);
[] SIPP.receive(mw_INFO_Request_Base(vc_callId)) -> value v_info_request sender vc_sent_label {
f_setHeadersOnReceiptOfRequest(v_info_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);
[] SIPP.receive(mw_NOTIFY_Request_Base(vc_callId)) -> value v_notify_request sender vc_sent_label {
f_setHeadersOnReceiptOfRequest(v_notify_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);
[vc_ignore_subscribe] SIPP.receive(mw_SUBSCRIBE_Request_Base) -> value v_subscribe_request sender vc_sent_label {
f_setHeadersOnReceiptOfSUBSCRIBE(v_subscribe_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);
[] SIPP.receive(mw_SUBSCRIBE_Request_Base) -> value v_subscribe_request sender vc_sent_label {
f_setHeadersOnReceiptOfRequest(v_subscribe_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));
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_SendNOTIFY(m_NOTIFY_Request_contact(v_subscribe_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 {
[] SIPP.receive(mw_BYE_Request_Base(?)) -> value v_bye_request sender vc_sent_label {
setverdict(fail);
f_setHeadersOnReceiptOfRequest(v_request);
f_setHeadersOnReceiptOfRequest(v_bye_request);
f_send200OK();
f_RemoveRegistration(vc_cSeq);
}
// unexpected CANCEL is acknowledged to avoid retransmissions
[] SIPP.receive(mw_CANCEL_Request_Base(?)) -> value v_request sender vc_sent_label {
[] SIPP.receive(mw_CANCEL_Request_Base(?)) -> value v_cancel_request sender vc_sent_label {
setverdict(fail);
f_setHeadersOnReceiptOfRequest(v_request);
f_setHeadersOnReceiptOfRequest(v_cancel_request);
// Answer to the CANCEL
f_send200OK();
f_RemoveRegistration(vc_cSeq);
4823,7 → 4829,7
f_RemoveRegistration(vc_cSeq);
}
// catch invalid REGISTER
[] SIPP.receive(mw_REGISTER_Request_Base) -> value v_request sender vc_sent_label {
[] SIPP.receive(mw_REGISTER_Request_Base) -> value v_register_request sender vc_sent_label {
setverdict(fail);
f_componentStop();
}