--  Reference:          3GPP TS 29.002 10.6.0

MAP-GR-DataTypes {
   itu-t identified-organization (4) etsi (0) mobileDomain (0)
   gsm-Network (1) modules (3) map-GR-DataTypes (23) version13 (13)}

DEFINITIONS

IMPLICIT TAGS

::=

BEGIN

EXPORTS
	PrepareGroupCallArg,
	PrepareGroupCallRes,
	SendGroupCallEndSignalArg,
	SendGroupCallEndSignalRes,
	ForwardGroupCallSignallingArg,
	ProcessGroupCallSignallingArg,
	SendGroupCallInfoArg,
	SendGroupCallInfoRes
;

IMPORTS
	ISDN-AddressString,
	IMSI, 
	TMSI,
	EMLPP-Priority,
	ASCI-CallReference,
	SignalInfo,
	GlobalCellId,
	AccessNetworkSignalInfo
FROM MAP-CommonDataTypes {
   itu-t identified-organization (4) etsi (0) mobileDomain (0)
   gsm-Network (1) modules (3) map-CommonDataTypes (18) version13 (13)}

	Ext-TeleserviceCode
FROM MAP-TS-Code {
   itu-t identified-organization (4) etsi (0) mobileDomain (0)
   gsm-Network (1) modules (3) map-TS-Code (19) version13 (13)}

	Kc,
	AdditionalInfo,
	GroupId,
Long-GroupId,
	AdditionalSubscriptions,
	Cksn
FROM MAP-MS-DataTypes {
   itu-t identified-organization (4) etsi (0) mobileDomain (0)
   gsm-Network (1) modules (3) map-MS-DataTypes (11) version13 (13)}

	ExtensionContainer
FROM MAP-ExtensionDataTypes {
   itu-t identified-organization (4) etsi (0) mobileDomain (0)
   gsm-Network (1) modules (3) map-ExtensionDataTypes (21) version13 (13)}
;


PrepareGroupCallArg ::= SEQUENCE {
	teleservice	Ext-TeleserviceCode,
	asciCallReference	ASCI-CallReference,
	codec-Info	CODEC-Info,
	cipheringAlgorithm	CipheringAlgorithm,
	groupKeyNumber-Vk-Id	[0] GroupKeyNumber	OPTIONAL,
	groupKey		[1] Kc		OPTIONAL, 
	-- this parameter shall not be sent and shall be discarded if received
	priority		[2] EMLPP-Priority	OPTIONAL,
	uplinkFree	[3] NULL		OPTIONAL,
	extensionContainer	[4] ExtensionContainer	OPTIONAL,
	...,
	vstk			[5] VSTK		OPTIONAL,
	vstk-rand		[6] VSTK-RAND	OPTIONAL,
	talkerChannelParameter	[7] NULL		OPTIONAL,
	uplinkReplyIndicator	[8] NULL		OPTIONAL}

VSTK ::= OCTET STRING (SIZE (16))

VSTK-RAND ::= OCTET STRING (SIZE (5))
	-- The 36 bit value is carried in bit 7 of octet 1 to bit 4 of octet 5
	-- bits 3, 2, 1, and 0 of octet 5 are padded with zeros.

PrepareGroupCallRes ::= SEQUENCE {
	groupCallNumber	ISDN-AddressString,
	extensionContainer	ExtensionContainer	OPTIONAL,
	...}

SendGroupCallEndSignalArg ::= SEQUENCE {
	imsi			IMSI			OPTIONAL,
	extensionContainer	ExtensionContainer	OPTIONAL,
	...,
	talkerPriority	[0]TalkerPriority	OPTIONAL,
	additionalInfo	[1]AdditionalInfo	OPTIONAL }

TalkerPriority ::= ENUMERATED {
	normal  (0),
	privileged  (1),
	emergency  (2)}

SendGroupCallEndSignalRes ::= SEQUENCE {
	extensionContainer	ExtensionContainer	OPTIONAL,
	...}

ForwardGroupCallSignallingArg ::= SEQUENCE {
	imsi			IMSI			OPTIONAL,
	uplinkRequestAck	[0] NULL		OPTIONAL,
	uplinkReleaseIndication	[1] NULL		OPTIONAL,
	uplinkRejectCommand	[2] NULL		OPTIONAL,
	uplinkSeizedCommand	[3] NULL		OPTIONAL,
	uplinkReleaseCommand	[4] NULL		OPTIONAL,
	extensionContainer	ExtensionContainer	OPTIONAL,
	..., 
	stateAttributes	[5] StateAttributes	OPTIONAL,
	talkerPriority	[6] TalkerPriority	OPTIONAL,
	additionalInfo	[7] AdditionalInfo	OPTIONAL,
	emergencyModeResetCommandFlag	[8] NULL		OPTIONAL,
	sm-RP-UI		[9] SignalInfo	OPTIONAL,
	an-APDU	[10] AccessNetworkSignalInfo	OPTIONAL
 }

ProcessGroupCallSignallingArg ::= SEQUENCE {
	uplinkRequest	[0] NULL		OPTIONAL,
	uplinkReleaseIndication	[1] NULL		OPTIONAL,
	releaseGroupCall	[2] NULL		OPTIONAL,
	extensionContainer	ExtensionContainer	OPTIONAL,
	...,
	talkerPriority	[3] TalkerPriority	OPTIONAL,
	additionalInfo	[4] AdditionalInfo	OPTIONAL,
	emergencyModeResetCommandFlag	[5] NULL		OPTIONAL,
	an-APDU	[6] AccessNetworkSignalInfo	OPTIONAL }

GroupKeyNumber ::= INTEGER (0..15)

CODEC-Info ::= OCTET STRING (SIZE (5..10))
	-- Refers to channel type
	-- coded according to 3GPP TS 48.008 [49] and including Element identifier and Length	

CipheringAlgorithm ::= OCTET STRING (SIZE (1))
	-- Refers to 'permitted algorithms' in 'encryption information'
	-- coded according to 3GPP TS 48.008 [49]:
	
	-- Bits 8-1 
	-- 8765 4321
	-- 0000 0001	No encryption
	-- 0000 0010	GSM A5/1
	-- 0000 0100	GSM A5/2
	-- 0000 1000	GSM A5/3
	-- 0001 0000	GSM A5/4
	-- 0010 0000	GSM A5/5
	-- 0100 0000	GSM A5/6
	-- 1000 0000	GSM A5/7

StateAttributes ::= SEQUENCE {
	downlinkAttached			[5] NULL		OPTIONAL,
	uplinkAttached			[6] NULL		OPTIONAL,
	dualCommunication			[7] NULL		OPTIONAL,
	callOriginator			[8] NULL		OPTIONAL }

	-- Refers to 3GPP TS 44.068 for definitions of StateAttributes fields. 


SendGroupCallInfoArg ::= SEQUENCE {
	requestedInfo	RequestedInfo,
	groupId		Long-GroupId, 
	teleservice	Ext-TeleserviceCode,
	cellId		[0] GlobalCellId	OPTIONAL,
	imsi			[1] IMSI		OPTIONAL,
	tmsi			[2] TMSI		OPTIONAL,
	additionalInfo	[3] AdditionalInfo	OPTIONAL,
	talkerPriority	[4] TalkerPriority	OPTIONAL,
	cksn			[5] Cksn		OPTIONAL,
	extensionContainer	[6] ExtensionContainer	OPTIONAL,
	... }

RequestedInfo ::= ENUMERATED {
	anchorMSC-AddressAndASCI-CallReference			(0),
	imsiAndAdditionalInfoAndAdditionalSubscription		(1),
	... }
--	exception handling:
--	an unrecognized value shall be rejected by the receiver with a return error cause of 
--	unexpected data value

SendGroupCallInfoRes ::= SEQUENCE {
	anchorMSC-Address	[0] ISDN-AddressString	OPTIONAL,
	asciCallReference	[1] ASCI-CallReference	OPTIONAL,
	imsi			[2] IMSI		OPTIONAL,
	additionalInfo	[3] AdditionalInfo	OPTIONAL,
	additionalSubscriptions	[4] AdditionalSubscriptions	OPTIONAL,
	kc			[5] Kc		OPTIONAL,
	extensionContainer	[6] ExtensionContainer	OPTIONAL,
	... }


END
