Commit 496a552f authored by tepelmann's avatar tepelmann
Browse files

Initial formatting.

parent cc1687f1
Loading
Loading
Loading
Loading
+193 −166
Original line number Diff line number Diff line
@@ -5,9 +5,7 @@
 *              for SIP-IMS tests. Module become from STF306 and STF334-336
 *              This module is part of LibSipV3.
 */

module LibSip_Interface
{    
module LibSip_Interface {
    // LibCommon
    import from LibCommon_Sync all;
    import from LibCommon_AbstractData all;
@@ -20,50 +18,67 @@ module LibSip_Interface

    import from LibSip_PIXITS all;

    group AdressTypes
    {
      type record address4SIP
      {
    group AdressTypes {
        type record address4SIP {
            // HostPort
        charstring             host optional,                       // hostname, IPv4 or IPv6
        integer             portField optional                      // represented as an integer
      } with { encode "SIPCodec" }
            charstring host optional,
            // hostname, IPv4 or IPv6
            integer portField
             optional // represented as an integer
        }
        with {
            encode "SIPCodec";
        }

        type address4SIP address;


    } // end group AdressTypes

    type port SipPort message {
        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 
     } with { 
         extension "address" 
     };
                  
    signature s_SIP_conversation (in charstring text, out boolean answer);
    signature s_SIP_ringing (in charstring text, out boolean answer);
    signature s_SIP_announcementA (in charstring text, out boolean answer);
    signature s_SIP_announcementB (in charstring text, out boolean answer);
    signature s_SIP_announcement (in charstring text, out boolean answer);
    signature s_SIP_voiceMessage (in charstring text, out boolean answer);
    signature s_SIP_mediastopped (in charstring text, out boolean answer);
     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};
        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;
    }
    with {
        extension "address";
    }

    signature s_SIP_conversation(
        in charstring text,
        out boolean answer
    ) ;
    signature s_SIP_ringing(
        in charstring text,
        out boolean answer
    ) ;
    signature s_SIP_announcementA(
        in charstring text,
        out boolean answer
    ) ;
    signature s_SIP_announcementB(
        in charstring text,
        out boolean answer
    ) ;
    signature s_SIP_announcement(
        in charstring text,
        out boolean answer
    ) ;
    signature s_SIP_voiceMessage(
        in charstring text,
        out boolean answer
    ) ;
    signature s_SIP_mediastopped(
        in charstring text,
        out boolean answer
    ) ;
    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;
    }

    // Solution for building error problem. (Important for validation)
    // type component ImsComponent extends SipComponent need to be located in LibIms_Interface and not in LibSip_Interface module
@@ -73,9 +88,7 @@ module LibSip_Interface
    // // general variables
    // var ImsInterfaceProfile vc_interfaceprofile
    // } // end ImsComponent

    type component SipComponent
    {
    type component SipComponent {
        // port
        port SipPort SIPP;
        // used for communication with the operator
@@ -84,14 +97,12 @@ module LibSip_Interface
        // current address to send TCP/UDP messages
        var SipUserProfile vc_userprofile; // PIXIT userinformation
        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};

        // last incoming message
        var Response vc_response; // last incoming response message
        var boolean vc_boo_response := false; // to check if response received or not
        var Request vc_request; // last incoming request message
        var boolean vc_boo_request := false; // to check if request received or not
        var Request vc_requestFor407; // last INVITE request to be authorized if 407/401 received from Proxy

        var SipUrl vc_requestUri := c_empty_RequestUri;
        var SipUrl vc_requestUri2 := c_empty_RequestUri; // MRO
        var charstring vc_branch := "";
@@ -109,17 +120,33 @@ module LibSip_Interface
        var Via vc_via := c_empty_Via;
        var Via vc_via_REG := c_empty_Via; // via used in last REGISTER
        var ContentType vc_contentType := c_empty_ContentType; // MRO
      
        var template(omit) RecordRoute vc_recordRoute; // value of RecordRoute header
        var boolean vc_boo_recordRoute := false; // boolean indicates valid recordRoute
        var template(omit) Route vc_route; // value of Route header
        var template(omit) Route vc_route_REG; // value of Route header from registration ServiceRoute header for initial Requests
      var UrnUriComponents vc_reqUrnUri := {namespaceId:="", namespaceSpecificString:=""};
        var
        UrnUriComponents
            vc_reqUrnUri := {
                namespaceId := "",
                namespaceSpecificString := ""
            };
        var boolean vc_boo_route := false; // boolean indicates valid Route
        var template(omit) Contact vc_contact; // value of Contact header
        var CSeq vc_cSeq := c_empty_cSeq; // value of CSeq header
      var template(value) RAck         vc_rAck         := { fieldName := RACK_E, responseNum := 1, seqNumber := 1, method := "INVITE"}; // value of RAck header
      var HostPort     vc_reqHostPort     := {host:=PX_SIP_SUT_IPADDR, portField:=PX_SIP_SUT_PORT}; // address to send request
        var template(value)
        RAck
            vc_rAck := {
                fieldName := RACK_E,
                responseNum := 1,
                seqNumber := 1,
                method := "INVITE"
            }; // value of RAck header
        var
        HostPort
            vc_reqHostPort := {
                host := PX_SIP_SUT_IPADDR,
                portField := PX_SIP_SUT_PORT
            }; // address to send request
        var template(omit) Privacy vc_privacy;
        var HistoryInfo_List vc_historyInfoList := {}; // value of history list according to RFC4244
        var SipUrl vc_confURI; // conference URI according to TS124147 ch. 5.3.1.3.2
@@ -127,7 +154,6 @@ module LibSip_Interface
        var SDP_Message vc_sdp_local; // SDP values to be sent
        var XmlBody vc_xml_remote; // incoming XML value
        var template XmlBody vc_xml_local; // SDP values to be sent
      
        var template(omit) CSeq vc_iut_CSeq := c_empty_cSeq; // value of last CSeq header used by the IUT in request
        // To/From header-fields to be used if the callee will release the session
        var To vc_callee_To := c_empty_To;
@@ -154,7 +180,6 @@ module LibSip_Interface
        timer tc_tDelay := 32.0;

        var float vc_tcRESP := PX_SIP_TRESP; // standard value for TRESP (may be modified in particular tests)
        
        // indicators set/used parameter status or state handling in default
        var boolean vc_sdp_remote_is_valid := false; // true if there is a value in v_SDP_remote
        var boolean vc_history_is_valid := false; // true if there is a HistoryList in response message
@@ -178,17 +203,19 @@ module LibSip_Interface
        // TODO: TT change
        var boolean vc_subscribed := false;
        // ETS address
      var address v_ets_label := { host := PX_SIP_TS1_IPADDR, portField := PX_SIP_TS1_PORT};
        var
        address
            v_ets_label := {
                host := PX_SIP_TS1_IPADDR,
                portField := PX_SIP_TS1_PORT
            };

        // parts needed for Client/SelfSyncComp type compatibility
        var StringStack v_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;

    } // end SipComponent
  
} // end module LibSip_Interface
+59 −51
Original line number Diff line number Diff line
/******************************************************************************/
/******************************************************************************
 *
 */
// $Date: 2013-04-08 08:18:17 +0000 (Mo, 08 Apr 2013) $
// $Author: seka $
// $Rev: 8470 $
/******************************************************************************/
/******************************************************************************
 *
 */
/*
* This module is part of LibSipV2.
*/

module LibSip_MessageBodyTypes
{
module LibSip_MessageBodyTypes {
    import from LibSip_SDPTypes all;
    import from LibSip_SimpleMsgSummaryTypes all;
    import from LibSip_XMLTypes all;

    // type charstring XmlBody;

    group MIMETypes {
        type union MIME_Encapsulated_Parts {
            SDP_Message sdpMessageBody,
    XmlBody xmlBody                    // if there is XML body
    // XMLMessage  xmlMessage          // if there is XML message (with header and body)
  };
            XmlBody
            xmlBody // if there is XML body
        }

        type record MIME_Encapsulated_Part {
            charstring content_type,
            charstring content_disposition optional,
            MIME_Encapsulated_Parts mime_encapsulated_part
  };
        }

        type record MIME_Message {
    charstring boundary, // len:
            charstring boundary,
            // len:
            MimeEncapsulatedList mimeEncapsulatedList
  };
        }

        type record of MIME_Encapsulated_Part MimeEncapsulatedList;


    } // group MIMETypes

    type union MessageBody {
    SDP_Message sdpMessageBody,     // if there is only SDP part
        SDP_Message sdpMessageBody,
        // if there is only SDP part
        // XMLMessage xmlMessage, // if there is XML message (with header and body)
    XmlBody xmlBody,                // if there is XML body
    MIME_Message mimeMessageBody,   // if there is SDP and encapsulated ISUP part
    charstring sipfrag,             // if content-Type is message/sipfrag (cp. NOTIFY, cp TS124147 A.4.3.1.2)
    charstring textplain,           // if content type is text/plain (for testing long messages)
    SimpleMsgSummary simpleMsgSummary, // RFC 3842
    octetstring smsMessage          // encoded SMS message 3GPP 23.040, 24.011
  };


        XmlBody xmlBody,
        // if there is XML body
        MIME_Message mimeMessageBody,
        // if there is SDP and encapsulated ISUP part
        charstring sipfrag,
        // if content-Type is message/sipfrag (cp. NOTIFY, cp TS124147 A.4.3.1.2)
        charstring textplain,
        // if content type is text/plain (for testing long messages)
        SimpleMsgSummary simpleMsgSummary,
        // RFC 3842
        octetstring
        smsMessage // encoded SMS message 3GPP 23.040, 24.011
    }
}
+23 −16
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@
 *                - ParametersForHTTP_Authentication
 */
module LibSip_PIXITS {
    
    // LibCommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
@@ -127,6 +126,7 @@ module LibSip_PIXITS {
             */
            modulepar charstring PX_SIP_SDP_transport := "udptl";


        } // group SDP Parameter

        group ISUPinterworkingParameters {
@@ -139,6 +139,7 @@ module LibSip_PIXITS {
             */
            modulepar charstring PX_SIP_ISUP_CPC_VALUE := "prison";


        } // goup PSTNParameters

        group SupportedOptions {
@@ -163,6 +164,7 @@ module LibSip_PIXITS {
             */
            modulepar charstring PX_SIP_TRANSPORT := "UDP";


        } // group SupportedOptions{

        // PIXITS in group Ports_and_addresses_of_the_SUT can be ignored if this information is provided in other modules of the ATS that uses this SIP
@@ -239,6 +241,7 @@ module LibSip_PIXITS {
             */
            modulepar charstring PX_SIP_TS1_BEARER_IPADDR := "172.27.1.218";


        } // group PortsAndAddressesOfTheTS

        // PIXITS in group PortsAndAddressesOfTheTS2 can be ignored if this information is provided in other modules of the ATS that uses this SIP library
@@ -290,6 +293,7 @@ module LibSip_PIXITS {
            modulepar charstring PX_SIP_TS2_BEARER_IPADDR := "172.27.1.218";



        } // group PortsAndAddressesOfTheTS2

        // PIXITS in group PortsAndAddressesOfTheTS3 can be ignored if this information is provided in other modules of the ATS that uses this SIP library
@@ -316,6 +320,7 @@ module LibSip_PIXITS {
            modulepar charstring PX_SIP_TS3_LOCAL_USER := "2012";



        } // group PortsAndAddressesOfTheTS3

        group RegistrationParameters {
@@ -340,6 +345,7 @@ module LibSip_PIXITS {
             */
            modulepar charstring PX_AUTH_ALGORITHM := "AKAv1-MD5";


        } // group Registration parameters

        group ReleaseCause {
@@ -348,6 +354,7 @@ module LibSip_PIXITS {
             */
            modulepar integer PX_SIP_BYE_CAUSE := 16;


        } // group ReleaseCause

        group RTPStreamControlAndCheck {
@@ -371,6 +378,7 @@ module LibSip_PIXITS {
             */
            modulepar boolean PX_SIP_CheckRinging := false;


        } // group RTPStreamControlAndCheck

        group SwitchToEnableAuthentication {
@@ -384,6 +392,7 @@ module LibSip_PIXITS {
             */
            modulepar boolean PX_SIP_INVITE_AUTHENTICATION_ENABLED := false;


        } // group SwitchToEnableAuthentication

        group NofifyAndSubscribe {
@@ -402,9 +411,7 @@ module LibSip_PIXITS {
        group ParametersForHTTP_Authentication {

            /**
             * @desc
             *     charstring for RFC 2617 clause 3-2-1 qop options: Quoted string of one or more tokens indicating the "quality of protection" values supported
             *     by the server. The value "auth" indicates authentication; the value "auth-int" indicates authentication with integrity protection.
             * @desc charstring for RFC 2617 clause 3-2-1 qop options: Quoted string of one or more tokens indicating the "quality of protection" values supported by the server. The value "auth" indicates authentication; the value "auth-int" indicates authentication with integrity protection.
             */
            modulepar charstring PX_SIP_SUT_UE1_QOP := "auth";

@@ -419,9 +426,7 @@ module LibSip_PIXITS {
            modulepar charstring PX_SIP_SUT_UE1_PASSWD := "1234";

            /**
             * @desc
             *     charstring for RFC 2617 clause 3-2-1 qop options: Quoted string of one or more tokens indicating the "quality of protection" values supported
             *     by the server. The value "auth" indicates authentication; the value "auth-int" indicates authentication with integrity protection.
             * @desc charstring for RFC 2617 clause 3-2-1 qop options: Quoted string of one or more tokens indicating the "quality of protection" values supported by the server. The value "auth" indicates authentication; the value "auth-int" indicates authentication with integrity protection.
             */
            modulepar charstring PX_SIP_SUT_UE2_QOP := "auth";

@@ -436,6 +441,7 @@ module LibSip_PIXITS {
            modulepar charstring PX_SIP_SUT_UE2_PASSWD := "1234";



        } // group ParametersForHTTP_Authentication

        group SIP_Timers {
@@ -475,9 +481,7 @@ module LibSip_PIXITS {
            modulepar float PX_SIP_TRESP := 15.0;

            /**
             * @desc
             *     float for TNoAct default value for waiting no message from the IUT Value given for PX_TNOACT should be less than value of SHORT_REGISTRATION
             *     constant (which is currently "3" (seconds))
             * @desc float for TNoAct default value for waiting no message from the IUT Value given for PX_TNOACT should be less than value of SHORT_REGISTRATION constant (which is currently "3" (seconds))
             */
            modulepar float PX_SIP_TNOACT := 1.0;

@@ -496,6 +500,7 @@ module LibSip_PIXITS {
             */
            modulepar float PX_TRespRetention := 1.0;


        } // group SIP_Timers

        // TODO STF471 addition
@@ -508,11 +513,13 @@ module LibSip_PIXITS {
            /**
             * @desc charstring for content type value of mime xml message body part
             */
            modulepar charstring PX_SIP_ISUP_ContentType := "application/vnd.etsi.cug+xml"; // application/vnd.etsi.simservs+xml
            modulepar charstring PX_SIP_ISUP_ContentType := "application/vnd.etsi.cug+xml";


        // application/vnd.etsi.simservs+xml
        } // group MimePart


    } //     group SIP_PIXITparameters

    } // group SIP_PIXITparameters
} // end module LibSip_PIXITS
+277 −281
Original line number Diff line number Diff line
@@ -8,19 +8,11 @@
 *             End users are encouraged to contact the distributers of this
 *             module regarding their modifications or additions
 *             This module is part of LibSipV3.
 *  @remark   Adding of new attributes types is ok;
 *            Adding of new optional attributes in @see SDP_attribute type
 *            is ok;
 *            Existing attribute types shall not be changed or removed -
 *            change requests shall be made to http://t-ort.etsi.org
 * @remark Adding of new attributes types is ok; Adding of new optional attributes in @see SDP_attribute type is ok; Existing attribute types shall not be changed or removed - change requests shall be made to http://t-ort.etsi.org
 */

module LibSip_SDPTypes
{
  group Constants
  {
    group SimpleConstants
    {
module LibSip_SDPTypes {
    group Constants {
        group SimpleConstants {
            // SDP net_type
            const charstring c_in := "IN";

@@ -56,12 +48,9 @@ module LibSip_SDPTypes
            const charstring c_e2e := "e2e";
        }
    }
  group Types
  {
    group SubTypes
    {
        group AttributeTypes
        {
    group Types {
        group SubTypes {
            group AttributeTypes {
                type record SDP_attribute_cat {
                    charstring attr_value
                }
@@ -182,10 +171,10 @@ module LibSip_SDPTypes
                    SDP_attribute_rtpmap rtpmap,
                    SDP_attribute_rtcp rtcp,
                    SDP_attribute_msrp msrp,

                    //*     unknown has to be the last else encoding/decoding won't work!
                    SDP_attribute_unknown unknown
                }

            } //*     group AttributeTypes

            type set of SDP_attribute SDP_attribute_list;
@@ -258,8 +247,10 @@ module LibSip_SDPTypes
            }

            type record SDP_time_field {
        charstring   start_time, //*  field is numeric strings that may not fit into 32-bit signed int
        charstring   stop_time //*  field is numeric strings that may not fit into 32-bit signed int
                charstring start_time,
                //*     field is numeric strings that may not fit into 32-bit signed int
                charstring
                stop_time //*     field is numeric strings that may not fit into 32-bit signed int
            }

            type record SDP_repeat {
@@ -288,19 +279,21 @@ module LibSip_SDPTypes

            type record SDP_Origin {
                charstring user_name,
        charstring          session_id,//*  field is numeric strings that may not fit into 32-bit signed int
        charstring          session_version, //*  field is numeric strings that may not fit into 32-bit signed int
                charstring session_id,
                //*     field is numeric strings that may not fit into 32-bit signed int
                charstring session_version,
                //*     field is numeric strings that may not fit into 32-bit signed int
                charstring net_type,
                charstring addr_type,
                charstring addr
            }

            type set of SDP_contact_tel SDP_phone_list;

        } //*     group SubTypes


    group MessageTypes
    {
        group MessageTypes {
            type record SDP_Message {
                integer protocol_version,
                SDP_Origin origin,
@@ -316,9 +309,12 @@ module LibSip_SDPTypes
                SDP_key key optional,
                SDP_attribute_list attributes optional,
                SDP_media_desc_list media_list optional
      } with { encode "SDPCodec" }
    } //  group MessageTypes
  } //  group Types
            }
            with {
                encode "SDPCodec";
            }

        } // group MessageTypes

    } // group Types
} // end module LibSip_SDPTypes
+1968 −1921

File changed.

Preview size limit exceeded, changes collapsed.

Loading