summaryrefslogtreecommitdiff
path: root/CSTA-application-context-information-csta3.erl
diff options
context:
space:
mode:
authorDimitri Sokolyuk <quax@moccu.com>2015-10-23 17:10:17 +0200
committerDimitri Sokolyuk <quax@moccu.com>2015-10-23 17:10:17 +0200
commit5cea818e88c61c7abef1df94da3f3796e0b23441 (patch)
tree1dfb2121c14cf67e59a65539aad3f610055e571d /CSTA-application-context-information-csta3.erl
parent433d3dcffb0ec6f0e9f54e4f747cb78d052d56b8 (diff)
Resort files
Diffstat (limited to 'CSTA-application-context-information-csta3.erl')
-rw-r--r--CSTA-application-context-information-csta3.erl1244
1 files changed, 0 insertions, 1244 deletions
diff --git a/CSTA-application-context-information-csta3.erl b/CSTA-application-context-information-csta3.erl
deleted file mode 100644
index 6d5fb0a..0000000
--- a/CSTA-application-context-information-csta3.erl
+++ /dev/null
@@ -1,1244 +0,0 @@
-%% Generated by the Erlang ASN.1 BER_V2-compiler version, utilizing bit-syntax:4.0
-%% Purpose: encoder and decoder to the types in mod CSTA-application-context-information-csta3
-
--module('CSTA-application-context-information-csta3').
--compile(nowarn_unused_vars).
--include("CSTA-application-context-information-csta3.hrl").
--asn1_info([{vsn,'4.0'},
- {module,'CSTA-application-context-information-csta3'},
- {options,[{i,"/Users/quax/erl"},
- warnings,ber,errors,
- {cwd,"/Users/quax/erl"},
- {outdir,"/Users/quax/erl"},
- {i,"/Users/quax/erl/acse"},
- {i,"/Users/quax/erl/csta"},
- {i,"."},
- {i,"/Users/quax/erl/kme"}]}]).
-
--export([encoding_rule/0,bit_string_format/0,
- legacy_erlang_types/0]).
--export(['dialyzer-suppressions'/1]).
--export([
-'enc_CSTAFunctionality'/2,
-'enc_SwitchingFunctionServicesC2'/2,
-'enc_EventReportServicesC2'/2,
-'enc_ComputingFunctionServicesC2'/2,
-'enc_BidirectionalServicesC2'/2,
-'enc_StatusReportingServicesC2'/2,
-'enc_InputOutputServicesC2'/2,
-'enc_VoiceUnitServicesC2'/2,
-'enc_ACSEUserInformationForCSTA'/2,
-'enc_OldACSEUserInformationForCSTA'/2,
-'enc_NewACSEUserInformationForCSTA'/2,
-'enc_CSTAPrivateDataVersionList'/2,
-'enc_CSTAVersion'/2,
-'enc_CallControlServices'/2,
-'enc_CallAssociatedServices'/2,
-'enc_MediaAttachmentServices'/2,
-'enc_RouteingServices'/2,
-'enc_VoiceUnitServices'/2,
-'enc_LocationServices'/2,
-'enc_CallControlEvents'/2,
-'enc_CallAssociatedEvents'/2,
-'enc_MediaAttachmentEvents'/2,
-'enc_PhysicalDeviceFeatureEvents'/2,
-'enc_LogicalDeviceFeatureEvents'/2,
-'enc_DeviceMaintenanceEvents'/2,
-'enc_VoiceUnitEvents'/2,
-'enc_VendorSpecEvents'/2
-]).
-
--export([
-'dec_CSTAFunctionality'/2,
-'dec_SwitchingFunctionServicesC2'/2,
-'dec_EventReportServicesC2'/2,
-'dec_ComputingFunctionServicesC2'/2,
-'dec_BidirectionalServicesC2'/2,
-'dec_StatusReportingServicesC2'/2,
-'dec_InputOutputServicesC2'/2,
-'dec_VoiceUnitServicesC2'/2,
-'dec_ACSEUserInformationForCSTA'/2,
-'dec_OldACSEUserInformationForCSTA'/2,
-'dec_NewACSEUserInformationForCSTA'/2,
-'dec_CSTAPrivateDataVersionList'/2,
-'dec_CSTAVersion'/2,
-'dec_CallControlServices'/2,
-'dec_CallAssociatedServices'/2,
-'dec_MediaAttachmentServices'/2,
-'dec_RouteingServices'/2,
-'dec_VoiceUnitServices'/2,
-'dec_LocationServices'/2,
-'dec_CallControlEvents'/2,
-'dec_CallAssociatedEvents'/2,
-'dec_MediaAttachmentEvents'/2,
-'dec_PhysicalDeviceFeatureEvents'/2,
-'dec_LogicalDeviceFeatureEvents'/2,
-'dec_DeviceMaintenanceEvents'/2,
-'dec_VoiceUnitEvents'/2,
-'dec_VendorSpecEvents'/2
-]).
-
--export([info/0]).
-
-
--export([encode/2,decode/2]).
-
-encoding_rule() -> ber.
-
-bit_string_format() -> bitstring.
-
-legacy_erlang_types() -> false.
-
-encode(Type, Data) ->
-try iolist_to_binary(element(1, encode_disp(Type, Data))) of
- Bytes ->
- {ok,Bytes}
- catch
- Class:Exception when Class =:= error; Class =:= exit ->
- case Exception of
- {error,Reason}=Error ->
- Error;
- Reason ->
- {error,{asn1,Reason}}
- end
-end.
-
-decode(Type,Data) ->
-try decode_disp(Type, element(1, ber_decode_nif(Data))) of
- Result ->
- {ok,Result}
- catch
- Class:Exception when Class =:= error; Class =:= exit ->
- case Exception of
- {error,Reason}=Error ->
- Error;
- Reason ->
- {error,{asn1,Reason}}
- end
-end.
-
-encode_disp('CSTAFunctionality',Data) -> 'enc_CSTAFunctionality'(Data);
-encode_disp('SwitchingFunctionServicesC2',Data) -> 'enc_SwitchingFunctionServicesC2'(Data);
-encode_disp('EventReportServicesC2',Data) -> 'enc_EventReportServicesC2'(Data);
-encode_disp('ComputingFunctionServicesC2',Data) -> 'enc_ComputingFunctionServicesC2'(Data);
-encode_disp('BidirectionalServicesC2',Data) -> 'enc_BidirectionalServicesC2'(Data);
-encode_disp('StatusReportingServicesC2',Data) -> 'enc_StatusReportingServicesC2'(Data);
-encode_disp('InputOutputServicesC2',Data) -> 'enc_InputOutputServicesC2'(Data);
-encode_disp('VoiceUnitServicesC2',Data) -> 'enc_VoiceUnitServicesC2'(Data);
-encode_disp('ACSEUserInformationForCSTA',Data) -> 'enc_ACSEUserInformationForCSTA'(Data);
-encode_disp('OldACSEUserInformationForCSTA',Data) -> 'enc_OldACSEUserInformationForCSTA'(Data);
-encode_disp('NewACSEUserInformationForCSTA',Data) -> 'enc_NewACSEUserInformationForCSTA'(Data);
-encode_disp('CSTAPrivateDataVersionList',Data) -> 'enc_CSTAPrivateDataVersionList'(Data);
-encode_disp('CSTAVersion',Data) -> 'enc_CSTAVersion'(Data);
-encode_disp('CallControlServices',Data) -> 'enc_CallControlServices'(Data);
-encode_disp('CallAssociatedServices',Data) -> 'enc_CallAssociatedServices'(Data);
-encode_disp('MediaAttachmentServices',Data) -> 'enc_MediaAttachmentServices'(Data);
-encode_disp('RouteingServices',Data) -> 'enc_RouteingServices'(Data);
-encode_disp('VoiceUnitServices',Data) -> 'enc_VoiceUnitServices'(Data);
-encode_disp('LocationServices',Data) -> 'enc_LocationServices'(Data);
-encode_disp('CallControlEvents',Data) -> 'enc_CallControlEvents'(Data);
-encode_disp('CallAssociatedEvents',Data) -> 'enc_CallAssociatedEvents'(Data);
-encode_disp('MediaAttachmentEvents',Data) -> 'enc_MediaAttachmentEvents'(Data);
-encode_disp('PhysicalDeviceFeatureEvents',Data) -> 'enc_PhysicalDeviceFeatureEvents'(Data);
-encode_disp('LogicalDeviceFeatureEvents',Data) -> 'enc_LogicalDeviceFeatureEvents'(Data);
-encode_disp('DeviceMaintenanceEvents',Data) -> 'enc_DeviceMaintenanceEvents'(Data);
-encode_disp('VoiceUnitEvents',Data) -> 'enc_VoiceUnitEvents'(Data);
-encode_disp('VendorSpecEvents',Data) -> 'enc_VendorSpecEvents'(Data);
-encode_disp(Type,_Data) -> exit({error,{asn1,{undefined_type,Type}}}).
-
-
-decode_disp('CSTAFunctionality',Data) -> 'dec_CSTAFunctionality'(Data);
-decode_disp('SwitchingFunctionServicesC2',Data) -> 'dec_SwitchingFunctionServicesC2'(Data);
-decode_disp('EventReportServicesC2',Data) -> 'dec_EventReportServicesC2'(Data);
-decode_disp('ComputingFunctionServicesC2',Data) -> 'dec_ComputingFunctionServicesC2'(Data);
-decode_disp('BidirectionalServicesC2',Data) -> 'dec_BidirectionalServicesC2'(Data);
-decode_disp('StatusReportingServicesC2',Data) -> 'dec_StatusReportingServicesC2'(Data);
-decode_disp('InputOutputServicesC2',Data) -> 'dec_InputOutputServicesC2'(Data);
-decode_disp('VoiceUnitServicesC2',Data) -> 'dec_VoiceUnitServicesC2'(Data);
-decode_disp('ACSEUserInformationForCSTA',Data) -> 'dec_ACSEUserInformationForCSTA'(Data);
-decode_disp('OldACSEUserInformationForCSTA',Data) -> 'dec_OldACSEUserInformationForCSTA'(Data);
-decode_disp('NewACSEUserInformationForCSTA',Data) -> 'dec_NewACSEUserInformationForCSTA'(Data);
-decode_disp('CSTAPrivateDataVersionList',Data) -> 'dec_CSTAPrivateDataVersionList'(Data);
-decode_disp('CSTAVersion',Data) -> 'dec_CSTAVersion'(Data);
-decode_disp('CallControlServices',Data) -> 'dec_CallControlServices'(Data);
-decode_disp('CallAssociatedServices',Data) -> 'dec_CallAssociatedServices'(Data);
-decode_disp('MediaAttachmentServices',Data) -> 'dec_MediaAttachmentServices'(Data);
-decode_disp('RouteingServices',Data) -> 'dec_RouteingServices'(Data);
-decode_disp('VoiceUnitServices',Data) -> 'dec_VoiceUnitServices'(Data);
-decode_disp('LocationServices',Data) -> 'dec_LocationServices'(Data);
-decode_disp('CallControlEvents',Data) -> 'dec_CallControlEvents'(Data);
-decode_disp('CallAssociatedEvents',Data) -> 'dec_CallAssociatedEvents'(Data);
-decode_disp('MediaAttachmentEvents',Data) -> 'dec_MediaAttachmentEvents'(Data);
-decode_disp('PhysicalDeviceFeatureEvents',Data) -> 'dec_PhysicalDeviceFeatureEvents'(Data);
-decode_disp('LogicalDeviceFeatureEvents',Data) -> 'dec_LogicalDeviceFeatureEvents'(Data);
-decode_disp('DeviceMaintenanceEvents',Data) -> 'dec_DeviceMaintenanceEvents'(Data);
-decode_disp('VoiceUnitEvents',Data) -> 'dec_VoiceUnitEvents'(Data);
-decode_disp('VendorSpecEvents',Data) -> 'dec_VendorSpecEvents'(Data);
-decode_disp(Type,_Data) -> exit({error,{asn1,{undefined_type,Type}}}).
-
-
-
-
-info() ->
- case ?MODULE:module_info(attributes) of
- Attributes when is_list(Attributes) ->
- case lists:keyfind(asn1_info, 1, Attributes) of
- {_,Info} when is_list(Info) ->
- Info;
- _ ->
- []
- end;
- _ ->
- []
- end.
-
-
-%%================================
-%% CSTAFunctionality
-%%================================
-'enc_CSTAFunctionality'(Val) ->
- 'enc_CSTAFunctionality'(Val, [<<48>>]).
-
-'enc_CSTAFunctionality'(Val, TagIn) ->
-{_,Cindex1, Cindex2, Cindex3, Cindex4, Cindex5, Cindex6, Cindex7} = Val,
-
-%%-------------------------------------------------
-%% attribute switchingFunctionServices(1) with type BIT STRING DEFAULT = []
-%%-------------------------------------------------
- {EncBytes1,EncLen1} = case Cindex1 of
- asn1_DEFAULT -> {<<>>,0};
- [] -> {<<>>,0};
- _ ->
- encode_named_bit_string(Cindex1, [{alternateCall,0},{answerCall,1},{associateData,2},{callCompletion,3},{clearCall,4},{clearConnection,5},{conferenceCall,6},{consultationCall,7},{divertCall,8},{holdCall,9},{makeCall,10},{makePredictiveCall,11},{parkCall,12},{queryDevice,13},{reconnectCall,14},{retrieveCall,15},{sendDTMFTones,16},{setFeature,17},{singleStepConference,18},{singleStepTransfer,19},{transferCall,20}], [<<128>>])
- end,
-
-%%-------------------------------------------------
-%% attribute eventReportServices(2) with type BIT STRING DEFAULT = []
-%%-------------------------------------------------
- {EncBytes2,EncLen2} = case Cindex2 of
- asn1_DEFAULT -> {<<>>,0};
- [] -> {<<>>,0};
- _ ->
- encode_named_bit_string(Cindex2, [{callCleared,0},{conferenced,1},{connectionCleared,2},{delivered,3},{diverted,4},{established,5},{failed,6},{held,7},{networkReached,8},{originated,9},{queued,10},{retrieved,11},{serviceInitiated,12},{transferred,13},{autoAnswer,14},{callInformation,15},{doNotDisturb,16},{forwarding,17},{messageWaiting,18},{microphoneMute,19},{speakerMute,20},{speakerVolume,21},{agentBusy,22},{loggedOn,23},{loggedOff,24},{notReady,25},{ready,26},{workingAfterCall,27},{backInService,28},{outOfServiceEvent,29},{privateEvent,30},{playEvent,31},{recordEvent,32},{reviewEvent,33},{stopEvent,34},{suspendPlayEvent,35},{suspendRecordEvent,36},{voiceAttributesChangeEvent,37}], [<<129>>])
- end,
-
-%%-------------------------------------------------
-%% attribute computingFunctionServices(3) with type BIT STRING DEFAULT = []
-%%-------------------------------------------------
- {EncBytes3,EncLen3} = case Cindex3 of
- asn1_DEFAULT -> {<<>>,0};
- [] -> {<<>>,0};
- _ ->
- encode_named_bit_string(Cindex3, [{routeRequest,0},{reRouteRequest,1},{routeSelectRequest,2},{routeUsedRequest,3},{routeEndRequest,4}], [<<130>>])
- end,
-
-%%-------------------------------------------------
-%% attribute bidirectionalServices(4) with type BIT STRING DEFAULT = []
-%%-------------------------------------------------
- {EncBytes4,EncLen4} = case Cindex4 of
- asn1_DEFAULT -> {<<>>,0};
- [] -> {<<>>,0};
- _ ->
- encode_named_bit_string(Cindex4, [{escapeService,0},{systemStatus,1}], [<<131>>])
- end,
-
-%%-------------------------------------------------
-%% attribute statusReportingServices(5) with type BIT STRING DEFAULT = []
-%%-------------------------------------------------
- {EncBytes5,EncLen5} = case Cindex5 of
- asn1_DEFAULT -> {<<>>,0};
- [] -> {<<>>,0};
- _ ->
- encode_named_bit_string(Cindex5, [{monitorStart,0},{changeMonitorFilter,1},{monitorStop,2},{snapshotDevice,3},{snapshotCall,4}], [<<132>>])
- end,
-
-%%-------------------------------------------------
-%% attribute inputOutputServices(6) with type BIT STRING DEFAULT = []
-%%-------------------------------------------------
- {EncBytes6,EncLen6} = case Cindex6 of
- asn1_DEFAULT -> {<<>>,0};
- [] -> {<<>>,0};
- _ ->
- encode_named_bit_string(Cindex6, [{startDataPathService,0},{stopDataPathService,1},{sendDataService,2},{sendMulticastDataService,3},{sendBroadcastDataService,4},{suspendDataPathService,5},{dataPathSuspendedService,6},{resumeDataPath,7},{dataPathResumedService,8},{fastData,9}], [<<133>>])
- end,
-
-%%-------------------------------------------------
-%% attribute voiceUnitServices(7) with type BIT STRING DEFAULT = []
-%%-------------------------------------------------
- {EncBytes7,EncLen7} = case Cindex7 of
- asn1_DEFAULT -> {<<>>,0};
- [] -> {<<>>,0};
- _ ->
- encode_named_bit_string(Cindex7, [{concatenateMessage,0},{deleteMessage,1},{playMessage,2},{queryVoiceAttribute,3},{recordMessage,4},{reposition,5},{resume,6},{review,7},{setVoiceAttribute,8},{stop,9},{suspend,10},{synthesizeMessage,11}], [<<134>>])
- end,
-
- BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4, EncBytes5, EncBytes6, EncBytes7],
-LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4 + EncLen5 + EncLen6 + EncLen7,
-encode_tags(TagIn, BytesSoFar, LenSoFar).
-
-
-'dec_CSTAFunctionality'(Tlv) ->
- 'dec_CSTAFunctionality'(Tlv, [16]).
-
-'dec_CSTAFunctionality'(Tlv, TagIn) ->
- %%-------------------------------------------------
- %% decode tag and length
- %%-------------------------------------------------
-Tlv1 = match_tags(Tlv, TagIn),
-
-%%-------------------------------------------------
-%% attribute switchingFunctionServices(1) with type BIT STRING DEFAULT = []
-%%-------------------------------------------------
-{Term1,Tlv2} = case Tlv1 of
-[{131072,V1}|TempTlv2] ->
- {decode_named_bit_string(V1, [{alternateCall,0},{answerCall,1},{associateData,2},{callCompletion,3},{clearCall,4},{clearConnection,5},{conferenceCall,6},{consultationCall,7},{divertCall,8},{holdCall,9},{makeCall,10},{makePredictiveCall,11},{parkCall,12},{queryDevice,13},{reconnectCall,14},{retrieveCall,15},{sendDTMFTones,16},{setFeature,17},{singleStepConference,18},{singleStepTransfer,19},{transferCall,20}], []), TempTlv2};
- _ ->
- {[],Tlv1}
-end,
-
-%%-------------------------------------------------
-%% attribute eventReportServices(2) with type BIT STRING DEFAULT = []
-%%-------------------------------------------------
-{Term2,Tlv3} = case Tlv2 of
-[{131073,V2}|TempTlv3] ->
- {decode_named_bit_string(V2, [{callCleared,0},{conferenced,1},{connectionCleared,2},{delivered,3},{diverted,4},{established,5},{failed,6},{held,7},{networkReached,8},{originated,9},{queued,10},{retrieved,11},{serviceInitiated,12},{transferred,13},{autoAnswer,14},{callInformation,15},{doNotDisturb,16},{forwarding,17},{messageWaiting,18},{microphoneMute,19},{speakerMute,20},{speakerVolume,21},{agentBusy,22},{loggedOn,23},{loggedOff,24},{notReady,25},{ready,26},{workingAfterCall,27},{backInService,28},{outOfServiceEvent,29},{privateEvent,30},{playEvent,31},{recordEvent,32},{reviewEvent,33},{stopEvent,34},{suspendPlayEvent,35},{suspendRecordEvent,36},{voiceAttributesChangeEvent,37}], []), TempTlv3};
- _ ->
- {[],Tlv2}
-end,
-
-%%-------------------------------------------------
-%% attribute computingFunctionServices(3) with type BIT STRING DEFAULT = []
-%%-------------------------------------------------
-{Term3,Tlv4} = case Tlv3 of
-[{131074,V3}|TempTlv4] ->
- {decode_named_bit_string(V3, [{routeRequest,0},{reRouteRequest,1},{routeSelectRequest,2},{routeUsedRequest,3},{routeEndRequest,4}], []), TempTlv4};
- _ ->
- {[],Tlv3}
-end,
-
-%%-------------------------------------------------
-%% attribute bidirectionalServices(4) with type BIT STRING DEFAULT = []
-%%-------------------------------------------------
-{Term4,Tlv5} = case Tlv4 of
-[{131075,V4}|TempTlv5] ->
- {decode_named_bit_string(V4, [{escapeService,0},{systemStatus,1}], []), TempTlv5};
- _ ->
- {[],Tlv4}
-end,
-
-%%-------------------------------------------------
-%% attribute statusReportingServices(5) with type BIT STRING DEFAULT = []
-%%-------------------------------------------------
-{Term5,Tlv6} = case Tlv5 of
-[{131076,V5}|TempTlv6] ->
- {decode_named_bit_string(V5, [{monitorStart,0},{changeMonitorFilter,1},{monitorStop,2},{snapshotDevice,3},{snapshotCall,4}], []), TempTlv6};
- _ ->
- {[],Tlv5}
-end,
-
-%%-------------------------------------------------
-%% attribute inputOutputServices(6) with type BIT STRING DEFAULT = []
-%%-------------------------------------------------
-{Term6,Tlv7} = case Tlv6 of
-[{131077,V6}|TempTlv7] ->
- {decode_named_bit_string(V6, [{startDataPathService,0},{stopDataPathService,1},{sendDataService,2},{sendMulticastDataService,3},{sendBroadcastDataService,4},{suspendDataPathService,5},{dataPathSuspendedService,6},{resumeDataPath,7},{dataPathResumedService,8},{fastData,9}], []), TempTlv7};
- _ ->
- {[],Tlv6}
-end,
-
-%%-------------------------------------------------
-%% attribute voiceUnitServices(7) with type BIT STRING DEFAULT = []
-%%-------------------------------------------------
-{Term7,Tlv8} = case Tlv7 of
-[{131078,V7}|TempTlv8] ->
- {decode_named_bit_string(V7, [{concatenateMessage,0},{deleteMessage,1},{playMessage,2},{queryVoiceAttribute,3},{recordMessage,4},{reposition,5},{resume,6},{review,7},{setVoiceAttribute,8},{stop,9},{suspend,10},{synthesizeMessage,11}], []), TempTlv8};
- _ ->
- {[],Tlv7}
-end,
-
-case Tlv8 of
-[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv8}}}) % extra fields not allowed
-end,
- {'CSTAFunctionality', Term1, Term2, Term3, Term4, Term5, Term6, Term7}.
-
-
-
-%%================================
-%% SwitchingFunctionServicesC2
-%%================================
-'enc_SwitchingFunctionServicesC2'(Val) ->
- 'enc_SwitchingFunctionServicesC2'(Val, [<<3>>]).
-
-'enc_SwitchingFunctionServicesC2'(Val, TagIn) ->
-encode_named_bit_string(Val, [{alternateCall,0},{answerCall,1},{associateData,2},{callCompletion,3},{clearCall,4},{clearConnection,5},{conferenceCall,6},{consultationCall,7},{divertCall,8},{holdCall,9},{makeCall,10},{makePredictiveCall,11},{parkCall,12},{queryDevice,13},{reconnectCall,14},{retrieveCall,15},{sendDTMFTones,16},{setFeature,17},{singleStepConference,18},{singleStepTransfer,19},{transferCall,20}], TagIn).
-
-
-'dec_SwitchingFunctionServicesC2'(Tlv) ->
- 'dec_SwitchingFunctionServicesC2'(Tlv, [3]).
-
-'dec_SwitchingFunctionServicesC2'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{alternateCall,0},{answerCall,1},{associateData,2},{callCompletion,3},{clearCall,4},{clearConnection,5},{conferenceCall,6},{consultationCall,7},{divertCall,8},{holdCall,9},{makeCall,10},{makePredictiveCall,11},{parkCall,12},{queryDevice,13},{reconnectCall,14},{retrieveCall,15},{sendDTMFTones,16},{setFeature,17},{singleStepConference,18},{singleStepTransfer,19},{transferCall,20}], TagIn).
-
-
-
-%%================================
-%% EventReportServicesC2
-%%================================
-'enc_EventReportServicesC2'(Val) ->
- 'enc_EventReportServicesC2'(Val, [<<3>>]).
-
-'enc_EventReportServicesC2'(Val, TagIn) ->
-encode_named_bit_string(Val, [{callCleared,0},{conferenced,1},{connectionCleared,2},{delivered,3},{diverted,4},{established,5},{failed,6},{held,7},{networkReached,8},{originated,9},{queued,10},{retrieved,11},{serviceInitiated,12},{transferred,13},{autoAnswer,14},{callInformation,15},{doNotDisturb,16},{forwarding,17},{messageWaiting,18},{microphoneMute,19},{speakerMute,20},{speakerVolume,21},{agentBusy,22},{loggedOn,23},{loggedOff,24},{notReady,25},{ready,26},{workingAfterCall,27},{backInService,28},{outOfServiceEvent,29},{privateEvent,30},{playEvent,31},{recordEvent,32},{reviewEvent,33},{stopEvent,34},{suspendPlayEvent,35},{suspendRecordEvent,36},{voiceAttributesChangeEvent,37}], TagIn).
-
-
-'dec_EventReportServicesC2'(Tlv) ->
- 'dec_EventReportServicesC2'(Tlv, [3]).
-
-'dec_EventReportServicesC2'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{callCleared,0},{conferenced,1},{connectionCleared,2},{delivered,3},{diverted,4},{established,5},{failed,6},{held,7},{networkReached,8},{originated,9},{queued,10},{retrieved,11},{serviceInitiated,12},{transferred,13},{autoAnswer,14},{callInformation,15},{doNotDisturb,16},{forwarding,17},{messageWaiting,18},{microphoneMute,19},{speakerMute,20},{speakerVolume,21},{agentBusy,22},{loggedOn,23},{loggedOff,24},{notReady,25},{ready,26},{workingAfterCall,27},{backInService,28},{outOfServiceEvent,29},{privateEvent,30},{playEvent,31},{recordEvent,32},{reviewEvent,33},{stopEvent,34},{suspendPlayEvent,35},{suspendRecordEvent,36},{voiceAttributesChangeEvent,37}], TagIn).
-
-
-
-%%================================
-%% ComputingFunctionServicesC2
-%%================================
-'enc_ComputingFunctionServicesC2'(Val) ->
- 'enc_ComputingFunctionServicesC2'(Val, [<<3>>]).
-
-'enc_ComputingFunctionServicesC2'(Val, TagIn) ->
-encode_named_bit_string(Val, [{routeRequest,0},{reRouteRequest,1},{routeSelectRequest,2},{routeUsedRequest,3},{routeEndRequest,4}], TagIn).
-
-
-'dec_ComputingFunctionServicesC2'(Tlv) ->
- 'dec_ComputingFunctionServicesC2'(Tlv, [3]).
-
-'dec_ComputingFunctionServicesC2'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{routeRequest,0},{reRouteRequest,1},{routeSelectRequest,2},{routeUsedRequest,3},{routeEndRequest,4}], TagIn).
-
-
-
-%%================================
-%% BidirectionalServicesC2
-%%================================
-'enc_BidirectionalServicesC2'(Val) ->
- 'enc_BidirectionalServicesC2'(Val, [<<3>>]).
-
-'enc_BidirectionalServicesC2'(Val, TagIn) ->
-encode_named_bit_string(Val, [{escapeService,0},{systemStatus,1}], TagIn).
-
-
-'dec_BidirectionalServicesC2'(Tlv) ->
- 'dec_BidirectionalServicesC2'(Tlv, [3]).
-
-'dec_BidirectionalServicesC2'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{escapeService,0},{systemStatus,1}], TagIn).
-
-
-
-%%================================
-%% StatusReportingServicesC2
-%%================================
-'enc_StatusReportingServicesC2'(Val) ->
- 'enc_StatusReportingServicesC2'(Val, [<<3>>]).
-
-'enc_StatusReportingServicesC2'(Val, TagIn) ->
-encode_named_bit_string(Val, [{monitorStart,0},{changeMonitorFilter,1},{monitorStop,2},{snapshotDevice,3},{snapshotCall,4}], TagIn).
-
-
-'dec_StatusReportingServicesC2'(Tlv) ->
- 'dec_StatusReportingServicesC2'(Tlv, [3]).
-
-'dec_StatusReportingServicesC2'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{monitorStart,0},{changeMonitorFilter,1},{monitorStop,2},{snapshotDevice,3},{snapshotCall,4}], TagIn).
-
-
-
-%%================================
-%% InputOutputServicesC2
-%%================================
-'enc_InputOutputServicesC2'(Val) ->
- 'enc_InputOutputServicesC2'(Val, [<<3>>]).
-
-'enc_InputOutputServicesC2'(Val, TagIn) ->
-encode_named_bit_string(Val, [{startDataPathService,0},{stopDataPathService,1},{sendDataService,2},{sendMulticastDataService,3},{sendBroadcastDataService,4},{suspendDataPathService,5},{dataPathSuspendedService,6},{resumeDataPath,7},{dataPathResumedService,8},{fastData,9}], TagIn).
-
-
-'dec_InputOutputServicesC2'(Tlv) ->
- 'dec_InputOutputServicesC2'(Tlv, [3]).
-
-'dec_InputOutputServicesC2'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{startDataPathService,0},{stopDataPathService,1},{sendDataService,2},{sendMulticastDataService,3},{sendBroadcastDataService,4},{suspendDataPathService,5},{dataPathSuspendedService,6},{resumeDataPath,7},{dataPathResumedService,8},{fastData,9}], TagIn).
-
-
-
-%%================================
-%% VoiceUnitServicesC2
-%%================================
-'enc_VoiceUnitServicesC2'(Val) ->
- 'enc_VoiceUnitServicesC2'(Val, [<<3>>]).
-
-'enc_VoiceUnitServicesC2'(Val, TagIn) ->
-encode_named_bit_string(Val, [{concatenateMessage,0},{deleteMessage,1},{playMessage,2},{queryVoiceAttribute,3},{recordMessage,4},{reposition,5},{resume,6},{review,7},{setVoiceAttribute,8},{stop,9},{suspend,10},{synthesizeMessage,11}], TagIn).
-
-
-'dec_VoiceUnitServicesC2'(Tlv) ->
- 'dec_VoiceUnitServicesC2'(Tlv, [3]).
-
-'dec_VoiceUnitServicesC2'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{concatenateMessage,0},{deleteMessage,1},{playMessage,2},{queryVoiceAttribute,3},{recordMessage,4},{reposition,5},{resume,6},{review,7},{setVoiceAttribute,8},{stop,9},{suspend,10},{synthesizeMessage,11}], TagIn).
-
-
-
-%%================================
-%% ACSEUserInformationForCSTA
-%%================================
-'enc_ACSEUserInformationForCSTA'(Val) ->
- 'enc_ACSEUserInformationForCSTA'(Val, []).
-
-'enc_ACSEUserInformationForCSTA'(Val, TagIn) ->
- {EncBytes,EncLen} = case element(1,Val) of
- oldDefinition ->
- 'enc_OldACSEUserInformationForCSTA'(element(2,Val), [<<48>>]);
- newDefinition ->
- 'enc_NewACSEUserInformationForCSTA'(element(2,Val), [<<160>>]);
- Else ->
- exit({error,{asn1,{invalid_choice_type,Else}}})
- end,
-
-encode_tags(TagIn, EncBytes, EncLen).
-
-
-
-
-'dec_ACSEUserInformationForCSTA'(Tlv) ->
- 'dec_ACSEUserInformationForCSTA'(Tlv, []).
-
-'dec_ACSEUserInformationForCSTA'(Tlv, TagIn) ->
-Tlv1 = match_tags(Tlv, TagIn),
-case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
-
-%% 'oldDefinition'
- {16, V1} ->
- {oldDefinition, 'dec_OldACSEUserInformationForCSTA'(V1, [])};
-
-
-%% 'newDefinition'
- {131072, V1} ->
- {newDefinition, 'dec_NewACSEUserInformationForCSTA'(V1, [])};
-
- Else ->
- exit({error,{asn1,{invalid_choice_tag,Else}}})
- end
-.
-
-
-%%================================
-%% OldACSEUserInformationForCSTA
-%%================================
-'enc_OldACSEUserInformationForCSTA'(Val) ->
- 'enc_OldACSEUserInformationForCSTA'(Val, [<<48>>]).
-
-'enc_OldACSEUserInformationForCSTA'(Val, TagIn) ->
-{_,Cindex1, Cindex2, Cindex3} = Val,
-
-%%-------------------------------------------------
-%% attribute cSTAVersion(1) with type BIT STRING
-%%-------------------------------------------------
- {EncBytes1,EncLen1} = encode_named_bit_string(Cindex1, [{versionOne,0},{versionTwo,1},{versionThree,2},{versionFour,3},{versionFive,4},{versionSix,5},{versionSeven,6},{versionEight,7},{versionNine,8},{versionTen,9},{versionEleven,10},{versionTwelve,11},{versionThirteen,12},{versionFourteen,13},{versionFifteen,14},{versionSixteen,15},{versionSeventeen,16},{versionEighteen,17},{versionNineteen,18},{versionTwenty,19},{versionTwentyone,20},{versionTwentytwo,21},{versionTwentythree,22},{versionTwentyfour,23}], [<<3>>]),
-
-%%-------------------------------------------------
-%% attribute cSTAFunctionsRequiredByApplication(2) External CSTA-application-context-information-csta3:CSTAFunctionality
-%%-------------------------------------------------
- {EncBytes2,EncLen2} = 'enc_CSTAFunctionality'(Cindex2, [<<48>>]),
-
-%%-------------------------------------------------
-%% attribute cSTAFunctionsThatCanBeSupplied(3) External CSTA-application-context-information-csta3:CSTAFunctionality
-%%-------------------------------------------------
- {EncBytes3,EncLen3} = 'enc_CSTAFunctionality'(Cindex3, [<<48>>]),
-
- BytesSoFar = [EncBytes1, EncBytes2, EncBytes3],
-LenSoFar = EncLen1 + EncLen2 + EncLen3,
-encode_tags(TagIn, BytesSoFar, LenSoFar).
-
-
-'dec_OldACSEUserInformationForCSTA'(Tlv) ->
- 'dec_OldACSEUserInformationForCSTA'(Tlv, [16]).
-
-'dec_OldACSEUserInformationForCSTA'(Tlv, TagIn) ->
- %%-------------------------------------------------
- %% decode tag and length
- %%-------------------------------------------------
-Tlv1 = match_tags(Tlv, TagIn),
-
-%%-------------------------------------------------
-%% attribute cSTAVersion(1) with type BIT STRING
-%%-------------------------------------------------
-[V1|Tlv2] = Tlv1,
-Term1 = decode_named_bit_string(V1, [{versionOne,0},{versionTwo,1},{versionThree,2},{versionFour,3},{versionFive,4},{versionSix,5},{versionSeven,6},{versionEight,7},{versionNine,8},{versionTen,9},{versionEleven,10},{versionTwelve,11},{versionThirteen,12},{versionFourteen,13},{versionFifteen,14},{versionSixteen,15},{versionSeventeen,16},{versionEighteen,17},{versionNineteen,18},{versionTwenty,19},{versionTwentyone,20},{versionTwentytwo,21},{versionTwentythree,22},{versionTwentyfour,23}], [3]),
-
-%%-------------------------------------------------
-%% attribute cSTAFunctionsRequiredByApplication(2) External CSTA-application-context-information-csta3:CSTAFunctionality
-%%-------------------------------------------------
-[V2|Tlv3] = Tlv2,
-Term2 = 'dec_CSTAFunctionality'(V2, [16]),
-
-%%-------------------------------------------------
-%% attribute cSTAFunctionsThatCanBeSupplied(3) External CSTA-application-context-information-csta3:CSTAFunctionality
-%%-------------------------------------------------
-[V3|Tlv4] = Tlv3,
-Term3 = 'dec_CSTAFunctionality'(V3, [16]),
-
-case Tlv4 of
-[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv4}}}) % extra fields not allowed
-end,
- {'OldACSEUserInformationForCSTA', Term1, Term2, Term3}.
-
-
-
-%%================================
-%% NewACSEUserInformationForCSTA
-%%================================
-'enc_NewACSEUserInformationForCSTA'(Val) ->
- 'enc_NewACSEUserInformationForCSTA'(Val, [<<48>>]).
-
-'enc_NewACSEUserInformationForCSTA'(Val, TagIn) ->
-{_,Cindex1, Cindex2, Cindex3, Cindex4} = Val,
-
-%%-------------------------------------------------
-%% attribute cSTAVersion(1) with type BIT STRING
-%%-------------------------------------------------
- {EncBytes1,EncLen1} = encode_named_bit_string(Cindex1, [{versionOne,0},{versionTwo,1},{versionThree,2},{versionFour,3},{versionFive,4},{versionSix,5},{versionSeven,6},{versionEight,7},{versionNine,8},{versionTen,9},{versionEleven,10},{versionTwelve,11},{versionThirteen,12},{versionFourteen,13},{versionFifteen,14},{versionSixteen,15},{versionSeventeen,16},{versionEighteen,17},{versionNineteen,18},{versionTwenty,19},{versionTwentyone,20},{versionTwentytwo,21},{versionTwentythree,22},{versionTwentyfour,23}], [<<3>>]),
-
-%%-------------------------------------------------
-%% attribute cSTAFunctionsRequiredByApplication(2) External CSTA-application-context-information-csta3:CSTAFunctionality OPTIONAL
-%%-------------------------------------------------
- {EncBytes2,EncLen2} = case Cindex2 of
- asn1_NOVALUE -> {<<>>,0};
- _ ->
- 'enc_CSTAFunctionality'(Cindex2, [<<160>>])
- end,
-
-%%-------------------------------------------------
-%% attribute cSTAFunctionsThatCanBeSupplied(3) External CSTA-application-context-information-csta3:CSTAFunctionality OPTIONAL
-%%-------------------------------------------------
- {EncBytes3,EncLen3} = case Cindex3 of
- asn1_NOVALUE -> {<<>>,0};
- _ ->
- 'enc_CSTAFunctionality'(Cindex3, [<<161>>])
- end,
-
-%%-------------------------------------------------
-%% attribute cSTAPrivateDataVersionList(4) External CSTA-application-context-information-csta3:CSTAPrivateDataVersionList OPTIONAL
-%%-------------------------------------------------
- {EncBytes4,EncLen4} = case Cindex4 of
- asn1_NOVALUE -> {<<>>,0};
- _ ->
- 'enc_CSTAPrivateDataVersionList'(Cindex4, [<<162>>])
- end,
-
- BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4],
-LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4,
-encode_tags(TagIn, BytesSoFar, LenSoFar).
-
-
-'dec_NewACSEUserInformationForCSTA'(Tlv) ->
- 'dec_NewACSEUserInformationForCSTA'(Tlv, [16]).
-
-'dec_NewACSEUserInformationForCSTA'(Tlv, TagIn) ->
- %%-------------------------------------------------
- %% decode tag and length
- %%-------------------------------------------------
-Tlv1 = match_tags(Tlv, TagIn),
-
-%%-------------------------------------------------
-%% attribute cSTAVersion(1) with type BIT STRING
-%%-------------------------------------------------
-[V1|Tlv2] = Tlv1,
-Term1 = decode_named_bit_string(V1, [{versionOne,0},{versionTwo,1},{versionThree,2},{versionFour,3},{versionFive,4},{versionSix,5},{versionSeven,6},{versionEight,7},{versionNine,8},{versionTen,9},{versionEleven,10},{versionTwelve,11},{versionThirteen,12},{versionFourteen,13},{versionFifteen,14},{versionSixteen,15},{versionSeventeen,16},{versionEighteen,17},{versionNineteen,18},{versionTwenty,19},{versionTwentyone,20},{versionTwentytwo,21},{versionTwentythree,22},{versionTwentyfour,23}], [3]),
-
-%%-------------------------------------------------
-%% attribute cSTAFunctionsRequiredByApplication(2) External CSTA-application-context-information-csta3:CSTAFunctionality OPTIONAL
-%%-------------------------------------------------
-{Term2,Tlv3} = case Tlv2 of
-[{131072,V2}|TempTlv3] ->
- {'dec_CSTAFunctionality'(V2, []), TempTlv3};
- _ ->
- { asn1_NOVALUE, Tlv2}
-end,
-
-%%-------------------------------------------------
-%% attribute cSTAFunctionsThatCanBeSupplied(3) External CSTA-application-context-information-csta3:CSTAFunctionality OPTIONAL
-%%-------------------------------------------------
-{Term3,Tlv4} = case Tlv3 of
-[{131073,V3}|TempTlv4] ->
- {'dec_CSTAFunctionality'(V3, []), TempTlv4};
- _ ->
- { asn1_NOVALUE, Tlv3}
-end,
-
-%%-------------------------------------------------
-%% attribute cSTAPrivateDataVersionList(4) External CSTA-application-context-information-csta3:CSTAPrivateDataVersionList OPTIONAL
-%%-------------------------------------------------
-{Term4,Tlv5} = case Tlv4 of
-[{131074,V4}|TempTlv5] ->
- {'dec_CSTAPrivateDataVersionList'(V4, []), TempTlv5};
- _ ->
- { asn1_NOVALUE, Tlv4}
-end,
-
-case Tlv5 of
-[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv5}}}) % extra fields not allowed
-end,
- {'NewACSEUserInformationForCSTA', Term1, Term2, Term3, Term4}.
-
-
-
-%%================================
-%% CSTAPrivateDataVersionList
-%%================================
-'enc_CSTAPrivateDataVersionList'(Val) ->
- 'enc_CSTAPrivateDataVersionList'(Val, [<<48>>]).
-
-'enc_CSTAPrivateDataVersionList'(Val, TagIn) ->
- {EncBytes,EncLen} = 'enc_CSTAPrivateDataVersionList_components'(Val,[],0),
- encode_tags(TagIn, EncBytes, EncLen).
-
-'enc_CSTAPrivateDataVersionList_components'([], AccBytes, AccLen) ->
- {lists:reverse(AccBytes),AccLen};
-
-'enc_CSTAPrivateDataVersionList_components'([H|T],AccBytes, AccLen) ->
- {EncBytes,EncLen} = encode_integer(H, [<<2>>]),
- 'enc_CSTAPrivateDataVersionList_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
-
-
-
-'dec_CSTAPrivateDataVersionList'(Tlv) ->
- 'dec_CSTAPrivateDataVersionList'(Tlv, [16]).
-
-'dec_CSTAPrivateDataVersionList'(Tlv, TagIn) ->
- %%-------------------------------------------------
- %% decode tag and length
- %%-------------------------------------------------
-Tlv1 = match_tags(Tlv, TagIn),
-[decode_integer(V1, [2]) || V1 <- Tlv1].
-
-
-
-
-%%================================
-%% CSTAVersion
-%%================================
-'enc_CSTAVersion'(Val) ->
- 'enc_CSTAVersion'(Val, [<<3>>]).
-
-'enc_CSTAVersion'(Val, TagIn) ->
-encode_named_bit_string(Val, [{versionOne,0},{versionTwo,1},{versionThree,2},{versionFour,3},{versionFive,4},{versionSix,5},{versionSeven,6},{versionEight,7},{versionNine,8},{versionTen,9},{versionEleven,10},{versionTwelve,11},{versionThirteen,12},{versionFourteen,13},{versionFifteen,14},{versionSixteen,15},{versionSeventeen,16},{versionEighteen,17},{versionNineteen,18},{versionTwenty,19},{versionTwentyone,20},{versionTwentytwo,21},{versionTwentythree,22},{versionTwentyfour,23}], TagIn).
-
-
-'dec_CSTAVersion'(Tlv) ->
- 'dec_CSTAVersion'(Tlv, [3]).
-
-'dec_CSTAVersion'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{versionOne,0},{versionTwo,1},{versionThree,2},{versionFour,3},{versionFive,4},{versionSix,5},{versionSeven,6},{versionEight,7},{versionNine,8},{versionTen,9},{versionEleven,10},{versionTwelve,11},{versionThirteen,12},{versionFourteen,13},{versionFifteen,14},{versionSixteen,15},{versionSeventeen,16},{versionEighteen,17},{versionNineteen,18},{versionTwenty,19},{versionTwentyone,20},{versionTwentytwo,21},{versionTwentythree,22},{versionTwentyfour,23}], TagIn).
-
-
-
-%%================================
-%% CallControlServices
-%%================================
-'enc_CallControlServices'(Val) ->
- 'enc_CallControlServices'(Val, [<<3>>]).
-
-'enc_CallControlServices'(Val, TagIn) ->
-encode_named_bit_string(Val, [{acceptCall,0},{alternateCall,1},{answerCall,2},{callBack,3},{callBackMessage,4},{campOnCall,5},{clearCall,6},{clearConnection,7},{conferenceCall,8},{consultationCall,9},{deflectCall,10},{dialDigits,11},{directedPickupCall,12},{groupPickupCall,13},{holdCall,14},{intrudeCall,15},{joinCall,16},{makeCall,17},{makePredictiveCall,18},{parkCall,19},{reconnectCall,20},{retrieveCall,21},{singleStepConference,22},{singleStepTransfer,23},{transferCall,24},{makeConnection,25},{sendMessage,26}], TagIn).
-
-
-'dec_CallControlServices'(Tlv) ->
- 'dec_CallControlServices'(Tlv, [3]).
-
-'dec_CallControlServices'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{acceptCall,0},{alternateCall,1},{answerCall,2},{callBack,3},{callBackMessage,4},{campOnCall,5},{clearCall,6},{clearConnection,7},{conferenceCall,8},{consultationCall,9},{deflectCall,10},{dialDigits,11},{directedPickupCall,12},{groupPickupCall,13},{holdCall,14},{intrudeCall,15},{joinCall,16},{makeCall,17},{makePredictiveCall,18},{parkCall,19},{reconnectCall,20},{retrieveCall,21},{singleStepConference,22},{singleStepTransfer,23},{transferCall,24},{makeConnection,25},{sendMessage,26}], TagIn).
-
-
-
-%%================================
-%% CallAssociatedServices
-%%================================
-'enc_CallAssociatedServices'(Val) ->
- 'enc_CallAssociatedServices'(Val, [<<3>>]).
-
-'enc_CallAssociatedServices'(Val, TagIn) ->
-encode_named_bit_string(Val, [{associateData,0},{cancelTelephonyTones,1},{generateDigits,2},{generateTelephonyTones,3},{sendUserInformation,4},{changeConnectionInformation,5}], TagIn).
-
-
-'dec_CallAssociatedServices'(Tlv) ->
- 'dec_CallAssociatedServices'(Tlv, [3]).
-
-'dec_CallAssociatedServices'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{associateData,0},{cancelTelephonyTones,1},{generateDigits,2},{generateTelephonyTones,3},{sendUserInformation,4},{changeConnectionInformation,5}], TagIn).
-
-
-
-%%================================
-%% MediaAttachmentServices
-%%================================
-'enc_MediaAttachmentServices'(Val) ->
- 'enc_MediaAttachmentServices'(Val, [<<3>>]).
-
-'enc_MediaAttachmentServices'(Val, TagIn) ->
-encode_named_bit_string(Val, [{attachMediaService,0},{detachMediaService,1}], TagIn).
-
-
-'dec_MediaAttachmentServices'(Tlv) ->
- 'dec_MediaAttachmentServices'(Tlv, [3]).
-
-'dec_MediaAttachmentServices'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{attachMediaService,0},{detachMediaService,1}], TagIn).
-
-
-
-%%================================
-%% RouteingServices
-%%================================
-'enc_RouteingServices'(Val) ->
- 'enc_RouteingServices'(Val, [<<3>>]).
-
-'enc_RouteingServices'(Val, TagIn) ->
-encode_named_bit_string(Val, [{routeRegister,0},{routeRegisterCancel,1},{routeRegisterAbort,2},{reroute,3},{routeEnd,4},{routeReject,5},{routeRequest,6},{routeSelect,7},{routeUsed,8}], TagIn).
-
-
-'dec_RouteingServices'(Tlv) ->
- 'dec_RouteingServices'(Tlv, [3]).
-
-'dec_RouteingServices'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{routeRegister,0},{routeRegisterCancel,1},{routeRegisterAbort,2},{reroute,3},{routeEnd,4},{routeReject,5},{routeRequest,6},{routeSelect,7},{routeUsed,8}], TagIn).
-
-
-
-%%================================
-%% VoiceUnitServices
-%%================================
-'enc_VoiceUnitServices'(Val) ->
- 'enc_VoiceUnitServices'(Val, [<<3>>]).
-
-'enc_VoiceUnitServices'(Val, TagIn) ->
-encode_named_bit_string(Val, [{concatenateMessage,0},{deleteMessage,1},{playMessage,2},{queryVoiceAttribute,3},{recordMessage,4},{reposition,5},{resume,6},{review,7},{setVoiceAttribute,8},{stop,9},{suspend,10},{synthesizeMessage,11},{activate,12},{clear,13},{deactivate,14}], TagIn).
-
-
-'dec_VoiceUnitServices'(Tlv) ->
- 'dec_VoiceUnitServices'(Tlv, [3]).
-
-'dec_VoiceUnitServices'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{concatenateMessage,0},{deleteMessage,1},{playMessage,2},{queryVoiceAttribute,3},{recordMessage,4},{reposition,5},{resume,6},{review,7},{setVoiceAttribute,8},{stop,9},{suspend,10},{synthesizeMessage,11},{activate,12},{clear,13},{deactivate,14}], TagIn).
-
-
-
-%%================================
-%% LocationServices
-%%================================
-'enc_LocationServices'(Val) ->
- 'enc_LocationServices'(Val, [<<3>>]).
-
-'enc_LocationServices'(Val, TagIn) ->
-encode_named_bit_string(Val, [{getLocationInformation,0},{setLocationInformation,1},{locationTrackkingSessionResumed,2},{locationTrackkingSessionSuspended,3},{resumeLocationTrackingSession,4},{locationInformationReport,5},{startLocationTrackingSession,6},{stopLocationTrackingSession,7},{suspendLocationTrackingCapabilities,8},{locationSessionInfo,9}], TagIn).
-
-
-'dec_LocationServices'(Tlv) ->
- 'dec_LocationServices'(Tlv, [3]).
-
-'dec_LocationServices'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{getLocationInformation,0},{setLocationInformation,1},{locationTrackkingSessionResumed,2},{locationTrackkingSessionSuspended,3},{resumeLocationTrackingSession,4},{locationInformationReport,5},{startLocationTrackingSession,6},{stopLocationTrackingSession,7},{suspendLocationTrackingCapabilities,8},{locationSessionInfo,9}], TagIn).
-
-
-
-%%================================
-%% CallControlEvents
-%%================================
-'enc_CallControlEvents'(Val) ->
- 'enc_CallControlEvents'(Val, [<<3>>]).
-
-'enc_CallControlEvents'(Val, TagIn) ->
-encode_named_bit_string(Val, [{callCleared,0},{conferenced,1},{connectionCleared,2},{delivered,3},{diverted,4},{established,5},{failed,6},{held,7},{networkReached,8},{originated,9},{queued,10},{retrieved,11},{serviceInitiated,12},{transferred,13},{digitsDialed,14},{bridged,15},{networkCapabilitiesChanged,16},{offered,17}], TagIn).
-
-
-'dec_CallControlEvents'(Tlv) ->
- 'dec_CallControlEvents'(Tlv, [3]).
-
-'dec_CallControlEvents'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{callCleared,0},{conferenced,1},{connectionCleared,2},{delivered,3},{diverted,4},{established,5},{failed,6},{held,7},{networkReached,8},{originated,9},{queued,10},{retrieved,11},{serviceInitiated,12},{transferred,13},{digitsDialed,14},{bridged,15},{networkCapabilitiesChanged,16},{offered,17}], TagIn).
-
-
-
-%%================================
-%% CallAssociatedEvents
-%%================================
-'enc_CallAssociatedEvents'(Val) ->
- 'enc_CallAssociatedEvents'(Val, [<<3>>]).
-
-'enc_CallAssociatedEvents'(Val, TagIn) ->
-encode_named_bit_string(Val, [{callInformation,0},{charging,1},{dTMFDigitsDetected,2},{telephonyTonesDetected,3},{serviceCompletionFailure,4}], TagIn).
-
-
-'dec_CallAssociatedEvents'(Tlv) ->
- 'dec_CallAssociatedEvents'(Tlv, [3]).
-
-'dec_CallAssociatedEvents'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{callInformation,0},{charging,1},{dTMFDigitsDetected,2},{telephonyTonesDetected,3},{serviceCompletionFailure,4}], TagIn).
-
-
-
-%%================================
-%% MediaAttachmentEvents
-%%================================
-'enc_MediaAttachmentEvents'(Val) ->
- 'enc_MediaAttachmentEvents'(Val, [<<3>>]).
-
-'enc_MediaAttachmentEvents'(Val, TagIn) ->
-encode_named_bit_string(Val, [{mediaAttached,0},{mediaDetached,1}], TagIn).
-
-
-'dec_MediaAttachmentEvents'(Tlv) ->
- 'dec_MediaAttachmentEvents'(Tlv, [3]).
-
-'dec_MediaAttachmentEvents'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{mediaAttached,0},{mediaDetached,1}], TagIn).
-
-
-
-%%================================
-%% PhysicalDeviceFeatureEvents
-%%================================
-'enc_PhysicalDeviceFeatureEvents'(Val) ->
- 'enc_PhysicalDeviceFeatureEvents'(Val, [<<3>>]).
-
-'enc_PhysicalDeviceFeatureEvents'(Val, TagIn) ->
-encode_named_bit_string(Val, [{buttonInformation,0},{buttonPress,1},{displayUpdated,2},{hookswitch,3},{lampMode,4},{messageWaiting,5},{microphoneGain,6},{microphoneMute,7},{ringerStatus,8},{speakerMute,9},{speakerVolume,10}], TagIn).
-
-
-'dec_PhysicalDeviceFeatureEvents'(Tlv) ->
- 'dec_PhysicalDeviceFeatureEvents'(Tlv, [3]).
-
-'dec_PhysicalDeviceFeatureEvents'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{buttonInformation,0},{buttonPress,1},{displayUpdated,2},{hookswitch,3},{lampMode,4},{messageWaiting,5},{microphoneGain,6},{microphoneMute,7},{ringerStatus,8},{speakerMute,9},{speakerVolume,10}], TagIn).
-
-
-
-%%================================
-%% LogicalDeviceFeatureEvents
-%%================================
-'enc_LogicalDeviceFeatureEvents'(Val) ->
- 'enc_LogicalDeviceFeatureEvents'(Val, [<<3>>]).
-
-'enc_LogicalDeviceFeatureEvents'(Val, TagIn) ->
-encode_named_bit_string(Val, [{agentBusy,0},{agentLoggedOn,1},{agentLoggedOff,2},{agentNotReady,3},{agentReady,4},{agentWorkingAfterCall,5},{autoAnswer,6},{autoWorkMode,7},{callBack,8},{callBackMessage,9},{callerIDStatus,10},{doNotDisturb,11},{forwarding,12},{routeingMode,13},{presenceState,14}], TagIn).
-
-
-'dec_LogicalDeviceFeatureEvents'(Tlv) ->
- 'dec_LogicalDeviceFeatureEvents'(Tlv, [3]).
-
-'dec_LogicalDeviceFeatureEvents'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{agentBusy,0},{agentLoggedOn,1},{agentLoggedOff,2},{agentNotReady,3},{agentReady,4},{agentWorkingAfterCall,5},{autoAnswer,6},{autoWorkMode,7},{callBack,8},{callBackMessage,9},{callerIDStatus,10},{doNotDisturb,11},{forwarding,12},{routeingMode,13},{presenceState,14}], TagIn).
-
-
-
-%%================================
-%% DeviceMaintenanceEvents
-%%================================
-'enc_DeviceMaintenanceEvents'(Val) ->
- 'enc_DeviceMaintenanceEvents'(Val, [<<3>>]).
-
-'enc_DeviceMaintenanceEvents'(Val, TagIn) ->
-encode_named_bit_string(Val, [{backInService,0},{outOfService,1},{deviceCapabilityChanged,2},{partiallyInService,3}], TagIn).
-
-
-'dec_DeviceMaintenanceEvents'(Tlv) ->
- 'dec_DeviceMaintenanceEvents'(Tlv, [3]).
-
-'dec_DeviceMaintenanceEvents'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{backInService,0},{outOfService,1},{deviceCapabilityChanged,2},{partiallyInService,3}], TagIn).
-
-
-
-%%================================
-%% VoiceUnitEvents
-%%================================
-'enc_VoiceUnitEvents'(Val) ->
- 'enc_VoiceUnitEvents'(Val, [<<3>>]).
-
-'enc_VoiceUnitEvents'(Val, TagIn) ->
-encode_named_bit_string(Val, [{stop,0},{play,1},{suspendPlay,2},{record,3},{suspendRecord,4},{review,5},{voiceAttributesChange,6},{bookmarkReached,7},{completed,8},{dtmfDetected,9},{emptied,10},{interruptionDetected,11},{notRecognized,12},{recognized,13},{started,14},{silenceTimeoutExpired,15},{speechDetected,16},{voiceErrorOccured,17}], TagIn).
-
-
-'dec_VoiceUnitEvents'(Tlv) ->
- 'dec_VoiceUnitEvents'(Tlv, [3]).
-
-'dec_VoiceUnitEvents'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{stop,0},{play,1},{suspendPlay,2},{record,3},{suspendRecord,4},{review,5},{voiceAttributesChange,6},{bookmarkReached,7},{completed,8},{dtmfDetected,9},{emptied,10},{interruptionDetected,11},{notRecognized,12},{recognized,13},{started,14},{silenceTimeoutExpired,15},{speechDetected,16},{voiceErrorOccured,17}], TagIn).
-
-
-
-%%================================
-%% VendorSpecEvents
-%%================================
-'enc_VendorSpecEvents'(Val) ->
- 'enc_VendorSpecEvents'(Val, [<<3>>]).
-
-'enc_VendorSpecEvents'(Val, TagIn) ->
-encode_named_bit_string(Val, [{privateEvent,0}], TagIn).
-
-
-'dec_VendorSpecEvents'(Tlv) ->
- 'dec_VendorSpecEvents'(Tlv, [3]).
-
-'dec_VendorSpecEvents'(Tlv, TagIn) ->
-decode_named_bit_string(Tlv, [{privateEvent,0}], TagIn).
-
-
-%%%
-%%% Run-time functions.
-%%%
-
-'dialyzer-suppressions'(Arg) ->
- ok.
-
-ber_decode_nif(B) ->
- asn1rt_nif:decode_ber_tlv(B).
-
-collect_parts(TlvList) ->
- collect_parts(TlvList, []).
-
-collect_parts([{_,L}|Rest], Acc) when is_list(L) ->
- collect_parts(Rest, [collect_parts(L)|Acc]);
-collect_parts([{3,<<Unused,Bits/binary>>}|Rest], _Acc) ->
- collect_parts_bit(Rest, [Bits], Unused);
-collect_parts([{_T,V}|Rest], Acc) ->
- collect_parts(Rest, [V|Acc]);
-collect_parts([], Acc) ->
- list_to_binary(lists:reverse(Acc)).
-
-collect_parts_bit([{3,<<Unused,Bits/binary>>}|Rest], Acc, Uacc) ->
- collect_parts_bit(Rest, [Bits|Acc], Unused + Uacc);
-collect_parts_bit([], Acc, Uacc) ->
- list_to_binary([Uacc|lists:reverse(Acc)]).
-
-decode_bitstring2(1,
- Unused,
- <<B7:1,B6:1,B5:1,B4:1,B3:1,B2:1,B1:1,B0:1,_/binary>>) ->
- lists:sublist([B7,B6,B5,B4,B3,B2,B1,B0], 8 - Unused);
-decode_bitstring2(Len,
- Unused,
- <<B7:1,
- B6:1,
- B5:1,
- B4:1,
- B3:1,
- B2:1,
- B1:1,
- B0:1,
- Buffer/binary>>) ->
- [B7,B6,B5,B4,B3,B2,B1,B0|decode_bitstring2(Len - 1, Unused, Buffer)].
-
-decode_bitstring_NNL(BitList, NamedNumberList) ->
- decode_bitstring_NNL(BitList, NamedNumberList, 0, []).
-
-decode_bitstring_NNL([], _, _No, Result) ->
- lists:reverse(Result);
-decode_bitstring_NNL([B|BitList],
- [{Name,No}|NamedNumberList],
- No,
- Result) ->
- if
- B =:= 0 ->
- decode_bitstring_NNL(BitList,
- NamedNumberList,
- No + 1,
- Result);
- true ->
- decode_bitstring_NNL(BitList,
- NamedNumberList,
- No + 1,
- [Name|Result])
- end;
-decode_bitstring_NNL([1|BitList], NamedNumberList, No, Result) ->
- decode_bitstring_NNL(BitList,
- NamedNumberList,
- No + 1,
- [{bit,No}|Result]);
-decode_bitstring_NNL([0|BitList], NamedNumberList, No, Result) ->
- decode_bitstring_NNL(BitList, NamedNumberList, No + 1, Result).
-
-decode_integer(Tlv, TagIn) ->
- Bin = match_tags(Tlv, TagIn),
- Len = byte_size(Bin),
- <<Int:Len/signed-unit:8>> = Bin,
- Int.
-
-decode_named_bit_string(Buffer, NamedNumberList, Tags) ->
- case match_and_collect(Buffer, Tags) of
- <<0>> ->
- [];
- <<Unused,Bits/binary>> ->
- BitString = decode_bitstring2(byte_size(Bits), Unused, Bits),
- decode_bitstring_NNL(BitString, NamedNumberList)
- end.
-
-do_encode_named_bit_string([FirstVal|RestVal], NamedBitList, TagIn) ->
- ToSetPos = get_all_bitposes([FirstVal|RestVal], NamedBitList, []),
- Size = lists:max(ToSetPos) + 1,
- BitList = make_and_set_list(Size, ToSetPos, 0),
- {Len,Unused,OctetList} = encode_bitstring(BitList),
- encode_tags(TagIn, [Unused|OctetList], Len + 1).
-
-encode_bitstring([B8,B7,B6,B5,B4,B3,B2,B1|Rest]) ->
- Val =
- B8 bsl 7 bor (B7 bsl 6) bor (B6 bsl 5) bor (B5 bsl 4)
- bor
- (B4 bsl 3)
- bor
- (B3 bsl 2)
- bor
- (B2 bsl 1)
- bor
- B1,
- encode_bitstring(Rest, [Val], 1);
-encode_bitstring(Val) ->
- {Unused,Octet} = unused_bitlist(Val, 7, 0),
- {1,Unused,[Octet]}.
-
-encode_bitstring([B8,B7,B6,B5,B4,B3,B2,B1|Rest], Ack, Len) ->
- Val =
- B8 bsl 7 bor (B7 bsl 6) bor (B6 bsl 5) bor (B5 bsl 4)
- bor
- (B4 bsl 3)
- bor
- (B3 bsl 2)
- bor
- (B2 bsl 1)
- bor
- B1,
- encode_bitstring(Rest, [Ack,Val], Len + 1);
-encode_bitstring([], Ack, Len) ->
- {Len,0,Ack};
-encode_bitstring(Rest, Ack, Len) ->
- {Unused,Val} = unused_bitlist(Rest, 7, 0),
- {Len + 1,Unused,[Ack,Val]}.
-
-encode_integer(Val) ->
- Bytes =
- if
- Val >= 0 ->
- encode_integer_pos(Val, []);
- true ->
- encode_integer_neg(Val, [])
- end,
- {Bytes,length(Bytes)}.
-
-encode_integer(Val, Tag) when is_integer(Val) ->
- encode_tags(Tag, encode_integer(Val));
-encode_integer(Val, _Tag) ->
- exit({error,{asn1,{encode_integer,Val}}}).
-
-encode_integer_neg(- 1, [B1|_T] = L) when B1 > 127 ->
- L;
-encode_integer_neg(N, Acc) ->
- encode_integer_neg(N bsr 8, [N band 255|Acc]).
-
-encode_integer_pos(0, [B|_Acc] = L) when B < 128 ->
- L;
-encode_integer_pos(N, Acc) ->
- encode_integer_pos(N bsr 8, [N band 255|Acc]).
-
-encode_length(L) when L =< 127 ->
- {[L],1};
-encode_length(L) ->
- Oct = minimum_octets(L),
- Len = length(Oct),
- if
- Len =< 126 ->
- {[128 bor Len|Oct],Len + 1};
- true ->
- exit({error,{asn1,too_long_length_oct,Len}})
- end.
-
-encode_named_bit_string([H|_] = Bits, NamedBitList, TagIn)
- when is_atom(H) ->
- do_encode_named_bit_string(Bits, NamedBitList, TagIn);
-encode_named_bit_string([{bit,_}|_] = Bits, NamedBitList, TagIn) ->
- do_encode_named_bit_string(Bits, NamedBitList, TagIn);
-encode_named_bit_string(Bits, _NamedBitList, TagIn)
- when is_bitstring(Bits) ->
- encode_unnamed_bit_string(Bits, TagIn).
-
-encode_tags(TagIn, {BytesSoFar,LenSoFar}) ->
- encode_tags(TagIn, BytesSoFar, LenSoFar).
-
-encode_tags([Tag|Trest], BytesSoFar, LenSoFar) ->
- {Bytes2,L2} = encode_length(LenSoFar),
- encode_tags(Trest,
- [Tag,Bytes2|BytesSoFar],
- LenSoFar + byte_size(Tag) + L2);
-encode_tags([], BytesSoFar, LenSoFar) ->
- {BytesSoFar,LenSoFar}.
-
-encode_unnamed_bit_string(Bits, TagIn) ->
- Unused = (8 - bit_size(Bits) band 7) band 7,
- Bin = <<Unused,Bits/bitstring,0:Unused>>,
- encode_tags(TagIn, Bin, byte_size(Bin)).
-
-get_all_bitposes([{bit,ValPos}|Rest], NamedBitList, Ack) ->
- get_all_bitposes(Rest, NamedBitList, [ValPos|Ack]);
-get_all_bitposes([Val|Rest], NamedBitList, Ack) when is_atom(Val) ->
- case lists:keyfind(Val, 1, NamedBitList) of
- {_ValName,ValPos} ->
- get_all_bitposes(Rest, NamedBitList, [ValPos|Ack]);
- _ ->
- exit({error,{asn1,{bitstring_namedbit,Val}}})
- end;
-get_all_bitposes([], _NamedBitList, Ack) ->
- lists:sort(Ack).
-
-make_and_set_list(0, [], _) ->
- [];
-make_and_set_list(0, _, _) ->
- exit({error,{asn1,bitstring_sizeconstraint}});
-make_and_set_list(Len, [XPos|SetPos], XPos) ->
- [1|make_and_set_list(Len - 1, SetPos, XPos + 1)];
-make_and_set_list(Len, [Pos|SetPos], XPos) ->
- [0|make_and_set_list(Len - 1, [Pos|SetPos], XPos + 1)];
-make_and_set_list(Len, [], XPos) ->
- [0|make_and_set_list(Len - 1, [], XPos + 1)].
-
-match_and_collect(Tlv, TagsIn) ->
- Val = match_tags(Tlv, TagsIn),
- case Val of
- [_|_] = PartList ->
- collect_parts(PartList);
- Bin when is_binary(Bin) ->
- Bin
- end.
-
-match_tags({T,V}, [T]) ->
- V;
-match_tags({T,V}, [T|Tt]) ->
- match_tags(V, Tt);
-match_tags([{T,V}], [T|Tt]) ->
- match_tags(V, Tt);
-match_tags([{T,_V}|_] = Vlist, [T]) ->
- Vlist;
-match_tags(Tlv, []) ->
- Tlv;
-match_tags({Tag,_V} = Tlv, [T|_Tt]) ->
- exit({error,{asn1,{wrong_tag,{{expected,T},{got,Tag,Tlv}}}}}).
-
-minimum_octets(0, Acc) ->
- Acc;
-minimum_octets(Val, Acc) ->
- minimum_octets(Val bsr 8, [Val band 255|Acc]).
-
-minimum_octets(Val) ->
- minimum_octets(Val, []).
-
-unused_bitlist([], Trail, Ack) ->
- {Trail + 1,Ack};
-unused_bitlist([Bit|Rest], Trail, Ack) ->
- unused_bitlist(Rest, Trail - 1, Bit bsl Trail bor Ack).