///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
// which accompanies this distribution, and is available at
// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
///////////////////////////////////////////////////////////////////////////////
//
//  File:     ISUP_Types.ttcn
//  Rev:      R8A
//  Prodnr:   CNL 113 365
//  Updated:  2011-05-10
//  Contact:  http://ttcn.ericsson.se
///////////////////////////////////////////////////////////////////////////////
//
// This product is based on the following documents:
//************************************************************************
// Ericsson  Reference for ITU-T : 2/155 17-FAY 112 020/4 Uen, ITU-T ISDN User
//                                 Part, Section A:Formats and Codes
// Standard ITU-T Reference ISUP : Q.763, Signaling System No. 7 - ISDN User
//                                 Part formats and codes
//************************************************************************
// EED/X 1056-174 Uen - Global Call reference for ISUP and BICC, MSC R12

///////////////////////////////////////////////////////////////////////////////
//     ! ! ! ! ! ! !        W A R N I N G         ! ! ! ! ! ! !              //
// From R2A02 the parameters are in 'set' and not in 'set of'. It has the    //
// consequence, that the parameters will be sent out in fix order (as defined//
// in set) so the tester cannot modify the order of the parameters with      //
// modification the order in the template. If the order is important, then   //
// the previous version of this protocol module should be used.              //
///////////////////////////////////////////////////////////////////////////////

//----------------------------------------------------------
//----------------------------------------------------------
//The following modification were done from R1A03 to R2A02:
//----------------------------------------------------------
//----------------------------------------------------------
// New parameter:
//Calling_name_identity
//Global_call_reference
//-------------------------------------------------
// Modified parameter:
//Calling_geodetic_location: Polygon updated
//CCSS_parameter : replaces CCBS_parameter
//Charged_party_identification : converted into record
//Forward_GVNS: TNRN_Spare->BIT1, lengths->INT4b, RAW coding attributes
//Loop_prevention_indicators : field splitted
//Message_compatibility_information: field name updated
//Network_routing_number: incorrect fields
//Network_specific_facility : was not possible to decode
//Optional_backward_call_indicators: field name updated
//Pivot_counter: PivCount->BIT5
//Pivot_routing_backward_information : converted into record
//Pivot_routing_forward_information : converted into record
//Redirect_backward_information : converted into record
//Redirect_forward_information : converted into record
//Redirecting_number : field name updated
//Redirection_information : optional keywords added
//Tariff_indicator : optional keywords added
//User_service_information: redesigned
//User_service_information_prime: redesigned
//User_teleservice_information : optional keywords added
//-------------------------------------------------
// Hexorder modified in parameter:
//Call_transfer_number
//Called_IN_number
//Called_directory_number
//Called_party_number
//Calling_party_number
//Connected_number
//Forward_GVNS
//Generic_number
//HTR_information
//Location_number
//Network_routing_number
//Original_called_number
//Original_called_IN_number
//Redirecting_number
//Redirection_number
//Subsequent_number
//-------------------------------------------------
// Parameter, which should be modified, but due to backward compatibility
// it is not modified:
//Parameter_compatibility_information
//-------------------------------------------------
//"set of" was changed to "set" with the following consequence in parameter:
//-Every optional parameter is extended the id and length.
//-The multiple parameters are put into a set with name <parameter_name>_set
//-The optional parameters of the messages are put into set where every field
// is optional.
//-For mandatory fix long parameters new type is created via removing id and
// length
//-For mandatory variable long parameters new type is created via removing id
//-For parameters which can be also mandatory and optional, the end of name of
// the optional version is extended with an _OPT

module  ISUP_Types
{
 import from General_Types all;

 external function enc_PDU_ISUP(in PDU_ISUP pdu) return octetstring;
 external function dec_PDU_ISUP(in octetstring stream) return PDU_ISUP;
 external function dec_PDU_ISUP_noCIC(in octetstring stream) return PDU_ISUP;
 external function enc_PDU_ISUP_fast(in PDU_ISUP pdu, out octetstring stream)
 with { extension "prototype(fast) encode(RAW)" };
 external function dec_PDU_ISUP_backtrack(in octetstring stream, out PDU_ISUP pdu) return integer
 with { extension "prototype(backtrack) decode(RAW)" };
 external function dec_PDU_ISUP_backtrack_noCIC(in octetstring stream, out PDU_ISUP pdu) return integer;

//************************************************************************
//  ISUP parameters
//************************************************************************
group ISUP_parameters
{

//************************************************************************
// Circuit Identification Code
// Ericsson Specification Reference: Chapter 2.1.3
// Standard Reference ISUP         : Chapter 1.2
//************************************************************************
  type record Circuit_identification_code
    {
     BIT12 CIC, // Circuit identification code
     BIT4 Spare // Spare
    } with { variant "" };


//************************************************************************
// Message Type
// Ericsson Specification Reference: Chapter 2.1.3
// Standard Reference ISUP         : Chapter 1.3
//************************************************************************
  type bitstring ISUP_Message_type length(8)
    with { variant "FIELDLENGTH(8)" };


//************************************************************************
// Pointer
// Ericsson Specification Reference: Chapter 2.1.7
// Standard Reference ISUP         : Chapter 1.9
//************************************************************************
  type integer Pointer (0..255)
    with { variant "FIELDLENGTH(8)" };
	

//************************************************************************
// End Of Optional Parameters Indicator
// Ericsson Specification Reference: Chapter 2.3.3.30
// Standard Reference ISUP         : Chapter 3.20
//************************************************************************
  type octetstring End_of_optional_parameters_indicator length(1)
    with { variant "FIELDLENGTH(1)" };


//************************************************************************
// Access Delivery Information
// Ericsson Specification Reference: Chapter 2.3.3.1
// Standard Reference ISUP         : Chapter 3.2
//************************************************************************
  type record Access_delivery_information       // 3.2 / Q.763
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 AccessDel, // Access delivery indicator
     BIT7 Spare      // Spare
    } with { variant "PRESENCE( id = '00101110'B)";
             variant (lengthField)"LENGTHTO(AccessDel,Spare)";
           };


//************************************************************************
// Access Transport
// Ericsson Specification Reference: Chapter 2.3.3.2
// Standard Reference ISUP         : Chapter 3.3
//************************************************************************
  type record Access_transport
    {
     BIT8 id,
     INT1 lengthField,

     OCTN ATP_field
    } with { variant "PRESENCE( id = '00000011'B)";
             variant (lengthField)"LENGTHTO(ATP_field)";
           };


//************************************************************************
// Additional Charging Information
// Ericsson Specification Reference: Chapter 2.3.3.3
//************************************************************************
  type record Additional_charging_information
    {
     BIT8 id,
     INT1 lengthField,

     BIT8 AddChargeInfo // Additional charging information
    } with { variant "PRESENCE( id = '11111010'B)";
             variant (lengthField)"LENGTHTO(AddChargeInfo)";
           };


//************************************************************************
// Additional Routing Information
// Ericsson Specification Reference: Chapter 2.3.3.4
//************************************************************************
  type record Additional_routing_information
    {
     BIT8 id,
     INT1 lengthField,

     OCT2 AddRoutInfo // Additional routing information
    } with { variant "PRESENCE( id = '11111011'B)";
             variant (lengthField)"LENGTHTO(AddRoutInfo)";
           };


//************************************************************************
// Application Transport Parameter
// Standard Reference ISUP         : Chapter 3.82
//************************************************************************
  type record Application_transport_parameter
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 applicationContextIdOct1, // Application context identifier
     BIT1 extInd1,                  // Extension indicator
     BIT7 applicationContextIdOct1a optional, // Application context identifier
     BIT1 extInd1a optional,                  // Extension indicator
     BIT1 releaseCallInd,      // Release call indicator
     BIT1 sendNotificationInd, // Send notification indicator
     BIT5 spare,               // Spare
     BIT1 extInd2,             // Extension indicator
     BIT6 aPMSegmentationInd,    // APM segmentation indicator
     BIT1 sequenceInd,           // Sequence indicator
     BIT1 extInd3,               // Extension indicator
     BIT7 segmentationLocalRef optional, // Segmentation local reference
     BIT1 extInd3a optional,             // Extension indicator
     OCTN aPMUserInfo // Encapsulated application information
    } with { variant "EXTENSION_BIT_GROUP (yes, applicationContextIdOct1,
                                                extInd1a)";
             variant "EXTENSION_BIT_GROUP (yes, aPMSegmentationInd,
                                                extInd3a)";
             variant "PRESENCE( id = '01111000'B)";
             variant (lengthField)"LENGTHTO(applicationContextIdOct1,extInd1,
                                            applicationContextIdOct1a,extInd1a,
                                            releaseCallInd,sendNotificationInd,
                                            spare,extInd2,aPMSegmentationInd,
                                            sequenceInd,extInd3,
                                            segmentationLocalRef,extInd3a,
                                            aPMUserInfo)";
           };

  type set of Application_transport_parameter
                         Application_transport_parameter_set
      with { variant "" };


//************************************************************************
// Automatic Congestion Level
// Ericsson Specification Reference: Chapter 2.3.3.5
// Standard Reference ISUP         : Chapter 3.4
//************************************************************************
  type record Automatic_congestion_level
    {
     BIT8 id,
     INT1 lengthField,

     BIT8 CongLevel
    } with { variant "PRESENCE( id = '00100111'B)";
             variant (lengthField)"LENGTHTO(CongLevel)";
           };


//************************************************************************
// Backward Call Indicators
// Ericsson Specification Reference: Chapter 2.3.3.6
// Standard Reference ISUP         : Chapter 3.5
//************************************************************************
  type record Backward_call_indicators_OPT
    {
     BIT8 id,
     INT1 lengthField,

     BIT2 ChargeInd,            // Charge indicator
     BIT2 CalledPartyStatusInd, // Called party's status indicator
     BIT2 CalledPartyCatInd,    // Called party's category indicator
     BIT2 EndToEndInd,          // End-to-end method indicator
     BIT1 InterworkingInd,   // Interworking indicator
     BIT1 EndToEndInfoInd,   // End-to-end INFormation indicator
     BIT1 ISUPInd,           // ISDN User Part indicator
     BIT1 HoldingInd,        // Holding indicator
     BIT1 ISDNAccessInd,     // ISDN access indicator
     BIT1 EchoControlDevInd, // Echo CONtrol device indicator
     BIT2 SCCPMethodInd      // SCCP method indicator
    } with { variant "PRESENCE( id = '00010001'B)";
             variant (lengthField)"LENGTHTO(ChargeInd,CalledPartyStatusInd,
                                            CalledPartyCatInd,EndToEndInd,
                                            InterworkingInd,EndToEndInfoInd,
                                            ISUPInd,HoldingInd,ISDNAccessInd,
                                            EchoControlDevInd,SCCPMethodInd)";
           };

  type record Backward_call_indicators    
    {
     BIT2 ChargeInd,            // Charge indicator
     BIT2 CalledPartyStatusInd, // Called party's status indicator
     BIT2 CalledPartyCatInd,    // Called party's category indicator
     BIT2 EndToEndInd,          // End-to-end method indicator
     BIT1 InterworkingInd,   // Interworking indicator
     BIT1 EndToEndInfoInd,   // End-to-end INFormation indicator
     BIT1 ISUPInd,           // ISDN User Part indicator
     BIT1 HoldingInd,        // Holding indicator
     BIT1 ISDNAccessInd,     // ISDN access indicator
     BIT1 EchoControlDevInd, // Echo CONtrol device indicator
     BIT2 SCCPMethodInd      // SCCP method indicator
    } with { variant ""};

//************************************************************************
// Backward GVNS
// Ericsson Specification Reference: Chapter 2.3.3.7
// Standard Reference ISUP         : Chapter 3.62
//************************************************************************
  type record Backward_GVNS
    {
     BIT8 id,
     INT1 lengthField,

     BIT2 TerminatingAccessInd, // Terminating access indicator
     BIT5 Spare,                // Spare
     BIT1 ExtensionInd          // Extension indicator
    } with { variant "PRESENCE( id = '01001101'B)";
             variant (lengthField)"LENGTHTO(TerminatingAccessInd,Spare,
                                            ExtensionInd)";
           };


//************************************************************************
// Call Diversion Information
// Ericsson Specification Reference: Chapter 2.3.3.8
// Standard Reference ISUP         : Chapter 3.6
//************************************************************************
  type record Call_diversion_information
    {
     BIT8 id,
     INT1 lengthField,

     BIT3 NotificationSubscriptionOptions, // Notification subscription options
     BIT4 RedirectionReason,               // Redirecting reason
     BIT1 Spare                            // Spare
    } with { variant "PRESENCE( id = '00110110'B)";
             variant (lengthField)"LENGTHTO(NotificationSubscriptionOptions,
                                            RedirectionReason,Spare)";
           };


//************************************************************************
// Call Diversion Treatment Information
// Ericsson Specification Reference: Chapter 2.3.3.9
// Standard Reference ISUP         : Chapter 3.72
//************************************************************************
  type record Call_diversion_treatment_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT2 CallDivertedInd, // Call to be diverted indicator
     BIT5 Spare,           // Spare
     BIT1 ExtensionInd     // Extension indicator
    } with { variant "PRESENCE( id = '01101110'B)";
             variant(lengthField)"LENGTHTO(CallDivertedInd,Spare,ExtensionInd)";
           };


//************************************************************************
// Call History Information
// Ericsson Specification Reference: Chapter 2.3.3.10
// Standard Reference ISUP         : Chapter 3.7
//************************************************************************
  type record Call_history_information
    {
     BIT8 id,
     INT1 lengthField,

     OCT2 PropagatDelayValue
    } with { variant "PRESENCE( id = '00101101'B)";
             variant (lengthField)"LENGTHTO(PropagatDelayValue)";
           };


//************************************************************************
// Call Offering Treatment Indicators
// Ericsson Specification Reference: Chapter 2.3.3.11
// Standard Reference ISUP         : Chapter 3.74
//************************************************************************
  type record Call_offering_treatment_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT2 CallOfferedInd, // Call to be offered indicator
     BIT5 Spare,          // Spare
     BIT1 ExtensionInd    // Extension indicator
    } with { variant "PRESENCE( id = '01110000'B)";
             variant (lengthField)"LENGTHTO(CallOfferedInd,Spare,ExtensionInd)";
           };


//************************************************************************
// Call Reference
// Standard Reference ISUP         : Chapter 3.8
//************************************************************************
  type record Call_reference
    {
     BIT8 id,
     INT1 lengthField,

     OCT5 CRef_contents // Call identity
    } with { variant "PRESENCE( id = '00000001'B)";
             variant (lengthField)"LENGTHTO(CRef_contents)";
           };


//************************************************************************
// Call Transfer Number
// Ericsson Specification Reference: Chapter 2.3.3.12
// Standard Reference ISUP         : Chapter 3.64
//************************************************************************
  type record Call_transfer_number
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 NatureOfAddrInd, // Nature of address indicator
     BIT1 OddEven,         // Odd/even indicator
     BIT2 ScreeningInd,       // Screening indicator
     BIT2 AddrPresentRestInd, // Address presentation REStricted indicator
     BIT3 NumberingPlanInd,   // Numbering plan indicator
     BIT1 Spare,              // Spare
     HEX1_32 AddrSignals optional,  // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant "PRESENCE( id = '01000101'B)";
             variant (lengthField)"LENGTHTO(NatureOfAddrInd,OddEven,
                                            ScreeningInd,AddrPresentRestInd,
                                            NumberingPlanInd,Spare,
                                            AddrSignals,Filler)";
           };


//************************************************************************
// Call Transfer Reference
// Ericsson Specification Reference: Chapter 2.3.3.13
// Standard Reference ISUP         : Chapter 3.65
//************************************************************************
  type record Call_transfer_reference
    {
     BIT8 id,
     INT1 lengthField,

     BIT8 CallTransferId // Call transfer identity
    } with { variant "PRESENCE( id = '01000011'B)";
             variant (lengthField)"LENGTHTO(CallTransferId)";
           };


//************************************************************************
// Call Transfer Treatment Indicators
// Ericsson Specification Reference: Chapter 2.3.3.14
//************************************************************************
  type record Call_transfer_treatment_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT2 CallTransferredInd, // Call to be transferred indicator
     BIT5 Spare,              // Spare
     BIT1 ExtensionInd        // Extension indicator
    } with { variant "PRESENCE( id = '11110011'B)";
             variant (lengthField)"LENGTHTO(CallTransferredInd,Spare,
                                            ExtensionInd)";
           };


//************************************************************************
// Called IN Number
// Standard Reference ISUP         : Chapter 3.73
//************************************************************************
  type record Called_IN_number
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 NatureOfAddrInd, // Nature of address indicator
     BIT1 OddEven,         // Odd/even indicator
     BIT2 spare_1,
     BIT2 AddrPresentRestInd, // Address presentation REStricted indicator
     BIT3 NumberingPlanInd,   // Numbering plan indicator
     BIT1 spare_2,            // Numbering plan indicator
     HEX1_32 AddrSignals optional, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant "PRESENCE( id = '01101111'B)";
             variant (lengthField)"LENGTHTO(NatureOfAddrInd,OddEven,
                                            spare_1,AddrPresentRestInd,
                                            NumberingPlanInd,spare_2,
                                            AddrSignals,Filler)";
           };

//************************************************************************
// Called Directory Number
// Standard Reference ISUP         : Chapter 3.86
//************************************************************************
  type record Called_directory_number
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 NatureOfAddrInd, // Nature of address indicator
     BIT1 OddEven,         // Odd/even indicator
     BIT4 spare,             // spare
     BIT3 NumberingPlanInd,  // Numbering plan indicator
     BIT1 INNInd,            // Internal network number indicator
     HEX1_32 AddrSignals, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant "PRESENCE( id = '01111101'B)";
             variant (lengthField)"LENGTHTO(NatureOfAddrInd,OddEven,
                                            spare,NumberingPlanInd,
                                            INNInd,AddrSignals,Filler)";
           };



//************************************************************************
// Called Party Number
// Ericsson Specification Reference: Chapter 2.3.3.15
// Standard Reference ISUP         : Chapter 3.9
//************************************************************************
  type record Called_party_number    
    {
     INT1 lengthField,

     BIT7 NatureOfAddrInd, // Nature of address indicator
     BIT1 OddEven,         // Odd/even indicator
     BIT4 Spare,             // spare
     BIT3 NumberingPlanInd,  // Numbering plan indicator
     BIT1 INNInd,            // Internal network number indicator
     HEX1_32 AddrSignals, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant (lengthField)"LENGTHTO(NatureOfAddrInd,OddEven,
                                            Spare,NumberingPlanInd,
                                            INNInd,AddrSignals,Filler)";
           };


//************************************************************************
// Calling Geodetic Location
// Standard Reference ISUP         : Chapter 3.88
//************************************************************************
  type record Ellipsoid_point
    {
     OCT3 DgrLat, // Degrees of latitude with sign
     OCT3 DgrLong // Degrees of longitude
    } with { variant "" };

  type record Ellipsoid_point_with_uncertainty
    {
     OCT3 DgrLat,  // Degrees of latitude with sign
     OCT3 DgrLong, // Degrees of longitude
     BIT7 UncCode, // Uncertainty code
     BIT1 spare_1, // Spare
     BIT7 Conf,    // Confidence
     BIT1 spare_2  // Spare
    } with { variant "" };

  type record Point_with_altitude_and_uncertainty
    {
     OCT3 DgrLat,    // Degrees of latitude with sign
     OCT3 DgrLong,   // Degrees of longitude
     BIT7 UncCode_1, // Uncertainty code
     BIT1 spare_1,   // Spare
     OCT2 Alt,       // Altitude with sign
     BIT7 UncCode_2, // Uncertainty code
     BIT1 spare_2,   // Spare
     BIT7 Conf,      // Confidence
     BIT1 spare_3    // Spare
    } with { variant "" };

  type record Ellipse_on_the_ellipsoid
    {
     OCT3 DgrLat,  // Degrees of latitude with sign
     OCT3 DgrLong, // Degrees of longitude
     BIT7 MajRad,  // Major radius
     BIT1 spare_1, // Spare
     BIT7 MinRad,  // Minor radius
     BIT1 spare_2, // Spare
     OCT1 orient,  // Orientation
     BIT7 Conf,    // Confidence
     BIT1 spare_3  // Spare
    } with { variant "" };

  type record Ellipsoid_circle_sector
    {
     OCT3 DgrLat,  // Degrees of latitude with sign
     OCT3 DgrLong, // Degrees of longitude
     BIT7 Rad,     // Radius
     BIT1 spare_1, // Spare
     OCT1 Offset,  // Offset
     OCT1 IncAng,  // Included angle
     BIT7 Conf,    // Confidence
     BIT1 spare_2  // Spare
    } with { variant "" };

  type record Polygon
    {
     integer NumPoints, // Number of points
     BIT4 spare_1,      // Spare
     DgrLat_longs DgrLat_Longs, // Degrees of latitude / logitude
     BIT7 Conf,         // Confidence
     BIT1 spare_2       // Spare
    } with { variant (NumPoints)"LENGTHTO(DgrLat_Longs)";
             variant (NumPoints)"UNIT(elements)";
	     variant (NumPoints) "FIELDLENGTH(4)";
	   };

  type record of DgrLat_long DgrLat_longs// Degrees of latitude / logitude

  type record DgrLat_long
    {
     OCT3 DgrLat, // Degrees of latitude with sign
     OCT3 DgrLong // Degrees of longitude
    } with { variant "" };

  type union Shape_description_union
    {
     Ellipsoid_point                     EP,
     Ellipsoid_point_with_uncertainty    EPU,
     Point_with_altitude_and_uncertainty PAU,
     Ellipse_on_the_ellipsoid            EonE,
     Ellipsoid_circle_sector             ECS,
     Polygon                             Pol
    } with { variant "" };

  type record Calling_geodetic_location
    {
     BIT8 id,
     INT1 lengthField,

     BIT2 Scr,    // Screening
     BIT2 LPRI,   // Location presentation REStricted indicator
     BIT4 Spare,  // Spare
     BIT7 typeSh, // Type of shape
     BIT1 ExtI,   // Extension indicator
     Shape_description_union ShapeDes
    } with { variant (ShapeDes) "CROSSTAG(
                        EP,   typeSh = '0000000'B;
                        EPU,  typeSh = '0000001'B;
                        PAU,  typeSh = '0000010'B;
                        EonE, typeSh = '0000011'B;
                        ECS,  typeSh = '0000100'B;
                        Pol,  typeSh = '0000101'B
                        )";
             variant "PRESENCE( id = '10000001'B)";
             variant (lengthField)"LENGTHTO(Scr,LPRI,Spare,typeSh,ExtI,
                                            ShapeDes)";
           };

//************************************************************************
// Calling name identity
// Ericsson Specification Reference: Chapter 2.3.3.16
//************************************************************************
  type record Calling_name_identity
    {
     BIT8 id,
     INT1 lengthField,

     BIT2 namePresentationRestrictedInd, // Name presentation restricted ind.
     BIT2 screeningIndicator, // Screening indicator
     BIT1 availabilityInd, // Availability indicator
     BIT3 typeOfName, // Type of name
     BIT8 encodingInd, // Encoding identification
     OCT1_50 characterSubfield // Character
    } with { variant "PRESENCE( id = '11110010'B)";
             variant (lengthField)"LENGTHTO(namePresentationRestrictedInd,
                                            screeningIndicator,availabilityInd,
                                            typeOfName,encodingInd,
                                            characterSubfield)";
           };


//************************************************************************
// Calling Party Number
// Ericsson Specification Reference: Chapter 2.3.3.17
// Standard Reference ISUP         : Chapter 3.10
//************************************************************************
  type record Calling_party_number
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 NatureOfAddrInd,  // Nature of address indicator
     BIT1 OddEven,          // Odd/even indicator
     BIT2 ScreeningInd,       // Screening indicator
     BIT2 AddrPresentRestInd, // Address presentation REStricted indicator
     BIT3 NumberingPlanInd,   // Numbering plan indicator
     BIT1 NIInd,              // Calling party number incomplete indicator
     HEX1_32 AddrSignals optional, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant "PRESENCE( id = '00001010'B)";
             variant (lengthField)"LENGTHTO(NatureOfAddrInd,OddEven,
                                            ScreeningInd,AddrPresentRestInd,
                                            NumberingPlanInd,NIInd,
                                            AddrSignals,Filler)";
           };

//************************************************************************
// Calling Party Number
// Ericsson Specification Reference: Chapter 2.3.3.18
// Standard Reference ISUP         : Chapter 3.11
//************************************************************************
  type record Calling_partys_category_OPT
    {
     BIT8 id,
     INT1 lengthField,

     BIT8 CallingPartysCategory  // Calling party's category
    } with { variant "PRESENCE( id = '00001001'B)";
             variant (lengthField)"LENGTHTO(CallingPartysCategory)";
           };

  type record Calling_partys_category    
    {
     BIT8 CallingPartysCategory  // Calling party's category
    } with { variant "" };

//************************************************************************
// Cause Indicators
// Ericsson Specification Reference: Chapter 2.3.3.19
// Standard Reference ISUP         : Chapter 3.12
//************************************************************************
  type record Cause_indicators_OPT
    {
     BIT8 id,
     INT1 lengthField,

     BIT4 Location,         // Location
     BIT1 Spare,            // Spare
     BIT2 CodingStandard,   // Coding standard
     BIT1 Ext1,             // Extension indicator
     BIT7 CauseValue,       // Vause value
     BIT1 Ext2,             // Extension indicator
     OCTN Diagnostics optional // Diagnostic(s)   (if any)
    } with { variant "PRESENCE( id = '00010010'B)";
             variant (lengthField)"LENGTHTO(Location,Spare,CodingStandard,
                                            Ext1,CauseValue,
                                            Ext2,Diagnostics)";
           };

  type record Cause_indicators    
    {
     INT1 lengthField,

     BIT4 Location,         // Location
     BIT1 Spare,            // Spare
     BIT2 CodingStandard,   // Coding standard
     BIT1 Ext1,             // Extension indicator
     BIT7 Reserved optional,   // National Recommendation
     BIT1 Ext1a optional,      // Present when Reserved field is present
     BIT7 CauseValue,       // Vause value
     BIT1 Ext2,             // Extension indicator
     OCTN Diagnostics optional // Diagnostic(s)   (if any)
    } with { variant (Reserved) "PRESENCE (Ext1='0'B)";
             variant (Ext1a) "PRESENCE (Ext1='0'B)";
             variant (lengthField)"LENGTHTO(Location,Spare,CodingStandard,
                                            Ext1,Reserved,Ext1a,CauseValue,
                                            Ext2,Diagnostics)";
           };


//************************************************************************
// CCNR Possible Indicator
// Standard Reference ISUP         : Chapter 3.83
//************************************************************************
  type record CCNR_possible_indicator
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 CCNRPInd, // CCNR possible indicator
     BIT7 spare     // Spare
    } with { variant "PRESENCE( id = '01111010'B)";
             variant (lengthField)"LENGTHTO(CCNRPInd,spare)";
           };


//************************************************************************
// CCSS
// Ericsson Specification Reference: Chapter 2.3.3.20
// Standard Reference ISUP         : Chapter 3.63
//************************************************************************
  type record CCSS_parameter
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 CCSSCallInd,  // CCSS call indicator
     BIT7 Spare
    } with { variant "PRESENCE( id = '01001011'B)";
             variant (lengthField)"LENGTHTO(CCSSCallInd,Spare)";
           };


//************************************************************************
// Charged Party Identification
// Standard Reference ISUP         : Chapter 3.75
//************************************************************************
  type record Charged_party_identification
    {
     BIT8 id,
     INT1 lengthField,

     OCTN ChargedPartyId
    } with { variant "PRESENCE( id = '01110001'B)";
             variant (lengthField)"LENGTHTO(ChargedPartyId)";
           };


//************************************************************************
// Circuit Assignment Map
// Standard Reference ISUP         : Chapter 3.69
//************************************************************************
  type record Circuit_assignment_map
    {
     BIT8 id,
     INT1 lengthField,

     BIT6 MapType,  // Map type
     BIT2 spare_1,  // Spare
     BIT31 MapFormat,  // Map format
     BIT1  spare_2     // spare
    } with { variant "PRESENCE( id = '00100101'B)";
             variant (lengthField)"LENGTHTO(MapType,spare_1,MapFormat,spare_2)";
           };


//************************************************************************
// Circuit Group Supervision Message Type Indicator
// Ericsson Specification Reference: Chapter 2.3.3.21
// Standard Reference ISUP         : Chapter 3.13
//************************************************************************
  type record Circuit_group_supervision_message_type_indicator    
    {
     BIT2 Type, // Type indicator
     BIT6 Spare // Spare
    } with { variant "" };


//************************************************************************
// Circuit State Indicator
// Ericsson Specification Reference: Chapter 2.3.3.22
// Standard Reference ISUP         : Chapter 3.14
//************************************************************************
  type record Circuit_state_indicator    
    {
     INT1 lengthField,

     OCTN CircuitStateIndicator
    } with { variant (lengthField)"LENGTHTO(CircuitStateIndicator)";
           };


//************************************************************************
// Closed User Group Interlock Code
// Ericsson Specification Reference: Chapter 2.3.3.23
// Standard Reference ISUP         : Chapter 3.15
//************************************************************************
// The contents of this parameter are not subdivided because values
//are easy to give as hexnumbers.
  type record Closed_user_group_interlock_code
    {
     BIT8 id,
     INT1 lengthField,

     OCT4 CUGIC_contents // CUGIC
    } with { variant "PRESENCE( id = '00011010'B)";
             variant (lengthField)"LENGTHTO(CUGIC_contents)";
           };


//************************************************************************
// Collect Call Request
// Standard Reference ISUP         : Chapter 3.81
//************************************************************************
  type record Collect_call_request
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 CCReqInd, // Collect call request indicator
     BIT7 spare     // Spare
    } with { variant "PRESENCE( id = '01111001'B)";
             variant (lengthField)"LENGTHTO(CCReqInd,spare)";
           };


//************************************************************************
// Conference Treatment Indicators
// Ericsson Specification Reference: Chapter 2.3.3.24
// Standard Reference ISUP         : Chapter 3.76
//************************************************************************
  type record Conference_treatment_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT2 ConfAcceptanceInd, // Conference acceptance indicator
     BIT5 Spare,             // Spare
     BIT1 ExtensionInd       // Extension indicator
    } with { variant "PRESENCE( id = '01110010'B)";
             variant (lengthField)"LENGTHTO(ConfAcceptanceInd,Spare,
                                            ExtensionInd)";
           };


//************************************************************************
// Connected Number
// Ericsson Specification Reference: Chapter 2.3.3.25
// Standard Reference ISUP         : Chapter 3.16
//************************************************************************
  type record Connected_number
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 NatureOfAddrInd, // Nature of address indicators
     BIT1 OddEven,         // Odd/even indicator
     BIT2 ScreeningInd,       // Screening indicator
     BIT2 AddrPresentRestInd, // Address presentation REStriction indicator
     BIT3 NumberingPlanInd,   // Numbering plan indicator
     BIT1 Spare,              // Spare
     HEX1_32 AddrSignals optional, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant "PRESENCE( id = '00100001'B)";
             variant (lengthField)"LENGTHTO(NatureOfAddrInd,OddEven,
                                            ScreeningInd,AddrPresentRestInd,
                                            NumberingPlanInd,Spare,
                                            AddrSignals,Filler)";
           };

//************************************************************************
// Connection Request
// Standard Reference ISUP         : Chapter 3.17
//************************************************************************
  type record Connection_request
    {
     BIT8 id,
     INT1 lengthField,

     OCT3 LocRef,       // Local reference
     OCT2 SPC_contents, // Signalling point code
     BIT8 PC,           // Protocol class
     BIT8 credit        // Credit
    } with { variant "PRESENCE( id = '00001101'B)";
             variant (lengthField)"LENGTHTO(LocRef,SPC_contents,PC,credit)";
           };


//************************************************************************
// Continuity Indicators
// Ericsson Specification Reference: Chapter 2.3.3.26
// Standard Reference ISUP         : Chapter 3.18
//************************************************************************
  type record Continuity_indicators
    {
     BIT1 ContInd_field, // Continuity indicator
     BIT7 Spare // Spare
    } with { variant "" };


//************************************************************************
// Correlation Id
// Ericsson Specification Reference: Chapter 2.3.3.27
// Standard Reference ISUP         : Chapter 3.70
//************************************************************************
  type record Correlation_id
    {
     BIT8 id,
     INT1 lengthField,

     OCTN  CorrelationId
    } with { variant "PRESENCE( id = '01100101'B)";
             variant (lengthField)"LENGTHTO(CorrelationId)";
           };


//************************************************************************
// Display Information
// Ericsson Specification Reference: Chapter 2.3.3.28
// Standard Reference ISUP         : Chapter 3.77
//************************************************************************
  type record Display_information
    {
     BIT8 id,
     INT1 lengthField,

     OCTN DisplayInfo
    } with { variant "PRESENCE( id = '01110011'B)";
             variant (lengthField)"LENGTHTO(DisplayInfo)";
           };


//************************************************************************
// Distributed Dynamic Routing Indicators
// Ericsson Specification Reference: Chapter 2.3.3.29
//************************************************************************
  type record Distributed_dynamic_routing_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 AutoReroutingInd,   // Automatic re-routing indicator
     BIT1 EventDepRoutingInd, // Event dependent routing indicator
     BIT6 Spare               // Spare
    } with { variant "PRESENCE( id = '11111000'B)";
             variant (lengthField)"LENGTHTO(AutoReroutingInd,EventDepRoutingInd,
                                            Spare)";
           };


//************************************************************************
// Echo Control Information
// Standard Reference ISUP         : Chapter 3.19
//************************************************************************
  type record Echo_control_information
    {
     BIT8 id,
     INT1 lengthField,

     BIT2 OEchoRsI, // Outgoing echo CONtrol device INFormation indicator
     BIT2 IEchoRsI, // Incoming echo CONtrol device INFormation indicator
     BIT2 OEchoRqI, // Outgoing echo CONtrol device request indicator
     BIT2 IEchoRqI  // Incoming echo CONtrol device request indicator
    } with { variant "PRESENCE( id = '00110111'B)";
             variant (lengthField)"LENGTHTO(OEchoRsI,IEchoRsI,OEchoRqI,
                                            IEchoRqI)";
           };


//************************************************************************
// Event Information
// Ericsson Specification Reference: Chapter 2.3.3.31
// Standard Reference ISUP         : Chapter 3.21
//************************************************************************
  type record Event_information    
    {
     BIT7 EventInd,            // Event indicator
     BIT1 EventPresentRestrInd // Event presentation retriction indicator
    } with { variant ""};


//************************************************************************
// Facility Indicator
// Ericsson Specification Reference: Chapter 2.3.3.32
// Standard Reference ISUP         : Chapter 3.22
//************************************************************************
  type record Facility_indicator    
    {
     OCT1 FacilityInd  // Facility indicator
    } with { variant "" };


//************************************************************************
// Forward Call Indicators
// Ericsson Specification Reference: Chapter 2.3.3.33
// Standard Reference ISUP         : Chapter 3.23
//************************************************************************
  type record Forward_call_indicators    
    {
     BIT1 NatIntCallInd,     // National/international call indicator
     BIT2 EndToEndMethInd,   // End-to-end method indicator
     BIT1 InterworkInd,      // Interworking indicator
     BIT1 EndToEndInfoInd,   // End-to-end INFormation indicator
     BIT1 ISUPInd,           // ISDN User Part indicator
     BIT2 ISUPPreferenceInd, // ISDN User Part preference indicator
     BIT1 ISDNAccessInd, // ISDN access indicator
     BIT2 SCCPMethodInd, // SCCP method indicator
     BIT1 Spare,         // Spare
     BIT2 Reserved,      // Reserved
     BIT2 VPNCallInd     // VPN call indicator (national use)
    } with { variant "" };


//************************************************************************
// Forward GVNS
// Ericsson Specification Reference: Chapter 2.3.3.34
// Standard Reference ISUP         : Chapter 3.66
//************************************************************************
 type record Forward_GVNS
    {
     BIT8 id,
     INT1 lengthField,

     INT4b OPSP_Len,        // OPSP length indicator
     BIT3 OPSP_Spare,      // Spare
     BIT1 OPSP_OddEven,    // Odd/even indicator
     HEX1_32 OPSP_AddSign optional, // Digits and Filler if odd digits
     HEX1 OPSP_Filler optional,
     INT4b GUG_Len,           // GUG length indicator
     BIT3 GUG_Spare,         // Spare
     BIT1 GUG_OddEven,       // Odd/even indicator
     HEX1_32 GUG_AddSign optional,    // Digits and Filler if odd digits
     HEX1 GUG_Filler optional,
     INT4b TNRN_Len,        // TNRN length indicator
     BIT3 TNRN_NumPlanInd, // Numbering plan indicator
     BIT1 TNRN_OddEven,    // Odd/even indicator
     BIT7 TNRN_NatOfAddInd optional, // Nature of address indicator
     BIT1 TNRN_Spare       optional, // Spare
     HEX1_32 TNRN_AddSign  optional, // Digits and Filler if odd digits
     HEX1 TNRN_Filler optional
    } with { variant (OPSP_Len) "LENGTHTO(OPSP_AddSign,OPSP_Filler)";
             variant (GUG_Len)  "LENGTHTO(GUG_AddSign,GUG_Filler)";
             variant (TNRN_Len) "LENGTHTO(TNRN_NatOfAddInd,TNRN_Spare,
                                          TNRN_AddSign,TNRN_Filler)";
             variant (OPSP_AddSign) "HEXORDER(low)";
             variant (GUG_AddSign)  "HEXORDER(low)";
             variant (TNRN_AddSign) "HEXORDER(low)";
             variant "PRESENCE( id = '01001100'B)";
             variant (lengthField)"LENGTHTO(OPSP_Len,OPSP_Spare,OPSP_OddEven,
                                            OPSP_AddSign,OPSP_Filler,GUG_Len,
                                            GUG_Spare,GUG_OddEven,GUG_AddSign,
                                            GUG_Filler,TNRN_Len,TNRN_NumPlanInd,
                                            TNRN_OddEven,TNRN_NatOfAddInd,
                                            TNRN_Spare,TNRN_AddSign,
                                            TNRN_Filler)";
           };


//************************************************************************
// Freephone Indicators
// Ericsson Specification Reference: Chapter 2.3.3.35
//************************************************************************
  type record Freephone_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 FreephoneInd, // Freephone indicator
     BIT7 Spare         // Spare
    } with { variant "PRESENCE( id = '01000001'B)";
             variant (lengthField)"LENGTHTO(FreephoneInd,Spare)";
           };


//************************************************************************
// Generic Digits
// Ericsson Specification Reference: Chapter 2.3.3.36
// Standard Reference ISUP         : Chapter 3.24
//************************************************************************
  type record Generic_digits
    {
     BIT8 id,
     INT1 lengthField,

     BIT5 TypeOfDigits,   // Type of digits
     BIT3 EncodingScheme, // Encoding scheme
     HEX1_32 Digits       // Digits
    } with { variant "PRESENCE( id = '11000001'B)";
             variant (lengthField)"LENGTHTO(TypeOfDigits,EncodingScheme,
                                            Digits)";
           };

  type set of Generic_digits Generic_digits_set
      with { variant "" };


//************************************************************************
// Generic Notification Indicator
// Ericsson Specification Reference: Chapter 2.3.3.37
// Standard Reference ISUP         : Chapter 3.25
//************************************************************************
  type record Generic_notification_indicator
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 NotificationInd, // Notification indicator
     BIT1 ExtInd           // Extension indicator
    } with { variant "PRESENCE( id = '00101100'B)";
             variant (lengthField)"LENGTHTO(NotificationInd,ExtInd)";
           };

  type set of Generic_notification_indicator 
                 Generic_notification_indicator_set
      with { variant "" };


//************************************************************************
// Generic Number
// Ericsson Specification Reference: Chapter 2.3.3.38
// Standard Reference ISUP         : Chapter 3.26
//************************************************************************
  type record Generic_number
    {
     BIT8 id,
     INT1 lengthField,

     BIT8 NumQualifier,   // Number qualifier indicator
     BIT7 NatureOfAddrInd, // Nature of address indicator
     BIT1 Odd_Even,        // Odd/even indicator
     BIT2 ScreeningInd,       // Screening indicator
     BIT2 AddrPresentRestInd, // Address presesntation REStricted indicator
     BIT3 NumberingPlanInd,   // Numbering plan indicator
     BIT1 NIInd,              // Number incomplete indicator
     HEX1_32 AddrSignals optional, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant "PRESENCE( id = '11000000'B)";
             variant (lengthField)"LENGTHTO(NumQualifier,NatureOfAddrInd,
                                            Odd_Even,ScreeningInd,
                                            AddrPresentRestInd,NumberingPlanInd,
                                            NIInd,AddrSignals,Filler)";
           };

  type set of Generic_number Generic_number_set
      with { variant "" };


  //************************************************************************
// HTR Information
// Standard Reference ISUP         : Chapter 3.89
//************************************************************************
  type record HTR_information
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 NatureOfAddrInd, // Nature of address indicator
     BIT1 OddEven,         // Odd/even indicator
     BIT4 spare_1,           // Spare
     BIT3 NumberingPlanInd,  // Numbering plan indicator
     BIT1 spare_2,           // Spare
     HEX1_32 AddrSignals, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant "PRESENCE( id = '10000010'B)";
             variant (lengthField)"LENGTHTO(NatureOfAddrInd,OddEven,spare_1,
                                            NumberingPlanInd,spare_2,
                                            AddrSignals,Filler)";
           };

//************************************************************************
// Hop Counter
// Ericsson Specification Reference: Chapter 2.3.3.39
// Standard Reference ISUP         : Chapter 3.80
//************************************************************************
  type record Hop_counter
    {
     BIT8 id,
     INT1 lengthField,

     BIT5 HopCount, // Hop counter
     BIT3 spare // Spare
    } with { variant "PRESENCE( id = '00111101'B)";
             variant (lengthField)"LENGTHTO(HopCount,spare)";
           };


//************************************************************************
// Information Indicators
// Ericsson Specification Reference: Chapter 2.3.3.40
// Standard Reference ISUP         : Chapter 3.28
//************************************************************************
  type record Information_indicators    
    {
     BIT2 CallingPartyAddrRespInd, // Calling party address RESponse indicator
     BIT1 HoldProvidedInd,         // Hold provided indicator
     BIT2 Spare1,                  // Spare
     BIT1 CallingPartyCatRespInd,  // Calling party's category RESponse ind.
     BIT1 Reserved1,               // Reserved
     BIT1 SolicitedInfoInd,        // Solicited INFormation indicator
     BIT4 Spare2,   // Spare
     BIT4 Reserved2 // Reserved 2
    } with { variant "" };


//************************************************************************
// Information Request Indicators
// Ericsson Specification Reference: Chapter 2.3.3.41
// Standard Reference ISUP         : Chapter 3.29
//************************************************************************
  type record Information_request_indicators    
    {
     BIT1 CallingPartyAddrRequestInd,// Calling party address request ind.
     BIT1 HoldingInd_or_Spare,       // Holding indicator
     BIT1 Spare1,                    // Spare
     BIT1 CallingPartyCatRequestInd, // Calling party's category request ind.
     BIT1 Reserved1,                 // Charge INFormation request ind.
     BIT2 Spare2,                    // Spare
     BIT1 MCIDReqInd_or_Spare, // Malicious call identification request ind.
     BIT4 Spare3,   // Spare
     BIT4 Reserved2 // Reserved
    } with { variant "" };


//************************************************************************
// Location Number
// Ericsson Specification Reference: Chapter 2.3.3.42
// Standard Reference ISUP         : Chapter 3.30
//************************************************************************
  type record Location_number
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 NatureOfAddrInd, // Nature of address indicator
     BIT1 OddEven,         // Odd/Even indicator
     BIT2 ScreeningInd,       // Screening indicator
     BIT2 AddrPresentRestInd, // Address presentation REStricted indicator
     BIT3 NumberingPlanInd,   // Numbering plan indicator
     BIT1 INNInd,             // Internal network number indicator
     HEX1_32 AddrSignals optional, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant "PRESENCE( id = '00111111'B)";
             variant (lengthField)"LENGTHTO(NatureOfAddrInd,OddEven,
                                            ScreeningInd,AddrPresentRestInd,
                                            NumberingPlanInd,INNInd,
                                            AddrSignals,Filler)";
           };

//************************************************************************
// Loop Prevention Indicators
// Ericsson Specification Reference: Chapter 2.3.3.43
// Standard Reference ISUP         : Chapter 3.67
//************************************************************************
  type record Loop_prevention_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 Type,                 // Type
     BIT2 ResponseInd_or_Spare, // Response indicator or Spare
     BIT5 Spare
    } with { variant "PRESENCE( id = '01000100'B)";
             variant (lengthField)"LENGTHTO(Type,ResponseInd_or_Spare,Spare)";
           };

//************************************************************************
// MCID Request Indicators
// Ericsson Specification Reference: Chapter 2.3.3.44
// Standard Reference ISUP         : Chapter 3.31
//************************************************************************
  type record MCID_request_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 MCIDReqInd, // MCID request indicator
     BIT1 HoldingInd, // Holding indicator
     BIT6 Spare       // Spare
    } with { variant "PRESENCE( id = '00111011'B)";
             variant (lengthField)"LENGTHTO(MCIDReqInd,HoldingInd,Spare)";
           };


//************************************************************************
// MCID Response Indicators
// Ericsson Specification Reference: Chapter 2.3.3.45
// Standard Reference ISUP         : Chapter 3.32
//************************************************************************
  type record MCID_response_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 MCIDRespInd,    // MCID RESponse indicator
     BIT1 HoldingProvInd, // Hold provided indicator
     BIT6 Spare           // Spare
    } with { variant "PRESENCE( id = '00111100'B)";
             variant (lengthField)"LENGTHTO(MCIDRespInd,HoldingProvInd,Spare)";
           };


//************************************************************************
// Message Compatibility Information
// Ericsson Specification Reference: Chapter 2.3.3.46
// Standard Reference ISUP         : Chapter 3.33
//************************************************************************
  type record Message_compatibility_information
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 TransitIntermedExchInd, // Transit at intermediate exchange ind.
     BIT1 ReleaseCallInd,         // Release call indicator
     BIT1 SendNotificationInd,    // Send notification indicator
     BIT1 DiscardMessageInd,      // Discard message indicator
     BIT1 PassOnNotPossibleInd,   // Pass on not possible indicator
     BIT2 BroadNarrowbandIwInd,   // Broadband/narrowband interworking ind.
     BIT1 ExtInd1,                // Extension indicator
     OCTN Spare2  optional
    } with { variant "EXTENSION_BIT_GROUP (yes,TransitIntermedExchInd,Spare2)";
             variant "PRESENCE( id = '00111000'B)";
             variant (lengthField)"LENGTHTO(TransitIntermedExchInd,
                                            ReleaseCallInd,SendNotificationInd,
                                            DiscardMessageInd,
                                            PassOnNotPossibleInd,
                                            BroadNarrowbandIwInd,
                                            ExtInd1,Spare2)";
           };




//************************************************************************
// Meter Pulse Indicator
// Ericsson Specification Reference: Chapter 2.3.3.47
//************************************************************************
  type record Meter_pulse_indicator
    {
     BIT8 id,
     INT1 lengthField,

     OCT1 MeterPulse, // Meter pulse indicator
     OCT1 Reserved    // Reserved
    } with { variant "PRESENCE( id = '11111110'B)";
             variant (lengthField)"LENGTHTO(MeterPulse,Reserved)";
           };

//************************************************************************
// MLPP Precedence
// Ericsson Specification Reference: Chapter 2.3.3.48
// Standard Reference ISUP         : Chapter 3.34
//************************************************************************
  type record MLPP_precedence
    {
     BIT8 id,
     INT1 lengthField,

     BIT4 PreLev,  // Precedence level
     BIT1 spare_1, // Spare
     BIT2 LFB,     // Look ahead for busy
     BIT1 spare_2, // Spare
     OCT2 NI,       // Network identity
     OCT3 ServDom   // MLPP service domain
    } with { variant "PRESENCE( id = '00111010'B)";
             variant (lengthField)"LENGTHTO(PreLev,spare_1,LFB,spare_2,NI,
                                            ServDom)";
           };


//************************************************************************
// Nature Of Connection Indicators
// Ericsson Specification Reference: Chapter 2.3.3.49
// Standard Reference ISUP         : Chapter 3.35
//************************************************************************
  type record Nature_of_connection_indicators    
    {
     BIT2 SatelliteInd,       // Satellite indicator
     BIT2 ContinuityCheckInd, // Continuity check indicator
     BIT1 EchoControlDevInd,  // Echo CONtrol device indicator
     BIT3 Spare               // Spare
    } with { variant "" };


//************************************************************************
// Network Call Reference
// Ericsson Specification Reference: Chapter 2.3.3.50
//************************************************************************
  type record Network_call_reference
    {
     BIT8 id,
     INT1 lengthField,

     OCT3 CallIdentity, // Call identity
     BIT14 SwitchId, // Switch identity
     BIT2 Spare // Spare
    } with { variant "PRESENCE( id = '11110100'B)";
             variant (lengthField)"LENGTHTO(CallIdentity,SwitchId,Spare)";
           };


//************************************************************************
// Network Management Controls
// Standard Reference ISUP         : Chapter 3.68
//************************************************************************
  type record Network_management_controls
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 TAR_indicator, // Temporary alternate routing indicator
     BIT6 spare,         // Temporary alternate routing indicator
     BIT1 ExtI           // Extension indicator
    } with { variant "PRESENCE( id = '01011011'B)";
             variant (lengthField)"LENGTHTO(TAR_indicator,spare,ExtI)";
           };


//************************************************************************
// Network Routing Number
// Standard Reference ISUP         : Chapter 3.90
//************************************************************************
  type record Network_routing_number
    {
     BIT8 id,
     INT1 lengthField,

     BIT4 NatureOfAddrInd,  // Nature of address indicator
     BIT3 NumberingPlanInd, // Numbering plan indicator
     BIT1 OddEven,          // Odd/even indicator
     HEX1_32 AddrSignals, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant "PRESENCE( id = '10000100'B)";
             variant (lengthField)"LENGTHTO(NatureOfAddrInd,NumberingPlanInd,
                                            OddEven,AddrSignals,Filler)";
           };

//************************************************************************
// Network Specific Facility
// Ericsson Specification Reference: Chapter 2.3.3.51
// Standard Reference ISUP         : Chapter 3.36
//************************************************************************
  type record Network_specific_facility
    {
     BIT8 id,
     INT1 lengthField,

     INT1 LenOfNetwId, // Length of network identification
     BIT4 NetworkIdPlan optional,   // Network identification plan
     BIT3 TypeofNetworkId optional, // Type of network identification
     BIT1 One optional,
     OCTN NetworkId optional,   // Network id. First bit in octets is 0
     OCTN NetworkSpecificFacility // network-specific FACility indicator
    } with { variant (LenOfNetwId) "LENGTHTO(NetworkIdPlan,TypeofNetworkId,
                                             One,NetworkId)";
             variant "PRESENCE( id = '00101111'B)";
             variant (lengthField)"LENGTHTO(LenOfNetwId,NetworkIdPlan,
                                            TypeofNetworkId,One,NetworkId,
                                            NetworkSpecificFacility)";
           };


//************************************************************************
// Number Portability Forward Information
// Standard Reference ISUP         : Chapter 3.101
//************************************************************************
  type record Number_portability_forward_information
    {
     BIT8 id,
     INT1 lengthField,

     BIT4 NbPStInd, // Number portability status indicator
     BIT3 spare,    // Spare
     BIT1 ExtI      // Extension indicator
    } with { variant "PRESENCE( id = '10001101'B)";
             variant (lengthField)"LENGTHTO(NbPStInd,spare,ExtI)";
           };


//************************************************************************
// Optional Backward Call Indicators
// Ericsson Specification Reference: Chapter 2.3.3.52
// Standard Reference ISUP         : Chapter 3.37
//************************************************************************
  type record Optional_backward_call_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 InBandInfoInd,            // In-band INFormation indicator
     BIT1 CallDiversionMayOccurInd, // Call diversion may occur indicator
     BIT1 SimpleSegmentationInd,    // Simple segmentation indicator
     BIT1 MLPPUserInd,              // MLPP User Indicator
     BIT2 Reserved,                 // Reserved
     BIT1 TimeSupervBeforeAnsInd,   // Time supervision before answerind.
     BIT1 LastPartyRelInd           // Last party release indicator
    } with { variant "PRESENCE( id = '00101001'B)";
             variant (lengthField)"LENGTHTO(InBandInfoInd,
                                            CallDiversionMayOccurInd,
                                            SimpleSegmentationInd,MLPPUserInd,
                                            Reserved,TimeSupervBeforeAnsInd,
                                            LastPartyRelInd)";
           };


//************************************************************************
// Optional Forward Call Indicators
// Ericsson Specification Reference: Chapter 2.3.3.53
// Standard Reference ISUP         : Chapter 3.38
//************************************************************************
  type record Optional_forward_call_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT2 CUGCallInd,            // Closed user group call indicator
     BIT1 SimpleSegmentationInd, // Simple segmentation indicator
     BIT4 Spare,                 // Spare
     BIT1 ConnLineReqInd         // Connected line identity request indicator
    } with { variant "PRESENCE( id = '00001000'B)";
             variant (lengthField)"LENGTHTO(CUGCallInd,SimpleSegmentationInd,
                                            Spare,ConnLineReqInd)";
           };


//************************************************************************
// Original Called Number
// Ericsson Specification Reference: Chapter 2.3.3.54
// Standard Reference ISUP         : Chapter 3.39
//************************************************************************
  type record Original_called_number
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 NatureOfAddrInd, // Nature of address indicator
     BIT1 OddEven,         // Odd/even indicator
     BIT2 Spare_1,            // Spare
     BIT2 AddrPresentRestInd, // Address presentation REStricted indicator
     BIT3 NumberingPlanInd,   // Numbering plan indicator
     BIT1 Spare_2,            // Spare
     HEX1_32 AddrSignals optional, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant "PRESENCE( id = '00101000'B)";
             variant (lengthField)"LENGTHTO(NatureOfAddrInd,OddEven,Spare_1,
                                            AddrPresentRestInd,NumberingPlanInd,
                                            Spare_2,AddrSignals,Filler)";
           };

//************************************************************************
// Original Called IN Number
// Standard Reference ISUP         : Chapter 3.87
//************************************************************************
  type record Original_called_IN_number
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 NatureOfAddrInd, // Nature of address indicator
     BIT1 OddEven,         // Odd/even indicator
     BIT2 spare_1,            // Spare
     BIT2 AddrPresentRestInd, // Address presentation REStricted indicator
     BIT3 NumberingPlanInd,   // Numbering plan indicator
     BIT1 spare_2,            // Spare
     HEX1_32 AddrSignals optional, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant "PRESENCE( id = '01111111'B)";
             variant (lengthField)"LENGTHTO(NatureOfAddrInd,OddEven,spare_1,
                                            AddrPresentRestInd,NumberingPlanInd,
                                            spare_2,AddrSignals,Filler)";
           };

//************************************************************************
// Origination ISC Point Code
// Ericsson Specification Reference: Chapter 2.3.3.55
// Standard Reference ISUP         : Chapter 3.40
//************************************************************************
  type record Origination_ISC_point_code
    {
     BIT8 id,
     INT1 lengthField,

     OCT2 OriISC_contents // Signalling point code
    } with { variant "PRESENCE( id = '00101011'B)";
             variant (lengthField)"LENGTHTO(OriISC_contents)";
           };


//************************************************************************
// Parameter Compatibility Information
// Ericsson Specification Reference: Chapter 2.3.3.56
// Standard Reference ISUP         : Chapter 3.41
//************************************************************************
  type record Parameter_compatibility_information
    {
     BIT8 id,
     INT1 lengthField,

     BIT8 FirstUpgradParam, // Upgraded parameter name
     BIT7 InstructIndFirst, // all instruction indicators for parameter 1
     BIT1 ExtInd1, // Extension indicator
     BIT8 SecondUpgradParam optional,
     BIT7 InstructIndSecond optional, // all instruction indicators for param. 2
     BIT1 ExtInd2 optional, // Extension indicator
     BIT8 ThirdUpgradParam optional,
     BIT7 InstructIndThird optional, // all instruction indicators for param. 3
     BIT1 ExtInd3 optional, // Extension indicator
     BIT8 FourthUpgradParam optional,
     BIT7 InstructIndFourth optional, // all instruction indicators for param. 4
     BIT1 ExtInd4 optional, // Extension indicator
     BIT8 FifthUpgradParam optional,
     BIT7 InstructIndFifth optional, // all instruction indicators for param. 5
     BIT1 ExtInd5 optional// Extension indicator
    } with { variant "PRESENCE( id = '00111001'B)";
             variant (lengthField)"LENGTHTO(FirstUpgradParam,InstructIndFirst,
                                            ExtInd1,SecondUpgradParam,
                                            InstructIndSecond,ExtInd2,
                                            ThirdUpgradParam,InstructIndThird,
                                            ExtInd3,FourthUpgradParam,
                                            InstructIndFourth,ExtInd4,
                                            FifthUpgradParam,InstructIndFifth,
                                            ExtInd5)";
           };


//************************************************************************
// Pivot Capability
// Standard Reference ISUP         : Chapter 3.84
//************************************************************************
  type record Pivot_capability
    {
     BIT8 id,
     INT1 lengthField,

     BIT3 PivPosInd,  // Pivot possible indicator
     BIT3 spare,      // Spare
     BIT1 IwRedirInd, // Interworking to redirection indicator
     BIT1 ExtI        // Extension indicator
    } with { variant "PRESENCE( id = '01111011'B)";
             variant (lengthField)"LENGTHTO(PivPosInd,spare,IwRedirInd,ExtI)";
           };


//************************************************************************
// Pivot Counter
// Standard Reference ISUP         : Chapter 3.93
//************************************************************************
  type record Pivot_counter
    {
     BIT8 id,
     INT1 lengthField,

     BIT5 PivCount, // Pivot counter
     BIT3 spare // spare
    } with { variant "PRESENCE( id = '10000111'B)";
             variant (lengthField)"LENGTHTO(PivCount,spare)";
           };


//************************************************************************
// Pivot Routing Backward Information
// Standard Reference ISUP         : Chapter 3.95
//************************************************************************
  type record Pivot_routing_backward_information
    {
     BIT8 id,
     INT1 lengthField,

     ISUP_Information_type_set PivotInfo
    } with { variant "PRESENCE( id = '10001001'B)";
             variant (lengthField)"LENGTHTO(PivotInfo)";
           };

  type record ISUP_Information_type
    {
     BIT8 infoTypeTag,
     INT1 infoTypeLength,
     OCTN infoTypeValue
    } with { variant (infoTypeLength)"LENGTHTO(infoTypeValue)";
           };

  type set of ISUP_Information_type ISUP_Information_type_set
      with { variant "" };


//************************************************************************
// Pivot Routing Forward Information
// Standard Reference ISUP         : Chapter 3.94
//************************************************************************
  type record Pivot_routing_forward_information
    {
     BIT8 id,
     INT1 lengthField,

     ISUP_Information_type_set PivotInfo
    } with { variant "PRESENCE( id = '10001000'B)";
             variant (lengthField)"LENGTHTO(PivotInfo)";
           };


//************************************************************************
// Pivot Routing Indicators
// Standard Reference ISUP         : Chapter 3.85
//************************************************************************
  type record Pivot_routing_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 PivRoutInd, // Pivot routing indicators
     BIT1 ExtI        // Extension indicator
    } with { variant "PRESENCE( id = '01111100'B)";
             variant (lengthField)"LENGTHTO(PivRoutInd,ExtI)";
           };


//************************************************************************
// Pivot Status
// Standard Reference ISUP         : Chapter 3.92
//************************************************************************
  type record Pivot_status
    {
     BIT8 id,
     INT1 lengthField,

     BIT2 PivStInd, // Pivot status indicator
     BIT5 spare, // Spare
     BIT1 ExtI // Extension indicator
    } with { variant "PRESENCE( id = '10000110'B)";
             variant (lengthField)"LENGTHTO(PivStInd,spare,ExtI)";
           };


//************************************************************************
// Propagation Delay Counter
// Ericsson Specification Reference: Chapter 2.3.3.57
// Standard Reference ISUP         : Chapter 3.42
//************************************************************************
  type record Propagation_delay_counter
    {
     BIT8 id,
     INT1 lengthField,

     OCT2 PropagationDelayValue
    } with { variant "PRESENCE( id = '00110001'B)";
             variant (lengthField)"LENGTHTO(PropagationDelayValue)";
           };


//************************************************************************
// Query On Release Capability
// Standard Reference ISUP         : Chapter 3.91
//************************************************************************
  type record Query_on_release_capability
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 QoRCapInd, // Query on RELease capability indicator
     BIT6 spare,     // Spare
     BIT1 ExtI       // Extension indicator
    } with { variant "PRESENCE( id = '10000101'B)";
             variant (lengthField)"LENGTHTO(QoRCapInd,spare,ExtI)";
           };


//************************************************************************
// Range And Status
// Ericsson Specification Reference: Chapter 2.3.3.58
// Standard Reference ISUP         : Chapter 3.43
//************************************************************************
  type record Range_and_status    
    {
     INT1 lengthField,

     OCT1 Range,         // Range
     OCTN Status optional// Status
    } with { variant (lengthField)"LENGTHTO(Range,Status)";
           };


//************************************************************************
// Redirect Backward Information
// Standard Reference ISUP         : Chapter 3.100
//************************************************************************
  type record Redirect_backward_information
    {
     BIT8 id,
     INT1 lengthField,

     ISUP_Information_type_set RedirInfo
    } with { variant "PRESENCE( id = '10001100'B)";
             variant (lengthField)"LENGTHTO(RedirInfo)";
           };


//************************************************************************
// Redirect Capability
// Standard Reference ISUP         : Chapter 3.96
//************************************************************************
  type record Redirect_capability
    {
     BIT8 id,
     INT1 lengthField,

     BIT3 RedirPosInd, // Redirect possible indicator
     BIT4 spare,       // Spare
     BIT1 ExtI         // Extension indicator
    } with { variant "PRESENCE( id = '01001110'B)";
             variant (lengthField)"LENGTHTO(RedirPosInd,spare,ExtI)";
           };


//************************************************************************
// Redirect Counter
// Standard Reference ISUP         : Chapter 3.97
//************************************************************************
  type record Redirect_counter
    {
     BIT8 id,
     INT1 lengthField,

     BIT5 RedirCount, // Redirect counter
     BIT3 spare       // Spare
    } with { variant "PRESENCE( id = '01110111'B)";
             variant (lengthField)"LENGTHTO(RedirCount,spare)";
           };


//************************************************************************
// Redirect Forward Information
// Standard Reference ISUP         : Chapter 3.99
//************************************************************************
  type record Redirect_forward_information
    {
     BIT8 id,
     INT1 lengthField,

     ISUP_Information_type_set RedirInfo
    } with { variant "PRESENCE( id = '10001011'B)";
             variant (lengthField)"LENGTHTO(RedirInfo)";
           };


//************************************************************************
// Redirect Status
// Standard Reference ISUP         : Chapter 3.98
//************************************************************************
  type record Redirect_status
    {
     BIT8 id,
     INT1 lengthField,

     BIT2 RedirStInd, // Redirect status indicator
     BIT5 spare,      // Spare
     BIT1 ExtI        // Extension indicator
    } with { variant "PRESENCE( id = '10001010'B)";
             variant (lengthField)"LENGTHTO(RedirStInd,spare,ExtI)";
           };


//************************************************************************
// Redirecting Number
// Ericsson Specification Reference: Chapter 2.3.3.59
// Standard Reference ISUP         : Chapter 3.44
//************************************************************************
  type record Redirecting_number
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 NatureOfAddrInd, // Nature of address indicator
     BIT1 OddEven,         // Odd/even indicator
     BIT2 Spare1,              // Spare
     BIT2 AddrPresentRestInd, // Address presentation REStricted indicator
     BIT3 NumberingPlanInd,   // Numbering plan indicator
     BIT1 Spare,              // Spare
     HEX1_32 AddrSignals optional, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant "PRESENCE( id = '00001011'B)";
             variant (lengthField)"LENGTHTO(NatureOfAddrInd,OddEven,
                                            Spare1,AddrPresentRestInd,
                                            NumberingPlanInd,Spare,AddrSignals,
                                            Filler)";
           };



//************************************************************************
// Redirection Information
// Ericsson Specification Reference: Chapter 2.3.3.60
// Standard Reference ISUP         : Chapter 3.45
//************************************************************************
  type record Redirection_information
    {
     BIT8 id,
     INT1 lengthField,

     BIT3 RedirectionInd,            // Redirecting indicator
     BIT1 Spare1,                    // Redirecting indicator
     BIT4 OriginalRedirectionReason, // Original redirection reason
     BIT3 RedirectionCounter optional, // Redirection counter
     BIT1 Spare2 optional,             // Spare
     BIT4 RedirectingReason optional   // Redirecting reason
    } with { variant "PRESENCE( id = '00010011'B)";
             variant (lengthField)"LENGTHTO(RedirectionInd,Spare1,
                                            OriginalRedirectionReason,
                                            RedirectionCounter,Spare2,
                                            RedirectingReason)";
           };


//************************************************************************
// Redirection Number
// Ericsson Specification Reference: Chapter 2.3.3.61
// Standard Reference ISUP         : Chapter 3.46
//************************************************************************
  type record Redirection_number
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 NatureOfAddrInd, // Nature of address indicator
     BIT1 OddEven,         // Odd/even indicator
     BIT4 Spare,              // spare
     BIT3 NumberingPlanInd,   // Numbering plan indicator
     BIT1 INNInd,             // Internal network number indicator
     HEX1_32 AddrSignals, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant "PRESENCE( id = '00001100'B)";
             variant (lengthField)"LENGTHTO(NatureOfAddrInd,OddEven,Spare,
                                            NumberingPlanInd,INNInd,
                                            AddrSignals,Filler)";
           };

//************************************************************************
// Redirection Number Restriction
// Ericsson Specification Reference: Chapter 2.3.3.62
// Standard Reference ISUP         : Chapter 3.47
//************************************************************************
  type record Redirection_number_restriction
    {
     BIT8 id,
     INT1 lengthField,

     BIT2 PresRestInd, // Presentation REStricted indicator
     BIT6 Spare        // Spare
    } with { variant "PRESENCE( id = '01000000'B)";
             variant (lengthField)"LENGTHTO(PresRestInd,Spare)";
           };


//************************************************************************
// Remote Operations
// Standard Reference ISUP         : Chapter 3.48
//************************************************************************
  type record Remote_operations
    {
     BIT8 id,
     INT1 lengthField,

     BIT5 ProtProf, // Protocol profile
     BIT2 spare,    //  Spare
     BIT1 ExtI,     // Extension indicator
     OCTN Comp      // Components
    } with { variant "PRESENCE( id = '00110010'B)";
             variant (lengthField)"LENGTHTO(ProtProf,spare,ExtI,Comp)";
           };


//************************************************************************
// Route Identity
// Ericsson Specification Reference: Chapter 2.3.3.63
//************************************************************************
  type record Route_identity
    {
     BIT8 id,
     INT1 lengthField,

     OCT2 RouteIdentity
    } with { variant "PRESENCE( id = '11111100'B)";
             variant (lengthField)"LENGTHTO(RouteIdentity)";
           };


//************************************************************************
// SCF Id
// Ericsson Specification Reference: Chapter 2.3.3.64
// Standard Reference ISUP         : Chapter 3.71
//************************************************************************
  type record SCF_id
    {
     BIT8 id,
     INT1 lengthField,

     OCTN SCFId
    } with { variant "PRESENCE( id = '01100110'B)";
             variant (lengthField)"LENGTHTO(SCFId)";
           };


//************************************************************************
// Service Activation
// Ericsson Specification Reference: Chapter 2.3.3.65
// Standard Reference ISUP         : Chapter 3.49
//************************************************************************
  type record Service_activation
    {
     BIT8 id,
     INT1 lengthField,

     OCTN ServAct_contents
    } with { variant "PRESENCE( id = '00110011'B)";
             variant (lengthField)"LENGTHTO(ServAct_contents)";
           };


//************************************************************************
// Signalling Point Code
// Standard Reference ISUP         : Chapter 3.50
//************************************************************************
  type record Signalling_point_code
    {
     BIT8 id,
     INT1 lengthField,

     OCT2 SPC_contents // Signalling point code
    } with { variant "PRESENCE( id = '00011110'B)";
             variant (lengthField)"LENGTHTO(SPC_contents)";
           };


//************************************************************************
// Subsequent Number
// Ericsson Specification Reference: Chapter 2.3.3.66
// Standard Reference ISUP         : Chapter 3.51
//************************************************************************
  type record Subsequent_number_OPT
    {
     BIT8 id,
     INT1 lengthField,

     BIT7 Spare,   // Spare
     BIT1 OddEven, // Odd/even inicator
     HEX1_32 AddrSignals, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant "PRESENCE( id = '00000101'B)";
             variant (lengthField)"LENGTHTO(Spare,OddEven,AddrSignals,Filler)";
           };

  type record Subsequent_number    
    {
     INT1 lengthField,

     BIT7 Spare,   // Spare
     BIT1 OddEven, // Odd/even inicator
     HEX1_32 AddrSignals, // Address signals and Filler if odd addr.signals
     HEX1 Filler optional
    } with { variant (AddrSignals) "HEXORDER(low)";
             variant (lengthField)"LENGTHTO(Spare,OddEven,AddrSignals,Filler)";
           };


//************************************************************************
// Suspend Resume Indicators
// Ericsson Specification Reference: Chapter 2.3.3.67
// Standard Reference ISUP         : Chapter 3.52
//************************************************************************
  type record Suspend_resume_indicators    
    {
     BIT1 SUSRESInd, // Suspend/resume indicator
     BIT7 Spare      // Spare
    } with { variant "" };


//************************************************************************
// Tariff Indicator
// Ericsson Specification Reference: Chapter 2.3.3.68
//************************************************************************
  type record Tariff_indicator
    {
     BIT8 id,
     INT1 lengthField,

     OCT1 TariffInd, // Tariff indicator
     OCT1 Reserved optional// Reserved
    } with { variant "PRESENCE( id = '11111101'B)";
             variant (lengthField)"LENGTHTO(TariffInd,Reserved)";
           };


//************************************************************************
// Transit Network Selection
// Ericsson Specification Reference: Chapter 2.3.3.69
// Standard Reference ISUP         : Chapter 3.53
//************************************************************************
  type record Transit_network_selection
    {
     BIT8 id,
     INT1 lengthField,

     BIT4 NetIdPlan,   //  Network identification plan
     BIT3 TypeOfNetId, // Type of network identification
     BIT1 OddEvenInd,  // Odd/even inicator
     OCTN NetId // Network identification
    } with { variant "PRESENCE( id = '00100011'B)";
             variant (lengthField)"LENGTHTO(NetIdPlan,TypeOfNetId,OddEvenInd,
                                            NetId)";
           };


//************************************************************************
// Transmission Medium Requirement
// Ericsson Specification Reference: Chapter 2.3.3.70
// Standard Reference ISUP         : Chapter 3.54
//************************************************************************
  type record Transmission_medium_requirement    
    {
     BIT8 TMR
    } with { variant "" };

//************************************************************************
// Transmission Medium Requirement Prime
// Ericsson Specification Reference: Chapter 2.3.3.71
// Standard Reference ISUP         : Chapter 3.55
//************************************************************************
  type record Transmission_medium_requirement_prime
    {
     BIT8 id,
     INT1 lengthField,

     BIT8 TMRp_field
    } with { variant "PRESENCE( id = '00111110'B)";
             variant (lengthField)"LENGTHTO(TMRp_field)";
           };

//************************************************************************
// Transmission Medium Used
// Ericsson Specification Reference: Chapter 2.3.3.72
// Standard Reference ISUP         : Chapter 3.56
//************************************************************************
  type record Transmission_medium_used
    {
     BIT8 id,
     INT1 lengthField,

     BIT8 TMU_field
    } with { variant "PRESENCE( id = '00110101'B)";
             variant (lengthField)"LENGTHTO(TMU_field)";
           };


//************************************************************************
// UID Action Indicators
// Standard Reference ISUP         : Chapter 3.78
//************************************************************************
  type record UID_action_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 ThConInsInd, // Through CONnection instruction indicator
     BIT1 T9InsInd,    // T9 timer instruction indicator
     BIT5 spare,       // Spare
     BIT1 ExtI         // Extension indicator
    } with { variant "PRESENCE( id = '01110100'B)";
             variant (lengthField)"LENGTHTO(ThConInsInd,T9InsInd,spare,ExtI)";
           };


//************************************************************************
// UID Capability Indicators
// Standard Reference ISUP         : Chapter 3.79
//************************************************************************
  type record UID_capability_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 through_connection_indicator, // Through CONnection indicator
     BIT1 T9_timer_indicator, // T9 timer indicator
     BIT5 spare, // T9 timer indicator
     BIT1 ExtI // Extension indicator
    } with { variant "PRESENCE( id = '01110101'B)";
             variant (lengthField)"LENGTHTO(through_connection_indicator,
                                            T9_timer_indicator,spare,ExtI)";
           };


//************************************************************************
// User Service Information
// Ericsson Specification Reference: Chapter 2.3.3.73
// Standard Reference ISUP         : Chapter 3.57
//************************************************************************
  type record User_service_information
    {
     BIT8 id,
     INT1 lengthField,

     BIT5 InfTrC, // Information transfer capability
     BIT2 CodS,   // Coding standard
     BIT1 ExtI_1, // Extension indicator (1)
  //EXT GR1 start
     BIT5 infTR,    // Information transfer rate
     BIT2 TrMod,    // Transfer mode
     BIT1 ExtI_2,   // Extension indicator (0/1)

     BIT2 establishment optional, // demand
     BIT2 configuration optional, // point-to-point
     BIT3 structure optional,     // default
     BIT1 ext2a optional,

     BIT5 infoTransRate optional, //used for packet-mode calls
     BIT2 symmetry optional,      // bi-directional symmetric
     BIT1 ext2b optional,
   //EXT GR1 end
     BIT7 RatMul optional,   // Rate multiplier
     BIT1 ExtI_2_1 optional, // Extension indicator (1)

     Layer1_info  layer1 optional,
     Layer2_info  layer2 optional,
     Layer3_info  layer3 optional
    } with { variant "EXTENSION_BIT_GROUP(yes,infTR,ext2b)";
             variant (RatMul) "PRESENCE(infTR = '11000'B)";
             variant (ExtI_2_1) "PRESENCE(infTR = '11000'B)";
             variant "TAG ( layer1, layer_id = '01'B;	
                            layer2, layer_id = '10'B;	
                            layer3, layer_id = '11'B;)"
             variant "PRESENCE( id = '00011101'B)";
             variant (lengthField)"LENGTHTO(InfTrC,CodS,ExtI_1,infTR,TrMod,
                                            ExtI_2,establishment,configuration,
                                            structure,ext2a,infoTransRate,
                                            symmetry,ext2b,RatMul,ExtI_2_1,
                                            layer1,layer2,layer3)";
           };

  type record Layer1_info
    {
     BIT5 UInf1,    // User INFormation layer 1 protocol
     BIT2 layer_id, // Layer identification
     BIT1 ExtI_3,   // Extension indicator (0/1)

     BIT5 UsrRate optional, // User rate
     BIT1 Negot optional,   // Negotiation
     BIT1 SynAsyn optional, // Synchronous/Asynchronous
     BIT1 ExtI_3a optional, // Extension indicator (0/1)

     //Note: the content of this field depends on field UInf1 - see Q.931 4.5.5
     BIT7 Bits_3b optional,  // info bits in octet 3b
     BIT1 ExtI_3b optional,    // Extension indicator (0/1)

     //BIT1 Spare_1 optional, // Spare
     //BIT1 FlCtrRx optional, // Flow control on Rx
     //BIT1 FlCtrTx optional, // Flow control on Tx
     //BIT1 NICRx optional,   // Network independent clock on RX
     //BIT1 NICTx optional,   // Network independent clock on TX
     //BIT2 IntRate optional, // Intermediate rate
     //BIT1 ExtI_6 optional,  // Extension indicator (0/1)

     //BIT1 Spare_2 optional,  // Spare
     //BIT1 InBndNeg optional, // In-band/out-band negotiation
     //BIT1 Ass optional,      // Assignor/assignee
     //BIT1 LLINeg optional,   // Logical link identifier negotiation
     //BIT1 Mode optional,     // Mode of operation

     //BIT1 MultFr optional,// Multiple frame establishment support in data link
     //BIT1 Hdr optional,   // Rate adaption header/no header
     //BIT1 ExtI_7 optional,// Extension indicator (0/1)

     BIT3 Prty optional,    // Parity INFormation
     BIT2 NDatBit optional, // Number of data bits excluding parity bit if pres.
     BIT2 NStpBit optional, // Number of stop bits
     BIT1 ExtI_3c optional,  // Extension indicator (0/1)

     BIT6 MdmTyp optional, // Modem type
     BIT1 DupMod optional, // Mode duplex
     BIT1 ExtI_3d optional  // Extension indicator (1)
     } with { variant "EXTENSION_BIT(yes)"}

  type record Layer2_info
    {
     BIT5 uInf2,    // User information layer 2 protocol
     BIT2 layer_id, // Layer identification
     BIT1 extI_10   // Extension indicator (1)
    } with { variant "" };

  type record Layer3_info
    {
     BIT5 uInf3,    // User information layer 3 protocol
     BIT2 layer_id, // Layer identification
     BIT1 extI_11   // Extension indicator (1)
    } with { variant "" };


//************************************************************************
// User Service Information Prime
// Ericsson Specification Reference: Chapter 2.3.3.74
// Standard Reference ISUP         : Chapter 3.58
//************************************************************************
  type record User_service_information_prime
    {
     BIT8 id,
     INT1 lengthField,

     BIT5 InfTrC, // Information transfer capability
     BIT2 CodS,   // Coding standard
     BIT1 ExtI_1, // Extension indicator (1)
  //EXT GR1 start
     BIT5 infTR,    // Information transfer rate
     BIT2 TrMod,    // Transfer mode
     BIT1 ExtI_2,   // Extension indicator (0/1)

     BIT2 establishment optional, // demand
     BIT2 configuration optional, // point-to-point
     BIT3 structure optional,     // default
     BIT1 ext2a optional,

     BIT5 infoTransRate optional, //used for packet-mode calls
     BIT2 symmetry optional,      // bi-directional symmetric
     BIT1 ext2b optional,
   //EXT GR1 end
     BIT7 RatMul optional,   // Rate multiplier
     BIT1 ExtI_2_1 optional, // Extension indicator (1)

     Layer1_info  layer1 optional,
     Layer2_info  layer2 optional,
     Layer3_info  layer3 optional
    } with { variant "EXTENSION_BIT_GROUP(yes,infTR,ext2b)";
             variant (RatMul) "PRESENCE(infTR = '11000'B)";
             variant (ExtI_2_1) "PRESENCE(infTR = '11000'B)";
             variant "TAG ( layer1, layer_id = '01'B;	
                            layer2, layer_id = '10'B;	
                            layer3, layer_id = '11'B;)"
             variant "PRESENCE( id = '00110000'B)";
             variant (lengthField)"LENGTHTO(InfTrC,CodS,ExtI_1,infTR,TrMod,
                                            ExtI_2,establishment,configuration,
                                            structure,ext2a,infoTransRate,
                                            symmetry,ext2b,RatMul,ExtI_2_1,
                                            layer1,layer2,layer3)";
            };
/* The old version is commented out because it could cause decoding problems.
  type record User_service_information    // 3.57 / Q.763
    {
     BIT5 InfTrC, // Information transfer capability
     BIT2 CodS, // Coding standard
     BIT1 ExtI_1, // Extension indicator (1)
     BIT5 InfTR, // Information transfer rate
     BIT2 TrMod, // Transfer mode
     BIT1 ExtI_2, // Extension indicator (0/1)
     BIT8 RatMul optional, // Rate multiplier
     BIT1 ExtI_3 optional, // Extension indicator (1)
     BIT5 UInf1 optional, // User INFormation layer 1 protocol
     BIT2 Lay1 optional, // Layer identification
     BIT1 ExtI_4 optional, // Extension indicator (0/1)
     BIT5 UsrRate optional, // User rate
     BIT1 Negot optional, // Negotiation
     BIT1 SynAsyn optional, // Synchronous/Asynchronous
     BIT1 ExtI_5 optional, // Extension indicator (0/1)
     BIT1 Spare_1 optional, // Spare
     BIT1 FlCtrRx optional, // Flow control on Rx
     BIT1 FlCtrTx optional, // Flow control on Tx
     BIT1 NICRx optional, // Network independent clock on RX
     BIT1 NICTx optional, // Network independent clock on TX
     BIT2 IntRate optional, // Intermediate rate
     BIT1 ExtI_6 optional, // Extension indicator (0/1)
     BIT1 Spare_2 optional, // Spare
     BIT1 InBndNeg optional, // In-band/out-band negotiation
     BIT1 Ass optional, // Assignor/assignee
     BIT1 LLINeg optional, // Logical link identifier negotiation
     BIT1 Mode optional, // Mode of operation
     BIT1 MultFr optional, // Multiple frame establishment support in data link
     BIT1 Hdr optional, // Rate adaption header/no header
     BIT1 ExtI_7 optional, // Extension indicator (0/1)
     BIT3 Prty optional, // Parity INFormation
     BIT2 NDatBit optional, // Number of data bits excluding parity bit if pres.
     BIT2 NStpBit optional, // Number of stop bits
     BIT1 ExtI_8 optional, // Extension indicator (1)
     BIT6 MdmTyp optional, // Modem type
     BIT1 DupMod optional, // Mode duplex
     BIT1 ExtI_9 optional, // Extension indicator (1)
     BIT5 UInf2 optional, // User INFormation layer 2 protocol
     BIT2 Lay2 optional, // Layer identification
     BIT1 ExtI_10 optional, // Extension indicator (1)
     BIT5 UInf3 optional, // User INFormation layer 3 protocol
     BIT2 Lay3 optional, // Layer identification
     BIT1 ExtI_11 optional // Extension indicator (1)
    } with { variant "" };


  type record User_service_information_prime    // 3.58 / Q.763
    {
     BIT5 InfTrC, // Information transfer capability
     BIT2 CodS, // Coding standard
     BIT1 ExtI_1, // Extension indicator (1)
     BIT5 InfTR, // Information transfer rate
     BIT2 TrMod, // Transfer mode
     BIT1 ExtI_2, // Extension indicator (0/1)
     BIT8 RatMul optional, // Rate multiplier
     BIT1 ExtI_3 optional, // Extension indicator (1)
     BIT5 UInf1 optional, // User INFormation layer 1 protocol
     BIT2 Lay1 optional, // Layer identification
     BIT1 ExtI_4 optional, // Extension indicator (0/1)
     BIT5 UsrRate optional, // User rate
     BIT1 Negot optional, // Negotiation
     BIT1 SynAsyn optional, // Synchronous/Asynchronous
     BIT1 ExtI_5 optional, // Extension indicator (0/1)
     BIT1 Spare_1 optional, // Spare
     BIT1 FlCtrRx optional, // Flow control on Rx
     BIT1 FlCtrTx optional, // Flow control on Tx
     BIT1 NICRx optional, // Network independent clock on RX
     BIT1 NICTx optional, // Network independent clock on TX
     BIT2 IntRate optional, // Intermediate rate
     BIT1 ExtI_6 optional, // Extension indicator (0/1)
     BIT1 Spare_2 optional, // Spare
     BIT1 InBndNeg optional, // In-band/out-band negotiation
     BIT1 Ass optional, // Assignor/assignee
     BIT1 LLINeg optional, // Logical link identifier negotiation
     BIT1 Mode optional, // Mode of operation
     BIT1 MultFr optional, // Multiple frame establishment support in data link
     BIT1 Hdr optional, // Rate adaption header/no header
     BIT1 ExtI_7 optional, // Extension indicator (0/1)
     BIT3 Prty optional, // Parity INFormation
     BIT2 NDatBit optional, // Number of data bits excluding parity bit if pres.
     BIT2 NStpBit optional, // Number of stop bits
     BIT1 ExtI_8 optional, // Extension indicator (1)
     BIT6 MdmTyp optional, // Modem type
     BIT1 DupMod optional, // Mode duplex
     BIT1 ExtI_9 optional, // Extension indicator (1)
     BIT5 UInf2 optional, // User INFormation layer 2 protocol
     BIT2 Lay2 optional, // Layer identification
     BIT1 ExtI_10 optional, // Extension indicator (1)
     BIT5 UInf3 optional, // User INFormation layer 3 protocol
     BIT2 Lay3 optional, // Layer identification
     BIT1 ExtI_11 optional // Extension indicator (1)
    } with { variant "" };
*/


//************************************************************************
// User Teleservice Information
// Ericsson Specification Reference: Chapter 2.3.3.75
// Standard Reference ISUP         : Chapter 3.59
//************************************************************************
  type record User_teleservice_information
    {
     BIT8 id,
     INT1 lengthField,

     BIT2 Pres,     // Presentation
     BIT3 Interpr,  // Interpretation
     BIT2 CodS,     // Coding standard
     BIT1 ExtI_1,   // Extention indicator, always 1
     BIT7 HLChrInf,   // High layer characteristics identification
     BIT1 ExtI_2,     // Extension indicator, (0/1)
     BIT7 ExHLChrInf optional, // Extended high layer characteristics id.
     BIT1 ExtI_3 optional      // Extention indicator, always 1
    } with { variant (ExHLChrInf) "PRESENCE(ExtI_2 = '0'B)";
             variant (ExtI_3) "PRESENCE(ExtI_2 = '0'B)";
             variant "PRESENCE( id = '00110100'B)";
             variant (lengthField)"LENGTHTO(Pres,Interpr,CodS,ExtI_1,HLChrInf,
                                            ExtI_2,ExHLChrInf,ExtI_3)";
           };

//************************************************************************
// User To User Indicators
// Ericsson Specification Reference: Chapter 2.3.3.76
// Standard Reference ISUP         : Chapter 3.60
//************************************************************************
  type record User_to_user_indicators
    {
     BIT8 id,
     INT1 lengthField,

     BIT1 Type, //  type
     BIT2 Service1, // Service 1
     BIT2 Service2, // Service 2
     BIT2 Service3, // Service 3
     BIT1 NetworkDiscardInd //Network discard ind. (spare if Type = request)
    } with { variant "PRESENCE( id = '00101010'B)";
             variant (lengthField)"LENGTHTO(Type,Service1,Service2,Service3,
                                            NetworkDiscardInd)";
           };


//************************************************************************
// User To User Information
// Ericsson Specification Reference: Chapter 2.3.3.77
// Standard Reference ISUP         : Chapter 3.61
//************************************************************************
  type record User_to_user_information_OPT
    {
     BIT8 id,
     INT1 lengthField,

     OCTN UserInfo
    } with { variant "PRESENCE( id = '00100000'B)";
             variant (lengthField)"LENGTHTO(UserInfo)";
           };

  type record User_to_user_information    
    {
     INT1 lengthField,

     OCTN UserInfo
    } with { variant (lengthField)"LENGTHTO(UserInfo)";
           };


//************************************************************************
// Global Call Reference
// GCR included in ISUP market variants based on EED/X 1056-174 Uen - Global
// Call reference for ISUP and BICC, MSC R12.
// It is used in the IAM message.  See section 3.1.1 for details.
//************************************************************************
  type record Global_call_reference
    {
     BIT8 id,
     INT1 lengthField,

     INT1 netwIdLenInd, // Network ID length indicator
     OCTN netwId, // Network ID
     INT1 nodeIdLenInd, // Node ID length indicator
     OCTN nodeId, // Node ID
     INT1 callRefLenInd, // Call Reference length indicator
     OCTN callRefId // Call Reference ID
    } with { variant (netwIdLenInd) "LENGTHTO (netwId)";
             variant (nodeIdLenInd) "LENGTHTO(nodeId)";
             variant (callRefLenInd) "LENGTHTO (callRefId)";
             variant "PRESENCE( id = '10100100'B)";
             variant (lengthField)"LENGTHTO(netwIdLenInd,netwId,nodeIdLenInd,
                                            nodeId,callRefLenInd,callRefId)";
           };
} // END Group ISUP_parameters


//************************************************************************
//************************************************************************
//************************************************************************
//************************************************************************
//************************************************************************


//************************************************************************
// ACM - Address complete
// Ericsson Specification Reference: Chapter 2.2.2.1
// Standard Reference ISUP         : Chapter 4, Table 21
//************************************************************************
  type set ACM_optional_part
    {
     Optional_backward_call_indicators      optBackwardCallInd optional,
     Cause_indicators_OPT                   causeInd optional,
     User_to_user_indicators                userToUserInd optional,
     User_to_user_information_OPT           userToUserInfo optional,
     Access_transport                       accessTransport optional,
     Generic_notification_indicator_set     genericNotificationInd optional,
     Transmission_medium_used               transMediumUsed optional,
     Access_delivery_information            accessDeliveryInfo optional,
     Redirection_number                     redirectionNum optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,
     Call_diversion_information             callDiversionInfo optional,
     Network_specific_facility              networkFacility optional,
     Redirection_number_restriction         redirectionNumRest optional,
     Route_identity                         routeIdentity optional,
     Call_transfer_treatment_indicators     callTransferTreatmentInd optional,
     Conference_treatment_indicators        conferenceTreatmentInd optional,

     Call_reference                         callReference optional,
     Echo_control_information               echoControlInfo optional,
     Remote_operations                      remoteOperations optional,
     Service_activation                     serviceActivation optional,
     UID_action_indicators                  UIDAcInd optional,
     Application_transport_parameter_set    ATPP optional,
     CCNR_possible_indicator                CCNRP optional,
     HTR_information                        HTRInfo optional,
     Pivot_routing_backward_information     PRBI optional,
     Redirect_status                        RedirSt optional
    } with { variant (ATPP,genericNotificationInd) "REPEATABLE(yes)";};


  type record ACM_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Backward_call_indicators       backwardCallInd,
     Pointer                        opt_part_ptr,
     ACM_optional_part              acmOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (opt_part_ptr) "POINTERTO (acmOptionals)"};


//************************************************************************
// ANM - Answer
// Ericsson Specification Reference: Chapter 2.2.2.2
// Standard Reference ISUP         : Chapter 4, Table 22
//************************************************************************
  type set ANM_optional_part
    {
     Backward_call_indicators_OPT           backwardCallInd optional,
     Optional_backward_call_indicators      optBackwardCallInd optional,
     User_to_user_indicators                userToUserInd optional,
     User_to_user_information_OPT           userToUserInfo optional,
     Connected_number                       connectedNum optional,
     Access_transport                       accessTransport optional,
     Access_delivery_information            accessDeliveryInfo optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,
     Backward_GVNS                          backwardGVNS optional,
     Call_history_information               callHistoryInfo optional,
     Generic_number_set                     genericNum optional,
     Transmission_medium_used               transMediumUsed optional,
     Network_specific_facility              networkFacility optional,
     Redirection_number_restriction         redirectionNumRest optional,
     Call_transfer_treatment_indicators     callTransferTreatmentInd optional,
     Conference_treatment_indicators        conferenceTreatmentInd optional,

     Call_reference                         callReference optional,
     Generic_notification_indicator_set     genericNotificationInd optional,
     Remote_operations                      remoteOperations optional,
     Redirection_number                     redirectionNum optional,
     Service_activation                     serviceActivation optional,
     Echo_control_information               echoControlInfo optional,
     Display_information                    DisInf optional,
     Application_transport_parameter_set    ATPP optional,
     Pivot_routing_backward_information     PRBI optional,
     Redirect_status                        RedirSt optional
    } with { variant (ATPP,genericNotificationInd,genericNum) "REPEATABLE(yes)";};


  type record ANM_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     ANM_optional_part              anmOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (opt_part_ptr)"POINTERTO (anmOptionals)";
           };


//************************************************************************
// APM - Application Transport
// Standard Reference ISUP         : Chapter 4, Table 51
//************************************************************************
  type set APM_optional_part
    {
     Message_compatibility_information      MCI optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,
     Application_transport_parameter_set    ATPP optional
    } with { variant (ATPP) "REPEATABLE(yes)";};


  type record APM_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     APM_optional_part              apmOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (opt_part_ptr) "POINTERTO (apmOptionals)";
           };


//************************************************************************
// BLO - Blocking
// Ericsson Specification Reference: Chapter 2.2.2.3
// Standard Reference ISUP         : Chapter 4, Table 39
//************************************************************************
  type record BLO_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType
    } with { variant "" };


//************************************************************************
// BLA - Blocking Acknowledgement
// Ericsson Specification Reference: Chapter 2.2.2.4
// Standard Reference ISUP         : Chapter 4, Table 39
//************************************************************************
  type record BLA_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType
    } with { variant "" };


//************************************************************************
// CPG - Call Progress
// Ericsson Specification Reference: Chapter 2.2.2.5
// Standard Reference ISUP         : Chapter 4, Table 23
//************************************************************************
  type set CPG_optional_part
    {
     Cause_indicators_OPT                   causeInd optional,
     Backward_call_indicators_OPT           backwardCallInd optional,
     Optional_backward_call_indicators      optBackwardCallInd optional,
     Access_transport                       accessTransport optional,
     User_to_user_indicators                userToUserInd optional,
     Redirection_number                     redirectionNum optional,
     User_to_user_information_OPT           userToUserInfo optional,
     Generic_notification_indicator_set     genericNotificationInd optional,
     Network_specific_facility              networkFacility optional,
     Transmission_medium_used               transMediumUsed optional,
     Access_delivery_information            accessDeliveryInfo optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,
     Call_diversion_information             callDiversionInfo optional,
     Redirection_number_restriction         redirectionNumRest optional,
     Call_transfer_number                   callTransferNumber optional,
     Call_transfer_treatment_indicators     callTransferTreatmentInd optional,
     Conference_treatment_indicators        conferenceTreatmentInd optional,

     Call_reference                         callReference optional,
     Remote_operations                      remoteOperations optional,
     Service_activation                     serviceActivation optional,
     Echo_control_information               echoControlInfo optional,
     Connected_number                       connectedNum optional,
     Backward_GVNS                          backwardGVNS optional,
     Generic_number_set                     genericNum optional,
     Call_history_information               callHistoryInfo optional,
     UID_action_indicators                  UIDAcInd optional,
     Application_transport_parameter_set    ATPP optional,
     CCNR_possible_indicator                CCNRP optional,
     Pivot_routing_backward_information     PRBI optional,
     Redirect_status                        RedirSt optional
    } with { variant (ATPP,genericNotificationInd,genericNum) "REPEATABLE(yes)";};


  type record CPG_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Event_information              eventInfo,
     Pointer                        opt_part_ptr,
     CPG_optional_part              cpgOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (opt_part_ptr) "POINTERTO (cpgOptionals)";
           };


//************************************************************************
// CRG - Charge Information
// Ericsson Specification Reference: Chapter 2.2.2.6
//************************************************************************
  type set CRG_optional_part
    {
     Meter_pulse_indicator                  meterPulseInd optional,
     Tariff_indicator                       tariffInd optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional
    } with { variant "" };


  type record CRG_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     CRG_optional_part              crgOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (opt_part_ptr)"POINTERTO (crgOptionals)";
           };


//************************************************************************
// CGB - Circuit Group Blocking
// Ericsson Specification Reference: Chapter 2.2.2.7
// Standard Reference ISUP         : Chapter 4, Table 40
//************************************************************************
  type record CGB_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Circuit_group_supervision_message_type_indicator  circuitGroupSupervMsgInd,
     Pointer                        var_part_ptr,
     Range_and_status               rangeAndStatus
    } with { variant (var_part_ptr) "POINTERTO (rangeAndStatus)";
           };


//************************************************************************
// CGBA - Circuit Group Blocking Acknowledgement
// Ericsson Specification Reference: Chapter 2.2.2.8
// Standard Reference ISUP         : Chapter 4, Table 40
//************************************************************************
  type record CGBA_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Circuit_group_supervision_message_type_indicator  circuitGroupSupervMsgInd,
     Pointer                        var_part_ptr,
     Range_and_status               rangeAndStatus
    } with { variant (var_part_ptr) "POINTERTO (rangeAndStatus)";
           };


//************************************************************************
// CQM - Circuit Group Query
// Ericsson Specification Reference: Chapter 2.2.2.9
// Standard Reference ISUP         : Chapter 4, Table 41
//************************************************************************
  type record CQM_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        var_part_ptr,
     Range_and_status               rangeAndStatus
     } with { variant (var_part_ptr) "POINTERTO (rangeAndStatus)";
            };


//************************************************************************
// CQR - Circuit Group Query Response
// Ericsson Specification Reference: Chapter 2.2.2.10
// Standard Reference ISUP         : Chapter 4, Table 24
//************************************************************************
  type record CQR_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        var1_part_ptr,
     Pointer                        var2_part_ptr,
     Range_and_status               rangeAndStatus,
     Circuit_state_indicator        circuitStateInd
     } with { variant (var1_part_ptr) "POINTERTO (rangeAndStatus)";
              variant (var2_part_ptr) "POINTERTO (circuitStateInd)";
            };


//************************************************************************
// GRS - Circuit Group Reset
// Ericsson Specification Reference: Chapter 2.2.2.11
// Standard Reference ISUP         : Chapter 4, Table 41
//************************************************************************
  type record GRS_parameters
     {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        var_part_ptr,
     Range_and_status               rangeAndStatus
     } with { variant (var_part_ptr) "POINTERTO (rangeAndStatus)";
            };


//************************************************************************
// GRA - Circuit Group Reset Acknowledgement
// Ericsson Specification Reference: Chapter 2.2.2.12
// Standard Reference ISUP         : Chapter 4, Table 25
//************************************************************************
  type record GRA_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        var_part_ptr,
     Range_and_status               rangeAndStatus
     } with { variant (var_part_ptr) "POINTERTO (rangeAndStatus)";
            };

//************************************************************************
// GGU - Circuit Group Unblocking
// Ericsson Specification Reference: Chapter 2.2.2.13
// Standard Reference ISUP         : Chapter 4, Table 40
//************************************************************************
  type record CGU_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Circuit_group_supervision_message_type_indicator  circuitGroupSupervMsgInd,
     Pointer                        var_part_ptr,
     Range_and_status               rangeAndStatus
    } with { variant (var_part_ptr) "POINTERTO (rangeAndStatus)";
           };


//************************************************************************
// CGUA - Circuit Group Unblocking Acknowledgement
// Ericsson Specification Reference: Chapter 2.2.2.14
// Standard Reference ISUP         : Chapter 4, Table 40
//************************************************************************
  type record CGUA_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Circuit_group_supervision_message_type_indicator  circuitGroupSupervMsgInd,
     Pointer                        var_part_ptr,
     Range_and_status               rangeAndStatus
    } with { variant (var_part_ptr)"POINTERTO (rangeAndStatus)";
           };


//************************************************************************
// CFN - Confusion
// Ericsson Specification Reference: Chapter 2.2.2.15
// Standard Reference ISUP         : Chapter 4, Table 26
//************************************************************************
  type record CFN_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        var_part_ptr,
     Pointer                        opt_part_ptr,
     Cause_indicators               causeInd,
     End_of_optional_parameters_indicator endOfOp
    } with { variant (var_part_ptr)"POINTERTO (causeInd)";
             variant (opt_part_ptr)"POINTERTO (endOfOp)";
           };


//************************************************************************
// CON - Connect
// Ericsson Specification Reference: Chapter 2.2.2.16
// Standard Reference ISUP         : Chapter 4, Table 27
//************************************************************************
  type set CON_optional_part
    {
     Optional_backward_call_indicators      optBackwardCallInd optional,
     Backward_GVNS                          backwardGVNS optional,
     Connected_number                       connectedNum optional,
     User_to_user_indicators                userToUserInd optional,
     User_to_user_information_OPT           userToUserInfo optional,
     Access_transport                       accessTransport optional,
     Network_specific_facility              networkFacility optional,
     Transmission_medium_used               transMediumUsed optional,
     Access_delivery_information            accessDeliveryInfo optional,
     Call_history_information               callHistoryInfo optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,
     Generic_number_set                     genericNum optional,
     Route_identity                         routeIdentity optional,
     Redirection_number_restriction         redirectionNumRest optional,
     Call_transfer_treatment_indicators     callTransferTreatmentInd optional,
     Conference_treatment_indicators        conferenceTreatmentInd optional,

     Call_reference                         callReference optional,
     Generic_notification_indicator_set     genericNotificationInd optional,
     Remote_operations                      remoteOperations optional,
     Echo_control_information               echoControlInfo optional,
     Service_activation                     serviceActivation optional,
     Application_transport_parameter_set    ATPP optional,
     HTR_information                        HTRInfo optional,
     Pivot_routing_backward_information     PRBI optional,
     Redirect_status                        RedirSt optional
    } with { variant (ATPP,genericNotificationInd,genericNum) "REPEATABLE(yes)";};


  type record CON_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Backward_call_indicators       backwardCallInd,
     Pointer                        opt_part_ptr,
     CON_optional_part              conOptionals optional,
     End_of_optional_parameters_indicator endOfOp  optional
    } with { variant (opt_part_ptr) "POINTERTO (conOptionals)";
           };


//************************************************************************
// COT - Continuity
// Ericsson Specification Reference: Chapter 2.2.2.17
// Standard Reference ISUP         : Chapter 4, Table 28
//************************************************************************
  type record COT_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Continuity_indicators          continuityInd
    } with { variant "" };


//************************************************************************
// CCR - Continuity Check Request
// Ericsson Specification Reference: Chapter 2.2.2.18
// Standard Reference ISUP         : Chapter 4, Table 39
//************************************************************************
  type record CCR_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType
    } with { variant "" };


//************************************************************************
// FAC - Facility
// Ericsson Specification Reference: Chapter 2.2.2.19
// Standard Reference ISUP         : Chapter 4, Table 45
//************************************************************************
  type set FAC_optional_part
    {
     Message_compatibility_information      messageCompatibilityInfo optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,
     Service_activation                     serviceActivation optional,
     Call_transfer_number                   callTransferNumber optional,
     Access_transport                       accessTransport optional,
     Generic_notification_indicator_set     genericNotificationInd optional,

     Remote_operations                      remoteOperations optional,
     Redirection_number                     redirectionNum optional,
     Pivot_routing_indicators               PRInd optional,
     Pivot_status                           PSts optional,
     Pivot_counter                          PCount optional,
     Pivot_routing_backward_information     PRBI optional,
     Redirect_status                        RedirSt optional
    } with { variant (genericNotificationInd) "REPEATABLE(yes)";};


  type record FAC_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     FAC_optional_part              facOptionals optional,
     End_of_optional_parameters_indicator endOfOp   optional
    } with { variant (opt_part_ptr)"POINTERTO (facOptionals)";
           };


//************************************************************************
// FAA - Facility Accepted
// Ericsson Specification Reference: Chapter 2.2.2.20
// Standard Reference ISUP         : Chapter 4, Table 42
//************************************************************************
  type set FAA_optional_part
    {
     User_to_user_indicators                userToUserInd optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,

     Call_reference                         callReference optional,
     Connection_request                     connectionRequest optional
    } with { variant "" };


  type record FAA_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Facility_indicator             facilityInd,
     Pointer                        opt_part_ptr,
     FAA_optional_part              faaOptionals optional,
     End_of_optional_parameters_indicator endOfOp  optional
    } with { variant (opt_part_ptr) "POINTERTO (faaOptionals)";
           };


//************************************************************************
// FRJ - Facility Reject
// Ericsson Specification Reference: Chapter 2.2.2.21
// Standard Reference ISUP         : Chapter 4, Table 29
//************************************************************************
  type set FRJ_optional_part
    {
     User_to_user_indicators                userToUserInd optional
    }  with { variant "" };


  type record FRJ_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Facility_indicator             facilityInd,
     Pointer                        var_part_ptr,
     Pointer                        opt_part_ptr,
     Cause_indicators               causeInd,
     FRJ_optional_part              frjOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (var_part_ptr) "POINTERTO (causeInd)";
             variant (opt_part_ptr) "POINTERTO (frjOptionals)";
           };


//************************************************************************
// FAR - Facility Request
// Ericsson Specification Reference: Chapter 2.2.2.22
// Standard Reference ISUP         : Chapter 4, Table 42
//************************************************************************
  type set FAR_optional_part
    {
     User_to_user_indicators                userToUserInd optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,

     Call_reference                         callReference optional,
     Connection_request                     connectionRequest optional
    } with { variant "" };


  type record FAR_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Facility_indicator             facilityInd,
     Pointer                        opt_part_ptr,
     FAR_optional_part              farOptionals optional,
     End_of_optional_parameters_indicator endOfOp  optional
    } with { variant (opt_part_ptr) "POINTERTO (farOptionals)";
           };


//************************************************************************
// FOT - Forward Transfer
// Ericsson Specification Reference: Chapter 2.2.2.23
// Standard Reference ISUP         : Chapter 4, Table 37
//************************************************************************
  type set FOT_optional_part
    {
     Parameter_compatibility_information    paramCompatibilityInfo optional,

     Call_reference                         callReference optional
    } with { variant "" };


  type record FOT_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     FOT_optional_part              fotOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (opt_part_ptr) "POINTERTO (fotOptionals)";
           };


//************************************************************************
// IDR - Identification Request
// Ericsson Specification Reference: Chapter 2.2.2.24
// Standard Reference ISUP         : Chapter 4, Table 47
//************************************************************************
  type set IDR_optional_part
    {
     MCID_request_indicators                MCIDReqInd optional,
     Message_compatibility_information      messageCompatibilityInfo optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional
    } with { variant "" };


  type record IDR_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     IDR_optional_part              idrOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (opt_part_ptr) "POINTERTO (idrOptionals)";
           };


//************************************************************************
// IRS - Identification Response
// Ericsson Specification Reference: Chapter 2.2.2.25
// Standard Reference ISUP         : Chapter 4, Table 48
//************************************************************************
  type set IRS_optional_part
    {
     MCID_response_indicators               MCIDRpInd optional,
     Message_compatibility_information      messageCompatibilityInfo optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,
     Calling_party_number                   callingPartyNum optional,
     Access_transport                       accessTransport optional,
     Generic_number_set                     genericNum optional,
     Charged_party_identification           ChPId optional
    } with { variant (genericNum) "REPEATABLE(yes)";};


  type record IRS_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     IRS_optional_part              irsOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (opt_part_ptr) "POINTERTO (irsOptionals)";
           };


//************************************************************************
// INF - Information
// Ericsson Specification Reference: Chapter 2.2.2.26
// Standard Reference ISUP         : Chapter 4, Table 30
//************************************************************************
  type set INF_optional_part
    {
     Calling_partys_category_OPT            callingPartyCat optional,
     Calling_party_number                   callingPartyNum optional,
     Access_transport                       accessTransport optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,
     Network_specific_facility              networkFacility optional,
     Display_information                    displayInfo optional,

     Call_reference                         callReference optional,
     Connection_request                     connectionRequest optional
    } with { variant "" };


  type record  INF_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Information_indicators         informationInd,
     Pointer                        opt_part_ptr,
     INF_optional_part              infOptionals optional,
     End_of_optional_parameters_indicator endOfOp  optional
    } with { variant (opt_part_ptr) "POINTERTO (infOptionals)";
           };


//************************************************************************
// INR - Information Request
// Ericsson Specification Reference: Chapter 2.2.2.27
// Standard Reference ISUP         : Chapter 4, Table 31
//************************************************************************
  type set INR_optional_part
    {
     Network_specific_facility              networkFacility optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,

     Call_reference                         callReference optional
    } with { variant "" };


  type record  INR_parameters
    {
     Circuit_identification_code        cic optional,
     ISUP_Message_type                  messageType,
     Information_request_indicators     InfRqInd,
     Pointer                            opt_part_ptr,
     INR_optional_part                  inrOptionals optional,
     End_of_optional_parameters_indicator endOfOp   optional
    } with { variant (opt_part_ptr) "POINTERTO (inrOptionals)";
           };


//************************************************************************
// IAM - Initial Address Message
// Ericsson Specification Reference: Chapter 2.2.2.28
// Standard Reference ISUP         : Chapter 4, Table 32
//************************************************************************
  type set IAM_optional_part
    {
     Transit_network_selection              transitNetworkSel optional,
     Calling_party_number                   callingPartyNum optional,
     Optional_forward_call_indicators       optForwardCallInd optional,
     Redirecting_number                     redirectingNum optional,
     Redirection_information                redirectionInfo optional,
     Closed_user_group_interlock_code       cUGInterlockCode optional,
     Original_called_number                 originalCalledNum optional,
     User_to_user_information_OPT           userToUserInfo optional,
     Access_transport                       accessTransport optional,
     User_service_information               userServiceInfo optional,
     User_to_user_indicators                userToUserInd optional,
     Generic_number_set                     genericNum optional,
     Propagation_delay_counter              propDelayCounter optional,
     User_service_information_prime         userServiceInfoPrime optional,
     Network_specific_facility              networkFacility optional,
     Generic_digits_set                     genericDigits optional,
     Origination_ISC_point_code             origISCPointCode optional,
     User_teleservice_information           userTeleServiceInfo optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,
     MLPP_precedence                        mLPPprecedence optional,
     Route_identity                         routeIdentity optional,
     Transmission_medium_requirement_prime  transMediumReqPrime optional,
     Location_number                        locationNum optional,
     Forward_GVNS                           forwardGVNS optional,
     Freephone_indicators                   freePhoneInd optional,
     CCSS_parameter                         ccssPar optional,
     Distributed_dynamic_routing_indicators distrDynRoutInd optional,
     Additional_charging_information        addChargeInfo optional,
     Additional_routing_information         addRoutInfo optional,
     Correlation_id                         correlationId optional,
     SCF_id                                 SCFId optional,
     Call_transfer_treatment_indicators     callTransferTreatmentInd optional,
     Conference_treatment_indicators        conferenceTreatmentInd optional,
     Call_offering_treatment_indicators     callOfferingTreatmentInd optional,
     Call_diversion_treatment_indicators    callDiversionTreatmentInd optional,
     Network_call_reference                 netwCallRef optional,
     Calling_name_identity                  cgNameId optional,
     Hop_counter                            HopCnt optional,

     Call_reference                         callReference optional,
     Connection_request                     connectionRequest optional,
     Remote_operations                      remoteOperations optional,
     Generic_notification_indicator_set     genericNotificationInd optional,
     Service_activation                     serviceActivation optional,
     Network_management_controls            NetManCon optional,
     Circuit_assignment_map                 CctAssMap optional,
     Called_IN_number                       CdINnum optional,
     UID_capability_indicators              UIDcapInd optional,
     Echo_control_information               echoControlInfo optional,
     Collect_call_request                   ColCReq optional,
     Application_transport_parameter_set    ATPP optional,
     Pivot_capability                       PivCap optional,
     Called_directory_number                CDirNb optional,
     Original_called_IN_number              OCINNb optional,
     Calling_geodetic_location              CGeoLoc optional,
     Network_routing_number                 NRNb optional,
     Query_on_release_capability            QoRCap optional,
     Pivot_counter                          PCount optional,
     Pivot_routing_forward_information      PRFI optional,
     Redirect_capability                    RedirCap optional,
     Redirect_counter                       RedirCount optional,
     Redirect_status                        RedirSt optional,
     Redirect_forward_information           RedirFI optional,
     Number_portability_forward_information NPFI optional,
     Global_call_reference                  GCRef optional
    } with { variant (ATPP,genericNotificationInd,genericNum,genericDigits) 
                      "REPEATABLE(yes)";};


  type record IAM_parameters
    {
     Circuit_identification_code          cic optional,
     ISUP_Message_type                    messageType,
     Nature_of_connection_indicators      natureOfConnInd,
     Forward_call_indicators              forwardCallInd,
     Calling_partys_category              callingPartyCat,
     Transmission_medium_requirement      transmissionMediumReq,
     Pointer                              var_part_ptr,
     Pointer                              opt_part_ptr,
     Called_party_number                  calledPartyNum,
     IAM_optional_part                    iamOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (var_part_ptr) "POINTERTO (calledPartyNum)";
             variant (opt_part_ptr) "POINTERTO (iamOptionals)";
           };


//************************************************************************
// IAM_PTSO - Initial Address Message
// Ericsson Specification Reference: Chapter 2.2.2.28
// Standard Reference ISUP         : Chapter 4, Table 32
//************************************************************************
/*
  type record PAR_GD
    {
     OCT1 parameter_type,
     OCT1 lengthf,
     Generic_digits parameter_contents
    } with { variant "" };


  type record PAR_OISCP
    {
     OCT1 parameter_type,
     OCT1 lengthf,
     Origination_ISC_point_code parameter_contents
    } with { variant "" };


  type record PAR_AT
    {
     OCT1 parameter_type,
     OCT1 lengthf,
     Access_transport parameter_contents
    } with { variant "" };


  type record PAR_CPN
    {
     OCT1 parameter_type,
     OCT1 lengthf,
     Called_party_number parameter_contents
    } with { variant "" };


  type record PAR_CGPN
    {
     OCT1 parameter_type,
     OCT1 lengthf,
     Called_party_number parameter_contents
    } with { variant "" };



  type set IAM_PTSO_optional_part
    {
     PAR_CGPN  callingPartyNum,
     PAR_AT    accessTransport,
     PAR_GD    genericDigits,
     PAR_OISCP origISCPointCode
    } with { variant "" };


type record IAM_PTSO_parameters
    {
     Circuit_identification_code     cic optional,
     ISUP_Message_type               messageType,
     Nature_of_connection_indicators natureOfConnInd,
     Forward_call_indicators             forwardCallInd,
     Calling_partys_category             callingPartyCat,
     Transmission_medium_requirement     transmissionMediumReq,
     Pointer                         var_part_ptr,
     Pointer                         opt_part_ptr,
     INT1                            calledPartyNum_length,
     PAR_CPN                         calledPartyNum,
     IAM_PTSO_optional_part          iamOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (var_part_ptr) "POINTERTO (calledPartyNum_length)";
             variant (opt_part_ptr) "POINTERTO (iamOptionals)";
             variant (calledPartyNum_length) "LENGTHTO (calledPartyNum)";
           };

*/


//************************************************************************
// LPA - Loop Back Acknowledgement
// Standard Reference ISUP         : Chapter 4, Table 39
//************************************************************************
  type record LPA_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType
    } with { variant "" };


//************************************************************************
// LOP - Loop Prevention
// Ericsson Specification Reference: Chapter 2.2.2.29
// Standard Reference ISUP         : Chapter 4, Table 50
//************************************************************************
  type set LOP_optional_part
    {
     Message_compatibility_information      messageCompatibilityInfo optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,
     Call_transfer_reference                callTransferReference optional,
     Loop_prevention_indicators             loopPreventionInd optional
    } with { variant "" };


  type record LOP_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     LOP_optional_part              lopOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (opt_part_ptr) "POINTERTO (lopOptionals)";
           };


//************************************************************************
// NRM - Network Resource Management
// Standard Reference ISUP         : Chapter 4, Table 46
//************************************************************************
  type set NRM_optional_part
    {
     Message_compatibility_information      messageCompatibilityInfo optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,
     Echo_control_information               echoControlInfo optional
    } with { variant "" };


  type record NRM_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     NRM_optional_part              nrmOptionals optional,
     End_of_optional_parameters_indicator endOfOp  optional
    } with { variant (opt_part_ptr) "POINTERTO (nrmOptionals)";
           };


//************************************************************************
// OLM - Overload
// Standard Reference ISUP         : Chapter 4, Table 39
//************************************************************************
  type record OLM_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType
    } with { variant "" };



//************************************************************************
// OPQ - Operator Queue   FS: 2.2.2.32 / 61/15517-CRT 212 31 Uen Rev. A
//************************************************************************
/*
  type set OPQ_optional_part
    {
     Message_compatibility_information messageCompatibilityInfo optional
    } with { variant "" };

  type record OPQ_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     OPQ_optional_part           opqOptionals optional,
     End_of_optional_parameters_indicator endOfOp   optional
    } with { variant (opt_part_ptr) "POINTERTO (opqOptionals)" };

*/


//************************************************************************
// OPR - Operator
// Ericsson Specification Reference: Chapter 2.2.2.30
//************************************************************************
  type set OPR_optional_part
    {
     Message_compatibility_information      messageCompatibilityInfo optional
    } with { variant "" };


  type record OPR_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     OPR_optional_part              oprOptionals optional,
     End_of_optional_parameters_indicator endOfOp   optional
    } with { variant (opt_part_ptr) "POINTERTO (oprOptionals)";
           };


//************************************************************************
// PAM - Pass-along
// Standard Reference ISUP         : Chapter 4, Table 43
//************************************************************************
  type record PAM_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     OCTN                           contents optional
    } with { variant (opt_part_ptr) "POINTERTO (contents)";
           };


//************************************************************************
// PRI - Pre-release Information
// Standard Reference ISUP         : Chapter 4, Table 52
//************************************************************************
  type set PRI_optional_part
    {
     Message_compatibility_information      messageCompatibilityInfo optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,
     Optional_forward_call_indicators       optForwardCallInd optional,
     Optional_backward_call_indicators      optBackwardCallInd optional,
     Application_transport_parameter_set    ATPP optional
    } with { variant (ATPP)"REPEATABLE(yes)";};


  type record PRI_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     PRI_optional_part              priOptionals optional,
     End_of_optional_parameters_indicator endOfOp  optional
    } with { variant (opt_part_ptr) "POINTERTO (priOptionals)";
           };


//************************************************************************
// REL - Release
// Ericsson Specification Reference: Chapter 2.2.2.31
// Standard Reference ISUP         : Chapter 4, Table 33
//************************************************************************
  type set REL_optional_part
    {
     Access_transport                       accessTransport optional,
     User_to_user_indicators                userToUserInd optional,
     User_to_user_information_OPT           userToUserInfo optional,
     Automatic_congestion_level             autCongLevel optional,
     Network_specific_facility              networkFacility optional,
     Access_delivery_information            accessDeliveryInfo optional,
     Redirection_number                     redirectionNum optional,
     Redirection_information                redirectionInfo optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional,

     Signalling_point_code                  sigPointCode optional,
     Display_information                    displayInfo optional,
     Remote_operations                      remoteOperations optional,
     HTR_information                        HTRInfo optional,
     Redirect_counter                       RedirCount optional,
     Redirection_number_restriction         redirectionNumRest optional,
     Redirect_backward_information          RedirBI optional
    } with { variant "" };

  type record REL_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        var_part_ptr,
     Pointer                        opt_part_ptr,
     Cause_indicators               causeInd,
     REL_optional_part              relOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (var_part_ptr) "POINTERTO (causeInd)";
             variant (opt_part_ptr) "POINTERTO (relOptionals)";
           };


//************************************************************************
// RLC - Release Complete
// Ericsson Specification Reference: Chapter 2.2.2.32
// Standard Reference ISUP         : Chapter 4, Table 34
//************************************************************************
  type set RLC_optional_part
    {
     Cause_indicators_OPT                   causeInd optional
    } with { variant "" };


  type record RLC_parameters
     {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     RLC_optional_part              rlcOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (opt_part_ptr) "POINTERTO (rlcOptionals)";
           };


//************************************************************************
// RSC - Reset Circuit
// Ericsson Specification Reference: Chapter 2.2.2.33
// Standard Reference ISUP         : Chapter 4, Table 39
//************************************************************************
  type record RSC_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType
    } with { variant "" };


//************************************************************************
// RES - Resume
// Ericsson Specification Reference: Chapter 2.2.2.34
// Standard Reference ISUP         : Chapter 4, Table 38
//************************************************************************
  type set RES_optional_part
    {
     Parameter_compatibility_information    paramCompatibilityInfo optional,

     Call_reference                         callReference optional
    } with { variant "" };


  type record RES_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Suspend_resume_indicators      SUSRESInd,
     Pointer                        opt_part_ptr,
     RES_optional_part              resOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (opt_part_ptr) "POINTERTO (resOptionals)";
           };


//************************************************************************
// SGM - Segmentation
// Ericsson Specification Reference: Chapter 2.2.2.35
// Standard Reference ISUP         : Chapter 4, Table 49
//************************************************************************
  type set SGM_optional_part
    {
     Access_transport                       accessTransport optional,
     User_to_user_information_OPT           userToUserInfo optional,
     Message_compatibility_information      messageCompatibilityInfo optional,
     Generic_digits_set                     genericDigits optional,
     Generic_notification_indicator_set     genericNotificationInd optional,
     Generic_number_set                     genericNum optional,
     Calling_name_identity                  cgNameId optional
    } with { variant (genericNotificationInd,genericNum,genericDigits) 
                      "REPEATABLE(yes)";};


  type record SGM_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     SGM_optional_part              sgmOptionals optional,
     End_of_optional_parameters_indicator endOfOp   optional
    } with { variant (opt_part_ptr) "POINTERTO (sgmOptionals)";
           };


//************************************************************************
// SCB - Special Clear Back
// Ericsson Specification Reference: Chapter 2.2.2.36
//************************************************************************
  type set SCB_optional_part
    {
     Message_compatibility_information      messageCompatibilityInfo optional
    } with { variant "" };


  type record SCB_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     SCB_optional_part              scbOptionals optional,
     End_of_optional_parameters_indicator endOfOp  optional
    } with { variant (opt_part_ptr) "POINTERTO (scbOptionals)";
           };


//************************************************************************
// SAM - Subsequent Address
// Ericsson Specification Reference: Chapter 2.2.2.37
// Standard Reference ISUP         : Chapter 4, Table 35
//************************************************************************
  type record SAM_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        var_part_ptr,
     Pointer                        opt_part_ptr,
     Subsequent_number              subsequentNum,
     End_of_optional_parameters_indicator endOfOp
    } with { variant (var_part_ptr) "POINTERTO (subsequentNum)";
             variant (opt_part_ptr) "POINTERTO (endOfOp)";
           };


//************************************************************************
// SDM - Subsequent Directory Number
// Standard Reference ISUP         : Chapter 4, Table 53
//************************************************************************
  type set SDM_optional_part
    {
     Subsequent_number_OPT                  subsequentNum optional,
     Message_compatibility_information      messageCompatibilityInfo optional
    } with { variant "" };


  type record SDM_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     SDM_optional_part              sdmOptionals optional,
     End_of_optional_parameters_indicator endOfOp  optional
    } with { variant (opt_part_ptr) "POINTERTO (sdmOptionals)";
           };


//************************************************************************
// SUS - Suspend
// Ericsson Specification Reference: Chapter 2.2.2.38
// Standard Reference ISUP         : Chapter 4, Table 38
//************************************************************************
  type set SUS_optional_part
    {
     Parameter_compatibility_information    paramCompatibilityInfo optional,

     Call_reference                         callReference optional
    } with { variant "" };


  type record SUS_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Suspend_resume_indicators      SUSRESInd,
     Pointer                        opt_part_ptr,
     SUS_optional_part              susOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (opt_part_ptr) "POINTERTO (susOptionals)";
           };


//************************************************************************
// UBL - Unblocking
// Ericsson Specification Reference: Chapter 2.2.2.39
// Standard Reference ISUP         : Chapter 4, Table 39
//************************************************************************
  type record UBL_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType
    } with { variant "" };


//************************************************************************
// UBA - Unblocking Acknowledgement
// Ericsson Specification Reference: Chapter 2.2.2.40
// Standard Reference ISUP         : Chapter 4, Table 39
//************************************************************************
  type record UBA_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType
    } with { variant "" };


//***************************************************************************
// UCIC - Unequipped Circuit Identification Code
// Ericsson Specification Reference: Chapter 2.2.2.41
// Standard Reference ISUP         : Chapter 4, Table 39
//***************************************************************************
  type record UCIC_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType
    } with { variant "" };


//************************************************************************
// UPA - User Part Available
// Ericsson Specification Reference: Chapter 2.2.2.42
// Standard Reference ISUP         : Chapter 4, Table 44
//************************************************************************
  type set UPA_optional_part
    {
     Parameter_compatibility_information    paramCompatibilityInfo optional
    } with { variant ""};


  type record UPA_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     UPA_optional_part              upaOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (opt_part_ptr) "POINTERTO (upaOptionals)";
           };


//************************************************************************
// UPT - User Part Test
// Ericsson Specification Reference: Chapter 2.2.2.43
// Standard Reference ISUP         : Chapter 4, Table 44
//************************************************************************
  type set UPT_optional_part
    {
     Parameter_compatibility_information    paramCompatibilityInfo optional
    } with { variant "" };


  type record UPT_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        opt_part_ptr,
     UPT_optional_part              uptOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (opt_part_ptr) "POINTERTO (uptOptionals)";
           };


//************************************************************************
// USR - User-to-user Information
// Ericsson Specification Reference: Chapter 2.2.2.44
// Standard Reference ISUP         : Chapter 4, Table 36
//************************************************************************
  type set USR_optional_part
    {
     Access_transport                       accessTransport optional,
     Parameter_compatibility_information    paramCompatibilityInfo optional
    } with { variant "" };


  type record USR_parameters
    {
     Circuit_identification_code    cic optional,
     ISUP_Message_type              messageType,
     Pointer                        var_part_ptr,
     Pointer                        opt_part_ptr,
     User_to_user_information       userToUserInfo,
     USR_optional_part              usrOptionals optional,
     End_of_optional_parameters_indicator endOfOp optional
    } with { variant (var_part_ptr) "POINTERTO (userToUserInfo)";
             variant (opt_part_ptr) "POINTERTO (usrOptionals)";
           };


//************************************************************************
//************************************************************************
//************************************************************************
//************************************************************************
//************************************************************************

//************************************************************************
// Top level PDU
//************************************************************************
  type union PDU_ISUP
    {
     ACM_parameters  ISUP_ACM,   //Address complete
     ANM_parameters  ISUP_ANM,   //Answer
     APM_parameters  ISUP_APM,   //Application transport
     BLO_parameters  ISUP_BLO,   //Blocking
     BLA_parameters  ISUP_BLA,   //Blocking acknowledgement
     CPG_parameters  ISUP_CPG,   //Call progress
     CGB_parameters  ISUP_CGB,   //Circuit group BLOcking
     CGBA_parameters ISUP_CGBA,  //Circuit group BLOcking acknowledgement
     CQM_parameters  ISUP_CQM,   //Circuit group query
     CQR_parameters  ISUP_CQR,   //Circuit group query RESponse
     GRS_parameters  ISUP_GRS,   //Circuit group RESet
     GRA_parameters  ISUP_GRA,   //Circuit group RESet acknowledge
     CGU_parameters  ISUP_CGU,   //Circuit group unblocking
     CGUA_parameters ISUP_CGUA,  //Circuit group unblocking acknowledgement
     CRG_parameters  ISUP_CRG,   //Charge INFormation
     CFN_parameters  ISUP_CFN,   //Confusion
     CON_parameters  ISUP_CON,   //Connect
     COT_parameters  ISUP_COT,   //Continuity
     CCR_parameters  ISUP_CCR,   //Continuity check request
     FAC_parameters  ISUP_FAC,   //Facility
     FAA_parameters  ISUP_FAA,   //Facility accepted
     FRJ_parameters  ISUP_FRJ,   //Facility reject
     FAR_parameters  ISUP_FAR,   //Facility request
     FOT_parameters  ISUP_FOT,   //Forward transfer
     IDR_parameters  ISUP_IDR,   //Identification request
     IRS_parameters  ISUP_IRS,   //Identification RESponse
     INF_parameters  ISUP_INF,   //Information
     INR_parameters  ISUP_INR,   //Information request
     IAM_parameters  ISUP_IAM,   //Initial address
//     IAM_PTSO_parameters  ISUP_IAM_PTSO,   //Modified Initial address
     LPA_parameters  ISUP_LPA,   //Loop back acknowlwdgement
     LOP_parameters  ISUP_LOP,   //Loop prevention
     NRM_parameters  ISUP_NRM,   //Network RESource management
     OLM_parameters  ISUP_OLM,   //Overload
//     OPQ_parameters  ISUP_OPQ,   //Operator Queue
     OPR_parameters  ISUP_OPR,   //Operator
     PAM_parameters  ISUP_PAM,   //Pass-along
     PRI_parameters  ISUP_PRI,   //Pre-release INFormation
     REL_parameters  ISUP_REL,   //Release
     RLC_parameters  ISUP_RLC,   //Release complete
     RSC_parameters  ISUP_RSC,   //Reset circuit
     RES_parameters  ISUP_RES,   //Resume
     SGM_parameters  ISUP_SGM,   //Segmentation
     SAM_parameters  ISUP_SAM,   //Subsequent
     SCB_parameters  ISUP_SCB,   //Special Clear Back
     SDM_parameters  ISUP_SDM,   //Subsequent Directory Number
     SUS_parameters  ISUP_SUS,   //Suspend
     UBL_parameters  ISUP_UBL,   //Unblocking
     UBA_parameters  ISUP_UBA,   //Unblocking acknowledge
     UCIC_parameters ISUP_UCIC,  //Unequipped cic
     UPA_parameters  ISUP_UPA,   //User part available
     UPT_parameters  ISUP_UPT,   //User part test
     USR_parameters  ISUP_USR    //User-to-user INFormation
    } with { variant "TAG(
                       ISUP_ACM,   messageType = '00000110'B;
                       ISUP_ANM,   messageType = '00001001'B;
                       ISUP_APM,   messageType = '01000001'B;
                       ISUP_BLO,   messageType = '00010011'B;
                       ISUP_BLA,   messageType = '00010101'B;
                       ISUP_CPG,   messageType = '00101100'B;
                       ISUP_CGB,   messageType = '00011000'B;
                       ISUP_CGBA,  messageType = '00011010'B;
                       ISUP_CQM,   messageType = '00101010'B;
                       ISUP_CQR,   messageType = '00101011'B;
                       ISUP_GRS,   messageType = '00010111'B;
                       ISUP_GRA,   messageType = '00101001'B;
                       ISUP_CGU,   messageType = '00011001'B;
                       ISUP_CGUA,  messageType = '00011011'B;
                       ISUP_CRG,   messageType = '00110001'B;
                       ISUP_CFN,   messageType = '00101111'B;
                       ISUP_CON,   messageType = '00000111'B;
                       ISUP_COT,   messageType = '00000101'B;
                       ISUP_CCR,   messageType = '00010001'B;
                       ISUP_FAC,   messageType = '00110011'B;
                       ISUP_FAA,   messageType = '00100000'B;
                       ISUP_FRJ,   messageType = '00100001'B;
                       ISUP_FAR,   messageType = '00011111'B;
                       ISUP_FOT,   messageType = '00001000'B;
                       ISUP_IDR,   messageType = '00110110'B;
                       ISUP_IRS,   messageType = '00110111'B;
                       ISUP_INF,   messageType = '00000100'B;
                       ISUP_INR,   messageType = '00000011'B;
                       ISUP_IAM,   messageType = '00000001'B;
//                       ISUP_IAM_PTSO,   messageType = '00000001'B;
                       ISUP_LPA,   messageType = '00100100'B;
                       ISUP_LOP,   messageType = '01000000'B;
                       ISUP_NRM,   messageType = '00110010'B;
                       ISUP_OLM,   messageType = '00110000'B;
//                       ISUP_OPQ,   messageType = '11111110'B;
                       ISUP_OPR,   messageType = '11111111'B;
                       ISUP_PAM,   messageType = '00101000'B;
                       ISUP_PRI,   messageType = '01000010'B;
                       ISUP_REL,   messageType = '00001100'B;
                       ISUP_RLC,   messageType = '00010000'B;
                       ISUP_RSC,   messageType = '00010010'B;
                       ISUP_RES,   messageType = '00001110'B;
                       ISUP_SGM,   messageType = '00111000'B;
                       ISUP_SAM,   messageType = '00000010'B;
                       ISUP_SCB,   messageType = '11111001'B;
                       ISUP_SDM,   messageType = '01000011'B;
                       ISUP_SUS,   messageType = '00001101'B;
                       ISUP_UBL,   messageType = '00010100'B;
                       ISUP_UBA,   messageType = '00010110'B;
                       ISUP_UCIC,  messageType = '00101110'B;
                       ISUP_UPA,   messageType = '00110101'B;
                       ISUP_UPT,   messageType = '00110100'B;
                       ISUP_USR,   messageType = '00101101'B)"
           };


//************************************************************************
//************************************************************************
//************************************************************************
//************************************************************************
//************************************************************************
}with{ encode "RAW"}//end module
