-- Module Prenegotiation-Operations-and-Errors (Q.2984:12/1999)
-- See also ITU-T Q.2984 (12/1999)
-- See also the index of all ASN.1 assignments needed in this document

Prenegotiation-Operations-and-Errors {itu-t recommendation q 2984
  prenegotiation-operations-and-errors(1)} DEFINITIONS AUTOMATIC TAGS ::=
BEGIN

EXPORTS preNegotiate, PrenegotiationProposal, prenegotiationAlert;

IMPORTS
  OPERATION, ERROR
    FROM Remote-Operations-Information-Objects {joint-iso-itu-t
      remote-operations(4) informationObjects(5) version1(0)}
  CallSegmentId
    FROM CC-Operations {itu-t recommendation q 2981 cc-operations(1)}
  BearerId
    FROM Call-Object-Class-Definitions {itu-t recommendation q 2981
      call-object-class-definitions(5)};

PrenegotiationOperations OPERATION ::= {preNegotiate | prenegotiationAlert}

preNegotiationOperationsDefinitions OBJECT IDENTIFIER ::=
  {itu-t recommendation q 2984 prenegotiation-operations-definitions(2)}

preNegotiate OPERATION ::= {
  ARGUMENT
    SEQUENCE {prenegotiationProposal  PrenegotiationProposal,
              callAssociation
                CHOICE {callSegmentId  CallSegmentId,
                        callId         CallIdValue}}
  RESULT
    SEQUENCE {prenegotiationProposal  PrenegotiationProposal,
              callAssociation
                CHOICE {callSegmentId  CallSegmentId,
                        callId         CallIdValue}}
  RETURN RESULT    TRUE
  ERRORS           {prenegotiateErrorSimple | prenegotiateErrorItemized}
  SYNCHRONOUS      FALSE
  ALWAYS RESPONDS  TRUE
  CODE             global:{preNegotiationOperationsDefinitions 1}
}

CallIdValue ::= OCTET STRING(SIZE (1..3))

PrenegotiationProposal ::= SEQUENCE OF ConnectionProposal

ConnectionProposal ::= SEQUENCE {
  connectionSubject       ConnectionSubject,
  connectionReference     ConnectionNumber,
  connectionCallRelation  UserMandatory DEFAULT FALSE,
  bearerId                BearerId OPTIONAL
}

ConnectionSubject ::= CHOICE {
  connectionProposal  Proposal,
  connectionAccept    Accept
}

ConnectionNumber ::= INTEGER(1..127)

UserMandatory ::= BOOLEAN

Accept ::= SEQUENCE {accept         BOOLEAN,
                     alternativeNo  INTEGER OPTIONAL
}

-- TRUE  if proposal is accepted and therefore no counterproposal necessary
-- FALSE if proposal is rejected and no counterproposal is possible for UserOptional Connection
-- alternativeNo specifies the accepted alternative
Proposal ::= SEQUENCE {
  bearerEstDirection     BearerEstDirection,
  mostPreferredProposal  MostPreferredProposal,
  alternatives           SEQUENCE OF Alternative OPTIONAL
}

BearerEstDirection ::= ENUMERATED {
  noSpecificRequirements(0), exclusiveByPrenegInvokingEntity(1),
  exclusiveByPrenegRemoteEntity(2), preferablyByPrenegRemoteEntity(3)
}

Alternative ::= SEQUENCE {
  alternativeProposal  SEQUENCE OF ProposedItem,
  alternativeNo        INTEGER(1..127)
}

-- alternativeNo reflects the priority of the alternatives
MostPreferredProposal ::= SEQUENCE OF ProposedItem

-- specifies one connection with minimum proposal
ProposedItem ::= SEQUENCE {
  item                  InformationElement,
  modificationPossible  BOOLEAN OPTIONAL
}

InformationElement ::=
  OCTET STRING(SIZE (4..4095)) -- embedded DSS2 Information Elements
              

-- information elements are listed in 9.2.1.3
-- maximum value depends on information element
preNegotiationOperationsErrors OBJECT IDENTIFIER ::=
  {itu-t recommendation q 2984 prenegotiation-operations-errors(3)}

prenegotiateErrorSimple ERROR ::= {
  PARAMETER  CHOICE {callSegmentId  CallSegmentId,
                     callId         CallIdValue}
  CODE       global:{preNegotiationOperationsErrors 1}
}

prenegotiateErrorItemized ERROR ::= {
  PARAMETER  PrenegotiateErrorItemizedParam
  CODE       global:{preNegotiationOperationsErrors 2}
}

PrenegotiateErrorItemizedParam ::= SEQUENCE {
  callAssociation
    CHOICE {callSegmentId  CallSegmentId,
            callId         CallIdValue},
  listOfConnectionErrors  SEQUENCE OF ConnectionError
}

ConnectionError ::= SEQUENCE {
  connectionSubject
    ENUMERATED {unspecified(0), compatibleAndCurrentlyUnavailable(1),
                incompatible(2), ...
                },
  connectionReference  ConnectionNumber
}

prenegotiationAlert OPERATION ::= {
  RETURN RESULT    FALSE
  SYNCHRONOUS      FALSE
  ALWAYS RESPONDS  FALSE
  CODE             global:{preNegotiationOperationsDefinitions 2}
}

END -- Prenegotiation-Operations-and-Errors
-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D