Rev

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