Rev

Rev 605 | Details | Compare with Previous | Last modification | View Log | SVN | Bug Tracker

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