LibSip_SDPTypes.ttcn 14 KB
Newer Older
tepelmann's avatar
tepelmann committed
 * @author STF 346, STF366, STF368, STF369, STF450, STF471
 * @version $Id$
 * @desc This module defines message, attribute, structured and simple
 *             SDP types as well constants used by LipSip constructs. <br>
 *             Note that any changes made to the definitions in this module
 *             may be overwritten by future releases of this library
 *             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
tepelmann's avatar
tepelmann committed
module LibSip_SDPTypes {
    import from LibSip_Common all;
tepelmann's avatar
tepelmann committed
    group Constants {
        group SimpleConstants {
            // SDP net_type
            const charstring c_in := "IN";

            // SDP addr_type
            const charstring c_ip4 := "IP4";
            const charstring c_ip6 := "IP6";

            // SDP_media_desc: media
            const charstring c_audio := "audio";
            const charstring c_image := "image";
            const charstring c_video := "video";
            const charstring c_text := "text";
            const charstring c_msrp := "msrp";

            // SDP_media_desc: transport
            const charstring c_rtpAvp := "RTP/AVP";
            const charstring c_rtpAvpf := "RTP/AVPF";
            const charstring c_msrpTcp := "TCP/MSRP";
            const charstring c_udptl := "Udptl";

            // SDP_attribute_list constants:
            const charstring c_local := "local";
            const charstring c_mandatory := "mandatory";
            const charstring c_optional := "optional";
            const charstring c_none := "none";
            const charstring c_qos := "qos";
            const charstring c_remote := "remote";
            const charstring c_sendrecv := "sendrecv";
            const charstring c_sendonly := "sendonly";
            const charstring c_inactive := "inactive";
            const charstring c_send := "send";
            const charstring c_recv := "recv";
            const charstring c_e2e := "e2e";
        }
tepelmann's avatar
tepelmann committed
    group Types {
        group SubTypes {
            group AttributeTypes {
                type record SDP_attribute_cat {
                    charstring attr_value
                }

                type record SDP_attribute_keywds {
                    charstring attr_value
                }

                type record SDP_attribute_tool {
                    charstring attr_value
                }

                type record SDP_attribute_ptime {
                    charstring attr_value
                }

                type record SDP_attribute_recvonly {
                }

                type record SDP_attribute_sendrecv {
                }

                type record SDP_attribute_sendonly {
                }

                type record SDP_attribute_inactive {
                }

                type record SDP_attribute_orient {
                    charstring attr_value
                }

                type record SDP_attribute_type {
                    charstring attr_value
                }

                type record SDP_attribute_charset {
                    charstring attr_value
                }

                type record SDP_attribute_sdplang {
                    charstring attr_value
                }

                type record SDP_attribute_lang {
                    charstring attr_value
                }

                type record SDP_attribute_framerate {
                    charstring attr_value
                }

                type record SDP_attribute_quality {
                    charstring attr_value
                }

                type union SDP_attribute_fmtp_format_specific_params {
                    SemicolonParam_List paramList,
                    charstring unstructured
                }

tepelmann's avatar
tepelmann committed
                type record SDP_attribute_fmtp {
                    charstring format,
                    SDP_attribute_fmtp_format_specific_params params
tepelmann's avatar
tepelmann committed
                }

                type record SDP_attribute_curr {
                    charstring preconditionType,
                    charstring statusType,
                    charstring direction
                }

                type record SDP_attribute_des {
                    charstring preconditionType,
                    charstring strength,
                    charstring statusType,
                    charstring direction
                }

                type record SDP_attribute_conf {
                    charstring preconditionType,
                    charstring statusType,
                    charstring direction
                }

                type record SDP_attribute_rtpmap_codec {
                    charstring encoding,
                    charstring clockrate,
                    charstring parameters optional
                }

tepelmann's avatar
tepelmann committed
                type record SDP_attribute_rtpmap {
                    charstring payload_type,
                    SDP_attribute_rtpmap_codec codec
tepelmann's avatar
tepelmann committed
                }

                type record SDP_attribute_rtcp {
                    integer portnumber,
                    SDP_connection connection optional
tepelmann's avatar
tepelmann committed
                }

                type record SDP_attribute_msrp {
                    charstring attr_value
                }

                type record SDP_attribute_unknown {
                    charstring name,
                    charstring attr_value optional
                }

                type record SDP_attribute_maxptime { 
                    charstring attr_value
                }

                type record SDP_attribute_tcap {   
                    integer trpr_cap_num,
                    Charstring_List proto_list
                }

                type record SDP_attribute_pcfg {  
                    integer config_number,
                    Charstring_List pot_cfg_list optional
                }

                type record SDP_attribute_acfg {    
                    integer config_number,
                    Charstring_List sel_cfg_list optional
                }

                type record SDP_attribute_ecn_capable_rtp {  
                    Charstring_List init_list,
                    Charstring_List parm_list optional
                }

                type record SDP_attribute_rtcp_fb {  
                    charstring rtcp_fb_pt,
                    charstring rtcp_fb_val
                }

                type record SDP_attribute_rtcp_xr {  
                    Charstring_List xr_format_list optional
                }

                type record SDP_attribute_rtcp_rsize {      
                }

                type record SDP_attribute_3ge2ae {    
                    charstring indicator
                }

                type record SDP_attribute_crypto {     
                    charstring tag,
                    charstring crypto_suite,
                    charstring key_params,
                    Charstring_List session_params optional
                }
tepelmann's avatar
tepelmann committed

                type record SDP_attribute_content {
                    Charstring_List content_params
                }

                type record SDP_attribute_keymgmt {
                    charstring prtcl_id,
                    charstring data
                }

tepelmann's avatar
tepelmann committed
                type union SDP_attribute {
                    SDP_attribute_cat cat,
                    SDP_attribute_keywds keywds,
                    SDP_attribute_tool tool,
                    SDP_attribute_ptime ptime,
                    SDP_attribute_recvonly recvonly,
                    SDP_attribute_sendrecv sendrecv,
                    SDP_attribute_sendonly sendonly,
                    SDP_attribute_inactive inactive,
                    SDP_attribute_orient orient,
                    SDP_attribute_type sdp_type,
                    SDP_attribute_charset charset,
                    SDP_attribute_sdplang sdplang,
                    SDP_attribute_lang lang,
                    SDP_attribute_framerate framerate,
                    SDP_attribute_quality quality,
                    SDP_attribute_fmtp fmtp,
                    SDP_attribute_curr curr,
                    SDP_attribute_des des,
                    SDP_attribute_conf conf,
                    SDP_attribute_rtpmap rtpmap,
                    SDP_attribute_rtcp rtcp,
                    SDP_attribute_msrp msrp,
                    SDP_attribute_maxptime maxptime,
                    SDP_attribute_tcap tcap,
                    SDP_attribute_pcfg pcfg,
                    SDP_attribute_acfg acfg,
                    SDP_attribute_ecn_capable_rtp ecn_capable_rtp,
                    SDP_attribute_rtcp_fb rtcp_fb,
                    SDP_attribute_rtcp_xr rtcp_xr,
                    SDP_attribute_rtcp_rsize rtcp_rsize,
                    SDP_attribute_3ge2ae e2ae,
                    SDP_attribute_crypto crypto,
                    SDP_attribute_content content,
                    SDP_attribute_keymgmt keymgmt,
tepelmann's avatar
tepelmann committed
                    //*     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;

            type record SDP_bandwidth {
                charstring modifier,
                integer bandwidth
tepelmann's avatar
tepelmann committed
            type set of SDP_bandwidth SDP_bandwidth_list;
tepelmann's avatar
tepelmann committed
            type record SDP_connection {
                charstring net_type,
                charstring addr_type,
                SDP_conn_addr conn_addr
tepelmann's avatar
tepelmann committed
            type record SDP_conn_addr {
                charstring addr,
                integer ttl optional,
                integer num_of_addr optional
tepelmann's avatar
tepelmann committed
            type set of SDP_connection SDP_connection_list;
tepelmann's avatar
tepelmann committed
            type record SDP_contact {
                charstring addr_or_phone,
                charstring disp_name optional
tepelmann's avatar
tepelmann committed
            type SDP_contact SDP_contact_tel;
tepelmann's avatar
tepelmann committed
            type SDP_contact SDP_contact_email;
tepelmann's avatar
tepelmann committed
            type set of SDP_contact_email SDP_email_list;
tepelmann's avatar
tepelmann committed
            type record of charstring SDP_fmt_list;
tepelmann's avatar
tepelmann committed
            type record SDP_key {
                charstring method,
                charstring key optional
tepelmann's avatar
tepelmann committed
            type record SDP_media_desc {
                SDP_media_field media_field,
                charstring information optional,
                SDP_connection_list connections optional,
                SDP_bandwidth_list bandwidth optional,
                SDP_key key optional,
                SDP_attribute_list attributes optional
tepelmann's avatar
tepelmann committed
            type set of SDP_media_desc SDP_media_desc_list;
tepelmann's avatar
tepelmann committed
            type record SDP_media_port {
                integer port_number,
                integer num_of_ports optional
tepelmann's avatar
tepelmann committed
            type record SDP_media_field {
                charstring media,
                SDP_media_port ports,
                charstring transport,
                SDP_fmt_list fmts
tepelmann's avatar
tepelmann committed
            type record SDP_time {
                SDP_time_field time_field,
                SDP_repeat_list time_repeat optional
tepelmann's avatar
tepelmann committed
            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
tepelmann's avatar
tepelmann committed
            type record SDP_repeat {
                SDP_typed_time repeat_interval,
                SDP_typed_time active,
                SDP_typed_time_list offsets
tepelmann's avatar
tepelmann committed
            type set of SDP_repeat SDP_repeat_list;
tepelmann's avatar
tepelmann committed
            type record SDP_typed_time {
                integer time,
                charstring unit optional
tepelmann's avatar
tepelmann committed
            type set of SDP_typed_time SDP_typed_time_list;
tepelmann's avatar
tepelmann committed
            type set of SDP_time SDP_time_list;
tepelmann's avatar
tepelmann committed
            type record SDP_timezone {
                charstring adjustment_time,
                SDP_typed_time offset
tepelmann's avatar
tepelmann committed
            type set of SDP_timezone SDP_timezone_list;

            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 net_type,
                charstring addr_type,
                charstring addr
            }
tepelmann's avatar
tepelmann committed
            type set of SDP_contact_tel SDP_phone_list;

        } //*     group SubTypes


        group MessageTypes {
            type record SDP_Message {
                integer protocol_version,
                SDP_Origin origin,
                charstring session_name,
                charstring information optional,
                charstring uri optional,
                SDP_email_list emails optional,
                SDP_phone_list phone_numbers optional,
                SDP_connection connection optional,
                SDP_bandwidth_list bandwidth optional,
                SDP_time_list times,
                SDP_timezone_list timezone_adjustments optional,
                SDP_key key optional,
                SDP_attribute_list attributes optional,
                SDP_media_desc_list media_list optional
            }
            with {
                encode "SDPCodec";
            }
tepelmann's avatar
tepelmann committed
        } // group MessageTypes
tepelmann's avatar
tepelmann committed
    } // group Types
} // end module LibSip_SDPTypes