Rev

Rev 197 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | Bug Tracker

Rev 197 Rev 199
Line 1... Line 1...
1
/**
1
/**
2
 * @author STF 346, STF366, STF368, STF369, STF450, STF471
2
 * @author STF 346, STF366, STF368, STF369, STF450, STF471
3
 * @version $Id: LibIms_Steps.ttcn 197 2014-02-28 08:31:46Z nikolajev $
3
 * @version $Id: LibIms_Steps.ttcn 199 2014-07-07 11:55:30Z tepelmann $
4
 * @desc This module provides the types used by the test component for SIP-IMS tests. This module is part of LibImsV3.
4
 * @desc This module provides the types used by the test component for SIP-IMS tests. This module is part of LibImsV3.
5
 */
5
 */
6
module LibIms_Steps {
6
module LibIms_Steps {
7
    // LibSip
7
    // LibSip
8
    import from LibSip_SIPTypesAndValues all;
8
    import from LibSip_SIPTypesAndValues all;
Line 715... Line 715...
715
            f_SendREGISTER(m_REGISTER_Request_IMS(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via_REG, vc_contact, m_add_Authorization_digest(vc_authorization, {c_Integrity_protected_no}), p_host, p_port)); // LibSip
715
            f_SendREGISTER(m_REGISTER_Request_IMS(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via_REG, vc_contact, m_add_Authorization_digest(vc_authorization, {c_Integrity_protected_no}), p_host, p_port)); // LibSip
716
            // awaiting of 401 and sending 2nd REGISTER and awaiting 200 OK REGISTER
716
            // awaiting of 401 and sending 2nd REGISTER and awaiting 200 OK REGISTER
717
            if (p_auth) {
717
            if (p_auth) {
718
                // receiving 401 Unauthorized response.
718
                // receiving 401 Unauthorized response.
719
                // and Re-send REGISTER request with Authorization header
719
                // and Re-send REGISTER request with Authorization header
720
                tc_ack.start(PX_SIP_TACK);
720
                tc_ack.start;
721
                alt {
721
                alt {
722
                    [] SIPP.receive(mw_Response_Base(c_statusLine401, vc_callId, p_cSeq_s)) -> value vc_response {
722
                    [] SIPP.receive(mw_Response_Base(c_statusLine401, vc_callId, p_cSeq_s)) -> value vc_response {
723
                        tc_ack.stop;
723
                        tc_ack.stop;
724
                        // set headers via, cseq and authorization
724
                        // set headers via, cseq and authorization
725
                        f_setHeaders_2ndREGISTER(p_cSeq_s);
725
                        f_setHeaders_2ndREGISTER(p_cSeq_s);
Line 839... Line 839...
839
839
840
                f_SendREGISTER(v_request);
840
                f_SendREGISTER(v_request);
841
                if (PX_SIP_REGISTER_AUTHENTICATION_ENABLED) {
841
                if (PX_SIP_REGISTER_AUTHENTICATION_ENABLED) {
842
                    // receiving 401 Unauthorized response.
842
                    // receiving 401 Unauthorized response.
843
                    // and Re-send REGISTER request with Authorization header
843
                    // and Re-send REGISTER request with Authorization header
844
                    tc_ack.start(PX_SIP_TACK);
844
                    tc_ack.start;
845
                    alt {
845
                    alt {
846
                        [] SIPP.receive(mw_Response_Base(c_statusLine401, vc_callIdReg, p_cSeq_s)) -> value vc_response {
846
                        [] SIPP.receive(mw_Response_Base(c_statusLine401, vc_callIdReg, p_cSeq_s)) -> value vc_response {
847
                            tc_ack.stop;
847
                            tc_ack.stop;
848
                            // set headers via, cseq and authorization
848
                            // set headers via, cseq and authorization
849
                            f_setHeaders_2ndREGISTER(p_cSeq_s);
849
                            f_setHeaders_2ndREGISTER(p_cSeq_s);
Line 1187... Line 1187...
1187
        ) runs on ImsComponent  {
1187
        ) runs on ImsComponent  {
1188
            LibSip_Steps.f_setHeadersBYE(p_cSeq_s);
1188
            LibSip_Steps.f_setHeadersBYE(p_cSeq_s);
1189
            // Sending of a BYE request to release the call and expect a final response
1189
            // Sending of a BYE request to release the call and expect a final response
1190
            f_SendBYE(m_BYE_Request_IMS(p_requestUri, p_callId, p_cSeq_s, p_from, p_to, vc_via, vc_route));
1190
            f_SendBYE(m_BYE_Request_IMS(p_requestUri, p_callId, p_cSeq_s, p_from, p_to, vc_via, vc_route));
1191
1191
1192
            tc_resp.start(PX_SIP_TRESP);
1192
            tc_resp.start;
1193
            alt {
1193
            alt {
1194
                [] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_callId, p_cSeq_s)) {
1194
                [] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_callId, p_cSeq_s)) {
1195
                    repeat;
1195
                    repeat;
1196
                }
1196
                }
1197
                [] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_callId, p_cSeq_s)) {
1197
                [] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_callId, p_cSeq_s)) {
Line 1227... Line 1227...
1227
            }
1227
            }
1228
            else {
1228
            else {
1229
                f_SendBYE(m_BYE_Request_UE(p_requestUri, p_callId, p_cSeq_s, p_from, valueof(p_to), vc_via, vc_route));
1229
                f_SendBYE(m_BYE_Request_UE(p_requestUri, p_callId, p_cSeq_s, p_from, valueof(p_to), vc_via, vc_route));
1230
            }
1230
            }
1231
1231
1232
            tc_resp.start(PX_SIP_TRESP);
1232
            tc_resp.start;
1233
            alt {
1233
            alt {
1234
                [] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_callId, p_cSeq_s)) {
1234
                [] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_callId, p_cSeq_s)) {
1235
                    repeat;
1235
                    repeat;
1236
                }
1236
                }
1237
                [] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_callId, p_cSeq_s)) {
1237
                [] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_callId, p_cSeq_s)) {
Line 1260... Line 1260...
1260
        ) runs on ImsComponent  {
1260
        ) runs on ImsComponent  {
1261
            LibSip_Steps.f_setHeadersBYE(p_cSeq_s);
1261
            LibSip_Steps.f_setHeadersBYE(p_cSeq_s);
1262
            // Sending of a BYE request to release the call and expect a final response
1262
            // Sending of a BYE request to release the call and expect a final response
1263
            f_SendBYE(m_BYE_Request_UE(p_requestUri, p_callId, p_cSeq_s, p_from, p_to, vc_via, vc_route));
1263
            f_SendBYE(m_BYE_Request_UE(p_requestUri, p_callId, p_cSeq_s, p_from, p_to, vc_via, vc_route));
1264
1264
1265
            tc_resp.start(PX_SIP_TRESP);
1265
            tc_resp.start;
1266
            alt {
1266
            alt {
1267
                [] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_callId, p_cSeq_s)) {
1267
                [] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_callId, p_cSeq_s)) {
1268
                    repeat;
1268
                    repeat;
1269
                }
1269
                }
1270
                [] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_callId, p_cSeq_s)) {
1270
                [] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_callId, p_cSeq_s)) {