aboutsummaryrefslogtreecommitdiff
path: root/_misc/kxtde.asn
blob: f44b279adc0d7b92dc40ee1c7d47ab875af82548 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
-- ver 0.3 (C)Cyr
CSTAapdu ::= CHOICE {
    svcRequest      ROIVapdu,
    svcResult       RORSapdu,
	svcError        ROERapdu
--  svcReject       RORJapdu
}
ROIVapdu ::= [1] IMPLICIT SEQUENCE {
	invokeID	  INTEGER,  
	serviceID	  INTEGER, 
	serviceArgs	  ANY DEFINED BY serviceID 
}
RORSapdu ::= [2] IMPLICIT SEQUENCE {
	invokeID	  INTEGER,     
	result            SEQUENCE {
		serviceID	  INTEGER,
		serviceResult ANY DEFINED BY serviceID OPTIONAL
	}
}
ROERapdu ::= [3] IMPLICIT SEQUENCE {
	invokeID	 INTEGER,      
	code		 INTEGER, -- local:1   
	parameter 	 UniversalFailure
}
UniversalFailure ::= CHOICE
{	operation			 	 	[0] EXPLICIT OperationErrors,
	stateIncompatibility       	[2] EXPLICIT StateIncompatibilityErrors,
	systemResourceAvailability 	[3] EXPLICIT SystemResourceAvailabilityErrors,
	unspecified                	[7] UnspecifiedErrors
}
OperationErrors ::= ENUMERATED
{	invalidAgentGroup			(32),
	invalidAgentState			(35),
	invalidCalledDeviceID		(6),
	invalidConnectionID			(13),
	invalidDeviceID				(12),
	invalidParameterValue		(31),
	notSameDevice				(86),
	privilegeViolationSpecifiedDevice (8),
	requestIncompatibleWithObject (2),
	serviceNotSupported			(50)
}
StateIncompatibilityErrors ::= ENUMERATED
{
	invalidObjectState				(2)
}
SystemResourceAvailabilityErrors ::= ENUMERATED
{
	deviceOutOfService			(15),
	resourceBusy				(2),
	resourceLimitExceeded		(26),
	resourceOutOfService		(4)
}
UnspecifiedErrors ::= NULL
	
systemStatus ::= CHOICE
{	ARGUMENT SystemStatusArg,
	RESULT 	 SystemStatusRes
--	ERRORS 	{universalFailure}
--	CODE	local: 211	
}
SystemStatusArg ::= SEQUENCE
{	systemStatus	SystemStatus}

SystemStatusRes ::= CHOICE 
{	noData	 NULL}

SystemStatus ::= ENUMERATED
{   normal               (2),
    messageLost          (3),
    overloadReached      (6)
}
monitorStart ::= CHOICE
{	ARGUMENT	MonitorStartArgument,
    RESULT     	MonitorStartResult
--  ERRORS     	{universalFailure}
--	CODE	local: 71
}

MonitorStartArgument ::= SEQUENCE
{	monitorObject               MonitorObject,
	requestedMonitorFilter		[0] IMPLICIT MonitorFilter	OPTIONAL
}

MonitorStartResult ::= SEQUENCE
{	crossRefIdentifier 			MonitorCrossRefID,
	actualmonitorFilter			[0] IMPLICIT MonitorFilter	OPTIONAL
}

MonitorObject ::= CSTAObject

CSTAObject ::= CHOICE
{	deviceObject   DeviceID,
    callObject     ConnectionID}

MonitorFilter ::= SEQUENCE	-- default is no filter (i.e. all events)
{	callControl				[0] IMPLICIT CallControlEvents			OPTIONAL,
--	callAssociated			[6] IMPLICIT CallAssociatedEvents		OPTIONAL,
	physicalDeviceFeature	[8] IMPLICIT PhysicalDeviceFeatureEvents OPTIONAL,
	logicalDeviceFeature	[9] IMPLICIT LogicalDeviceFeatureEvents OPTIONAL,
--	maintenance				[3] IMPLICIT DeviceMaintenanceEvents	OPTIONAL,
	private					[4] IMPLICIT VendorSpecEvents			OPTIONAL
}

cSTAEventReport	::= CHOICE
{	ARGUMENT	CSTAEventReportArgument
--	ALWAYS 		RESPONDS		FALSE
--	CODE		local:21
}	
CSTAEventReportArgument ::= SEQUENCE
{	crossRefIdentifier		MonitorCrossRefID,
	eventSpecificInfo		EventSpecificInfo}
	
EventSpecificInfo ::= CHOICE
{	callControlEvents			[0] CallControlEvents,
--	callAssociatedEvents		[1] CallAssociatedEvents,
--	mediaAttachmentEvents		[2] MediaAttachmentEvents,
 	physicalDeviceFeatureEvents	[3] PhysicalDeviceFeatureEvents,
	logicalDeviceFeatureEvents	[4] LogicalDeviceFeatureEvents,
--	deviceMaintenanceEvents		[5] DeviceMaintenanceEvents,
--	voiceUnitEvents				[6] VoiceUnitEvents,
	vendorSpecEvents			[7] VendorSpecEvents
}
CallControlEvents ::= CHOICE
{
	conferenced 				[ 2] IMPLICIT ConferencedEvent,
	connectionCleared 			[ 3] IMPLICIT ConnectionClearedEvent,
	delivered 					[ 4] IMPLICIT DeliveredEvent,
--	digitsDialed 				[ 5] IMPLICIT DigitsDialedEvent,
	diverted 					[ 6] IMPLICIT DivertedEvent,
 	established                 [ 7] IMPLICIT EstablishedEvent,
 	failed                     	[ 8] IMPLICIT FailedEvent,
	held                 		[ 9] IMPLICIT HeldEvent,
	networkReached 				[11] IMPLICIT NetworkReachedEvent,
	originated 					[13] IMPLICIT OriginatedEvent,
	queued 						[14] IMPLICIT QueuedEvent,
	retrieved 					[15] IMPLICIT RetrievedEvent,
	serviceInitiated 			[16] IMPLICIT ServiceInitiatedEvent,
 	transferred 				[17] IMPLICIT TransferredEvent
}
ConferencedEvent ::= SEQUENCE
{ 	primaryOldCall 			ConnectionID,
	secondaryOldCall 		ConnectionID 				OPTIONAL,
	conferencingDevice 		SubjectDeviceID,
	addedParty 				SubjectDeviceID,
	conferenceConnections 	ConnectionList,
	localConnectionInfo 	LocalConnectionState 		OPTIONAL,
	cause 					EventCause
--	extensions 				[5] IMPLICIT CSTACommonArguments OPTIONAL 
}
ConnectionClearedEvent ::=  SEQUENCE
{	droppedConnection       ConnectionID,
	releasingDevice         SubjectDeviceID,
	localConnectionInfo     LocalConnectionState         OPTIONAL,
	cause                   EventCause
--	extensions              CSTACommonArguments          OPTIONAL
}
DeliveredEvent ::=   SEQUENCE
{   connection              ConnectionID,
    alertingDevice          SubjectDeviceID,
    callingDevice           CallingDeviceID,
    calledDevice            CalledDeviceID,
    lastRedirectionDevice   RedirectionDeviceID,
    localConnectionInfo     LocalConnectionState          OPTIONAL,
    cause                   EventCause,
    networkCallingDevice    NetworkCallingDeviceID        OPTIONAL,
    networkCalledDevice     NetworkCalledDeviceID         OPTIONAL,
    associatedCallingDevice AssociatedCallingDeviceID     OPTIONAL,
    associatedCalledDevice  AssociatedCalledDeviceID      OPTIONAL,
    extensions              CSTACommonArguments           OPTIONAL
}
DivertedEvent ::= SEQUENCE
{ 	connection 				ConnectionID,
	divertingDevice 		SubjectDeviceID,
	newDestination 			SubjectDeviceID,
	callingDevice 			CallingDeviceID 				OPTIONAL,
	calledDevice 			CalledDeviceID 					OPTIONAL,
	lastRedirectionDevice 	RedirectionDeviceID,
	localConnectionInfo 	LocalConnectionState 			OPTIONAL,
	cause 					EventCause,
	networkCallingDevice 	NetworkCallingDeviceID 			OPTIONAL,
	networkCalledDevice 	NetworkCalledDeviceID 			OPTIONAL,
	associatedCallingDevice AssociatedCallingDeviceID 		OPTIONAL,
	associatedCalledDevice 	AssociatedCalledDeviceID 		OPTIONAL
}
EstablishedEvent ::=   SEQUENCE        
{   establishedConnection   ConnectionID,
    answeringDevice         SubjectDeviceID,
    callingDevice           CallingDeviceID,
    calledDevice            CalledDeviceID,
    lastRedirectionDevice   RedirectionDeviceID,
    localConnectionInfo     LocalConnectionState            OPTIONAL,
    cause                   EventCause,
    networkCallingDevice    NetworkCallingDeviceID          OPTIONAL,
    networkCalledDevice     NetworkCalledDeviceID           OPTIONAL,
    associatedCallingDevice AssociatedCallingDeviceID       OPTIONAL,
    associatedCalledDevice  AssociatedCalledDeviceID        OPTIONAL, 
    extensions              CSTACommonArguments             OPTIONAL
}
FailedEvent ::= SEQUENCE
{   failedConnection        ConnectionID,
    failingDevice           SubjectDeviceID,
    callingDevice           CallingDeviceID,
    calledDevice            CalledDeviceID,
    lastRedirectionDevice   RedirectionDeviceID,
    localConnectionInfo     LocalConnectionState            OPTIONAL,
    cause                   EventCause,
    networkCallingDevice    NetworkCallingDeviceID          OPTIONAL,
    networkCalledDevice     NetworkCalledDeviceID           OPTIONAL,
    associatedCallingDevice AssociatedCallingDeviceID       OPTIONAL,
    associatedCalledDevice  AssociatedCalledDeviceID        OPTIONAL 
}
HeldEvent ::=   SEQUENCE
{   heldConnection          ConnectionID,
    holdingDevice           SubjectDeviceID,        
    localConnectionInfo     LocalConnectionState            OPTIONAL,
    cause                   EventCause,
    extensions              CSTACommonArguments             OPTIONAL
}
NetworkReachedEvent ::=  SEQUENCE
{   outboundConnection      ConnectionID,
    networkInterfaceUsed    SubjectDeviceID,
    callingDevice           CallingDeviceID,
    calledDevice            CalledDeviceID,
    lastRedirectionDevice   RedirectionDeviceID,
    localConnectionInfo     LocalConnectionState            OPTIONAL,
    cause                   EventCause 
--  networkCallingDevice    NetworkCallingDeviceID          OPTIONAL,
--  networkCalledDevice     NetworkCalledDeviceID           OPTIONAL,
--  associatedCallingDevice AssociatedCallingDeviceID       OPTIONAL
--  extensions              CSTACommonArguments             OPTIONAL
}
OriginatedEvent ::= SEQUENCE
{	originatedConnection	ConnectionID,
	callingDevice			SubjectDeviceID,
	calledDevice			CalledDeviceID,
	localConnectionInfo		LocalConnectionState			OPTIONAL,
	cause					EventCause,
    networkCallingDevice	NetworkCallingDeviceID			OPTIONAL,
  	networkCalledDevice		NetworkCalledDeviceID			OPTIONAL,
  	associatedCallingDevice AssociatedCallingDeviceID  		OPTIONAL,
 	associatedCalledDevice 	AssociatedCalledDeviceID  		OPTIONAL,
	extensions 				CSTACommonArguments 			OPTIONAL
}
QueuedEvent ::= SEQUENCE
{	queuedConnection		ConnectionID,
	queue					SubjectDeviceID,
	callingDevice			CallingDeviceID,
	calledDevice			CalledDeviceID,
	lastRedirectionDevice	RedirectionDeviceID,
	callsInFront			[1] IMPLICIT INTEGER			OPTIONAL,
	localConnectionInfo		LocalConnectionState			OPTIONAL,
	cause					EventCause,
	networkCallingDevice	NetworkCallingDeviceID			OPTIONAL,
	networkCalledDevice		NetworkCalledDeviceID			OPTIONAL,
	associatedCallingDevice	AssociatedCallingDeviceID		OPTIONAL,
	associatedCalledDevice	AssociatedCalledDeviceID		OPTIONAL
}
RetrievedEvent ::= SEQUENCE
{	retrievedConnection		ConnectionID,
	retrievingDevice		SubjectDeviceID,
	localConnectionInfo		LocalConnectionState			OPTIONAL,
	cause					EventCause
}
ServiceInitiatedEvent ::=  SEQUENCE
{   initiatedConnection     ConnectionID,
    initiatingDevice        SubjectDeviceID,
    localConnectionInfo     LocalConnectionState            OPTIONAL,
    cause                   EventCause,
    networkCallingDevice    NetworkCallingDeviceID          OPTIONAL,
    networkCalledDevice     NetworkCalledDeviceID           OPTIONAL,
--  associatedCallingDevice AssociatedCallingDeviceID       OPTIONAL
    extensions              CSTACommonArguments             OPTIONAL
}
TransferredEvent ::= SEQUENCE
{   primaryOldCall          ConnectionID,
    secondaryOldCall        [0] IMPLICIT ConnectionID       OPTIONAL,
    transferringDevice      SubjectDeviceID,
    transferredToDevice     SubjectDeviceID,
    transferredConnections  [1] IMPLICIT ConnectionList,
    localConnectionInfo     LocalConnectionState            OPTIONAL,
    cause                   EventCause
--  extensions              CSTACommonArguments             OPTIONAL
}
PhysicalDeviceFeatureEvents ::= CHOICE
{	
--	buttonInformation 		[ 0] IMPLICIT ButtonInformationEvent,
	buttonPress				[ 1] IMPLICIT ButtonPressEvent,
--	displayUpdated			[ 2] IMPLICIT DisplayUpdatedEvent,
--	hookswitch				[ 3] IMPLICIT HookswitchEvent,
--	lampMode				[ 4] IMPLICIT LampModeEvent,
--	messageWaiting			[ 5] IMPLICIT MessageWaitingEvent,
--	microphoneGain			[ 6] IMPLICIT MicrophoneGainEvent,
--	microphoneMute			[ 7] IMPLICIT MicrophoneMuteEvent,
 	ringerStatus			[ 8] IMPLICIT RingerStatusEvent
--	speakerMute				[ 9] IMPLICIT SpeakerMuteEvent,
--	speakerVolume			[10] IMPLICIT SpeakerVolumeEvent 
}
ButtonPressEvent ::= SEQUENCE
{	device				SubjectDeviceID,
	button				ButtonID,
	buttonLabel			IA5String 			OPTIONAL,
	buttonAssociatedNumber DeviceID			OPTIONAL,
	extensions			CSTACommonArguments	OPTIONAL }

ButtonID ::= OCTET STRING

RingerStatusEvent ::= SEQUENCE
{	device				SubjectDeviceID,
	ringer 				RingerID,
	ringMode	 		RingMode				OPTIONAL,
	extensions			CSTACommonArguments		OPTIONAL 
}

RingerID ::= OCTET STRING

RingMode ::= ENUMERATED
{ 	ringing 				(0),
	notRinging 				(1) 
}
	
LogicalDeviceFeatureEvents ::= CHOICE
{	agentBusy				[ 0] IMPLICIT AgentBusyEvent,
--	agentLoggedOn			[ 1] IMPLICIT AgentLoggedOnEvent,
--	agentLoggedOff			[ 2] IMPLICIT AgentLoggedOffEvent,
--	agentNotReady			[ 3] IMPLICIT AgentNotReadyEvent,
	agentReady				[ 4] IMPLICIT AgentReadyEvent
--	agentWorkingAfterCall	[ 5] IMPLICIT AgentWorkingAfterCallEvent,
--	autoAnswer				[ 6] IMPLICIT AutoAnswerEvent,
--	autoWorkMode			[ 7] IMPLICIT AutoWorkModeEvent,
--	callBack				[ 8] IMPLICIT CallBackEvent,
--	callBackMessage			[ 9] IMPLICIT CallBackMessageEvent,
--	callerIDStatus			[10] IMPLICIT CallerIDStatusEvent,
--	doNotDisturb			[11] IMPLICIT DoNotDisturbEvent,
--	forwarding				[12] IMPLICIT ForwardingEvent,
--	presenceState			[14] IMPLICIT PresenceStateEvent,
--	routeingMode			[13] IMPLICIT RouteingModeEvent 
}
AgentBusyEvent ::= SEQUENCE
{	agentDevice 		SubjectDeviceID
}

AgentReadyEvent ::= SEQUENCE
{	agentDevice 		SubjectDeviceID
}
VendorSpecEvents::= CHOICE
{	privateEvent	[ 0] IMPLICIT PrivateEvent}	

PrivateEvent ::= SEQUENCE
{-- security CSTASecurityData OPTIONAL,
privateData CSTAPrivateData }

ConnectionID ::= [APPLICATION 11] CHOICE
{
	deviceID	[1]	LocalDeviceID,
	both	SEQUENCE
	{	callID 	[0] IMPLICIT CallID,
		deviceID [1] LocalDeviceID
	}
}

CallID ::= OCTET STRING 

LocalDeviceID ::= CHOICE
{   staticID        DeviceID
}

ConnectionList ::= SEQUENCE OF SEQUENCE
	{	newConnection [0] EXPLICIT ConnectionID	OPTIONAL,   --! добавлен EXPLICIT
		associatedNID [3] associatedNID_		OPTIONAL	--! CHOICE вынесен отдельно
	}
associatedNID_	::= CHOICE 
	{	deviceID	DeviceID 
	}	

LocalConnectionState ::= [APPLICATION 14] IMPLICIT ENUMERATED
{	null		(0),
	initiated	(1),
	alerting	(2),
	connected	(3),
	hold		(4),
	queued		(5),
	fail		(6)
}
		
CallingDeviceID	::= [APPLICATION 1] CHOICE
	{deviceIdentifier		DeviceID,
	 notKnown		[7] IMPLICIT		NULL}

CalledDeviceID ::= [APPLICATION 2] CHOICE
	{deviceIdentifier		DeviceID,
	 notKnown		[7] IMPLICIT		NULL}

SubjectDeviceID ::= [APPLICATION 3] CHOICE
	{deviceIdentifier		DeviceID,
	 notKnown		[7] IMPLICIT		NULL}

RedirectionDeviceID ::= [APPLICATION 4] CHOICE
	{numberdialed		DeviceID,
	 notKnown		[7] IMPLICIT		NULL,
	 notRequired	[8] IMPLICIT		NULL,
	 notSpecified	[9] IMPLICIT		NULL}
	 
AssociatedCallingDeviceID ::= [APPLICATION 5] CHOICE
	{deviceIdentifier		DeviceID,
	 notKnown		[7] IMPLICIT		NULL}

AssociatedCalledDeviceID ::= [APPLICATION 6] CHOICE
	{deviceIdentifier		DeviceID,
	 notKnown		[7] IMPLICIT		NULL}

NetworkCallingDeviceID	::= [APPLICATION 7] CHOICE
	{deviceIdentifier		DeviceID,
	 notKnown		[7] IMPLICIT		NULL}

NetworkCalledDeviceID ::= [APPLICATION 8] CHOICE
	{deviceIdentifier		DeviceID,
	 notKnown		[7] IMPLICIT		NULL}
	 
DeviceID ::= SEQUENCE 
{	deviceIdentifier		CHOICE
  { dialingNumber		[0] IMPLICIT	NumberDigits,
	deviceNumber		[1] IMPLICIT	DeviceNumber,
	other				[6] IMPLICIT	OtherPlan
  }
}
OtherPlan ::= OCTET STRING			-- Allows future expansion to cover other numbering plans
 	
NumberDigits ::= IA5String

DeviceNumber ::= INTEGER

MonitorCrossRefID ::= [APPLICATION 21] INTEGER

CSTACommonArguments ::= [APPLICATION 30] IMPLICIT SEQUENCE
{   privateData   [1] IMPLICIT SEQUENCE OF CSTAPrivateData    OPTIONAL }

CSTAPrivateData ::= CHOICE 
{	string OCTET STRING,
	private	KmeSpecificPrivateData
}	-- The actual encoding is added here,

KmeSpecificPrivateData ::= CHOICE
{
--	kmeCallControl  [1] KmeCallControlSrvEvt,
--	kmeDeviceStatus [2] KmeDeviceStatus,
--	kmeDeviceMonitor [3] KmeDeviceMonitor,
 	kmeSystemData  	[4] KmeSystemData,
--	kmeLocalAlerm  	[5] KmeLocalAlerm,
	kmeAdditionalData [6] KmeAdditionalData,
	kmePrivateEvent [7] KmePrivateEvent,
	kmeResourceControl [8] KmeResourceControl
--	kmeGeneric 		[9] KmeGenericSrvEvt,
--  kmeExtendedDataAccess [10] OCTET STRING
--	kmePDFControl 	[11] KmePDFSrvEvt, 		-- Ver2.0
--	kmeAlterIf 		[12] KmeAlterIfSrvEvt,	-- TDA600
--	kmeHotelControl [13] KmeHotelSrvEvt 	-- TDA600 v4.0
}
KmeAdditionalData ::= CHOICE
{
--	fowardType 		[1] KmeForwardType, 	-- SetForwarding
--	trunkId 		[2] KmeTrunkId, 		-- Not Used.
--	otherDevice 	[3] KmeOtherDevice, 	-- GetSwitchingFunctionDevices
--	vmRecExtNo 		[4] IA5String, 			-- ConsultationCall
--	deviceCategory 	[5] KmeChangedDeviceCategory, -- SwitchingFunctionDevice Changed
 	device 			[6] EXPLICIT DeviceID, 	-- GetAutoWorkMode-Request, SetAutoWorkMode-Request
--	featureNumber 	[7] KmeFeatureNumber, 	-- AnswerCall-Request, Delivered-Event
--	proprietaryContents [8] KmeProprietaryChars, -- Set Display
	holdType 	   	[9]  EXPLICIT KmeHoldType, -- Held Event
--	conditionCode 	[10] KmeCdrConditionCode, -- Call Detail Records Report
--	lockDisplay 	[11] BOOLEAN, 			-- SetDisplay
--	forcedAlerting 	[12] KmeForcedAlerting, -- DeflectCall
	callID 			[13] EXPLICIT CallID, 	-- RingStatus
--	ogmContinuation [14] BOOLEAN, 			-- DeflectCall
--	broadcastGroupNo [15] INTEGER, 			-- SInit,Orig,Delivered,Established
--	ringPattern 	[16] INTEGER, 			-- DeflectCall V2.0
 	didNo 			[17] EXPLICIT DeviceID  -- Delivered V2.0
--	confGroupNo 	[18] INTEGER 			-- SInit,Orig,Deliv,Estab,Trans-Evt
}
KmeHoldType ::= ENUMERATED
{ 	consultation (0),
	normal 		(1),
	exclusive 	(2)
}

escape ::= CHOICE
{ 	ARGUMENT EscapeArgument,
	RESULT	 EscapeResult
--  ERRORS {universalFailure}
--	CODE local: 51
}

EscapeArgument ::= SEQUENCE
{ --escapeRegisterID EscapeRegisterID OPTIONAL,
	--security 		 CSTASecurityData OPTIONAL,
	privateData		 CSTAPrivateData }

EscapeResult ::= CHOICE
{ extensions CSTACommonArguments,
	noData NULL
}

KmeSystemData ::= CHOICE
{ getSystemData 		[0] KmeGetSystemData,--!
  setSystemData 		[1] KmeSetSystemData,
--systemDataChanged 	[2] KmeSystemDataChanged,
  systemDataLinkedReply [3] EXPLICIT KmeSystemDataLinkedReply,
  getSystemDataPosAck 	[4] EXPLICIT KmeGetSystemDataPosAck
--lockSystemData 		[5] KmeLockSystemData, -- 2002/05/17
--systemDataStatus 		[6] KmeSystemDataStatus, -- 2002/05/17
--dataRevisionRecord 	[7] KmeSystemDataRevision, -- 2002/12/19
--getDataRevisionRecord [8] KmeGetSystemDataRevision, -- V2.0
--setprogrammingEventOn [9] KmeSetProgrammingEventOn -- V2.0
}
KmeGetSystemData ::= CHOICE
{ request KmeGetSystemDataReq 		--!
--result KmeGetSystemDataRsp
}
KmeGetSystemDataReq ::= CHOICE
{ systemData [0] EXPLICIT ENUMERATED
   {sysTimeStamp 	(0),
	devTimeStamp 	(1), -- Not used
	featureList 	(2),
	speedDial 		(3), -- Not used
	trunkGroup 		(4),
	extensionGroup 	(5),
	pickupGroup 	(6),
	pagingGroup 	(7),
	incomingGroup 	(8),
	dayNightMode 	(9),
	doorPhone 		(10),
	vmGroup 		(11),
	manufacturerName (12), -- 3rd Party
	subdomainName 	(13), -- 3rd Party
	softwareVersion (14), -- 3rd Party
	ctiVersion 		(15), -- 3rd Party
	regionCode 		(16), -- 3rd Party
	systemTime 		(17), -- 3rd Party
	numberOfMsgPort (18), -- 3rd Party
	psGroup 		(19), -- 3rd Party
	whoAmI 			(20), -- V1.1
	broadcastGroup 	(21), -- V1.1
	pbxType 		(22), -- V2.0
	externalSensor 	(23), -- V2.0
	svm 			(24), -- TDA30 V2.2
	pdn 			(25)}, -- TDA600 V3.1
  incomGMember [3] IMPLICIT SEQUENCE
	{groupNo DeviceID },
  deviceList   [4] KmeRequestedDevice 	--!
}
KmeRequestedDevice ::= CHOICE -- for GetSystemData.deviceList
{ --device [0] DeviceID,
  category [1] KmeDeviceCategory} 	--!
  
KmeDeviceCategory ::= CHOICE
{ standardDevice [0] EXPLICIT DeviceCategory--!
 -- kmeDevice [1] KmeOtherDevice
}   
DeviceCategory ::= ENUMERATED
{	acd				(0),
	group			(1),
	networkInterface (2),		--!
	park			(3),
	routeingDevice	(4),
	station			(5), 		--!
	voiceUnit		(6),
	other			(7)
}
KmeSystemDataLinkedReply ::= SEQUENCE
{ crossRefID  [0] EXPLICIT ServiceCrossRefID, -- 01/12/17
  segmentID   [1] EXPLICIT INTEGER,
  lastSegment [2] EXPLICIT BOOLEAN,
  sysData     [3] EXPLICIT KmeGetSystemDataRsp OPTIONAL -- 02/04/22
}
ServiceCrossRefID ::= OCTET STRING

KmeGetSystemDataPosAck ::= ServiceCrossRefID -- Cross Reference Identifier01/12/17

KmeGetSystemDataRsp ::= SEQUENCE
{ -- Whole system data
--timeStamp 		[0] KmeTimeStamp OPTIONAL, -- PCC
--featureList 		[1] KmeFeatureList OPTIONAL, -- PCC
--speedDial 		[2] KmeSpeedDial OPTIONAL, -- PCC
--trunkGroup 		[3] KmeExtTrkGroupList OPTIONAL, -- PCC
--extGroup 			[4] KmeExtTrkGroupList OPTIONAL, -- PCC
--pickGroup 		[5] KmePckPagGroupList OPTIONAL, -- PCC
--pagingGroup 		[6] KmePckPagGroupList OPTIONAL, -- PCC
--incomingGroup 	[7] KmeIncomingGroupList OPTIONAL, -- PCC
--dayNightMode 		[8] KmeDayNightMode OPTIONAL, -- PCC
--wakeUp 			[9] KmeWakeUpInfo OPTIONAL, -- PCC
--remoteLock 		[10] KmeDeviceLock OPTIONAL, -- PCC
--callLogLock 		[11] KmeDeviceLock OPTIONAL, -- PCC
--absentMessage 	[12] KmeAbsentMessage OPTIONAL, -- PCC
--forwardDnd 		[13] ForwardList OPTIONAL, -- PCC
--trkGMembers 		[14] KmeTrkMembers OPTIONAL, -- PCC
--extGMembers 		[15] KmeExtMembers OPTIONAL, -- PCC
--incomGMembers 	[16] KmeIcmGrpMembers OPTIONAL, -- PCC
--doorPhone 		[17] KmeDoorPhone OPTIONAL, -- PCC
--vmGroup 			[18] KmeVmGroupList OPTIONAL, -- PCC
  manufacturerName 	[19] IA5String OPTIONAL, -- 3rd Party
  subdomainName 	[20] IA5String OPTIONAL, -- 3rd Party
  softwareVersion 	[21] IA5String OPTIONAL, -- 3rd Party
  ctiVersion 		[22] IA5String OPTIONAL, -- 3rd Party
  regionCode 		[23] IA5String OPTIONAL, -- 3rd Party
  systemTime		[24] GeneralizedTime OPTIONAL, -- 3rd Party
  numberOfMsgPort 	[25] EXPLICIT NumberOfMsgPort OPTIONAL, -- 3rd Party
--psGroup 			[26] KmePsGroupList OPTIONAL, -- 3rd Party
--youAre 			[27] DeviceID OPTIONAL, -- V1.1
--svm 				[28] KmeSvmList OPTIONAL, -- TDA30 V2.2
--pdn 				[29] KmePdnGMembers OPTIONAL, -- TDA600 V3.1
-- Each device data
--cos 				[34] INTEGER OPTIONAL, -- 3rd Party
--phoneProperty 	[35] KmePhoneProperty OPTIONAL, -- 3rd Party
--assocIncomGroup 	[36] KmeGroupMembers OPTIONAL, -- 3rd Party
--messageWaiting 	[37] SEQUENCE OF DeviceID OPTIONAL, -- 3rd Party
  deviceList 		[38] EXPLICIT KmeDeviceStateList OPTIONAL, -- 3rd Party
--assocExtGroup 	[39] INTEGER OPTIONAL, -- 01/12/17
--vmGMembers 		[40] KmeIcmGrpMembers OPTIONAL, -- 02/05/20
--extName 			[41] KmeExtName OPTIONAL, -- V1.1
--broadcastGroup 	[42] KmeBroadcastGroupList OPTIONAL, -- V1.1
--broadcastGMembers [43] KmeBroadcastGrpMembers OPTIONAL, -- V1.1
--fcoKeyList 		[44] KmeFcoKeyList OPTIONAL, -- V2.0
--sxdpMaster 		[45] DeviceID OPTIONAL, -- V2.0
  pbxType 			[46] INTEGER OPTIONAL -- V2.0
--externalSensor	[47] KmeExternalSensorList OPTIONAL, -- V2.0
--deviceDataList	[48] KmeDeviceDataList OPTIONAL, -- TDA600
--guestCheckStatus	[49] KmeCheckStatusList OPTIONAL -- TDA600 V4.0
}
NumberOfMsgPort ::= SEQUENCE
{ 	numberOfMsgPort 	INTEGER,
	numberOfFreePort 	INTEGER}

KmeDeviceStateList ::= SEQUENCE OF KmeDeviceStateEntry

KmeDeviceStateEntry ::= SEQUENCE
{ device DeviceID,
  number IA5String OPTIONAL, -- Ext No, CO No, Park Area No.
  status KmeDeviceState 
}
KmeDeviceState ::= ENUMERATED
{ ins (0),
  ous (1)
}
KmePrivateEvent ::= CHOICE
{--digitsReport   [1] KmeDigitsReport,
	ogmStatus     [2] EXPLICIT KmeOgmStatus,
--	wakeupResult  [3] KmeWakeupResult,
--	unconferenced [4] KmeUnconferenced,
--	tamEnded 	  [5] KmeTamEnded, -- 2002/04/26 05/17 mod.
--	pcRecEnded    [6] KmePcRecEnded, -- 2002/05/17 Added.
--	callbackNotification [7] CallBackNotification, -- 2002/05/28 Added
	freeOgmPort  [8] KmeFreeOgmPort -- 2002/08/26 Added
--	pDFStatus    [9] KmePDFStatus -- Ver2.0
}
KmeOgmStatus ::= SEQUENCE
{ connection 	ConnectionID,
  state 		KmeOgmPlayState,
  ogmId 		INTEGER,
  ogmPortNumber DeviceID}
  
KmeOgmPlayState ::= ENUMERATED
{ started (0),
  ended   (1)}
  
KmeFreeOgmPort ::= INTEGER

KmeSetSystemData ::= CHOICE
{acdQueue [3] EXPLICIT SEQUENCE 
	{device DeviceID,
	attribute CHOICE
		{acdMode BOOLEAN,
		ctiWaitTime INTEGER}
	}
}
KmeResourceControl ::= CHOICE
 { ogmStart [0] EXPLICIT KmeOgmStart,
   ogmStop  [1] EXPLICIT KmeOgmStop}

  KmeOgmStart ::= SEQUENCE
{ connection ConnectionID,
  ogmId INTEGER}

KmeOgmStop ::= ConnectionID
	
EventCause ::= ENUMERATED
-- a general list of cause codes
--				Present in	Added in	Added in
-- 				Version 1	Version 2	Version 3
{	aCDBusy					(57),
	aCDForward					(58),
	aCDSaturated					(59),
	activeParticipation			(1),
	alertTimeExpired					(60),
	alternate			(2),
	autoWork					(61),
	blocked				(35),
	busy			(3),
	callBack			(4),
	callCancelled			(5),
	callForward			(9),
	callForwardImmediate			(6),
	callForwardBusy			(7),
	callForwardNoAnswer			(8),
	callNotAnswered			(10),
	callPickup			(11),
	campOn			(12),
	campOnTrunks					(62),
	characterCountReached				(36),
	conference					(63),
	consultation				(37),
	destDetected					(64),
	destNotObtainable			(13),
	destOutOfOrder					(65),
	distributed				(38),
	distributionDelay					(66),
	doNotDisturb			(14),
	dTMFDigitDetected				(39),
	durationExceeded				(40),
	endOfMessageDetected				(41),
	enteringDistribution				(42),
	forcedPause				(43),
	forcedTransition					(67),
	incompatibleDestination			(15),
	intrude					(68),
	invalidAccountCode			(16),
	invalidNumberFormat					(69),
	joinCall					(70),
	keyOperation			(17),
	keyOperationInUse					(71),
	lockout			(18),
	maintenance			(19),
	makeCall				(44),
	makePredictiveCall					(72),
	messageDurationExceeded					(73),
	messageSizeExceeded				(45),
	multipleAlerting					(74),
	multipleQueuing					(75),
	networkCongestion			(20),
	networkDialling					(76),
	networkNotObtainable			(21),
	networkOutOfOrder					(77),
	networkSignal				(46),
	newCall			(22),
	nextMessage				(47),
	noAvailableAgents			(23),
	normal					(78),
	normalClearing				(48),
	noSpeechDetected				(49),
	notAvaliableBearerService					(79),
	notSupportedBearerService					(80),
	numberChanged				(50),
	numberUnallocated					(81),
	overflow			(26),
	override			(24),
	park			(25),
	queueCleared					(82),
	recall			(27),
	redirected			(28),
	remainsInQueue					(83),
	reorderTone			(29),
	reserved					(84),
	resourcesNotAvailable			(30),
	selectedTrunkBusy					(85),
	silentParticipation			(31),
	singleStepConference				(51),
	singleStepTransfer				(52),
	speechDetected				(53),
	suspend					(86),
	switchingFunctionTerminated				(54), 
	terminationCharacterReceived				(55), 
	timeout				(56),
	transfer			(32),
	trunksBusy			(33),
	unauthorisedBearerService					(87)}

SnapshotDeviceArgument ::= 	SEQUENCE
{	snapshotObject DeviceID}

SnapshotDeviceResult   ::=	SEQUENCE
{	crossRefIDorSnapshotData
		CHOICE
		{	serviceCrossRefID	ServiceCrossRefID,
			snapshotData		SnapshotDeviceData
		}
}
ServiceCrossRefID ::= OCTET STRING

SnapshotDeviceData ::= [APPLICATION 22] IMPLICIT SEQUENCE OF SnapshotDeviceResponseInfo

SnapshotDeviceResponseInfo ::= SEQUENCE
{	connectionIdentifier	ConnectionID,
	localCallState			CallState}

CallState ::= CHOICE
{	compoundCallState	[0] IMPLICIT CompoundCallState}

CompoundCallState ::= SEQUENCE OF LocalConnectionState

AnswerCallArgument ::= SEQUENCE			--CODE	local: 2
{   callToBeAnswered        ConnectionID}

ClearConnectionArgument ::= SEQUENCE	--CODE	local: 5
{	connectionToBeCleared	ConnectionID}

MakeCallArgument ::= SEQUENCE			--CODE	local: 10
{	callingDevice			DeviceID,
	calledDirectoryNumber	DeviceID
}
MakeCallResult ::= SEQUENCE	
{	callingDevice		 	ConnectionID}

HoldCallArgument ::= SEQUENCE			--CODE	local: 9
{	callToBeHeld      		ConnectionID}	

TransferCallArgument ::= SEQUENCE		--CODE	local: 16
{	heldCall	ConnectionID,
	activeCall	ConnectionID}

TransferCallResult ::= 	SEQUENCE
{	transferredCall	ConnectionID}

ButtonPressArgument ::= SEQUENCE		--CODE	local: 260
{	device		DeviceID,
	button		ButtonID}
	
ButtonID ::= OCTET STRING