Call-Diversion-Operations
{
  itu-t recommendation h 450 3 version1(0) call-diversion-operations(0)
}

DEFINITIONS AUTOMATIC TAGS ::=
BEGIN

  IMPORTS Extension FROM H4501 -- Manufacturer-specific-service-extension-definition
  { 
    itu-t recommendation h 450 1 version1(0) msi-definition(18)
  }

  H225InformationElement FROM H225-generic-parameters-definition
  {
    itu-t recommendation h 450 1 version1(0) h225-generic-parameters(6)
  }

  NonStandardParameter FROM H225 -- H323-MESSAGES see H.225.0

  EndpointAddress, PartySubaddress, PresentationAllowedIndicator FROM H4501 -- Addressing-Data-Elements 
  {
    itu-t recommendation h 450 1 version1(0) addressing-data-elements (9)
  }

  userNotSubscribed, notAvailable, invalidServedUserNumber,
  basicServiceNotProvided, resourceUnavailable, 
  supplementaryServiceInteractionNotAllowed FROM  H4501-General-Error-List
  {
    itu-t recommendation h 450 1 version1(0) general-error-list (1)
  };


  H323CallDiversionOperations ::= ENUMERATED 
  {
    activateDiversionQ(15),
    deactivateDiversionQ(16),
    interrogateDiversionQ(17),
    checkRestriction(18),
    callRerouting(19),
    divertingLegInformation1(20),
    divertingLegInformation2(21),
    divertingLegInformation3(22),
    divertingLegInformation4(100),
    cfnrDivertedLegFailed(23)
  }


  -- sent from the activating h.323-endpoint to the served h.323-endpoint
  ARGUMENT-activateDiversionQ ::= SEQUENCE
  {
	procedure	    Procedure,
	basicService        BasicService,
	divertedToAddress   EndpointAddress,
	servedUserNr        EndpointAddress,
	activatingUserNr    EndpointAddress,
	extension CHOICE 
	{
		extensionSeq    ExtensionSeq,
		nonStandardData NonStandardParameter
	} OPTIONAL,    
	...
  }


  RESULT-activateDiversionQ ::= CHOICE 
  {
	extensionSeq	ExtensionSeq,
	nonStandardData	NonStandardParameter
  }


  -- sent from the deactivating h.323-endpoint to the served h.323-endpoint
  ARGUMENT-deactivateDiversionQ ::= SEQUENCE
  {
	procedure		Procedure,
	basicService		BasicService,
	servedUserNr		EndpointAddress,
	deactivatingUserNr	EndpointAddress,
	extension		CHOICE 
	{
		extensionSeq	ExtensionSeq,
		nonStandardData NonStandardParameter
	} OPTIONAL,
	...
  }
 
  RESULT-deactivateDiversionQ ::= CHOICE 
  {
	extensionSeq	ExtensionSeq,
	nonStandardData	NonStandardParameter
  }


  -- sent from the interrogating h.323-endpoint to the served h.323-endpoint
  ARGUMENT-interrogateDiversionQ ::= SEQUENCE
  {
	procedure		Procedure,
	basicService		BasicService DEFAULT allServices,
	servedUserNr		EndpointAddress,
	interrogatingUserNr	EndpointAddress,
	extension		CHOICE 
	{
		extensionSeq	ExtensionSeq,
		nonStandardData	NonStandardParameter
	} OPTIONAL,
	...
  }


  -- sent from the served h.323-endpoint to the diverted-to h.323-endpoint
  ARGUMENT-checkRestriction ::= SEQUENCE
  {
	servedUserNr		EndpointAddress,
	basicService		BasicService,
	divertedToNr		EndpointAddress,
	extension		CHOICE 
	{
		extensionSeq	ExtensionSeq,
		nonStandardData NonStandardParameter
	} OPTIONAL,
	...
  }

  RESULT-checkRestriction ::= CHOICE 
  {
	extensionSeq	ExtensionSeq,
	nonStandardData	NonStandardParameter
  }
  
  
  -- sent from the served h.323-endpoint to the rerouting h.323-endpoint
  ARGUMENT-callRerouting ::= SEQUENCE
  {
	reroutingReason			DiversionReason,
	originalReroutingReason		DiversionReason OPTIONAL,
	calledAddress			EndpointAddress,
	diversionCounter		INTEGER (1..15),
	h225InfoElement			H225InformationElement,
	-- The H.225 information elements Bearer capability, 
	-- High layer compatibility, Low layer compatibility and 
	-- Progress Indicator information element may  be embedded 
	-- in the h225InfoElement in accordance with H.450.1. 
	lastReroutingNr			EndpointAddress,
	subscriptionOption		SubscriptionOption,
	callingPartySubaddress		PartySubaddress OPTIONAL,
	callingNumber			EndpointAddress,
	callingInfo			BMPString (SIZE(1..128)) OPTIONAL,
	originalCalledNr		EndpointAddress OPTIONAL,
	redirectingInfo			BMPString (SIZE(1..128)) OPTIONAL,
	originalCalledInfo		BMPString (SIZE(1..128)) OPTIONAL,
	extension			CHOICE 
	{
		extensionSeq		ExtensionSeq,
		nonStandardData 	NonStandardParameter
	} OPTIONAL,
	...
  }
  
  RESULT-callRerouting ::= CHOICE
  {
	extensionSeq	ExtensionSeq,
	nonStandardData	NonStandardParameter
  }

		
  -- sent from the re-routing h.323-endpoint to the originating h.323-endpoint 
  -- if the re-routing endpoint equals the originating endpoint, this operation 
  -- is not applicable; may also be sent from the rerouting endpoint to other 
  -- members of a conference, if subscription option allows. 
  ARGUMENT-divertingLegInformation1 ::= SEQUENCE
  {
	diversionReason		DiversionReason,
	subscriptionOption	SubscriptionOption,
	nominatedNr		EndpointAddress,
	nominatedInfo		BMPString (SIZE(1..128)) OPTIONAL, 
	redirectingNr		EndpointAddress OPTIONAL,
	redirectingInfo		BMPString (SIZE(1..128)) OPTIONAL,
	extension		CHOICE 
	{
		extensionSeq	ExtensionSeq,
		nonStandardData NonStandardParameter
	} OPTIONAL,
	...
  }


  --sent from the re-routing h.323-endpoint to the diverted-to h.323-endpoint 
  ARGUMENT-divertingLegInformation2 ::= SEQUENCE
  {
	diversionCounter	INTEGER (1..15),
	diversionReason		DiversionReason,
	originalDiversionReason	DiversionReason OPTIONAL,
	divertingNr		EndpointAddress OPTIONAL,
	originalCalledNr	EndpointAddress OPTIONAL,
	redirectingInfo		BMPString (SIZE(1..128)) OPTIONAL,
	originalCalledInfo	BMPString (SIZE(1..128)) OPTIONAL,
	extension		CHOICE 
	{
		extensionSeq	ExtensionSeq,
		nonStandardData NonStandardParameter
	} OPTIONAL,
	...
  }


  --sent from the diverted-to h.323-endpoint to the originating h.323-endpoint
  ARGUMENT-divertingLegInformation3 ::= SEQUENCE
  {
	presentationAllowedIndicator	PresentationAllowedIndicator,
	redirectionNr			EndpointAddress OPTIONAL,
	redirectionInfo			BMPString (SIZE(1..128)) OPTIONAL,
	extension			CHOICE 
	{
		extensionSeq		ExtensionSeq,
		nonStandardData 	NonStandardParameter
	} OPTIONAL,
	...
  }


  -- If call diversion in not performed by the forwarding terminal but by a
  --  gatekeeper, the gatekeeper may send divertingLegInformation4 apdu to the 
  -- forwarding terminal. 
  ARGUMENT-divertingLegInformation4 ::= SEQUENCE
  {
  	diversionReason		DiversionReason,
	subscriptionOption	SubscriptionOption,
	callingNr		EndpointAddress,
	callingInfo		BMPString (SIZE(1..128)) OPTIONAL,
	nominatedNr		EndpointAddress,
	nominatedInfo		BMPString (SIZE(1..128)) OPTIONAL,
	extension		CHOICE 
	{
		extensionSeq	ExtensionSeq,
		nonStandardData NonStandardParameter
	} OPTIONAL,
	...
  }


  -- sent from the rerouting h.323-terminal to the served  h.323-endpoint
  -- This indicates that the diverted-to leg has been cleared during SS-CFNR execution.
  ARGUMENT-cfnrDivertedLegFailed ::= CHOICE 
  {
	extensionSeq	ExtensionSeq,
	nonStandardData NonStandardParameter
  }
  

  -- Definitions of general used data types:

  DiversionReason ::= ENUMERATED
  { 
    unknown(0),
    cfu(1),
    cfb(2),
    cfnr(3), 
    ...
  }

  -- The value unknown is only used if received from another network when interworking.
  IntResultList ::= SET SIZE (0..29) OF IntResult

  IntResult ::= SEQUENCE
  {
    servedUserNr      EndpointAddress,
    basicService      BasicService,
    procedure         Procedure,
    divertedToAddress EndpointAddress,
    remoteEnabled     BOOLEAN DEFAULT FALSE,
    extension         CHOICE 
    {
      extensionSeq    ExtensionSeq,
      nonStandardData NonStandardParameter
    } OPTIONAL,
    ...
  }

  Procedure ::= ENUMERATED
  {
    cfu(0), 
    cfb(1),
    cfnr (2),
    ...
  }

  SubscriptionOption ::= ENUMERATED
  {
    noNotification(0),
    notificationWithoutDivertedToNr(1),
    notificationWithDivertedToNr(2),
    ...
  }

  CallDiversionErrors ::= ENUMERATED
  {
    invalidDivertedNumber(12),
    specialServiceNumber(14),
    diversionToServedUserNumber(15),
    numberOfDiversionsExceeded(24),
    temporarilyUnavailable(1000),
    notAuthorized(1007),
    unspecified(1008)
  }

  BasicService ::= ENUMERATED
  {	
    allServices(0),	
    -- speech (1),	
    -- unrestricedDigitalInformation (2),	
    -- audio3.1KHz (3),	
    -- telephony (32),	
    -- teletex (33),	
    -- telefaxGroup4Class1 (34),	
    -- videotexSyntaxBased (35),	
    -- videotelephony (36), 
    ...
  }

  -- For multimedia calls the value "allServices" shall be used only. 
  -- The usage of the other codepoints for multimedia calls is for further study.

  ExtensionSeq ::= SEQUENCE OF Extension

END -- of Call-Diversion-Operations
