Compare Revisions

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

Ignore whitespace Rev 606 → Rev 607

/branches/v3/ttcn/LibSip_Interface.ttcn
19,7 → 19,7
import from LibSip_PIXITS all;
 
group AdressTypes {
type record address4SIP {
type record Address4SIP {
// HostPort
charstring host optional,
// hostname, IPv4 or IPv6
30,7 → 30,7
encode "SIPCodec";
}
 
type address4SIP address;
type Address4SIP address;
 
 
} // end group AdressTypes
43,34 → 43,34
}
 
signature s_SIP_conversation(
in charstring text,
out boolean answer
in charstring p_text,
out boolean p_answer
) ;
signature s_SIP_ringing(
in charstring text,
out boolean answer
in charstring p_text,
out boolean p_answer
) ;
signature s_SIP_announcementA(
in charstring text,
out boolean answer
in charstring p_text,
out boolean p_answer
) ;
signature s_SIP_announcementB(
in charstring text,
out boolean answer
in charstring p_text,
out boolean p_answer
) ;
signature s_SIP_announcement(
in charstring text,
out boolean answer
in charstring p_text,
out boolean p_answer
) ;
signature s_SIP_voiceMessage(
in charstring text,
out boolean answer
in charstring p_text,
out boolean p_answer
) ;
signature s_SIP_mediastopped(
in charstring text,
out boolean answer
in charstring p_text,
out boolean p_answer
) ;
type port operatorPort procedure {
type port OperatorPort procedure {
inout s_SIP_conversation;
inout s_SIP_ringing;
inout s_SIP_announcementA;
92,7 → 92,7
// port
port SipPort SIPP;
// used for communication with the operator
port operatorPort opPort;
port OperatorPort opPort;
 
// current address to send TCP/UDP messages
var SipUserProfile vc_userprofile; // PIXIT userinformation
199,11 → 199,11
var boolean vc_firstREGISTER_sent := false; // true after sent of first REGISTER message
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 v_white_space := false; // MRO
var boolean vc_white_space := false; // MRO
// TODO: TT change
var boolean vc_subscribed := false;
// ETS address
var address v_ets_label; /*STF471 removed assignment, should be performed in specific ATS
var address vc_ets_label; /*STF471 removed assignment, should be performed in specific ATS
:= {
host := PX_SIP_TS1_IPADDR,
portField := PX_SIP_TS1_PORT
210,11 → 210,11
};*/
 
// parts needed for Client/SelfSyncComp type compatibility
var StringStack v_stateStack := c_initStringStack;
var StringStack vc_stateStack := c_initStringStack;
port SyncPort syncSendPort;
port SyncPort syncPort;
timer tc_sync := PX_TSYNC_TIME_LIMIT;
// // used for communication with the operator
// port operatorPort_SIP opPort;
// port OperatorPort_SIP opPort;
} // end SipComponent
} // end module LibSip_Interface
/branches/v3/ttcn/LibSip_PIXITS.ttcn
17,77 → 17,77
/**
* @desc charstring for SDP user name
*/
modulepar charstring PX_SIP_SDP_user_name := "voicesession";
modulepar charstring PX_SIP_SDP_USER_NAME := "voicesession";
 
/**
* @desc charstring for SDP session identifier
*/
modulepar charstring PX_SIP_SDP_session_id := "30000";
modulepar charstring PX_SIP_SDP_SESSION_ID := "30000";
 
/**
* @desc charstring for SDP dynamic port
*/
modulepar charstring PX_SIP_SDP_dyn := "0";
modulepar charstring PX_SIP_SDP_DYN := "0";
 
/**
* @desc charstring for SDP bandwidth modifier
*/
modulepar charstring PX_SIP_SDP_b_modifier := "AS";
modulepar charstring PX_SIP_SDP_B_MODIFIER := "AS";
 
/**
* @desc integer for SDP bandwidth value
*/
modulepar integer PX_SIP_SDP_b_bandwidth := 64;
modulepar integer PX_SIP_SDP_B_BANDWIDTH := 64;
 
/**
* @desc charstring for SDP media attribute encoding supported by the IUT
*/
modulepar charstring PX_SIP_SDP_encoding := "PCMU/8000";
modulepar charstring PX_SIP_SDP_ENCODING := "PCMU/8000";
 
/**
* @desc charstring for SDP media type supported by the IUT
*/
modulepar charstring PX_SIP_SDP_media_video := "video";
modulepar charstring PX_SIP_SDP_MEDIA_VIDEO := "video";
 
/**
* @desc charstring for SDP media transport supported by the IUT
*/
modulepar charstring PX_SIP_SDP_media_transport_G722 := "G722/8000";
modulepar charstring PX_SIP_SDP_MEDIA_TRANSPORT_G722 := "G722/8000";
 
/**
* @desc charstring for SDP media transport supported by the IUT
*/
modulepar charstring PX_SIP_SDP_media_transport_PCMU := "PCMU/8000";
modulepar charstring PX_SIP_SDP_MEDIA_TRANSPORT_PCMU := "PCMU/8000";
 
/**
* @desc charstring for SDP media transport supported by the IUT
*/
modulepar charstring PX_SIP_SDP_media_transport_PCMA := "PCMA/8000";
modulepar charstring PX_SIP_SDP_MEDIA_TRANSPORT_PCMA := "PCMA/8000";
 
/**
* @desc charstring for SDP media transport supported by the IUT
*/
modulepar charstring PX_SIP_SDP_media_transport_AMR := "AMR";
modulepar charstring PX_SIP_SDP_MEDIA_TRANSPORT_AMR := "AMR";
 
/**
* @desc charstring for SDP media transport supported by the IUT
*/
modulepar charstring PX_SIP_SDP_media_transport_Cle := "CLEARMODE/8000";
modulepar charstring PX_SIP_SDP_MEDIA_TRANSPORT_CLE := "CLEARMODE/8000";
/**
* @desc charstring for SDP media attribute encoding supported by the IUT
*/
modulepar charstring PX_SIP_SDP_encoding_attribute_G222 := "9 " & PX_SIP_SDP_media_transport_G722;
modulepar charstring PX_SIP_SDP_ENCODING_ATTRIBUTE_G222 := "9 " & PX_SIP_SDP_MEDIA_TRANSPORT_G722;
 
/**
* @desc charstring for SDP media attribute encoding supported by the IUT
*/
modulepar charstring PX_SIP_SDP_encoding_attribute_PCMU := "0 " & PX_SIP_SDP_media_transport_PCMU;
modulepar charstring PX_SIP_SDP_ENCODING_ATTRIBUTE_PCMU := "0 " & PX_SIP_SDP_MEDIA_TRANSPORT_PCMU;
 
/**
* @desc charstring for SDP media attribute encoding supported by the IUT
*/
modulepar charstring PX_SIP_SDP_encoding_attribute_PCMA := "8 " & PX_SIP_SDP_media_transport_PCMA;
modulepar charstring PX_SIP_SDP_ENCODING_ATTRIBUTE_PCMA := "8 " & PX_SIP_SDP_MEDIA_TRANSPORT_PCMA;
 
} // group SDP Parameter
 
129,12 → 129,12
/**
* @desc boolean for True, if conversation check is implemented.
*/
modulepar boolean PX_SIP_CheckConversation := false;
modulepar boolean PX_SIP_CHECK_CONVERSATION := false;
 
/**
* @desc boolean for True, if ringing check is implemented.
*/
modulepar boolean PX_SIP_CheckRinging := false;
modulepar boolean PX_SIP_CHECK_RINGING := false;
 
 
} // group RTPStreamControlAndCheck
181,7 → 181,7
/**
* @desc charstring for delimiter value used in mime multipart message to separate message body parts
*/
modulepar charstring PX_SIP_MIME_Boundary := "boundary1";
modulepar charstring PX_SIP_MIME_BOUNDARY := "boundary1";
 
// application/vnd.etsi.simservs+xml
} // group MimePart
/branches/v3/ttcn/LibSip_SIPTypesAndValues.ttcn
76,7 → 76,7
 
// MIME name application
// TODO TT change: added boundary delimiter
const charstring c_mimeMultipart := "multipart/mixed;boundary=""" & PX_SIP_MIME_Boundary & """";
const charstring c_mimeMultipart := "multipart/mixed;boundary=""" & PX_SIP_MIME_BOUNDARY & """";
 
// IMS 3GPP name application
const charstring c_ims3gppApplication := "application/3gpp-ims+xml";
/branches/v3/ttcn/LibSip_SMSFunctions.ttcn3
12,7 → 12,7
charstring p_ASCII_String
) return octetstring {
var integer i;
var integer k;
var integer j;
var integer v_Length := lengthof(p_ASCII_String);
var integer v_Temp;
var octetstring v_Noctets := ''O;
20,7 → 20,7
var bitstring v_TempBitDes := ''B;
 
if ((v_Length <= 0) or (v_Length > 160) or (((v_Length * 7) mod 8) != 0)) {
log("Invalid value of input string length.");
log("*** " & __SCOPE__ & "INFO: Invalid value of input string length ***");
}
 
for (i := 0; i < v_Length; i := i + 1) {
27,11 → 27,11
v_Temp := char2int(p_ASCII_String[i]);
v_TempBitSrc := int2bit(v_Temp, 8);
 
for (k := 1; k <= 7; k := k + 1) {
for (j := 1; j <= 7; j := j + 1) {
 
v_TempBitDes := v_TempBitSrc[8 - k] & v_TempBitDes;
v_TempBitDes := v_TempBitSrc[8 - j] & v_TempBitDes;
 
if (((7 * i + k) mod 8) == 0) {
if (((7 * i + j) mod 8) == 0) {
 
v_Noctets := v_Noctets & bit2oct(v_TempBitDes);
v_TempBitDes := ''B;
/branches/v3/ttcn/LibSip_SMSTemplates.ttcn3
13,13 → 13,13
group SMS_Templates_Group {
 
/* Non-SMS Type Constraints */
template(present) TypeOfNumberingPlan cr_TypeOfNumberingPlanAny := {
template(present) TypeOfNumberingPlan mw_TypeOfNumberingPlanAny := {
extBit := ?,
typeOfNumber := ?,
numberingPlanId := ?
}
 
template(value) TypeOfNumberingPlan cs_TypeOfNumberingPlan := {
template(value) TypeOfNumberingPlan m_TypeOfNumberingPlan := {
extBit := '1'B,
typeOfNumber := '001'B, // international number
numberingPlanId :=
26,158 → 26,158
'0001'B // ISDN/telephony numbering plan (Rec. E.164/E.163)
}
 
template(present) TypeOfNumberingPlan cr_TypeOfNumberingPlan := cr_TypeOfNumberingPlanAny;
template(present) TypeOfNumberingPlan mw_TypeOfNumberingPlan := mw_TypeOfNumberingPlanAny;
 
/* End Non-SMS Type Constraints */
template(value) RP_OriginatorAddress_dl cs_RP_OriginatorAddress_dl := {
template(value) RP_OriginatorAddress_dl m_RP_OriginatorAddress_dl := {
spare := omit,
iei := omit,
iel := '06'O, // 6 semi-octets
typeOfNumberingPlan := cs_TypeOfNumberingPlan,
typeOfNumberingPlan := m_TypeOfNumberingPlan,
digits := '001122'O
}
 
template(present) RP_OriginatorAddress_ul cr_RP_OriginatorAddress_ul := {
template(present) RP_OriginatorAddress_ul mw_RP_OriginatorAddress_ul := {
spare := omit,
iei := omit,
iel := '00'O
}
 
template(present) RP_DestinationAddress_ul cr_RP_DestinationAddress_ul := {
template(present) RP_DestinationAddress_ul mw_RP_DestinationAddress_ul := {
spare := omit,
iei := omit,
iel := ?,
typeOfNumberingPlan := cr_TypeOfNumberingPlan,
typeOfNumberingPlan := mw_TypeOfNumberingPlan,
digits := ?
}
template(omit) RP_DestinationAddress_dl cs_RP_DestinationAddress_dl := {
template(omit) RP_DestinationAddress_dl m_RP_DestinationAddress_dl := {
spare := omit,
iei := omit,
iel := '00'O
}
 
template(omit) RP_UserData cs_RP_UserData_DELIVER(
template(omit) RP_UserData m_RP_UserData_DELIVER(
octetstring p_Digits
) := {
spare := omit,
iei := omit,
iel := int2oct((153 + lengthof(p_Digits)), 1),
tP_PDU := {SMS_DELIVER := cs_SMS_DELIVER(p_Digits)}
tP_PDU := {SMS_DELIVER := m_SMS_DELIVER(p_Digits)}
}
 
template(value) RP_UserData cs_RP_UserData_SUBMIT_REPORT := {
template(value) RP_UserData m_RP_UserData_SUBMIT_REPORT := {
spare := '0'B,
iei := tsc_IEI_RP_UserData,
iei := c_IEI_RP_UserData,
iel := '0A'O, // the TPDU data length is 10 octets
tP_PDU := {SMS_SUBMIT_REPORT := cs_SMS_SUBMIT_REPORT}
tP_PDU := {SMS_SUBMIT_REPORT := m_SMS_SUBMIT_REPORT}
}
template(value) RP_UserData cs_RP_UserData_STATUS_REPORT(
template(value) RP_UserData m_RP_UserData_STATUS_REPORT(
template(value) TP_MessageReference_Type p_MessageRef,
template(value) TP_Address_Type p_RecipientAddress,
template(value) TP_ServiceCentreTimeStamp_Type p_SCTP
) modifies cs_RP_UserData_SUBMIT_REPORT := {
tP_PDU := {SMS_STATUS_REPORT := cs_SMS_STATUS_REPORT(p_MessageRef, p_RecipientAddress, p_SCTP)}
) modifies m_RP_UserData_SUBMIT_REPORT := {
tP_PDU := {SMS_STATUS_REPORT := m_SMS_STATUS_REPORT(p_MessageRef, p_RecipientAddress, p_SCTP)}
}
 
template(present) RP_UserData cr_RP_UserData_SUBMIT := {
template(present) RP_UserData mw_RP_UserData_SUBMIT := {
spare := omit,
iei := omit,
iel := ?,
tP_PDU := {SMS_SUBMIT := cr_SMS_SUBMIT_VPF_REF}
tP_PDU := {SMS_SUBMIT := mw_SMS_SUBMIT_VPF_REF}
}
 
template(present) RP_UserData cr_RP_UserData_DELIVER_REPORT := {
template(present) RP_UserData mw_RP_UserData_DELIVER_REPORT := {
spare := '0'B,
iei := tsc_IEI_RP_UserData,
iei := c_IEI_RP_UserData,
iel := ?,
tP_PDU := {SMS_DELIVER_REPORT := cr_SMS_DELIVER_REPORT}
tP_PDU := {SMS_DELIVER_REPORT := mw_SMS_DELIVER_REPORT}
}
 
/* End SM-RP Type Constraints */
/* SM-RP PDU Constraints */
template(value) RP_DATA_dl_Type cs_RP_DATA_dl_base := {
template(value) RP_DATA_dl_Type m_RP_DATA_dl_base := {
spare5 := '00000'B,
rP_MessageTypeIndicator := tsc_MT_RP_DATA_dl,
rP_MessageTypeIndicator := c_MT_RP_DATA_dl,
rP_MessageReference := '00'O,
rP_OriginatorAddress := cs_RP_OriginatorAddress_dl,
rP_DestinationAddress := cs_RP_DestinationAddress_dl,
rP_UserData := cs_RP_UserData_DELIVER('0000'O)
rP_OriginatorAddress := m_RP_OriginatorAddress_dl,
rP_DestinationAddress := m_RP_DestinationAddress_dl,
rP_UserData := m_RP_UserData_DELIVER('0000'O)
}
 
template(value) RP_DATA_dl_Type cs_RP_DATA_dl_DELIVER(
template(value) RP_DATA_dl_Type m_RP_DATA_dl_DELIVER(
octetstring p_Digits
) modifies cs_RP_DATA_dl_base := {rP_UserData := cs_RP_UserData_DELIVER(p_Digits)}
) modifies m_RP_DATA_dl_base := {rP_UserData := m_RP_UserData_DELIVER(p_Digits)}
 
template(value) RP_DATA_dl_Type cs_RP_DATA_dl_STATUS_REPORT(
template(value) RP_DATA_dl_Type m_RP_DATA_dl_STATUS_REPORT(
template(value) TP_MessageReference_Type p_MessageRef,
template(value) TP_Address_Type p_RecipientAddress,
template(value) TP_ServiceCentreTimeStamp_Type p_SCTP
) modifies cs_RP_DATA_dl_base := {
rP_UserData := cs_RP_UserData_STATUS_REPORT(p_MessageRef, p_RecipientAddress, p_SCTP)
) modifies m_RP_DATA_dl_base := {
rP_UserData := m_RP_UserData_STATUS_REPORT(p_MessageRef, p_RecipientAddress, p_SCTP)
}
 
 
template(present) RP_DATA_ul_Type cr_RP_DATA_ul_SUBMIT := {
template(present) RP_DATA_ul_Type mw_RP_DATA_ul_SUBMIT := {
spare5 := '00000'B,
rP_MessageTypeIndicator := tsc_MT_RP_DATA_ul,
rP_MessageTypeIndicator := c_MT_RP_DATA_ul,
rP_MessageReference := ?,
rP_OriginatorAddress := cr_RP_OriginatorAddress_ul,
rP_DestinationAddress := cr_RP_DestinationAddress_ul,
rP_UserData := cr_RP_UserData_SUBMIT
rP_OriginatorAddress := mw_RP_OriginatorAddress_ul,
rP_DestinationAddress := mw_RP_DestinationAddress_ul,
rP_UserData := mw_RP_UserData_SUBMIT
}
 
template(value) RP_ACK_Type cs_RP_ACK_SUBMIT_REPORT(
template(value) RP_ACK_Type m_RP_ACK_SUBMIT_REPORT(
template(value) Oct1 p_msgReference := '00'O
) := {
spare5 := '00000'B,
rP_MessageTypeIndicator := tsc_MT_RP_ACK_dl,
rP_MessageTypeIndicator := c_MT_RP_ACK_dl,
rP_MessageReference := p_msgReference,
rP_UserData := cs_RP_UserData_SUBMIT_REPORT
rP_UserData := m_RP_UserData_SUBMIT_REPORT
}
 
template(present) RP_ACK_Type cr_RP_ACK_DELIVER_REPORT := {
template(present) RP_ACK_Type mw_RP_ACK_DELIVER_REPORT := {
spare5 := '00000'B,
rP_MessageTypeIndicator := tsc_MT_RP_ACK_ul,
rP_MessageTypeIndicator := c_MT_RP_ACK_ul,
rP_MessageReference := ?,
rP_UserData := cr_RP_UserData_DELIVER_REPORT
rP_UserData := mw_RP_UserData_DELIVER_REPORT
}
 
/* End SM-RP PDU Constraints */
/* SM-TP Type Constraints */
template(value) TP_ProtocolIdentifier_Type cr_TP_ProtocolIdentifier := {
template(value) TP_ProtocolIdentifier_Type mw_TP_ProtocolIdentifier := {
pidType := '01'B,
interworking := '0'B,
pidValue := '00000'B
}
 
template(value) TP_ProtocolIdentifier_Type cs_TP_ProtocolIdentifier := {
template(value) TP_ProtocolIdentifier_Type m_TP_ProtocolIdentifier := {
pidType := '01'B,
interworking := '0'B,
pidValue := '00000'B
}
 
template(value) TP_DataCodingScheme_Type cs_TP_DataCodingScheme := {
template(value) TP_DataCodingScheme_Type m_TP_DataCodingScheme := {
codingGroup := '0000'B,
codeValue := '0000'B
}
 
template(present) TP_Address_Type cr_TP_AddressAny := {
template(present) TP_Address_Type mw_TP_AddressAny := {
iel := ?,
typeOfNumberingPlan := cr_TypeOfNumberingPlanAny,
typeOfNumberingPlan := mw_TypeOfNumberingPlanAny,
digits := *
}
 
template(value) TP_Address_Type cs_TP_Address(
template(value) TP_Address_Type m_TP_Address(
octetstring p_Digits
) := {
iel := int2oct(2 * lengthof(p_Digits), 1),
// length is number of useful semi-octets
// as p_digits is declared as octetstring the number must be even
typeOfNumberingPlan := cs_TypeOfNumberingPlan,
typeOfNumberingPlan := m_TypeOfNumberingPlan,
digits := p_Digits
}
 
template(value) TP_ParameterIndicator_Type cs_TP_ParameterIndicator := {
template(value) TP_ParameterIndicator_Type m_TP_ParameterIndicator := {
extBit1 := '0'B,
spare4 := '0000'B,
tP_UDL := '0'B,
187,7 → 187,7
 
/* End SM-TP Type Constraints */
/* SM-TP PDU Constraints */
template(value) SMS_DELIVER_Type cs_SMS_DELIVER(
template(value) SMS_DELIVER_Type m_SMS_DELIVER(
octetstring p_Digits
) := {
tP_ReplyPath := '0'B,
195,38 → 195,38
tP_StatusReportIndication := '1'B,
spare2 := '00'B,
tP_MoreMessagesToSend := '0'B,
tP_MessageTypeIndicator := tsc_MT_SMS_DELIVER,
tP_OriginatingAddress := cs_TP_Address(p_Digits),
tP_ProtocolIdentifier := cs_TP_ProtocolIdentifier,
tP_DataCodingScheme_Type := cs_TP_DataCodingScheme,
tP_MessageTypeIndicator := c_MT_SMS_DELIVER,
tP_OriginatingAddress := m_TP_Address(p_Digits),
tP_ProtocolIdentifier := m_TP_ProtocolIdentifier,
tP_DataCodingScheme_Type := m_TP_DataCodingScheme,
tP_ServiceCentreTimeStamp := fx_GetSC_TimeStamp(0), // Time Zone 0 assumed
tP_UserDataLength := int2oct(160, 1),
tP_UserData := f_IA5_2oct(tsc_Fox)
tP_UserData := f_IA5_2oct(c_Fox)
}
 
template(present) SMS_DELIVER_REPORT_Type cr_SMS_DELIVER_REPORT := {
template(present) SMS_DELIVER_REPORT_Type mw_SMS_DELIVER_REPORT := {
spare1 := '0'B,
tP_UserDataHeaderIndicator := '0'B,
spare4 := '0000'B,
tP_MessageTypeIndicator := tsc_MT_SMS_DELIVER_REPORT,
tP_MessageTypeIndicator := c_MT_SMS_DELIVER_REPORT,
tP_FailureCause := omit,
tP_ParameterIndicator := ?,
tP_ProtocolIdentifier := cr_TP_ProtocolIdentifier,
tP_ProtocolIdentifier := mw_TP_ProtocolIdentifier,
tP_DataCodingScheme_Type := *,
tP_UserDataLength := *,
tP_UserData := *
}
 
template(present) SMS_SUBMIT_Type cr_SMS_SUBMIT := {
template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT := {
tP_ReplyPath := '0'B,
tP_UserDataHeaderIndicator := '0'B,
tP_StatusReportRequest := '1'B,
tP_ValidityPeriodFormat := '??'B,
tP_RejectDuplicates := '0'B,
tP_MessageTypeIndicator := tsc_MT_SMS_SUBMIT,
tP_MessageTypeIndicator := c_MT_SMS_SUBMIT,
tP_MessageReference := ?,
tP_DestinationAddress := cr_TP_AddressAny,
tP_ProtocolIdentifier := cr_TP_ProtocolIdentifier,
tP_DestinationAddress := mw_TP_AddressAny,
tP_ProtocolIdentifier := mw_TP_ProtocolIdentifier,
tP_DataCodingScheme_Type := ?,
tP_ValidityPeriod := *,
tP_UserDataLength := int2oct(160, 1),
234,41 → 234,41
? // any data will do: 140 octets
}
 
template(present) SMS_SUBMIT_Type cr_SMS_SUBMIT_VPF_NP modifies cr_SMS_SUBMIT := {
template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT_VPF_NP modifies mw_SMS_SUBMIT := {
tP_ValidityPeriodFormat := '00'B,
tP_ValidityPeriod := omit
}
 
template(present) SMS_SUBMIT_Type cr_SMS_SUBMIT_VPF_REF modifies cr_SMS_SUBMIT := {
template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT_VPF_REF modifies mw_SMS_SUBMIT := {
tP_ValidityPeriodFormat := '10'B,
tP_ValidityPeriod := ?
}
 
template(present) SMS_SUBMIT_Type cr_SMS_SUBMIT_VPF_ENH modifies cr_SMS_SUBMIT := {
template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT_VPF_ENH modifies mw_SMS_SUBMIT := {
tP_ValidityPeriodFormat := '01'B,
tP_ValidityPeriod := ?
}
 
template(present) SMS_SUBMIT_Type cr_SMS_SUBMIT_VPF_ABS modifies cr_SMS_SUBMIT := {
template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT_VPF_ABS modifies mw_SMS_SUBMIT := {
tP_ValidityPeriodFormat := '11'B,
tP_ValidityPeriod := ?
}
 
template(value) SMS_SUBMIT_REPORT_Type cs_SMS_SUBMIT_REPORT := {
template(value) SMS_SUBMIT_REPORT_Type m_SMS_SUBMIT_REPORT := {
spare1 := '0'B,
tP_UserDataHeaderIndicator := '0'B,
spare4 := '0000'B,
tP_MessageTypeIndicator := tsc_MT_SMS_SUBMIT_REPORT,
tP_MessageTypeIndicator := c_MT_SMS_SUBMIT_REPORT,
tP_FailureCause := omit,
tP_ParameterIndicator := cs_TP_ParameterIndicator,
tP_ParameterIndicator := m_TP_ParameterIndicator,
tP_ServiceCentreTimeStamp := fx_GetSC_TimeStamp(0), // Time Zone 0 assumed
tP_ProtocolIdentifier := cs_TP_ProtocolIdentifier,
tP_ProtocolIdentifier := m_TP_ProtocolIdentifier,
tP_DataCodingScheme_Type := omit,
tP_UserDataLength := omit,
tP_UserData := omit
}
 
template(value) SMS_STATUS_REPORT_Type cs_SMS_STATUS_REPORT(
template(value) SMS_STATUS_REPORT_Type m_SMS_STATUS_REPORT(
template(value) TP_MessageReference_Type p_MessageRef,
template(value) TP_Address_Type p_RA,
template(value) TP_ServiceCentreTimeStamp_Type p_SCTP
279,7 → 279,7
tP_StatusReportQualifier := '0'B,
spare2 := '00'B,
tP_MoreMessagesToSend := '0'B,
tP_MessageTypeIndicator := tsc_MT_SMS_STATUS_REPORT,
tP_MessageTypeIndicator := c_MT_SMS_STATUS_REPORT,
tP_MessageReference := p_MessageRef,
tP_RecipientAddress := p_RA,
tP_ServiceCentreTimeStamp := p_SCTP,
288,8 → 288,8
reserved := '0'B,
status := '0000000'B
},
tP_ParameterIndicator := cs_TP_ParameterIndicator,
tP_ProtocolIdentifier := cs_TP_ProtocolIdentifier,
tP_ParameterIndicator := m_TP_ParameterIndicator,
tP_ProtocolIdentifier := m_TP_ProtocolIdentifier,
tP_DataCodingScheme_Type := omit,
tP_UserDataLength := omit,
tP_UserData := omit
/branches/v3/ttcn/LibSip_SMSTypesAndValues.ttcn
18,35 → 18,35
 
group SMS_Declarations {
 
const RP_MessageTypeIndicator_Type tsc_MT_RP_DATA_ul := '000'B;
const RP_MessageTypeIndicator_Type c_MT_RP_DATA_ul := '000'B;
/* RP_DATA_ul */
const RP_MessageTypeIndicator_Type tsc_MT_RP_DATA_dl := '001'B;
const RP_MessageTypeIndicator_Type c_MT_RP_DATA_dl := '001'B;
/* RP_DATA_dl */
const RP_MessageTypeIndicator_Type tsc_MT_RP_ACK_ul := '010'B;
const RP_MessageTypeIndicator_Type c_MT_RP_ACK_ul := '010'B;
/* RP_ACK_ul */
const RP_MessageTypeIndicator_Type tsc_MT_RP_ACK_dl := '011'B;
const RP_MessageTypeIndicator_Type c_MT_RP_ACK_dl := '011'B;
/* RP_ACK_dl */
const RP_MessageTypeIndicator_Type tsc_MT_RP_ERROR_ul := '100'B;
const RP_MessageTypeIndicator_Type c_MT_RP_ERROR_ul := '100'B;
/* RP_ERROR_ul */
const RP_MessageTypeIndicator_Type tsc_MT_RP_ERROR_dl := '101'B;
const RP_MessageTypeIndicator_Type c_MT_RP_ERROR_dl := '101'B;
/* RP_ERROR_dl */
const RP_MessageTypeIndicator_Type tsc_MT_RP_SMMA := '110'B;
const RP_MessageTypeIndicator_Type c_MT_RP_SMMA := '110'B;
/* RP_SMMA */
const TP_MessageTypeIndicator_Type tsc_MT_SMS_DELIVER := '00'B;
const TP_MessageTypeIndicator_Type c_MT_SMS_DELIVER := '00'B;
/* SMS DELIVER */
const TP_MessageTypeIndicator_Type tsc_MT_SMS_DELIVER_REPORT := '00'B;
const TP_MessageTypeIndicator_Type c_MT_SMS_DELIVER_REPORT := '00'B;
/* SMS DELIVER REPORT */
const TP_MessageTypeIndicator_Type tsc_MT_SMS_STATUS_REPORT := '10'B;
const TP_MessageTypeIndicator_Type c_MT_SMS_STATUS_REPORT := '10'B;
/* SMS STATUS REPORT */
const TP_MessageTypeIndicator_Type tsc_MT_SMS_COMMAND := '10'B;
const TP_MessageTypeIndicator_Type c_MT_SMS_COMMAND := '10'B;
/* SMS COMMAND */
const TP_MessageTypeIndicator_Type tsc_MT_SMS_SUBMIT := '01'B;
const TP_MessageTypeIndicator_Type c_MT_SMS_SUBMIT := '01'B;
/* SMS SUBMIT, SMS SUBMIT REPORT */
const TP_MessageTypeIndicator_Type tsc_MT_SMS_SUBMIT_REPORT := '01'B;
const TP_MessageTypeIndicator_Type c_MT_SMS_SUBMIT_REPORT := '01'B;
/* SMS SUBMIT, SMS SUBMIT REPORT */
const Bit7 tsc_IEI_RP_UserData := '1000001'B;
const Bit7 c_IEI_RP_UserData := '1000001'B;
/* 24.011 cl. 8.2.5.3 */
const charstring tsc_Fox := "The quick brown fox jumps over the lazy dog's back. Kaufen Sie Ihrer Frau vier bequeme Pelze. - 0123456789 - THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG'S BACK.";
const charstring c_Fox := "The quick brown fox jumps over the lazy dog's back. Kaufen Sie Ihrer Frau vier bequeme Pelze. - 0123456789 - THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG'S BACK.";
 
 
 
/branches/v3/ttcn/LibSip_Steps.ttcn
25,11 → 25,11
// Return the equivalent string in lower case
external function fx_putInLowercase(
charstring par_string
charstring p_string
) return charstring;
 
external function fx_getIpAddr(
charstring host_name
charstring p_host_name
) return charstring;
 
/**
38,17 → 38,17
* @see RFC 2617, chapter 5 Sample implementation, for example usage, as the signature of calculateDigestResponse is according to the example given in the RFC.
*/
external function fx_calculateDigestResponse(
charstring nonce,
charstring cnonce,
charstring user,
charstring realm,
charstring passwd,
charstring alg,
charstring nonceCount,
charstring method,
charstring qop,
charstring URI,
charstring HEntity
charstring p_nonce,
charstring p_cnonce,
charstring p_user,
charstring p_realm,
charstring p_passwd,
charstring p_alg,
charstring p_nonceCount,
charstring p_method,
charstring p_qop,
charstring p_URI,
charstring p_HEntity
) return charstring;
 
}
61,11 → 61,11
*/
function f_getRndTag(
) return charstring {
var charstring tag_value;
var charstring v_tag_value;
// tag_value is initialized with a random value with at least 32 bits of randomness
// 4294967296 is a 32 bits integer
tag_value := fx_rndStr() & fx_rndStr();
return (tag_value);
v_tag_value := fx_rndStr() & fx_rndStr();
return (v_tag_value);
}
 
/**
79,15 → 79,13
in boolean p_algorithm := false
) return Credentials {
var Credentials v_result;
var charstring v_nonce := "";
 
 
// RFC 2617 3.2.2 username:
// The name of user in the specified realm.
var charstring v_username := p_userprofile.privUsername;
var charstring v_realm := p_userprofile.registrarDomain;
var charstring v_uri := c_sipScheme & ":" & p_userprofile.registrarDomain;
var charstring v_response := "";
var CommaParam_List v_digestResponse := {};
// Construct credentials for an Authorization field of a request.
v_digestResponse[0] := {
109,15 → 107,13
v_digestResponse[4] := {
id := "response=""""",
paramValue := omit
} // already enclosed to " characters
;
}; // already enclosed to " characters
 
if (p_algorithm) {
v_digestResponse[5] := {
id := "algorithm",
paramValue := PX_AUTH_ALGORITHM
} // already enclosed to " characters
;
}; // already enclosed to " characters
}
v_result := {digestResponse := v_digestResponse};
 
139,60 → 135,31
in CommaParam_List p_challenge
) 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:
// The name of user in the specified realm.
var charstring v_username := p_userprofile.privUsername;
 
var charstring v_realm;
 
 
 
 
 
 
 
// RFC 2617 3.2.2.2 passwd:
// A known shared secret, the password of user of the specified
// username.
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
const charstring c_nonceCount := "00000001";
 
const charstring cl_nonceCount := "00000001";
var charstring v_qop := p_userprofile.qop;
 
var charstring v_uri := c_sipScheme & ":" & p_userprofile.registrarDomain;
 
 
 
// MD5 hash of empty entity body.
const charstring c_hEntity := "d41d8cd98f00b204e9800998ecf8427e";
 
const charstring cl_hEntity := "d41d8cd98f00b204e9800998ecf8427e";
var charstring v_response;
var charstring v_opaque;
var CommaParam_List v_digestResponse := {};
205,7 → 172,7
v_opaque := f_extractParamValueFromChallenge(p_challenge, "opaque");
 
// calculate a digest response for the Authorize header
v_response := fx_calculateDigestResponse(v_nonce, v_cnonce, v_username, v_realm, v_passwd, v_algorithm, c_nonceCount, p_method, v_qop, v_uri, c_hEntity);
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.
// TODO STF471 change: avoid setting absent opaque value
244,7 → 211,7
paramValue := omit
}; // qop
v_digestResponse[8] := {
id := "nc=" & c_nonceCount,
id := "nc=" & cl_nonceCount,
paramValue := omit
}; // nonceCount
}
258,7 → 225,7
paramValue := omit
}; // qop
v_digestResponse[9] := {
id := "nc=" & c_nonceCount,
id := "nc=" & cl_nonceCount,
paramValue := omit
}; // nonceCount
}
281,65 → 248,37
in CommaParam_List p_challenge
) 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:
// The name of user in the specified realm.
var charstring v_username := p_userprofile.privUsername;
 
var charstring v_realm;
 
 
 
 
 
 
 
// RFC 2617 3.2.2.2 passwd:
// A known shared secret, the password of user of the specified
// username.
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
const charstring c_nonceCount := "00000001";
 
const charstring cl_nonceCount := "00000001";
var charstring v_qop := p_userprofile.qop;
 
var charstring v_uri := c_sipScheme & ":" & p_userprofile.registrarDomain;
 
 
 
// MD5 hash of empty entity body.
const charstring c_hEntity := "d41d8cd98f00b204e9800998ecf8427e";
 
const charstring cl_hEntity := "d41d8cd98f00b204e9800998ecf8427e";
var charstring v_response;
var charstring v_opaque;
var CommaParam_List v_digestResponse := {};
 
 
// extract nonce, realm, algorithm, and opaque from challenge
v_nonce := f_extractParamValueFromChallenge(p_challenge, "nonce");
v_realm := f_extractParamValueFromChallenge(p_challenge, "realm");
347,7 → 286,7
v_opaque := f_extractParamValueFromChallenge(p_challenge, "opaque");
 
// calculate a digest response for the Authorize header
v_response := fx_calculateDigestResponse(v_nonce, v_cnonce, v_username, v_realm, v_passwd, v_algorithm, c_nonceCount, p_method, v_qop, v_uri, c_hEntity);
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);
 
// TODO STF471 change: avoid setting absent opaque value
v_digestResponse[0] := {
381,7 → 320,7
paramValue := omit
}; // qop
v_digestResponse[7] := {
id := "nc=" & c_nonceCount,
id := "nc=" & cl_nonceCount,
paramValue := omit
}; // nonceCount
}
395,7 → 334,7
paramValue := omit
}; // qop
v_digestResponse[8] := {
id := "nc=" & c_nonceCount,
id := "nc=" & cl_nonceCount,
paramValue := omit
}; // nonceCount
}
494,60 → 433,34
in CommaParam_List p_challenge
) 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:
// The name of user in the specified realm.
var charstring v_username := p_userprofile.privUsername;
 
var charstring v_realm;
 
 
 
 
 
 
 
// RFC 2617 3.2.2.2 passwd:
// A known shared secret, the password of user of the specified
// username.
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
const charstring c_nonceCount := "00000001";
 
const charstring cl_nonceCount := "00000001";
var charstring v_qop := p_userprofile.qop;
 
var charstring v_uri := c_sipScheme & ":" & p_userprofile.registrarDomain;
 
 
 
// MD5 hash of empty entity body.
const charstring c_hEntity := "d41d8cd98f00b204e9800998ecf8427e";
 
const charstring cl_hEntity := "d41d8cd98f00b204e9800998ecf8427e";
var charstring v_response;
var charstring v_opaque;
var CommaParam_List v_digestResponse := {};
560,7 → 473,7
v_opaque := f_extractParamValueFromChallenge(p_challenge, "opaque");
 
// calculate a digest response for the Authorize header
v_response := fx_calculateDigestResponse(v_nonce, v_cnonce, v_username, v_realm, v_passwd, v_algorithm, c_nonceCount, p_method, v_qop, v_uri, c_hEntity);
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.
// TODO STF471 change: avoid setting absent opaque value
599,7 → 512,7
paramValue := omit
}; // qop
v_digestResponse[8] := {
id := "nc=" & c_nonceCount,
id := "nc=" & cl_nonceCount,
paramValue := omit
};
}
613,7 → 526,7
paramValue := omit
}; // qop
v_digestResponse[9] := {
id := "nc=" & c_nonceCount,
id := "nc=" & cl_nonceCount,
paramValue := omit
};
}
636,8 → 549,9
var boolean v_result := false;
var integer v_len := lengthof(p_challenge);
var charstring v_id := fx_putInLowercase(p_id);
 
for (var integer i := 0; i < v_len; i := i + 1) {
var integer i;
for (i := 0; i < v_len; i := i + 1) {
if (fx_putInLowercase(p_challenge[i].id) == v_id) {
v_result := true;
}
726,8 → 640,10
var charstring v_result := "";
var integer v_len := lengthof(p_challenge);
var charstring v_id := fx_putInLowercase(p_id);
var integer i;
var charstring v_tmpchar;
 
for (var integer i := 0; i < v_len; i := i + 1) {
for (i := 0; i < v_len; i := i + 1) {
if (fx_putInLowercase(p_challenge[i].id) == v_id) {
if (isvalue(p_challenge[i].paramValue)) {
v_result := valueof(p_challenge[i].paramValue);
743,8 → 659,8
v_result := "";
}
else {
var charstring v_tmpchar := "Cannot acquire value from credentials.";
log("Cannot acquire value from credentials.");
v_tmpchar := "Cannot acquire value from credentials.";
log("*** " & __SCOPE__ &" INFO: Cannot acquire value from credentials ***");
setverdict(inconc);
stop;
}
759,23 → 675,24
* @return component variable of via header
*/
function f_updateViaHeaderAS(
in Via via
in Via p_via
) runs on SipComponent
return Via {
var Via p_via;
var ViaBody_List p_viaBody_List := via.viaBody;
var integer size_via := lengthof(p_viaBody_List);
var integer size_via_updated := size_via + 1;
var ViaBody_List p_viaBody_List_updated;
var Via v_via;
var ViaBody_List v_viaBody_List := p_via.viaBody;
var integer v_size_via := lengthof(v_viaBody_List);
var integer v_size_via_updated := v_size_via + 1;
var ViaBody_List v_viaBody_List_updated;
var integer i;
vc_branch := c_branchCookie & f_getRndTag();
p_viaBody_List_updated[0] := valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile));
v_viaBody_List_updated[0] := valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile));
// p_viaBody_List_updated[0 ] := vc_request.msgHeader.route.routeBody[0 ] ;
for (var integer i := 1; i < size_via_updated; i := i + 1) {
p_viaBody_List_updated[i] := p_viaBody_List[i - 1];
for (i := 1; i < v_size_via_updated; i := i + 1) {
v_viaBody_List_updated[i] := v_viaBody_List[i - 1];
}
p_via.fieldName := via.fieldName;
p_via.viaBody := p_viaBody_List_updated;
return (p_via);
v_via.fieldName := p_via.fieldName;
v_via.viaBody := v_viaBody_List_updated;
return (v_via);
}
 
// TODO STF471 added, check location
784,21 → 701,22
* @return component variable of route header
*/
function f_updateRouteHeaderAS(
in Route route
in Route p_route
) runs on SipComponent
return Route {
var Route p_route;
var RouteBody_List p_routeBody_List := route.routeBody;
var integer size_route := lengthof(p_routeBody_List);
var integer size_route_updated := size_route - 1;
var RouteBody_List p_routeBody_List_updated;
var Route v_route;
var RouteBody_List v_routeBody_List := p_route.routeBody;
var integer v_size_route := lengthof(v_routeBody_List);
var integer v_size_route_updated := v_size_route - 1;
var RouteBody_List v_routeBody_List_updated;
var integer i;
 
for (var integer i := 0; i < size_route_updated; i := i + 1) {
p_routeBody_List_updated[i] := p_routeBody_List[i + 1];
for (i := 0; i < v_size_route_updated; i := i + 1) {
v_routeBody_List_updated[i] := v_routeBody_List[i + 1];
}
p_route.fieldName := route.fieldName;
p_route.routeBody := p_routeBody_List_updated;
return (p_route);
v_route.fieldName := p_route.fieldName;
v_route.routeBody := v_routeBody_List_updated;
return (v_route);
}
 
// TODO STF471 added, check location
824,13 → 742,13
}
)
);
var RouteBody_List v_routeBody_List;
var integer size_recordRoute := 0;
var integer v_size_recordRoute := 0;
var integer i;
 
if (isvalue(p_recordRoute)) {
size_recordRoute := lengthof(valueof(p_recordRoute).routeBody);
v_size_recordRoute := lengthof(valueof(p_recordRoute).routeBody);
}
for (var integer i := 1; i < size_recordRoute + 1; i := i + 1) {
for (i := 1; i < v_size_recordRoute + 1; i := i + 1) {
v_recordRoute.routeBody[i] := valueof(p_recordRoute).routeBody[i - 1];
}
 
923,21 → 841,23
function f_checkRequirePrecondition(
in Request p_message
) {
var boolean v_precondition_found;
var integer i;
if (isvalue(p_message.msgHeader.require)) {
var boolean v_precondition_found := false;
for (var integer v_i := 0; v_i < lengthof(p_message.msgHeader.require.optionsTags); v_i := v_i + 1) {
if (match(p_message.msgHeader.require.optionsTags[v_i], c_tagPrecond)) {
v_precondition_found := false;
for (i := 0; i < lengthof(p_message.msgHeader.require.optionsTags); i := i + 1) {
if (match(p_message.msgHeader.require.optionsTags[i], c_tagPrecond)) {
v_precondition_found := true;
}
}
if (not (v_precondition_found)) {
setverdict(fail);
log("FAIL: precondition not found in Require options list!");
log("*** " & __SCOPE__ & " FAIL: precondition not found in Require options list! ***");
}
}
else {
setverdict(fail);
log("FAIL: Require options is not present!");
log("*** " & __SCOPE__ & " FAIL: Require options is not present! ***");
}
}
 
951,10 → 871,10
in Request p_message,
charstring p_id
) return boolean {
var integer v_chargeParamsLen;
var integer i;
 
if (isvalue(p_message.msgHeader.pChargingVector)) {
for (var integer i := 0; i < lengthof(p_message.msgHeader.pChargingVector.chargeParams); i := i + 1) {
for (i := 0; i < lengthof(p_message.msgHeader.pChargingVector.chargeParams); i := i + 1) {
if (p_message.msgHeader.pChargingVector.chargeParams[i].id == p_id) {
return (true);
}
973,10 → 893,10
in Response p_message,
charstring p_id
) return boolean {
var integer v_chargeParamsLen;
var integer i;
 
if (isvalue(p_message.msgHeader.pChargingVector)) {
for (var integer i := 0; i < lengthof(p_message.msgHeader.pChargingVector.chargeParams); i := i + 1) {
for (i := 0; i < lengthof(p_message.msgHeader.pChargingVector.chargeParams); i := i + 1) {
if (p_message.msgHeader.pChargingVector.chargeParams[i].id == p_id) {
return true;
}
1047,10 → 967,10
in Response p_message,
SipUrl p_URI
) return boolean {
var integer v_chargeParamsLen;
var integer i;
 
if (isvalue(p_message.msgHeader.historyInfo)) {
for (var integer i := 0; i < lengthof(p_message.msgHeader.historyInfo.historyInfoList); i := i + 1) {
for (i := 0; i < lengthof(p_message.msgHeader.historyInfo.historyInfoList); i := i + 1) {
if (p_message.msgHeader.historyInfo.historyInfoList[i].nameAddr.addrSpec == p_URI) {
return (true);
}
1086,10 → 1006,8
* @return tag value
*/
function f_getRndCallId(
inout CSeq p_cSeq_s
) return charstring {
var charstring v_tag_value;
v_tag_value := fx_rndStr() & fx_rndStr();
var charstring v_tag_value := fx_rndStr() & fx_rndStr();
// v_tag_value is initialized with a random value with at least 32 bits of randomness
// 4294967296 is a 32 bits integer
// v_tag_value := int2str(float2int(4294967296.0*rnd()) + loc_CSeq_s.seqNumber );
1119,10 → 1037,9
*/
function f_getViaReplyAddr(
inout ViaBody_List p_viaBody_List,
inout address4SIP p_source_address
inout Address4SIP p_source_address
) runs on SipComponent {
var ViaBody v_viaBody;
var HostPort v_locAddr;
// The address to send message shall be updated after getting information
// in the Via header fied and according to 18.2.2
v_viaBody := p_viaBody_List[0];
1266,10 → 1183,11
) runs on SipComponent
return boolean {
var GenericParam v_viaParameter;
var integer i;
 
for (var integer v_i := 0; v_i < lengthof(p_response.msgHeader.via.viaBody); v_i := v_i + 1) {
for (i := 0; i < lengthof(p_response.msgHeader.via.viaBody); i := i + 1) {
 
v_viaParameter := p_response.msgHeader.via.viaBody[v_i].viaParams[0]; // first parameter
v_viaParameter := p_response.msgHeader.via.viaBody[i].viaParams[0]; // first parameter
if (not v_viaParameter.id == "tokenized-by") {
return (false);
}
1391,7 → 1309,7
 
vc_callId := {
fieldName := CALL_ID_E,
callid := f_getRndCallId(p_cSeq_s) & c_AT & vc_userprofile.currIpaddr
callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr
};
vc_callIdReg := vc_callId; // remember callId for de-registration
vc_to := valueof(m_To(m_SipUrl_currDomain(vc_userprofile)));
1624,7 → 1542,7
f_setHeadersGeneral(p_cSeq_s, "INVITE"); // cseq, contact, branch, via
vc_callId := {
fieldName := CALL_ID_E,
callid := f_getRndCallId(p_cSeq_s) & c_AT & vc_userprofile.currIpaddr
callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr
};
 
vc_cancel_To := vc_to;
1641,7 → 1559,7
vc_reqUrnUri := vc_requestUri.components.urn;
}
else {
log("f_setHeadersINVITE: unsupported field: ", vc_requestUri);
log("*** " & __SCOPE__ &" INFO:f_setHeadersINVITE: unsupported field: ", vc_requestUri," ***");
setverdict(fail);
}
}
1656,7 → 1574,7
f_setHeadersGeneral(p_cSeq_s, "UPDATE"); // cseq, contact, branch, via
vc_callId := {
fieldName := CALL_ID_E,
callid := f_getRndCallId(p_cSeq_s) & c_AT & vc_userprofile.currIpaddr
callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr
};
 
vc_cancel_To := vc_to;
1677,7 → 1595,7
f_setHeadersGeneral(p_cSeq_s, "MESSAGE"); // cseq, contact, branch, via
vc_callId := {
fieldName := CALL_ID_E,
callid := f_getRndCallId(p_cSeq_s) & c_AT & vc_userprofile.currIpaddr
callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr
};
 
vc_cancel_To := vc_to;
1737,7 → 1655,7
 
vc_callId := {
fieldName := CALL_ID_E,
callid := f_getRndCallId(p_cSeq_s) & c_AT & vc_userprofile.currIpaddr
callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr
};
 
// TODO STF471 change
1769,7 → 1687,7
f_setHeadersGeneral(p_cSeq_s, "SUBSCRIBE"); // cseq, contact, branch, via
vc_callId := {
fieldName := CALL_ID_E,
callid := f_getRndCallId(p_cSeq_s) & c_AT & vc_userprofile.currIpaddr
callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr
};
 
vc_cancel_To := vc_to;
1909,7 → 1827,9
function f_setHeadersOnReceiptOfINVITE(
Request p_Request
) runs on SipComponent {
 
var integer i, j;
var integer v_length;
f_setHeadersOnReceiptOfRequest(p_Request);
 
vc_callId := p_Request.msgHeader.callId;
1946,8 → 1866,8
if (isvalue(p_Request.messageBody)) {
// cleaning of attributes before assignment
if (isvalue(vc_sdp_remote.media_list)) {
var integer v_length := lengthof(vc_sdp_remote.media_list);
for (var integer i := 0; i < v_length; i := i + 1) {
v_length := lengthof(vc_sdp_remote.media_list);
for (i := 0; i < v_length; i := i + 1) {
if (isvalue(vc_sdp_remote.media_list[i].attributes)) {
vc_sdp_remote.media_list[i].attributes := omit;
}
1968,7 → 1888,7
 
if (ischosen(p_Request.messageBody.mimeMessageBody)) {
 
for (var integer j := 0; j < lengthof(p_Request.messageBody.mimeMessageBody.mimeEncapsulatedList); j := j + 1) {
for (j := 0; j < lengthof(p_Request.messageBody.mimeMessageBody.mimeEncapsulatedList); j := j + 1) {
if (match(p_Request.messageBody.mimeMessageBody.mimeEncapsulatedList[j].content_type, c_sdpApplication)) {
vc_sdp_remote := p_Request.messageBody.mimeMessageBody.mimeEncapsulatedList[j].mime_encapsulated_part.sdpMessageBody;
vc_sdp_remote_is_valid := true;
1982,7 → 1902,7
}
 
if (isvalue(p_Request.msgHeader.supported.optionsTags)) {
for (var integer i := lengthof(p_Request.msgHeader.supported.optionsTags); i > 0; i := i - 1) {
for (i := lengthof(p_Request.msgHeader.supported.optionsTags); i > 0; i := i - 1) {
if (p_Request.msgHeader.supported.optionsTags[i - 1] == "100rel") {
vc_supported_100rel := true;
}
2050,10 → 1970,10
* @verdict
*/
function f_setHeadersOnReceiptOfResponse(
inout CSeq p_cSeq,
inout CSeq p_cSeq,//TODO: do I remove this parameter, although it does nothing
Response p_response
) runs on SipComponent {
var integer v_i, v_j, v_nbroute;
var integer i, j, v_nbroute;
var template(omit) Contact v_contact;
// only for local purpose
vc_response := p_response;
2080,7 → 2000,7
vc_reqUrnUri := vc_to.addressField.addrSpecUnion.components.urn;
}
else {
log("f_setHeadersOnReceiptOfResponse: unsupported field: ", vc_to);
log("*** f_setHeadersOnReceiptOfResponse: INFO: unsupported field: ", vc_to, " ***");
setverdict(fail);
}
vc_requestUri := vc_to.addressField.addrSpecUnion;
2105,9 → 2025,9
vc_recordRoute := p_response.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;
2151,7 → 2071,7
 
if (ischosen(p_response.messageBody.mimeMessageBody)) {
 
for (var integer j := 0; j < lengthof(p_response.messageBody.mimeMessageBody.mimeEncapsulatedList); j := j + 1) {
for (j := 0; j < lengthof(p_response.messageBody.mimeMessageBody.mimeEncapsulatedList); j := j + 1) {
if (match(p_response.messageBody.mimeMessageBody.mimeEncapsulatedList[j].content_type, c_sdpApplication)) {
vc_sdp_remote := p_response.messageBody.mimeMessageBody.mimeEncapsulatedList[j].mime_encapsulated_part.sdpMessageBody;
}
2169,10 → 2089,9
* @param p_response received response message
*/
function f_getServiceRouteMapIntoRouteInRegistration(
inout CSeq p_cSeq,
Response p_response
) runs on SipComponent {
var integer v_i, v_j, v_nbroute;
var integer i, j, v_nbroute;
var template(omit) ServiceRoute v_serviceRoute;
 
// Route Management
2180,9 → 2099,9
v_serviceRoute := p_response.msgHeader.serviceRoute;
v_nbroute := lengthof(v_serviceRoute.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] := v_serviceRoute.routeBody[v_i];
for (i := 0; i <= (v_nbroute - 1); i := i + 1) {
j := v_nbroute - 1 - i;
vc_route.routeBody[j] := v_serviceRoute.routeBody[i];
}
vc_route.fieldName := ROUTE_E;
vc_route_REG := vc_route;
2199,7 → 2118,7
inout CSeq p_cSeq,
Request p_request
) runs on SipComponent {
var integer v_i, v_j, v_nbroute;
var integer i, j, v_nbroute;
var template(omit) Route v_route;
 
// Route Management
2207,9 → 2126,9
v_route := p_request.msgHeader.route;
v_nbroute := lengthof(v_route.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_recordRoute.routeBody[v_j] := v_route.routeBody[v_i];
for (i := 0; i <= (v_nbroute - 1); i := i + 1) {
j := v_nbroute - 1 - i;
vc_recordRoute.routeBody[j] := v_route.routeBody[i];
}
vc_recordRoute.fieldName := RECORD_ROUTE_E;
 
2234,11 → 2153,12
in template SDP_attribute p_attribute
) runs on SipComponent
return boolean {
var integer i, j;
 
if (isvalue(p_sdp.media_list)) {
for (var integer j := 0; j < lengthof(p_sdp.media_list); j := j + 1) {
for (j := 0; j < lengthof(p_sdp.media_list); j := j + 1) {
if (isvalue(p_sdp.media_list[j].attributes)) {
for (var integer i := 0; i < lengthof(p_sdp.media_list[j].attributes); i := i + 1) {
for (i := 0; i < lengthof(p_sdp.media_list[j].attributes); i := i + 1) {
if (match(p_sdp.media_list[j].attributes[i], p_attribute)) {
return (true);
}
2247,7 → 2167,7
}
}
if (isvalue(p_sdp.attributes)) {
for (var integer j := 0; j < lengthof(p_sdp.attributes); j := j + 1) {
for (j := 0; j < lengthof(p_sdp.attributes); j := j + 1) {
if (match(p_sdp.attributes[j], p_attribute)) {
return (true);
}
2265,9 → 2185,10
in template SDP_attribute p_attribute
) runs on SipComponent
return boolean {
var integer j;
 
if (isvalue(p_sdp.attributes)) {
for (var integer j := 0; j < lengthof(p_sdp.attributes); j := j + 1) {
for (j := 0; j < lengthof(p_sdp.attributes); j := j + 1) {
if (match(p_sdp.attributes[j], p_attribute)) {
return (true);
}
2289,12 → 2210,12
in template SDP_attribute p_attribute
) runs on SipComponent
return SDP_attribute {
 
var integer i, j;
var template SDP_attribute v_attribute := p_attribute;
 
// check if the selected attribute is included in the SDP offer (session attributes)
if (isvalue(p_sdp.attributes)) {
for (var integer j := 0; j < lengthof(p_sdp.attributes); j := j + 1) {
for (j := 0; j < lengthof(p_sdp.attributes); j := j + 1) {
if (match(p_sdp.attributes[j], p_attribute)) {
v_attribute := p_sdp.attributes[j];
}
2304,9 → 2225,9
// check if the selected attribute is included in the SDP offer (any of the media attributes)
{
if (isvalue(p_sdp.media_list)) {
for (var integer j := 0; j < lengthof(p_sdp.media_list); j := j + 1) {
for (j := 0; j < lengthof(p_sdp.media_list); j := j + 1) {
if (isvalue(p_sdp.media_list[j].attributes)) {
for (var integer i := 0; i < lengthof(p_sdp.media_list[j].attributes); i := i + 1) {
for (i := 0; i < lengthof(p_sdp.media_list[j].attributes); i := i + 1) {
if (match(p_sdp.media_list[j].attributes[i], p_attribute)) {
v_attribute := p_sdp.media_list[j].attributes[i];
}
2337,23 → 2258,23
* @desc check if message body include SDP bandwidth (2nd parameter) either for the session or a media description
*/
function f_check_bandwidth(
in SDP_Message loc_sdp,
in template SDP_bandwidth loc_bandw
in SDP_Message p_loc_sdp,
in template SDP_bandwidth p_loc_bandw
) runs on SipComponent
return boolean {
 
if (isvalue(loc_sdp.bandwidth)) {
for (var integer j := 0; j < lengthof(loc_sdp.bandwidth); j := j + 1) {
if (match(loc_sdp.bandwidth[j], loc_bandw)) {
var integer i, j;
if (isvalue(p_loc_sdp.bandwidth)) {
for (j := 0; j < lengthof(p_loc_sdp.bandwidth); j := j + 1) {
if (match(p_loc_sdp.bandwidth[j], p_loc_bandw)) {
return (true);
}
}
}
if (isvalue(loc_sdp.media_list)) {
for (var integer j := 0; j < lengthof(loc_sdp.media_list); j := j + 1) {
if (isvalue(loc_sdp.media_list[j].bandwidth)) {
for (var integer i := 0; i < lengthof(loc_sdp.media_list[j].bandwidth); i := i + 1) {
if (match(loc_sdp.media_list[j].bandwidth[i], loc_bandw)) {
if (isvalue(p_loc_sdp.media_list)) {
for (j := 0; j < lengthof(p_loc_sdp.media_list); j := j + 1) {
if (isvalue(p_loc_sdp.media_list[j].bandwidth)) {
for (i := 0; i < lengthof(p_loc_sdp.media_list[j].bandwidth); i := i + 1) {
if (match(p_loc_sdp.media_list[j].bandwidth[i], p_loc_bandw)) {
return (true);
}
}
2368,14 → 2289,14
* @desc check if message body include SDP media (2nd parameter)
*/
function f_check_media(
in SDP_Message loc_sdp,
in template(present) SDP_media_desc loc_media
in SDP_Message p_loc_sdp,
in template(present) SDP_media_desc p_loc_media
) runs on SipComponent
return boolean {
 
if (isvalue(loc_sdp.media_list)) {
for (var integer j := 0; j < lengthof(loc_sdp.media_list); j := j + 1) {
if (match(loc_sdp.media_list[j].media_field.transport, loc_media.media_field.transport) and match(loc_sdp.media_list[j].media_field.fmts, loc_media.media_field.fmts)) {
var integer j;
if (isvalue(p_loc_sdp.media_list)) {
for (j := 0; j < lengthof(p_loc_sdp.media_list); j := j + 1) {
if (match(p_loc_sdp.media_list[j].media_field.transport, p_loc_media.media_field.transport) and match(p_loc_sdp.media_list[j].media_field.fmts, p_loc_media.media_field.fmts)) {
return (true);
}
}
2388,10 → 2309,10
* @param loc_sdp SDP message
*/
function f_check_precondition(
in SDP_Message loc_sdp
in SDP_Message p_loc_sdp
) runs on SipComponent
return boolean {
if (f_check_attribute(loc_sdp, mw_attribute_des) or f_check_attribute(loc_sdp, mw_attribute_curr)) {
if (f_check_attribute(p_loc_sdp, mw_attribute_des) or f_check_attribute(p_loc_sdp, mw_attribute_curr)) {
return (true);
}
 
2403,11 → 2324,11
* @desc check if message body include SDP media direction return true, else false
*/
function f_check_media_direction(
in SDP_Message loc_sdp
in SDP_Message p_loc_sdp
) runs on SipComponent
return boolean {
 
if (f_check_attribute(loc_sdp, mw_attribute_sendonly) or f_check_attribute(loc_sdp, mw_attribute_recvonly) or f_check_attribute(loc_sdp, mw_attribute_sendrecv) or f_check_attribute(loc_sdp, mw_attribute_inactive)) {
if (f_check_attribute(p_loc_sdp, mw_attribute_sendonly) or f_check_attribute(p_loc_sdp, mw_attribute_recvonly) or f_check_attribute(p_loc_sdp, mw_attribute_sendrecv) or f_check_attribute(p_loc_sdp, mw_attribute_inactive)) {
return (true);
}
 
2418,22 → 2339,18
* @desc copy media/attribute lines from remote to local SDP variable
*/
function f_check_SDP(
integer loc_sdp,
integer loc_codec
integer p_loc_sdp,
integer p_loc_codec
) runs on SipComponent
return boolean {
var SDP_media_desc v_media := f_prepare_media(loc_sdp, loc_codec);
log("log0");
var SDP_media_desc v_media := f_prepare_media(p_loc_sdp, p_loc_codec);
if (vc_sdp_remote.media_list[0].media_field.media != v_media.media_field.media) {
log("log1");
return false;
}
if (vc_sdp_remote.media_list[0].media_field.transport != v_media.media_field.transport) {
log("log2");
return false;
}
if (vc_sdp_remote.media_list[0].media_field.fmts != v_media.media_field.fmts) {
log("remote:", vc_sdp_remote.media_list[0].media_field.fmts, "expect:", v_media.media_field.fmts);
return false;
}
 
2449,12 → 2366,14
inout SDP_Message p_sdp,
in SDP_attribute_curr p_curr
) {
var integer i;
var integer v_mn;
if (isvalue(p_sdp.media_list)) {
var integer mn := lengthof(p_sdp.media_list[0].attributes);
for (var integer i := 0; i < mn; i := i + 1) {
v_mn := lengthof(p_sdp.media_list[0].attributes);
for (i := 0; i < v_mn; i := i + 1) {
if (ischosen(p_sdp.media_list[0].attributes[i].curr)) {
p_sdp.media_list[0].attributes[i].curr := p_curr;
i := mn;
i := v_mn;
}
}
}
2469,9 → 2388,10
inout SDP_Message p_sdp,
in SDP_attribute p_att
) {
var integer v_mn;
if (isvalue(p_sdp.media_list)) {
var integer mn := lengthof(p_sdp.media_list[0].attributes);
p_sdp.media_list[0].attributes[mn] := p_att;
v_mn := lengthof(p_sdp.media_list[0].attributes);
p_sdp.media_list[0].attributes[v_mn] := p_att;
}
}
 
2480,11 → 2400,11
* @desc append new media to the existing media list in SDP
*/
function f_append_media(
inout SDP_Message loc_SDP,
template(value) SDP_media_desc loc_media
inout SDP_Message p_loc_SDP,
template(value) SDP_media_desc p_loc_media
) {
var integer mn := lengthof(loc_SDP.media_list);
loc_SDP.media_list[mn] := valueof(loc_media);
var integer v_mn := lengthof(p_loc_SDP.media_list);
p_loc_SDP.media_list[v_mn] := valueof(p_loc_media);
}
 
/**
2491,8 → 2411,8
* @desc repare media/attribute lines
*/
function f_prepare_media(
integer loc_sdp,
integer loc_codec
integer p_loc_sdp,
integer p_loc_codec
) runs on SipComponent
return SDP_media_desc {
var charstring v_codecs[32] := {"PCMU/8000", "GSM/8000", "G723/8000", "DVI4/8000", "DVI4/16000", "LPC/8000", "PCMA/8000", "G722/8000", "L16/44100/2", "L16/44100", "QCELP/8000", "CN/8000", "MPA/90000", "G728/8000", "DVI4/11025", "DVI4/22050", "G729/8000", "G726-40/8000", "G726-32/8000", "G726-24/8000", "G726-16/8000", "G726D/8000", "G726E/8000", "GSM-EFR/8000", "CelB/90000", "JPEG/90000", "Nv/90000", "H261/90000", "MPV/90000", "MP2T/90000", "H263/90000", "H263-1998/90000"};
2518,35 → 2438,35
attributes := omit
};
 
if (32 < loc_codec or loc_codec < 1) {
if (32 < p_loc_codec or p_loc_codec < 1) {
log("Unexpected SDP variant");
setverdict(inconc);
return (v_media);
}
 
if (loc_sdp == 1) {
if (p_loc_sdp == 1) {
}
else if (loc_sdp == 2) {
v_media.media_field.fmts := {PX_SIP_SDP_dyn}; // { "98", "0" };
else if (p_loc_sdp == 2) {
v_media.media_field.fmts := {PX_SIP_SDP_DYN}; // { "98", "0" };
v_media.attributes := {
{
rtpmap := {attr_value := PX_SIP_SDP_dyn & " " & v_codecs[loc_codec - 1]} // PX_SIP_SDP_dyn := 98
rtpmap := {attr_value := PX_SIP_SDP_DYN & " " & v_codecs[p_loc_codec - 1]} // PX_SIP_SDP_DYN := 98
}
};
}
else if (loc_sdp == 3) {
else if (p_loc_sdp == 3) {
v_media.media_field.fmts := {"8"};
}
else if (loc_sdp == 4) {
else if (p_loc_sdp == 4) {
v_media.media_field.fmts := {"99", "8"};
v_media.attributes := {{rtpmap := {attr_value := "99 " & v_codecs[loc_codec - 1]}}};
v_media.attributes := {{rtpmap := {attr_value := "99 " & v_codecs[p_loc_codec - 1]}}};
}
else if (loc_sdp == 5) {
else if (p_loc_sdp == 5) {
v_media.media_field.media := "image";
v_media.media_field.transport := "udptl";
v_media.media_field.fmts := {"t38"};
}
else if (loc_sdp == 6) {
else if (p_loc_sdp == 6) {
v_media.media_field.media := "image";
v_media.media_field.transport := "tcptl";
v_media.media_field.fmts := {"t38"};
2563,11 → 2483,11
* @desc repare media/attribute lines
*/
function f_prepare_SDP(
integer loc_sdp,
integer loc_codec
integer p_loc_sdp,
integer p_loc_codec
) runs on SipComponent {
 
vc_sdp_local.media_list := {f_prepare_media(loc_sdp, loc_codec)};
vc_sdp_local.media_list := {f_prepare_media(p_loc_sdp, p_loc_codec)};
}
 
/**
3269,8 → 3189,8
in template(present) NOTIFY_Request p_MSG := ?
) runs on SipComponent {
 
var boolean received_OK := false;
var boolean received_NOTIFY := false;
var boolean v_received_OK := false;
var boolean v_received_NOTIFY := false;
var NOTIFY_Request v_MSG;
tc_resp.start(PX_SIP_TRESP);
tc_wait.start(PX_SIP_TWAIT);
3280,7 → 3200,7
tc_resp.stop;
vc_subscribed := true;
f_setHeadersOnReceiptOfResponse(vc_cSeq, vc_response);
received_OK := true;
v_received_OK := true;
setverdict(pass);
if (not (received_NOTIFY)) {
repeat;
3292,7 → 3212,7
f_setHeadersOnReceiptOfRequest(v_MSG);
// Answer to the NOTIFY
f_send200OK();
received_NOTIFY := true;
v_received_NOTIFY := true;
if (not (received_OK)) {
repeat;
}
4046,7 → 3966,7
) runs on SipComponent {
// != pass does not work, because in case of "none" execution shall continue
if (getverdict == inconc or getverdict == fail) {
log("**** f_check2Null: Verdict evaluated to fail or inconc. Stopping test execution now ");
log("*** f_check2Null: Verdict evaluated to fail or inconc. Stopping test execution now ***");
f_selfOrClientSyncAndVerdict(p_syncPoint, e_error);
} // end if
}
4103,12 → 4023,12
f_SendREGISTER(p_register); // LibSip
// awaiting 200 OK REGISTER
f_awaitingOkResponse(p_cSeq_s);
f_getServiceRouteMapIntoRouteInRegistration(p_cSeq_s, vc_response);
f_getServiceRouteMapIntoRouteInRegistration(vc_response);
}
[] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callId, p_cSeq_s)) -> value vc_response {
tc_resp.stop;
f_setHeadersOnReceiptOfResponse(vc_cSeq, vc_response);
f_getServiceRouteMapIntoRouteInRegistration(p_cSeq_s, vc_response);
f_getServiceRouteMapIntoRouteInRegistration(vc_response);
log("Authorization was not requested as expected");
}
}
4115,7 → 4035,7
}
else {
f_awaitingOkResponse(p_cSeq_s);
f_getServiceRouteMapIntoRouteInRegistration(p_cSeq_s, vc_response);
f_getServiceRouteMapIntoRouteInRegistration(vc_response);
}
}
} // end function f_Registration
4156,12 → 4076,12
f_SendREGISTER(p_register); // LibSip
// awaiting 200 OK REGISTER
f_awaitingOkResponse(p_cSeq_s);
f_getServiceRouteMapIntoRouteInRegistration(p_cSeq_s, vc_response);
f_getServiceRouteMapIntoRouteInRegistration(vc_response);
}
[] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callId, p_cSeq_s)) -> value vc_response {
tc_resp.stop;
f_setHeadersOnReceiptOfResponse(vc_cSeq, vc_response);
f_getServiceRouteMapIntoRouteInRegistration(p_cSeq_s, vc_response);
f_getServiceRouteMapIntoRouteInRegistration(vc_response);
log("Authorization was not requested as expected");
}
}
4168,7 → 4088,7
}
else {
f_awaitingOkResponse(p_cSeq_s);
f_getServiceRouteMapIntoRouteInRegistration(p_cSeq_s, vc_response);
f_getServiceRouteMapIntoRouteInRegistration(vc_response);
}
}
} // end function f_Registration_withTemplate
4181,8 → 4101,6
function f_RemoveRegistration(
inout CSeq p_cSeq
) runs on SipComponent {
var CommaParam_List v_challenge;
var Credentials v_credentials;
var template(value) REGISTER_Request v_request;
var boolean v_receivedNotify := false;
 
4254,7 → 4172,6
function f_RemoveRegistration_wo_authorization(
inout CSeq p_cSeq
) runs on SipComponent {
var SemicolonParam_List tmp_params;
if (PX_SIP_REGISTRATION) {
f_setHeaders_deREGISTER(p_cSeq);
f_SendREGISTER(m_REGISTER_Request_expires(vc_requestUri, vc_callIdReg, p_cSeq, vc_from, vc_to, vc_via, vc_contact, vc_authorization, "0"));
4357,7 → 4274,7
 
// Preamble
//NOTE STF471: removed f_init_userprofile(p_userprofile); // assignment of PIXIT values to component variable
vc_sdp_local := valueof(m_SDP_bandwidth(m_media_dynPT(PX_SIP_SDP_dyn, PX_SIP_SDP_encoding), vc_userprofile));
vc_sdp_local := valueof(m_SDP_bandwidth(m_media_dynPT(PX_SIP_SDP_DYN, PX_SIP_SDP_ENCODING), vc_userprofile));
}
 
/**
4502,10 → 4419,9
*/
function f_check_Conversation(
) runs on SipComponent {
var boolean v_result;
var charstring v_question := "confirm if conversation at SIP port";
 
if (PX_SIP_CheckConversation) {
if (PX_SIP_CHECK_CONVERSATION) {
opPort
.call(
s_SIP_conversation:
4548,10 → 4464,9
*/
function f_check_Ringing(
) runs on SipComponent {
var boolean v_result;
var charstring v_question := "confirm if ringing at SIP port";
 
if (PX_SIP_CheckRinging) {
if (PX_SIP_CHECK_RINGING) {
opPort
.call(
s_SIP_ringing:
4594,10 → 4509,9
*/
function f_check_AnnouncementUE_A(
) runs on SipComponent {
var boolean v_result;
var charstring v_question := "confirm if announcement at UE A";
 
if (PX_SIP_CheckConversation) {
if (PX_SIP_CHECK_CONVERSATION) {
opPort
.call(
s_SIP_announcementA:
4640,10 → 4554,9
*/
function f_check_AnnouncementUE_B(
) runs on SipComponent {
var boolean v_result;
var charstring v_question := "confirm if announcement at UE B";
 
if (PX_SIP_CheckConversation) {
if (PX_SIP_CHECK_CONVERSATION) {
opPort
.call(
s_SIP_announcementB:
4686,10 → 4599,9
*/
function f_check_Announcement(
) runs on SipComponent {
var boolean v_result;
var charstring v_question := "confirm if announcement at SIP side";
 
if (PX_SIP_CheckConversation) {
if (PX_SIP_CHECK_CONVERSATION) {
opPort
.call(
s_SIP_announcement:
4732,10 → 4644,9
*/
function f_check_VoiceMessage(
) runs on SipComponent {
var boolean v_result;
var charstring v_question := "confirm if voice message at SIP side";
 
if (PX_SIP_CheckConversation) {
if (PX_SIP_CHECK_CONVERSATION) {
opPort
.call(
s_SIP_voiceMessage:
4778,10 → 4689,9
*/
function f_check_MediaStopped(
) runs on SipComponent {
var boolean v_result;
var charstring v_question := "confirm if media stream stopped";
 
if (PX_SIP_CheckConversation) {
if (PX_SIP_CHECK_CONVERSATION) {
opPort
.call(
s_SIP_mediastopped:
4831,13 → 4741,13
) runs on SipComponent {
[] syncPort.receive(m_syncServerStop) {
tc_sync.stop;
log("**** a_Sip_catchSyncStop: Test component received STOP signal from MTC - going to IDLE state **** ");
log("*** a_Sip_catchSyncStop: 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);
f_terminate_component();
log("**** a_Sip_catchSyncStop: TEST COMPONENT NOW STOPPING ITSELF! **** ");
log("*** a_Sip_catchSyncStop: TEST COMPONENT NOW STOPPING ITSELF! *** ");
setverdict(inconc);
stop;
}
5000,11 → 4910,11
*/
altstep a_altstep_401or407(
) runs on SipComponent {
var CommaParam_List v_challenge;
var Credentials v_Credentials;
var Response v_Response;
var Request v_Request := vc_requestFor407;
[] any port.check(receive) {
var CommaParam_List v_challenge;
var Credentials v_Credentials;
var Response v_Response;
var Request v_Request := vc_requestFor407;
 
tc_resp.start(PX_SIP_TRESP);
alt {
/branches/v3/ttcn/LibSip_Templates.ttcn
3159,8 → 3159,8
template(value) SDP_Message m_SDP_base := {
protocol_version := 0, //* v=0
origin := {
user_name := PX_SIP_SDP_user_name,
session_id := PX_SIP_SDP_session_id,
user_name := PX_SIP_SDP_USER_NAME,
session_id := PX_SIP_SDP_SESSION_ID,
session_version := "0",
net_type := c_in,
addr_type := c_ip4,
3301,8 → 3301,8
) modifies m_SDP := {
bandwidth := {
{
PX_SIP_SDP_b_modifier,
PX_SIP_SDP_b_bandwidth
PX_SIP_SDP_B_MODIFIER,
PX_SIP_SDP_B_BANDWIDTH
}
}
}
3315,8 → 3315,8
//* SDP
bandwidth := {
{
PX_SIP_SDP_b_modifier,
PX_SIP_SDP_b_bandwidth
PX_SIP_SDP_B_MODIFIER,
PX_SIP_SDP_B_BANDWIDTH
}
}
}
3327,8 → 3327,8
) modifies m_SDP := {
bandwidth := {
{
PX_SIP_SDP_b_modifier,
PX_SIP_SDP_b_bandwidth
PX_SIP_SDP_B_MODIFIER,
PX_SIP_SDP_B_BANDWIDTH
}
},
key := {
3402,7 → 3402,7
template(value) charstring p_mediaAttribute
) := {
media_field := {
media := PX_SIP_SDP_media_video,
media := PX_SIP_SDP_MEDIA_VIDEO,
ports := {
port_number := 11500,
num_of_ports := omit
3539,13 → 3539,13
// MRO
template(present) SDP_attribute mw_attribute_sendonly_inactive := (mw_attribute_sendonly, mw_attribute_inactive);
template SDP_attribute mw_attribute_sendrecv_recvonly_omit := (mw_attribute_sendrecv, mw_attribute_recvonly, omit);
template(value) SDP_attribute m_attribute_AMR_DPT := {rtpmap := {attr_value := PX_SIP_SDP_dyn & " " & PX_SIP_SDP_media_transport_AMR}}
template(value) SDP_attribute m_attribute_CLEARMODE_DPT := {rtpmap := {attr_value := PX_SIP_SDP_dyn & " " & PX_SIP_SDP_media_transport_Cle}}
template(value) SDP_attribute m_attribute_G722 := {rtpmap := {attr_value := PX_SIP_SDP_encoding_attribute_G222}}
template(value) SDP_attribute m_attribute_PCMU := {rtpmap := {attr_value := PX_SIP_SDP_encoding_attribute_PCMU}}
template(value) SDP_attribute m_attribute_PCMU_DPT := {rtpmap := {attr_value := PX_SIP_SDP_dyn & " " & PX_SIP_SDP_media_transport_PCMU}}
template(value) SDP_attribute m_attribute_PCMA := {rtpmap := {attr_value := PX_SIP_SDP_encoding_attribute_PCMA}}
template(value) SDP_attribute m_attribute_PCMA_DPT := {rtpmap := {attr_value := PX_SIP_SDP_dyn & " " & PX_SIP_SDP_media_transport_PCMA}}
template(value) SDP_attribute m_attribute_AMR_DPT := {rtpmap := {attr_value := PX_SIP_SDP_DYN & " " & PX_SIP_SDP_MEDIA_TRANSPORT_AMR}}
template(value) SDP_attribute m_attribute_CLEARMODE_DPT := {rtpmap := {attr_value := PX_SIP_SDP_DYN & " " & PX_SIP_SDP_MEDIA_TRANSPORT_CLE}}
template(value) SDP_attribute m_attribute_G722 := {rtpmap := {attr_value := PX_SIP_SDP_ENCODING_ATTRIBUTE_G222}}
template(value) SDP_attribute m_attribute_PCMU := {rtpmap := {attr_value := PX_SIP_SDP_ENCODING_ATTRIBUTE_PCMU}}
template(value) SDP_attribute m_attribute_PCMU_DPT := {rtpmap := {attr_value := PX_SIP_SDP_DYN & " " & PX_SIP_SDP_MEDIA_TRANSPORT_PCMU}}
template(value) SDP_attribute m_attribute_PCMA := {rtpmap := {attr_value := PX_SIP_SDP_ENCODING_ATTRIBUTE_PCMA}}
template(value) SDP_attribute m_attribute_PCMA_DPT := {rtpmap := {attr_value := PX_SIP_SDP_DYN & " " & PX_SIP_SDP_MEDIA_TRANSPORT_PCMA}}
// TODO: STF471 template name suggests that this is a send
// template, while it contains matching mechanisms
template(present) SDP_attribute mw_attribute_T38 := {
3727,7 → 3727,7
template(value) XmlBody p_xmlBody
) := {
mimeMessageBody := {
boundary := "--" & PX_SIP_MIME_Boundary,
boundary := "--" & PX_SIP_MIME_BOUNDARY,
mimeEncapsulatedList := {
{
content_type := c_sdpApplication,
3747,7 → 3747,7
template(value) SDP_Message p_sdp
) := {
mimeMessageBody := {
boundary := "--" & PX_SIP_MIME_Boundary,
boundary := "--" & PX_SIP_MIME_BOUNDARY,
mimeEncapsulatedList := {
{
content_type := "application/sdp",