[22] | 1 | /*
|
---|
| 2 | * @author STF 346, STF366, STF368, STF369
|
---|
| 3 | * @version $Id: LibSip_Interface.ttcn 256 2009-05-08 08:16:58Z pintar $
|
---|
| 4 | * @desc This module provides the types used by the test component
|
---|
| 5 | * for SIP-IMS tests. Module become from STF306 and STF334-336
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | module LibSip_Interface language "TTCN-3:2005"//MRO
|
---|
| 9 | {
|
---|
| 10 | //LibCommon
|
---|
| 11 | import from LibCommon_Sync all;
|
---|
| 12 | import from LibCommon_AbstractData all;
|
---|
| 13 | import from LibCommon_BasicTypesAndValues all;
|
---|
| 14 | import from LibCommon_DataStrings all;
|
---|
| 15 | //LibSip
|
---|
| 16 | import from LibSip_SIPTypesAndValues all;
|
---|
| 17 | import from LibSip_SDPTypes all;
|
---|
| 18 | import from LibSip_XMLTypes all;
|
---|
| 19 |
|
---|
| 20 | import from LibSip_PIXITS all;
|
---|
| 21 |
|
---|
| 22 | group AdressTypes
|
---|
| 23 | {
|
---|
| 24 | type record address4SIP
|
---|
| 25 | {
|
---|
| 26 | //HostPort
|
---|
| 27 | charstring host optional, // hostname, IPv4 or IPv6
|
---|
| 28 | integer portField optional // represented as an integer
|
---|
| 29 | } with { encode "SIPCodec" }
|
---|
| 30 |
|
---|
| 31 | type address4SIP address;
|
---|
| 32 |
|
---|
| 33 | }// end group AdressTypes
|
---|
| 34 |
|
---|
| 35 | type port SipPort message {
|
---|
| 36 | inout Request,
|
---|
| 37 | REGISTER_Request,
|
---|
| 38 | INVITE_Request,
|
---|
| 39 | OPTIONS_Request,
|
---|
| 40 | BYE_Request,
|
---|
| 41 | CANCEL_Request,
|
---|
| 42 | ACK_Request,
|
---|
| 43 | PRACK_Request,
|
---|
| 44 | NOTIFY_Request,
|
---|
| 45 | SUBSCRIBE_Request,
|
---|
| 46 | PUBLISH_Request,
|
---|
| 47 | UPDATE_Request,
|
---|
| 48 | REFER_Request,
|
---|
| 49 | MESSAGE_Request,
|
---|
| 50 | INFO_Request,
|
---|
| 51 | Response,
|
---|
| 52 | Raw } with { extension "address" };
|
---|
| 53 |
|
---|
| 54 | signature s_SIP_conversation (in charstring text, out boolean answer);
|
---|
| 55 | signature s_SIP_ringing (in charstring text, out boolean answer);
|
---|
| 56 | signature s_SIP_announcementA (in charstring text, out boolean answer);
|
---|
| 57 | signature s_SIP_announcementB (in charstring text, out boolean answer);
|
---|
| 58 | signature s_SIP_announcement (in charstring text, out boolean answer);
|
---|
| 59 | signature s_SIP_voiceMessage (in charstring text, out boolean answer);
|
---|
| 60 | signature s_SIP_mediastopped (in charstring text, out boolean answer);
|
---|
| 61 | type port operatorPort procedure {inout s_SIP_conversation; inout s_SIP_ringing; inout s_SIP_announcementA; inout s_SIP_announcementB; inout s_SIP_announcement; inout s_SIP_voiceMessage; inout s_SIP_mediastopped};
|
---|
| 62 |
|
---|
| 63 | // Solution for building error problem. (Important for validation)
|
---|
| 64 | //type component ImsComponent extends SipComponent need to be located in LibIms_Interface and not in LibSip_Interface module
|
---|
| 65 | //With this solution TAU compiler error.
|
---|
| 66 | // type component ImsComponent extends SipComponent
|
---|
| 67 | // {
|
---|
| 68 | // // general variables
|
---|
| 69 | // var ImsInterfaceProfile vc_interfaceprofile
|
---|
| 70 | // } // end ImsComponent
|
---|
| 71 |
|
---|
| 72 | type component SipComponent
|
---|
| 73 | {
|
---|
| 74 | //port
|
---|
| 75 | port SipPort SIPP;
|
---|
| 76 | // used for communication with the operator
|
---|
| 77 | port operatorPort opPort;
|
---|
| 78 |
|
---|
| 79 | // current address to send TCP/UDP messages
|
---|
| 80 | var SipUserProfile vc_userprofile; // PIXIT userinformation
|
---|
| 81 | var address vc_sent_label := {host := PX_SIP_SUT_IPADDR, portField := PX_SIP_SUT_PORT};
|
---|
| 82 |
|
---|
| 83 | // last incoming message
|
---|
| 84 | var Response vc_response; // last incoming response message
|
---|
| 85 | var boolean vc_boo_response := false; // to check if response received or not
|
---|
| 86 | var Request vc_request; // last incoming request message
|
---|
| 87 | var boolean vc_boo_request := false; // to check if request received or not
|
---|
| 88 | var Request vc_requestFor407; // last INVITE request to be authorized if 407/401 received from Proxy
|
---|
| 89 |
|
---|
| 90 | var SipUrl vc_requestUri := c_empty_RequestUri;
|
---|
| 91 | var SipUrl vc_requestUri2 := c_empty_RequestUri;//MRO
|
---|
| 92 | var charstring vc_branch := "";
|
---|
| 93 | var charstring vc_branch_ICSCF := "";
|
---|
| 94 | var charstring vc_branch_SCSCF := "";
|
---|
| 95 |
|
---|
| 96 | // SIP message header fields (for building next message)
|
---|
| 97 | var CallId vc_callId := c_empty_CallId;
|
---|
| 98 | var CallId vc_callIdReg := c_empty_CallId;
|
---|
| 99 | var From vc_from := c_empty_From;
|
---|
| 100 | var To vc_to := c_empty_To;
|
---|
| 101 | var To vc_cancel_To := c_empty_To; // used for next CANCEL
|
---|
| 102 | var Via vc_via := c_empty_Via;
|
---|
| 103 | var Via vc_via_REG := c_empty_Via; // via used in last REGISTER
|
---|
| 104 | var ContentType vc_contentType:= c_empty_ContentType;//MRO
|
---|
| 105 |
|
---|
| 106 | var RecordRoute vc_recordRoute; // value of RecordRoute header
|
---|
| 107 | var boolean vc_boo_recordRoute := false; // boolean indicates valid recordRoute
|
---|
| 108 | var Route vc_route; // value of Route header
|
---|
| 109 | var boolean vc_boo_route := false; // boolean indicates valid Route
|
---|
| 110 |
|
---|
| 111 | var Contact vc_contact; // value of Contact header
|
---|
| 112 | var CSeq vc_cSeq := c_empty_cSeq; // value of CSeq header
|
---|
| 113 | var RAck vc_rAck := { fieldName := RACK_E, responseNum := 1, seqNumber := 1, method := "INVITE"}; // value of RAck header
|
---|
| 114 | var HostPort vc_reqHostPort := {host:=PX_SIP_SUT_IPADDR, portField:=PX_SIP_SUT_PORT}; // address to send request
|
---|
| 115 | var Privacy vc_privacy;
|
---|
| 116 | var HistoryInfo_List vc_historyInfoList := {}; // value of history list according to RFC4244
|
---|
| 117 | var SipUrl vc_confURI; // conference URI according to TS124147 ch. 5.3.1.3.2
|
---|
| 118 | var SDP_Message vc_sdp_remote; // incoming SDP offers
|
---|
| 119 | var SDP_Message vc_sdp_local; // SDP values to be sent
|
---|
| 120 | var XmlBody vc_xml_remote; // incoming XML value
|
---|
| 121 | var XmlBody vc_xml_local; //SDP values to be sent
|
---|
| 122 |
|
---|
| 123 | var CSeq vc_iut_CSeq := c_empty_cSeq; // value of last CSeq header used by the IUT in request
|
---|
| 124 | // To/From header-fields to be used if the callee will release the session
|
---|
| 125 | var To vc_callee_To := c_empty_To;
|
---|
| 126 | var From vc_callee_From := c_empty_From;
|
---|
| 127 | // To/From header-fields to be used if the caller will release the session
|
---|
| 128 | var To vc_caller_To := c_empty_To;
|
---|
| 129 | var From vc_caller_From := c_empty_From;
|
---|
| 130 | var Authorization vc_authorization;
|
---|
| 131 |
|
---|
| 132 | // variables for storing default references
|
---|
| 133 | var default vc_default;
|
---|
| 134 | var default vc_def_catchSyncStop;
|
---|
| 135 |
|
---|
| 136 | // general timers
|
---|
| 137 | timer tc_T1 := PX_SIP_T1;
|
---|
| 138 | timer tc_Tf := PX_SIP_TF;
|
---|
| 139 | timer tc_wait := PX_SIP_TWAIT;
|
---|
| 140 | timer tc_ack := PX_SIP_TACK;
|
---|
| 141 | timer tc_resp := PX_SIP_TRESP;
|
---|
| 142 | timer tc_noAct := PX_SIP_TNOACT; // time for SUT to get idle state
|
---|
| 143 | // timer TRept;
|
---|
| 144 | // timer TSync := PX_SIP_TSYNC;
|
---|
| 145 | timer tc_guard := PX_SIP_TGUARD;//MRO
|
---|
| 146 | timer tc_tDelay := 32.0;
|
---|
| 147 |
|
---|
| 148 | var float vc_tcRESP := PX_SIP_TRESP; // standard value for TRESP (may be modified in particular tests)
|
---|
| 149 |
|
---|
| 150 | // indicators set/used parameter status or state handling in default
|
---|
| 151 | var boolean vc_sdp_remote_is_valid := false; // true if there is a value in v_SDP_remote
|
---|
| 152 | var boolean vc_history_is_valid := false; // true if there is a HistoryList in response message
|
---|
| 153 | var boolean vc_send_SDP := false; // send SDP in the next outgoing message
|
---|
| 154 | var boolean vc_ignore_bye := false; // enable ignore of repeated bye in default
|
---|
| 155 | var boolean vc_ignore_invite := false; // enable ignore invite in default
|
---|
| 156 | var boolean vc_ignore181 := false; // enable ignore of 181 in default
|
---|
| 157 | var boolean vc_ignore484 := false; // enable ignore of 484 in default
|
---|
| 158 | var boolean vc_ignore4xx := false; // enable ignore of 4xx in default
|
---|
| 159 | var boolean vc_ignore200OKinv := false; // enable ignore of 200OKinv in default
|
---|
| 160 | var boolean vc_supported_100rel := false; // true if the received invite contains 100rel
|
---|
| 161 | var boolean vc_supported_precondition:= false; // true if the received invite contains precondition
|
---|
| 162 | var boolean vc_MESSAGEreceived := false; // true if MESSAGE received during altstep
|
---|
| 163 | var boolean vc_first_recv := false; // true after receipt of first incomming SIP message
|
---|
| 164 | var boolean vc_firstREGISTER_sent := false; // true after sent of first REGISTER message
|
---|
| 165 |
|
---|
| 166 | var boolean v_white_space := false;//MRO
|
---|
| 167 |
|
---|
| 168 | // ETS address
|
---|
| 169 | var address v_ets_label := { host := PX_SIP_TS1_IPADDR, portField := PX_SIP_TS1_PORT};
|
---|
| 170 |
|
---|
| 171 | // parts needed for Client/SelfSyncComp type compatibility
|
---|
| 172 | var StringStack v_stateStack := c_initStringStack;
|
---|
| 173 | port SyncPort syncSendPort;
|
---|
| 174 | port SyncPort syncPort;
|
---|
| 175 | timer tc_sync := PX_TSYNC_TIME_LIMIT;
|
---|
| 176 |
|
---|
| 177 | // // used for communication with the operator
|
---|
| 178 | // port operatorPort_SIP opPort;
|
---|
| 179 |
|
---|
| 180 | } // end SipComponent
|
---|
| 181 |
|
---|
| 182 | } // end module LibSip_Interface
|
---|