CC-Operations {itu-t recommendation q 2981 cc-operations(1)} DEFINITIONS AUTOMATIC TAGS ::=
BEGIN

EXPORTS CcOperations, CallSegmentId;

IMPORTS
  OPERATION, ERROR
    FROM Remote-Operations-Information-Objects {joint-iso-itu-t(2)
      remote-operations(4) informationObjects(5) version1(0)}
  PartyNumber
    FROM Addressing-Data-Elements {itu-t recommendation q 932
      addressing-data-elements(7)}
  -- The definition of PartyNumber is reproduced in Appendix II
  CALLCONTROLOBJECTCLASS
    FROM Call-Control-Object-Super-Class {itu-t recommendation q 
      2981 call-control-object-super-class(4)}
  -- The definition of CALLCONTROLOBJECTCLASS is given in subclause 8.2
  call, localPartyEP, remotePartyEP, directCallAssociation,
    remoteCallAssociation, serviceComponent
    FROM Call-Object-Class-Definitions {itu-t recommendation q 2981
      call-object-class-definitions(5)};

-- The definition of call, localPartyEP, remotePartyEP, directCallAssociation, remoteCallAssociation, 
-- serviceComponent is given in subclause 8.3
CcOperations OPERATION ::=
  {callEstablish | callProceeding | callComplete | callRelease |
   callStatus}

ccOperationsDefinitions OBJECT IDENTIFIER ::=
  {itu-t recommendation q 2981 cc-operations-definitions(2)}

-- The callEstablish operation is used to establish a call and its information model. It is a confirmed operation.
callEstablish OPERATION ::= {
  ARGUMENT
    SEQUENCE {callSegmentId             CallSegmentId,
              callDescription           CallDescription,
              bearerEstablAddress       BearerEstablishmentAddress,
              awaitCompleteIndicator    BOOLEAN,
              parameterActionIndicator  ParameterActionIndicator,
              ...}
  RESULT
    SEQUENCE {callSegmentId             CallSegmentId,
              callDescription           CallDescription,
              parameterActionIndicator  ParameterActionIndicator,
              bearerEstablAddress
                BearerEstablishmentAddress OPTIONAL,
              ...}
  ERRORS
    {callDescriptionNotAccepted | unallocatedNumber |
      noUserResponding | noAnswerFromUser | callRejected |
      destinationOutOfOrder | addressIncomplete | networkOutOfOrder |
      temporaryFailure | userBusy | userNotReachable | unspecified}
  CODE      global:{ccOperationsDefinitions 1}}

-- The callProceeding operation is used by the succeeding call control entity to inform the preceding call control entity
-- that the call is in progress and connection establishment may start for this segment. It is an unconfirmed operation.
callProceeding OPERATION ::= {
  ARGUMENT
    SEQUENCE {callSegmentId             CallSegmentId,
              bearerEstablAddress       BearerEstablishmentAddress,
              parameterActionIndicator  ParameterActionIndicator,
              ...}
  RETURN RESULT    FALSE
  ALWAYS RESPONDS  FALSE
  CODE             global:{ccOperationsDefinitions 2}}

-- The callRelease operation is used to release an existing call and its information model. It is a confirmed operation.
callRelease OPERATION ::= {
  ARGUMENT
    SEQUENCE {callSegmentId             CallSegmentId,
              releaseCause              ReleaseCause,
              parameterActionIndicator  ParameterActionIndicator,
              ...}
  RESULT
    SEQUENCE {callSegmentId             CallSegmentId,
              parameterActionIndicator  ParameterActionIndicator,
              ...}
  CODE      global:{ccOperationsDefinitions 3}}

-- The callComplete operation is used to indicate completion of establishment of a call and its information model.
-- It is an unconfirmed operation.
callComplete OPERATION ::= {
  ARGUMENT
    SEQUENCE {callSegmentId             CallSegmentId,
              parameterActionIndicator  ParameterActionIndicator,
              ...}
  RETURN RESULT    FALSE
  ALWAYS RESPONDS  FALSE
  CODE             global:{ccOperationsDefinitions 4}}

-- The callStatus operation is used to report a change to the information model. It is an unconfirmed operation.
callStatus OPERATION ::= {
  ARGUMENT
    SEQUENCE {callSegmentId             CallSegmentId,
              callChangedParameter
                SEQUENCE OF CallChangedParameter,
              parameterActionIndicator  ParameterActionIndicator,
              ...}
  RETURN RESULT    FALSE
  ALWAYS RESPONDS  FALSE
  CODE             global:{ccOperationsDefinitions 5}}

ParameterActionIndicator ::= ENUMERATED {
  clearCallAndItsInformationModel(0), discardApduAndReject(1),
  discardApduNoReject(2),
  discardParameterAndPassApduToApplication(3),
  ignoreParameterAndPassApduToApplication(4)}

-- Used to indicate action to be taken if a parameter in an operation is not recognized
BearerEstablishmentAddress ::=
  PartyNumber

NetworkRelevantObjectClassSet CALLCONTROLOBJECTCLASS ::=
  {call | localPartyEP | remotePartyEP | directCallAssociation |
   remoteCallAssociation, ...}

EndToEndRelevantObjectClassSet CALLCONTROLOBJECTCLASS ::=
  {serviceComponent, ...}

CallDescription ::= SEQUENCE {
  networkRelevantPart
    SEQUENCE OF
      NetworkRelevantObjectDescription{{NetworkRelevantObjectClassSet}},
  endToEndRelevantPart
    SEQUENCE OF
      EndToEndRelevantObjectDescription{{EndToEndRelevantObjectClassSet}}
      OPTIONAL}

NetworkRelevantObjectDescription{CALLCONTROLOBJECTCLASS:NetworkRelevantObjectClassSet}
  ::= SEQUENCE {
  objectReference  INTEGER,
  objectActionInd  ObjectActionIndicator,
  objectStatus     ObjectStatus,
  objectClassId
    CALLCONTROLOBJECTCLASS.&objectClassIdentifier
      ({NetworkRelevantObjectClassSet}),
  objectArgument
    CALLCONTROLOBJECTCLASS.&ArgumentType
      ({NetworkRelevantObjectClassSet}{@objectClassId}) OPTIONAL,
  ...}

EndToEndRelevantObjectDescription{CALLCONTROLOBJECTCLASS:EndToEndRelevantObjectClassSet}
  ::= SEQUENCE {
  objectReference  INTEGER,
  objectActionInd  ObjectActionIndicator,
  objectStatus     ObjectStatus,
  objectClassId
    CALLCONTROLOBJECTCLASS.&objectClassIdentifier
      ({EndToEndRelevantObjectClassSet}),
  objectArgument
    CALLCONTROLOBJECTCLASS.&ArgumentType
      ({EndToEndRelevantObjectClassSet}{@objectClassId}) OPTIONAL,
  ...}

CallChangedParameter ::= SEQUENCE {
  modifiedNetworkRelevantPart
    SEQUENCE OF
      ModifiedNetworkRelevantObjectDescription{{NetworkRelevantObjectClassSet}},
  modifiedEndToEndRelevantPart
    SEQUENCE OF
      ModifiedEndToEndRelevantObjectDescription{{EndToEndRelevantObjectClassSet}}
      OPTIONAL}

ModifiedNetworkRelevantObjectDescription{CALLCONTROLOBJECTCLASS:NetworkRelevantObjectClassSet}
  ::= SEQUENCE {
  operation
    ENUMERATED {deleteObject(0), modifyAttributes(1), ...
                },
  objectReference   INTEGER,
  objectActionInd   ObjectActionIndicator,
  modifiedArgument
    CALLCONTROLOBJECTCLASS.&ArgumentType
      ({NetworkRelevantObjectClassSet}) OPTIONAL}

ModifiedEndToEndRelevantObjectDescription{CALLCONTROLOBJECTCLASS:EndToEndRelevantObjectClassSet}
  ::= SEQUENCE {
  operation
    ENUMERATED {deleteObject(0), modifyAttributes(1), ...
                },
  objectReference   INTEGER,
  objectActionInd   ObjectActionIndicator,
  modifiedArgument
    CALLCONTROLOBJECTCLASS.&ArgumentType
      ({EndToEndRelevantObjectClassSet}) OPTIONAL}

ObjectActionIndicator ::= ENUMERATED {
  clearCall(0), discardNotify(1), discardUnknown(2),
  progressTransit(3), ...
  }

-- Used to indicate action to be taken if an object or object attribute is not recognized
ObjectStatus ::= ENUMERATED {
  mandatory(0), optional(1), conditional(2), ...
  }

CallSegmentId ::= SEQUENCE {
  precedingSideCallSegId   CallSegmentIdComponent,
  succeedingSideCallSegId  CallSegmentIdComponent}

CallSegmentIdComponent ::=
  INTEGER(-2147483648..2147483647) -- 4 octets
         

-- The value 0 is to be used as a null value for the succeeding side call segment identifier 
-- in the callEstablish invoke APDU.
ReleaseCause ::= SEQUENCE {
  causeValue  CauseValue,
  location    Location,
  ...}

CauseValue ::= ENUMERATED {
  callDescriptionNotAccepted(0), normalCallClearing(3),
  temporaryFailure(11), recoveryOnTimerExpiry(12), unspecified(4),
  ...
  }

Location ::= ENUMERATED {
  unspecified(0), user(1), networkLocalCallSegment(2),
  networkNonLocalCallSegment(3), ...
  }

ccOperationsErrors OBJECT IDENTIFIER ::=
  {itu-t recommendation q 2981 cc-operations-errors(3)}

callDescriptionNotAccepted ERROR ::= {
  PARAMETER
    SEQUENCE {callSegmentId    CallSegmentId,
              location         Location,
              callDescription  CallDescription OPTIONAL,
              ...}
  CODE       global:{ccOperationsErrors 1}}

userBusy ERROR ::= {
  PARAMETER
    SEQUENCE {callSegmentId    CallSegmentId,
              location         Location,
              callDescription  CallDescription OPTIONAL,
              ...}
  CODE       global:{ccOperationsErrors 2}}

unallocatedNumber ERROR ::= {
  PARAMETER
    SEQUENCE {callSegmentId  CallSegmentId,
              location       Location,
              ...}
  CODE       global:{ccOperationsErrors 3}}

noUserResponding ERROR ::= {
  PARAMETER
    SEQUENCE {callSegmentId  CallSegmentId,
              location       Location,
              ...}
  CODE       global:{ccOperationsErrors 4}}

noAnswerFromUser ERROR ::= {
  PARAMETER
    SEQUENCE {callSegmentId  CallSegmentId,
              location       Location,
              ...}
  CODE       global:{ccOperationsErrors 5}}

callRejected ERROR ::= {
  PARAMETER
    SEQUENCE {callSegmentId  CallSegmentId,
              location       Location,
              ...}
  CODE       global:{ccOperationsErrors 6}}

destinationOutOfOrder ERROR ::= {
  PARAMETER
    SEQUENCE {callSegmentId  CallSegmentId,
              location       Location,
              ...}
  CODE       global:{ccOperationsErrors 7}}

addressIncomplete ERROR ::= {
  PARAMETER
    SEQUENCE {callSegmentId  CallSegmentId,
              location       Location,
              ...}
  CODE       global:{ccOperationsErrors 8}}

networkOutOfOrder ERROR ::= {
  PARAMETER
    SEQUENCE {callSegmentId  CallSegmentId,
              location       Location,
              ...}
  CODE       global:{ccOperationsErrors 9}}

temporaryFailure ERROR ::= {
  PARAMETER
    SEQUENCE {callSegmentId  CallSegmentId,
              location       Location,
              ...}
  CODE       global:{ccOperationsErrors 10}}

userNotReachable ERROR ::= {
  PARAMETER
    SEQUENCE {callSegmentId  CallSegmentId,
              location       Location,
              ...}
  CODE       global:{ccOperationsErrors 11}}

unspecified ERROR ::= {
  PARAMETER
    SEQUENCE {callSegmentId  CallSegmentId,
              location       Location,
              ...}
  CODE       global:{ccOperationsErrors 12}}

END



--8.2	Definition of Call Control Object Super Class
Call-Control-Object-Super-Class {itu-t recommendation q 2981
  call-control-object-super-class(4)} DEFINITIONS AUTOMATIC TAGS ::=
BEGIN

EXPORTS CALLCONTROLOBJECTCLASS;

CALLCONTROLOBJECTCLASS ::= CLASS {
  &ArgumentType           OPTIONAL,
  &argumentTypeOptional   BOOLEAN OPTIONAL,
  &objectClassIdentifier  OBJECT IDENTIFIER UNIQUE}
WITH SYNTAX {
  [ARGUMENT &ArgumentType
   [OPTIONAL &argumentTypeOptional]]
  IDENTIFIER &objectClassIdentifier}

END -- Call-Control-Object-Super-Class



--8.3	Definitions of Call Control Object Classes in the Information Model
Call-Object-Class-Definitions {itu-t recommendation q 2981
  call-object-class-definitions(5)} DEFINITIONS AUTOMATIC TAGS ::=
BEGIN

EXPORTS
  call, localPartyEP, remotePartyEP, directCallAssociation,
    remoteCallAssociation, serviceComponent, BearerId;

IMPORTS
  CALLCONTROLOBJECTCLASS
    FROM Call-Control-Object-Super-Class {itu-t recommendation q 
      2981 call-control-object-super-class(4)}
  PresentedAddressScreened, PartyNumber, PartySubaddress
    FROM Addressing-Data-Elements {itu-t recommendation q 932
      addressing-data-elements(7)};

ccObjectClasses OBJECT IDENTIFIER ::=
  {itu-t recommendation q 2981 cc-object-classes(6)}

call CALLCONTROLOBJECTCLASS ::= {
  ARGUMENT
    SEQUENCE {localPEPId                ObjectReferenceId,
              remotePEPId               ObjectReferenceId,
              serviceReference          ObjectReferenceId OPTIONAL,
              directCallAssociationIds  ObjectReferenceIdList,
              remoteCallAssociationIds
                ObjectReferenceIdList OPTIONAL,
              bearerIdList              BearerIdList OPTIONAL,
              telecomsServiceType       TelecomsServiceType,
              callPermissions           OpenCall}
  IDENTIFIER  {ccObjectClasses  1}}

ObjectReferenceId ::= INTEGER(-2147483648..2147483647) -- 4 octets
                             

-- refers to an object reference, unique to each object within a call
ObjectReferenceIdList ::= SEQUENCE OF ObjectReferenceId

BearerIdList ::= SEQUENCE OF BearerId

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

OpenCall ::= BIT STRING {
  reserved(7), externalPartyAddAllowed(6),
  existingPartyAddAllowed(5), notifyAllPartiesFlag(4),
  notifyOwnerFlag(3), permissionRequiredFlag(2),
  addConnectionAllowed(1), addServiceComponentAllowed(0)}

TelecomsServiceType ::= ENUMERATED {
  realtimeMultiMedia(0), nonRealtimeMultiMedia(1), unspecified(2),
  ...
  }

localPartyEP CALLCONTROLOBJECTCLASS ::= {
  ARGUMENT    PartyObjectArgument
  IDENTIFIER  {ccObjectClasses  2}}

remotePartyEP CALLCONTROLOBJECTCLASS ::= {
  ARGUMENT    PartyObjectArgument
  IDENTIFIER  {ccObjectClasses  3}}

PartyObjectArgument ::= SEQUENCE {
  partyAddress
    SEQUENCE {presentedAddressScreened  PresentedAddressScreened,
              defaultAddress            DefaultAddress OPTIONAL,
              networkInternalAddress
                NetworkInternalAddress OPTIONAL},
  partyOwnerPEPId           ObjectReferenceId,
  associatedResourcePEPIds  ObjectReferenceIdList OPTIONAL,
  associatedPEPIds          ObjectReferenceIdList OPTIONAL,
  partyType
    ENUMERATED {initiator(0), receiver(1), callOwner(2), ...
                },
  partyStatus
    ENUMERATED {confirmed(0), virtual(1), alerting(2), ...
                }}

DefaultAddress ::= OCTET STRING(SIZE (1..21))

NetworkInternalAddress ::= OCTET STRING(SIZE (1..21))

directCallAssociation CALLCONTROLOBJECTCLASS ::= {
  ARGUMENT    SEQUENCE {remotePEPId  ObjectReferenceId}
  IDENTIFIER  {ccObjectClasses  4}}

remoteCallAssociation CALLCONTROLOBJECTCLASS ::= {
  ARGUMENT
    SEQUENCE {localPEPId   ObjectReferenceId,
              remotePEPId  ObjectReferenceId}
  IDENTIFIER  {ccObjectClasses  5}}

serviceComponent CALLCONTROLOBJECTCLASS ::= {
  ARGUMENT
    SEQUENCE {callPEPId                             ObjectReferenceId,
              serviceComponentCharacteristics
                ServiceComponentCharacteristics OPTIONAL,
              communicationConfiguration
                CommunicationConfiguration OPTIONAL,
              serviceTrafficDescriptorRequirements
                ServiceTrafficDescriptorRequirements OPTIONAL,
              serviceComponentQoSRequirements
                ServiceQoSRequirements OPTIONAL,
              associatedServiceModuleId
                ObjectReferenceId OPTIONAL,
              associatedResourceComponentId
                ObjectReferenceId OPTIONAL}
  IDENTIFIER  {ccObjectClasses  6}}

ServiceComponentCharacteristics ::= OCTET STRING

CommunicationConfiguration ::= ENUMERATED {
  source(0), sink(1), biDirectional(2), ...
  }

ServiceTrafficDescriptorRequirements ::= OCTET STRING

ServiceQoSRequirements ::= OCTET STRING

END



Addressing-Data-Elements {itu-t recommendation q 932
  addressing-data-elements(7)} DEFINITIONS ::=
BEGIN

EXPORTS
  PresentedAddressScreened, PartyNumber, PartySubaddress,
    ScreeningIndicator;

PresentedAddressScreened ::= CHOICE {
  presentationAllowedAddress           [0] IMPLICIT AddressScreened,
  presentationRestricted               [1] IMPLICIT NULL,
  numberNotAvailableDueToInterworking  [2] IMPLICIT NULL,
  presentationRestrictedAddress        [3] IMPLICIT AddressScreened}

AddressScreened ::= SEQUENCE {
  partyNumber         PartyNumber,
  screeningIndicator  ScreeningIndicator,
  partySubaddress     PartySubaddress OPTIONAL}

PartyNumber ::= CHOICE {
  unknownPartyNumber           [0] IMPLICIT NumberDigits,
  -- the numbering plan is the default numbering plan of 
  -- the network.
  -- it is recommended that this values is used.
  publicPartyNumber            [1] IMPLICIT PublicPartyNumber,
  -- the numbering plan is according to Rec. E.163 and
  -- E.164
  nsapEncodedNumber            [2] IMPLICIT NsapEncodedNumber,
  -- ATM endsystem address encoded as an NSAP address
  dataPartyNumber              [3] IMPLICIT NumberDigits,
  -- not used, value reserved
  telexPartyNumber             [4] IMPLICIT NumberDigits,
  -- not used, value reserved
  privatePartyNumber           [5] IMPLICIT PrivatePartyNumber,
  nationalStandardPartyNumber  [8] IMPLICIT NumberDigits}

-- not used, values reserved
PublicPartyNumber ::= SEQUENCE {
  publicTypeOfNumber  PublicTypeOfNumber,
  publicNumberDigits  NumberDigits}

PrivatePartyNumber ::= SEQUENCE {
  privateTypeOfNumber  PrivateTypeOfNumber,
  privateNumberDigits  NumberDigits}

NumberDigits ::= NumericString(SIZE (1..20))

PublicTypeOfNumber ::= ENUMERATED {
  unknown(0),
  -- if used number digits carry prefix indicating type of
  -- number according to national recommendations.
  internationalNumber(1), nationalNumber(2),
  networkSpecificNumber(3),
  -- not used, value reserved
  subscriberNumber(4), abbreviatedNumber(6)}

-- valid only for called party number at the outgoing access,
-- network substitutes appropriate number.
PrivateTypeOfNumber ::= ENUMERATED {
  unknown(0), level2RegionalNumber(1), level1RegionalNumber(2),
  pISNSpecificNumber(3), localNumber(4), abbreviatedNumber(6)}

NsapEncodedNumber ::= OCTET STRING(SIZE (1..20))

PartySubaddress ::= CHOICE {
  userSpecifiedSubaddress  UserSpecifiedSubaddress,
  -- not recommended
  nSAPSubaddress           NSAPSubaddress}

-- according to Rec. X.213.
UserSpecifiedSubaddress ::= SEQUENCE {
  subaddressInformation  SubaddressInformation,
  oddCountIndicator      BOOLEAN OPTIONAL}

-- used when the coding of subaddress is BCD
NSAPSubaddress ::= OCTET STRING(SIZE (1..20))

-- specified according to X.213. some networks may limit
-- the subaddress value to some other length, e.g. 4 octets.
SubaddressInformation ::= OCTET STRING(SIZE (1..20))

-- coded according to user requirements. some networks
-- may limit the subaddress value to some other length,
-- e.g. 4 octets.
ScreeningIndicator ::= ENUMERATED {
  userProvidedNotScreened(0),
  -- number was provided by a remote user terminal
  -- equipment, and has been screened by a network that
  -- is not the local public or the local private network.
  userProvidedVerifiedAndPassed(1),
  -- number was provided by a remote user terminal
  -- equipment (or by a remote private network), and has
  -- been screened by the local public or the local private
  -- network.
  userProvidedVerifiedAndFailed(2),
  -- not used, value reserved.
  networkProvided(3)}

-- number was provided by local public or local private
-- network.
END -- of Addressing-Data-Elements