%% Generated by the Erlang ASN.1 BER-compiler version:1.7 %% Purpose: encoder and decoder to the types in mod CSTA-application-context-information-csta3 -module('CSTA-application-context-information-csta3'). -include("CSTA-application-context-information-csta3.hrl"). -define('RT_BER',asn1rt_ber_bin). -asn1_info([{vsn,'1.7'}, {module,'CSTA-application-context-information-csta3'}, {options,[{i,[47,104,111,109,101,47,113,117,97,120,47,101,114,108,47,97,115,110]},warnings,ber,errors,{cwd,[47,104,111,109,101,47,113,117,97,120,47,101,114,108,47,97,115,110]},{outdir,[47,104,111,109,101,47,113,117,97,120,47,101,114,108,47,97,115,110]},{i,[46]},{i,[47,104,111,109,101,47,113,117,97,120,47,101,114,108,47,97,115,110,47,107,109,101]}]}]). -export([encoding_rule/0]). -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([ 'dec_CSTAFunctionality'/3, 'dec_SwitchingFunctionServicesC2'/3, 'dec_EventReportServicesC2'/3, 'dec_ComputingFunctionServicesC2'/3, 'dec_BidirectionalServicesC2'/3, 'dec_StatusReportingServicesC2'/3, 'dec_InputOutputServicesC2'/3, 'dec_VoiceUnitServicesC2'/3, 'dec_ACSEUserInformationForCSTA'/3, 'dec_OldACSEUserInformationForCSTA'/3, 'dec_NewACSEUserInformationForCSTA'/3, 'dec_CSTAPrivateDataVersionList'/3, 'dec_CSTAVersion'/3, 'dec_CallControlServices'/3, 'dec_CallAssociatedServices'/3, 'dec_MediaAttachmentServices'/3, 'dec_RouteingServices'/3, 'dec_VoiceUnitServices'/3, 'dec_LocationServices'/3, 'dec_CallControlEvents'/3, 'dec_CallAssociatedEvents'/3, 'dec_MediaAttachmentEvents'/3, 'dec_PhysicalDeviceFeatureEvents'/3, 'dec_LogicalDeviceFeatureEvents'/3, 'dec_DeviceMaintenanceEvents'/3, 'dec_VoiceUnitEvents'/3, 'dec_VendorSpecEvents'/3 ]). -export([info/0]). -export([encode/2,decode/2,encode_disp/2,decode_disp/2]). encoding_rule() -> ber. encode(Type,Data) -> case catch encode_disp(Type,Data) of {'EXIT',{error,Reason}} -> {error,Reason}; {'EXIT',Reason} -> {error,{asn1,Reason}}; {Bytes,_Len} -> {ok,wrap_encode(Bytes)}; Bytes -> {ok,wrap_encode(Bytes)} end. decode(Type,Data) -> case catch decode_disp(Type,wrap_decode(Data)) of {'EXIT',{error,Reason}} -> {error,Reason}; {'EXIT',Reason} -> {error,{asn1,Reason}}; {X,_Rest} -> {ok,X}; {X,_Rest,_Len} -> {ok,X} 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,mandatory); decode_disp('SwitchingFunctionServicesC2',Data) -> 'dec_SwitchingFunctionServicesC2'(Data,mandatory); decode_disp('EventReportServicesC2',Data) -> 'dec_EventReportServicesC2'(Data,mandatory); decode_disp('ComputingFunctionServicesC2',Data) -> 'dec_ComputingFunctionServicesC2'(Data,mandatory); decode_disp('BidirectionalServicesC2',Data) -> 'dec_BidirectionalServicesC2'(Data,mandatory); decode_disp('StatusReportingServicesC2',Data) -> 'dec_StatusReportingServicesC2'(Data,mandatory); decode_disp('InputOutputServicesC2',Data) -> 'dec_InputOutputServicesC2'(Data,mandatory); decode_disp('VoiceUnitServicesC2',Data) -> 'dec_VoiceUnitServicesC2'(Data,mandatory); decode_disp('ACSEUserInformationForCSTA',Data) -> 'dec_ACSEUserInformationForCSTA'(Data,mandatory); decode_disp('OldACSEUserInformationForCSTA',Data) -> 'dec_OldACSEUserInformationForCSTA'(Data,mandatory); decode_disp('NewACSEUserInformationForCSTA',Data) -> 'dec_NewACSEUserInformationForCSTA'(Data,mandatory); decode_disp('CSTAPrivateDataVersionList',Data) -> 'dec_CSTAPrivateDataVersionList'(Data,mandatory); decode_disp('CSTAVersion',Data) -> 'dec_CSTAVersion'(Data,mandatory); decode_disp('CallControlServices',Data) -> 'dec_CallControlServices'(Data,mandatory); decode_disp('CallAssociatedServices',Data) -> 'dec_CallAssociatedServices'(Data,mandatory); decode_disp('MediaAttachmentServices',Data) -> 'dec_MediaAttachmentServices'(Data,mandatory); decode_disp('RouteingServices',Data) -> 'dec_RouteingServices'(Data,mandatory); decode_disp('VoiceUnitServices',Data) -> 'dec_VoiceUnitServices'(Data,mandatory); decode_disp('LocationServices',Data) -> 'dec_LocationServices'(Data,mandatory); decode_disp('CallControlEvents',Data) -> 'dec_CallControlEvents'(Data,mandatory); decode_disp('CallAssociatedEvents',Data) -> 'dec_CallAssociatedEvents'(Data,mandatory); decode_disp('MediaAttachmentEvents',Data) -> 'dec_MediaAttachmentEvents'(Data,mandatory); decode_disp('PhysicalDeviceFeatureEvents',Data) -> 'dec_PhysicalDeviceFeatureEvents'(Data,mandatory); decode_disp('LogicalDeviceFeatureEvents',Data) -> 'dec_LogicalDeviceFeatureEvents'(Data,mandatory); decode_disp('DeviceMaintenanceEvents',Data) -> 'dec_DeviceMaintenanceEvents'(Data,mandatory); decode_disp('VoiceUnitEvents',Data) -> 'dec_VoiceUnitEvents'(Data,mandatory); decode_disp('VendorSpecEvents',Data) -> 'dec_VendorSpecEvents'(Data,mandatory); decode_disp(Type,_Data) -> exit({error,{asn1,{undefined_type,Type}}}). wrap_encode(Bytes) when is_list(Bytes) -> binary_to_list(list_to_binary(Bytes)); wrap_encode(Bytes) when is_binary(Bytes) -> binary_to_list(Bytes); wrap_encode(Bytes) -> Bytes. wrap_decode(Bytes) when is_list(Bytes) -> list_to_binary(Bytes); wrap_decode(Bytes) -> Bytes. info() -> case ?MODULE:module_info() of MI when is_list(MI) -> case lists:keysearch(attributes,1,MI) of {value,{_,Attributes}} when is_list(Attributes) -> case lists:keysearch(asn1_info,1,Attributes) of {value,{_,Info}} when is_list(Info) -> Info; _ -> [] end; _ -> [] end end. %%================================ %% CSTAFunctionality %%================================ 'enc_CSTAFunctionality'(Val, TagIn) -> %%------------------------------------------------- %% attribute number 1 with type BIT STRING DEFAULT = [] %%------------------------------------------------- {EncBytes1,EncLen1} = case ?RT_BER:cindex(2,Val,switchingFunctionServices) of asn1_DEFAULT -> {<<>>,0}; [] -> {<<>>,0}; _ -> ?RT_BER:encode_bit_string([], ?RT_BER:cindex(2,Val,switchingFunctionServices), [{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}], [{tag,128,0,'IMPLICIT',32}]) end, %%------------------------------------------------- %% attribute number 2 with type BIT STRING DEFAULT = [] %%------------------------------------------------- {EncBytes2,EncLen2} = case ?RT_BER:cindex(3,Val,eventReportServices) of asn1_DEFAULT -> {<<>>,0}; [] -> {<<>>,0}; _ -> ?RT_BER:encode_bit_string([], ?RT_BER:cindex(3,Val,eventReportServices), [{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}], [{tag,128,1,'IMPLICIT',32}]) end, %%------------------------------------------------- %% attribute number 3 with type BIT STRING DEFAULT = [] %%------------------------------------------------- {EncBytes3,EncLen3} = case ?RT_BER:cindex(4,Val,computingFunctionServices) of asn1_DEFAULT -> {<<>>,0}; [] -> {<<>>,0}; _ -> ?RT_BER:encode_bit_string([], ?RT_BER:cindex(4,Val,computingFunctionServices), [{routeRequest,0},{reRouteRequest,1},{routeSelectRequest,2},{routeUsedRequest,3},{routeEndRequest,4}], [{tag,128,2,'IMPLICIT',32}]) end, %%------------------------------------------------- %% attribute number 4 with type BIT STRING DEFAULT = [] %%------------------------------------------------- {EncBytes4,EncLen4} = case ?RT_BER:cindex(5,Val,bidirectionalServices) of asn1_DEFAULT -> {<<>>,0}; [] -> {<<>>,0}; _ -> ?RT_BER:encode_bit_string([], ?RT_BER:cindex(5,Val,bidirectionalServices), [{escapeService,0},{systemStatus,1}], [{tag,128,3,'IMPLICIT',32}]) end, %%------------------------------------------------- %% attribute number 5 with type BIT STRING DEFAULT = [] %%------------------------------------------------- {EncBytes5,EncLen5} = case ?RT_BER:cindex(6,Val,statusReportingServices) of asn1_DEFAULT -> {<<>>,0}; [] -> {<<>>,0}; _ -> ?RT_BER:encode_bit_string([], ?RT_BER:cindex(6,Val,statusReportingServices), [{monitorStart,0},{changeMonitorFilter,1},{monitorStop,2},{snapshotDevice,3},{snapshotCall,4}], [{tag,128,4,'IMPLICIT',32}]) end, %%------------------------------------------------- %% attribute number 6 with type BIT STRING DEFAULT = [] %%------------------------------------------------- {EncBytes6,EncLen6} = case ?RT_BER:cindex(7,Val,inputOutputServices) of asn1_DEFAULT -> {<<>>,0}; [] -> {<<>>,0}; _ -> ?RT_BER:encode_bit_string([], ?RT_BER:cindex(7,Val,inputOutputServices), [{startDataPathService,0},{stopDataPathService,1},{sendDataService,2},{sendMulticastDataService,3},{sendBroadcastDataService,4},{suspendDataPathService,5},{dataPathSuspendedService,6},{resumeDataPath,7},{dataPathResumedService,8},{fastData,9}], [{tag,128,5,'IMPLICIT',32}]) end, %%------------------------------------------------- %% attribute number 7 with type BIT STRING DEFAULT = [] %%------------------------------------------------- {EncBytes7,EncLen7} = case ?RT_BER:cindex(8,Val,voiceUnitServices) of asn1_DEFAULT -> {<<>>,0}; [] -> {<<>>,0}; _ -> ?RT_BER:encode_bit_string([], ?RT_BER:cindex(8,Val,voiceUnitServices), [{concatenateMessage,0},{deleteMessage,1},{playMessage,2},{queryVoiceAttribute,3},{recordMessage,4},{reposition,5},{resume,6},{review,7},{setVoiceAttribute,8},{stop,9},{suspend,10},{synthesizeMessage,11}], [{tag,128,6,'IMPLICIT',32}]) end, BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4, EncBytes5, EncBytes6, EncBytes7], LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4 + EncLen5 + EncLen6 + EncLen7, ?RT_BER:encode_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], BytesSoFar, LenSoFar). 'dec_CSTAFunctionality'(Bytes, OptOrMand) -> 'dec_CSTAFunctionality'(Bytes, OptOrMand, []). 'dec_CSTAFunctionality'(Bytes, OptOrMand, TagIn) -> %%------------------------------------------------- %% decode tag and length %%------------------------------------------------- {{_,Len},Bytes1,Rb1} = ?RT_BER:check_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], Bytes, OptOrMand), {Bytes2,RemBytes} = ?RT_BER:split_list(Bytes1,Len), %%------------------------------------------------- %% attribute number 1 with type BIT STRING DEFAULT = [] %%------------------------------------------------- {Term1,Bytes3,Rb2} = case Bytes2 of <<2:2,_:1,0:5,_/binary>> -> ?RT_BER:decode_bit_string(Bytes2,[],[{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}],[{tag,128,0,'IMPLICIT',32}], no_length, mandatory); _ -> {[],Bytes2, 0 } end, %%------------------------------------------------- %% attribute number 2 with type BIT STRING DEFAULT = [] %%------------------------------------------------- {Term2,Bytes4,Rb3} = case Bytes3 of <<2:2,_:1,1:5,_/binary>> -> ?RT_BER:decode_bit_string(Bytes3,[],[{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}],[{tag,128,1,'IMPLICIT',32}], no_length, mandatory); _ -> {[],Bytes3, 0 } end, %%------------------------------------------------- %% attribute number 3 with type BIT STRING DEFAULT = [] %%------------------------------------------------- {Term3,Bytes5,Rb4} = case Bytes4 of <<2:2,_:1,2:5,_/binary>> -> ?RT_BER:decode_bit_string(Bytes4,[],[{routeRequest,0},{reRouteRequest,1},{routeSelectRequest,2},{routeUsedRequest,3},{routeEndRequest,4}],[{tag,128,2,'IMPLICIT',32}], no_length, mandatory); _ -> {[],Bytes4, 0 } end, %%------------------------------------------------- %% attribute number 4 with type BIT STRING DEFAULT = [] %%------------------------------------------------- {Term4,Bytes6,Rb5} = case Bytes5 of <<2:2,_:1,3:5,_/binary>> -> ?RT_BER:decode_bit_string(Bytes5,[],[{escapeService,0},{systemStatus,1}],[{tag,128,3,'IMPLICIT',32}], no_length, mandatory); _ -> {[],Bytes5, 0 } end, %%------------------------------------------------- %% attribute number 5 with type BIT STRING DEFAULT = [] %%------------------------------------------------- {Term5,Bytes7,Rb6} = case Bytes6 of <<2:2,_:1,4:5,_/binary>> -> ?RT_BER:decode_bit_string(Bytes6,[],[{monitorStart,0},{changeMonitorFilter,1},{monitorStop,2},{snapshotDevice,3},{snapshotCall,4}],[{tag,128,4,'IMPLICIT',32}], no_length, mandatory); _ -> {[],Bytes6, 0 } end, %%------------------------------------------------- %% attribute number 6 with type BIT STRING DEFAULT = [] %%------------------------------------------------- {Term6,Bytes8,Rb7} = case Bytes7 of <<2:2,_:1,5:5,_/binary>> -> ?RT_BER:decode_bit_string(Bytes7,[],[{startDataPathService,0},{stopDataPathService,1},{sendDataService,2},{sendMulticastDataService,3},{sendBroadcastDataService,4},{suspendDataPathService,5},{dataPathSuspendedService,6},{resumeDataPath,7},{dataPathResumedService,8},{fastData,9}],[{tag,128,5,'IMPLICIT',32}], no_length, mandatory); _ -> {[],Bytes7, 0 } end, %%------------------------------------------------- %% attribute number 7 with type BIT STRING DEFAULT = [] %%------------------------------------------------- {Term7,Bytes9,Rb8} = case Bytes8 of <<2:2,_:1,6:5,_/binary>> -> ?RT_BER:decode_bit_string(Bytes8,[],[{concatenateMessage,0},{deleteMessage,1},{playMessage,2},{queryVoiceAttribute,3},{recordMessage,4},{reposition,5},{resume,6},{review,7},{setVoiceAttribute,8},{stop,9},{suspend,10},{synthesizeMessage,11}],[{tag,128,6,'IMPLICIT',32}], no_length, mandatory); _ -> {[],Bytes8, 0 } end, {Bytes10,Rb9} = ?RT_BER:restbytes2(RemBytes, Bytes9,noext), {{'CSTAFunctionality', Term1, Term2, Term3, Term4, Term5, Term6, Term7}, Bytes10, Rb1+Rb2+Rb3+Rb4+Rb5+Rb6+Rb7+Rb8+Rb9}. %%================================ %% SwitchingFunctionServicesC2 %%================================ 'enc_SwitchingFunctionServicesC2'({'SwitchingFunctionServicesC2',Val}, TagIn) -> 'enc_SwitchingFunctionServicesC2'(Val, TagIn); 'enc_SwitchingFunctionServicesC2'(Val, TagIn) -> ?RT_BER:encode_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'(Bytes, OptOrMand) -> 'dec_SwitchingFunctionServicesC2'(Bytes, OptOrMand, []). 'dec_SwitchingFunctionServicesC2'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{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++[], no_length, OptOrMand). %%================================ %% EventReportServicesC2 %%================================ 'enc_EventReportServicesC2'({'EventReportServicesC2',Val}, TagIn) -> 'enc_EventReportServicesC2'(Val, TagIn); 'enc_EventReportServicesC2'(Val, TagIn) -> ?RT_BER:encode_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'(Bytes, OptOrMand) -> 'dec_EventReportServicesC2'(Bytes, OptOrMand, []). 'dec_EventReportServicesC2'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{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++[], no_length, OptOrMand). %%================================ %% ComputingFunctionServicesC2 %%================================ 'enc_ComputingFunctionServicesC2'({'ComputingFunctionServicesC2',Val}, TagIn) -> 'enc_ComputingFunctionServicesC2'(Val, TagIn); 'enc_ComputingFunctionServicesC2'(Val, TagIn) -> ?RT_BER:encode_bit_string([], Val, [{routeRequest,0},{reRouteRequest,1},{routeSelectRequest,2},{routeUsedRequest,3},{routeEndRequest,4}], TagIn ++ []). 'dec_ComputingFunctionServicesC2'(Bytes, OptOrMand) -> 'dec_ComputingFunctionServicesC2'(Bytes, OptOrMand, []). 'dec_ComputingFunctionServicesC2'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{routeRequest,0},{reRouteRequest,1},{routeSelectRequest,2},{routeUsedRequest,3},{routeEndRequest,4}],TagIn++[], no_length, OptOrMand). %%================================ %% BidirectionalServicesC2 %%================================ 'enc_BidirectionalServicesC2'({'BidirectionalServicesC2',Val}, TagIn) -> 'enc_BidirectionalServicesC2'(Val, TagIn); 'enc_BidirectionalServicesC2'(Val, TagIn) -> ?RT_BER:encode_bit_string([], Val, [{escapeService,0},{systemStatus,1}], TagIn ++ []). 'dec_BidirectionalServicesC2'(Bytes, OptOrMand) -> 'dec_BidirectionalServicesC2'(Bytes, OptOrMand, []). 'dec_BidirectionalServicesC2'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{escapeService,0},{systemStatus,1}],TagIn++[], no_length, OptOrMand). %%================================ %% StatusReportingServicesC2 %%================================ 'enc_StatusReportingServicesC2'({'StatusReportingServicesC2',Val}, TagIn) -> 'enc_StatusReportingServicesC2'(Val, TagIn); 'enc_StatusReportingServicesC2'(Val, TagIn) -> ?RT_BER:encode_bit_string([], Val, [{monitorStart,0},{changeMonitorFilter,1},{monitorStop,2},{snapshotDevice,3},{snapshotCall,4}], TagIn ++ []). 'dec_StatusReportingServicesC2'(Bytes, OptOrMand) -> 'dec_StatusReportingServicesC2'(Bytes, OptOrMand, []). 'dec_StatusReportingServicesC2'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{monitorStart,0},{changeMonitorFilter,1},{monitorStop,2},{snapshotDevice,3},{snapshotCall,4}],TagIn++[], no_length, OptOrMand). %%================================ %% InputOutputServicesC2 %%================================ 'enc_InputOutputServicesC2'({'InputOutputServicesC2',Val}, TagIn) -> 'enc_InputOutputServicesC2'(Val, TagIn); 'enc_InputOutputServicesC2'(Val, TagIn) -> ?RT_BER:encode_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'(Bytes, OptOrMand) -> 'dec_InputOutputServicesC2'(Bytes, OptOrMand, []). 'dec_InputOutputServicesC2'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{startDataPathService,0},{stopDataPathService,1},{sendDataService,2},{sendMulticastDataService,3},{sendBroadcastDataService,4},{suspendDataPathService,5},{dataPathSuspendedService,6},{resumeDataPath,7},{dataPathResumedService,8},{fastData,9}],TagIn++[], no_length, OptOrMand). %%================================ %% VoiceUnitServicesC2 %%================================ 'enc_VoiceUnitServicesC2'({'VoiceUnitServicesC2',Val}, TagIn) -> 'enc_VoiceUnitServicesC2'(Val, TagIn); 'enc_VoiceUnitServicesC2'(Val, TagIn) -> ?RT_BER:encode_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'(Bytes, OptOrMand) -> 'dec_VoiceUnitServicesC2'(Bytes, OptOrMand, []). 'dec_VoiceUnitServicesC2'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{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++[], no_length, OptOrMand). %%================================ %% ACSEUserInformationForCSTA %%================================ 'enc_ACSEUserInformationForCSTA'({'ACSEUserInformationForCSTA',Val}, TagIn) -> 'enc_ACSEUserInformationForCSTA'(Val, TagIn); 'enc_ACSEUserInformationForCSTA'(Val, TagIn) -> {EncBytes,EncLen} = case element(1,Val) of oldDefinition -> 'enc_OldACSEUserInformationForCSTA'(element(2,Val), []); newDefinition -> 'enc_NewACSEUserInformationForCSTA'(element(2,Val), [{tag,128,0,'IMPLICIT',32}]); Else -> exit({error,{asn1,{invalid_choice_type,Else}}}) end, ?RT_BER:encode_tags(TagIn ++[], EncBytes, EncLen). 'dec_ACSEUserInformationForCSTA'(Bytes, OptOrMand) -> 'dec_ACSEUserInformationForCSTA'(Bytes, OptOrMand, []). 'dec_ACSEUserInformationForCSTA'(Bytes, OptOrMand, TagIn) -> {{_,Len},Bytes1, RbExp} = ?RT_BER:check_tags(TagIn++[], Bytes, OptOrMand), IndefEndBytes = fun(indefinite,<<0,0,R/binary>>)-> R; (_,B)-> B end, IndefEndRb = fun(indefinite,<<0,0,_R/binary>>)-> 2; (_,_)-> 0 end, case Bytes1 of %% 'oldDefinition' <<0:2,_:1,16:5,_/binary>> -> {Dec, Rest, RbCho} = 'dec_OldACSEUserInformationForCSTA'(Bytes1, mandatory, []), {{oldDefinition, Dec}, IndefEndBytes(Len,Rest), RbExp + RbCho + IndefEndRb(Len,Rest)}; %% 'newDefinition' <<2:2,_:1,0:5,_/binary>> -> {Dec, Rest, RbCho} = 'dec_NewACSEUserInformationForCSTA'(Bytes1, mandatory, [{tag,128,0,'IMPLICIT',32}]), {{newDefinition, Dec}, IndefEndBytes(Len,Rest), RbExp + RbCho + IndefEndRb(Len,Rest)}; Else -> case OptOrMand of mandatory ->exit({error,{asn1,{invalid_choice_tag,Else}}}); _ ->exit({error,{asn1,{no_optional_tag,Else}}}) end end. %%================================ %% OldACSEUserInformationForCSTA %%================================ 'enc_OldACSEUserInformationForCSTA'(Val, TagIn) -> %%------------------------------------------------- %% attribute number 1 with type BIT STRING %%------------------------------------------------- {EncBytes1,EncLen1} = ?RT_BER:encode_bit_string([], ?RT_BER:cindex(2,Val,cSTAVersion), [{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}], []), %%------------------------------------------------- %% attribute number 2 External CSTA-application-context-information-csta3:CSTAFunctionality %%------------------------------------------------- {EncBytes2,EncLen2} = 'enc_CSTAFunctionality'(?RT_BER:cindex(3,Val,cSTAFunctionsRequiredByApplication), []), %%------------------------------------------------- %% attribute number 3 External CSTA-application-context-information-csta3:CSTAFunctionality %%------------------------------------------------- {EncBytes3,EncLen3} = 'enc_CSTAFunctionality'(?RT_BER:cindex(4,Val,cSTAFunctionsThatCanBeSupplied), []), BytesSoFar = [EncBytes1, EncBytes2, EncBytes3], LenSoFar = EncLen1 + EncLen2 + EncLen3, ?RT_BER:encode_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], BytesSoFar, LenSoFar). 'dec_OldACSEUserInformationForCSTA'(Bytes, OptOrMand) -> 'dec_OldACSEUserInformationForCSTA'(Bytes, OptOrMand, []). 'dec_OldACSEUserInformationForCSTA'(Bytes, OptOrMand, TagIn) -> %%------------------------------------------------- %% decode tag and length %%------------------------------------------------- {{_,Len},Bytes1,Rb1} = ?RT_BER:check_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], Bytes, OptOrMand), {Bytes2,RemBytes} = ?RT_BER:split_list(Bytes1,Len), %%------------------------------------------------- %% attribute number 1 with type BIT STRING %%------------------------------------------------- {Term1,Bytes3,Rb2} = ?RT_BER:decode_bit_string(Bytes2,[],[{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}],[], no_length, mandatory), %%------------------------------------------------- %% attribute number 2 External CSTA-application-context-information-csta3:CSTAFunctionality %%------------------------------------------------- {Term2,Bytes4,Rb3} = 'dec_CSTAFunctionality'(Bytes3, mandatory, []), %%------------------------------------------------- %% attribute number 3 External CSTA-application-context-information-csta3:CSTAFunctionality %%------------------------------------------------- {Term3,Bytes5,Rb4} = 'dec_CSTAFunctionality'(Bytes4, mandatory, []), {Bytes6,Rb5} = ?RT_BER:restbytes2(RemBytes, Bytes5,noext), {{'OldACSEUserInformationForCSTA', Term1, Term2, Term3}, Bytes6, Rb1+Rb2+Rb3+Rb4+Rb5}. %%================================ %% NewACSEUserInformationForCSTA %%================================ 'enc_NewACSEUserInformationForCSTA'(Val, TagIn) -> %%------------------------------------------------- %% attribute number 1 with type BIT STRING %%------------------------------------------------- {EncBytes1,EncLen1} = ?RT_BER:encode_bit_string([], ?RT_BER:cindex(2,Val,cSTAVersion), [{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}], []), %%------------------------------------------------- %% attribute number 2 External CSTA-application-context-information-csta3:CSTAFunctionality OPTIONAL %%------------------------------------------------- {EncBytes2,EncLen2} = case ?RT_BER:cindex(3,Val,cSTAFunctionsRequiredByApplication) of asn1_NOVALUE -> {<<>>,0}; _ -> 'enc_CSTAFunctionality'(?RT_BER:cindex(3,Val,cSTAFunctionsRequiredByApplication), [{tag,128,0,'IMPLICIT',32}]) end, %%------------------------------------------------- %% attribute number 3 External CSTA-application-context-information-csta3:CSTAFunctionality OPTIONAL %%------------------------------------------------- {EncBytes3,EncLen3} = case ?RT_BER:cindex(4,Val,cSTAFunctionsThatCanBeSupplied) of asn1_NOVALUE -> {<<>>,0}; _ -> 'enc_CSTAFunctionality'(?RT_BER:cindex(4,Val,cSTAFunctionsThatCanBeSupplied), [{tag,128,1,'IMPLICIT',32}]) end, %%------------------------------------------------- %% attribute number 4 External CSTA-application-context-information-csta3:CSTAPrivateDataVersionList OPTIONAL %%------------------------------------------------- {EncBytes4,EncLen4} = case ?RT_BER:cindex(5,Val,cSTAPrivateDataVersionList) of asn1_NOVALUE -> {<<>>,0}; _ -> 'enc_CSTAPrivateDataVersionList'(?RT_BER:cindex(5,Val,cSTAPrivateDataVersionList), [{tag,128,2,'IMPLICIT',32}]) end, BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4], LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4, ?RT_BER:encode_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], BytesSoFar, LenSoFar). 'dec_NewACSEUserInformationForCSTA'(Bytes, OptOrMand) -> 'dec_NewACSEUserInformationForCSTA'(Bytes, OptOrMand, []). 'dec_NewACSEUserInformationForCSTA'(Bytes, OptOrMand, TagIn) -> %%------------------------------------------------- %% decode tag and length %%------------------------------------------------- {{_,Len},Bytes1,Rb1} = ?RT_BER:check_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], Bytes, OptOrMand), {Bytes2,RemBytes} = ?RT_BER:split_list(Bytes1,Len), %%------------------------------------------------- %% attribute number 1 with type BIT STRING %%------------------------------------------------- {Term1,Bytes3,Rb2} = ?RT_BER:decode_bit_string(Bytes2,[],[{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}],[], no_length, mandatory), %%------------------------------------------------- %% attribute number 2 External CSTA-application-context-information-csta3:CSTAFunctionality OPTIONAL %%------------------------------------------------- {Term2,Bytes4,Rb3} = case Bytes3 of <<2:2,_:1,0:5,_/binary>> -> 'dec_CSTAFunctionality'(Bytes3, opt_or_default, [{tag,128,0,'IMPLICIT',32}]); _ -> { asn1_NOVALUE, Bytes3, 0 } end, %%------------------------------------------------- %% attribute number 3 External CSTA-application-context-information-csta3:CSTAFunctionality OPTIONAL %%------------------------------------------------- {Term3,Bytes5,Rb4} = case Bytes4 of <<2:2,_:1,1:5,_/binary>> -> 'dec_CSTAFunctionality'(Bytes4, opt_or_default, [{tag,128,1,'IMPLICIT',32}]); _ -> { asn1_NOVALUE, Bytes4, 0 } end, %%------------------------------------------------- %% attribute number 4 External CSTA-application-context-information-csta3:CSTAPrivateDataVersionList OPTIONAL %%------------------------------------------------- {Term4,Bytes6,Rb5} = case Bytes5 of <<2:2,_:1,2:5,_/binary>> -> 'dec_CSTAPrivateDataVersionList'(Bytes5, opt_or_default, [{tag,128,2,'IMPLICIT',32}]); _ -> { asn1_NOVALUE, Bytes5, 0 } end, {Bytes7,Rb6} = ?RT_BER:restbytes2(RemBytes, Bytes6,noext), {{'NewACSEUserInformationForCSTA', Term1, Term2, Term3, Term4}, Bytes7, Rb1+Rb2+Rb3+Rb4+Rb5+Rb6}. %%================================ %% CSTAPrivateDataVersionList %%================================ 'enc_CSTAPrivateDataVersionList'({'CSTAPrivateDataVersionList',Val}, TagIn) -> 'enc_CSTAPrivateDataVersionList'(Val, TagIn); 'enc_CSTAPrivateDataVersionList'(Val, TagIn) -> {EncBytes,EncLen} = 'enc_CSTAPrivateDataVersionList_components'(Val,[],0), ?RT_BER:encode_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], EncBytes, EncLen). 'enc_CSTAPrivateDataVersionList_components'([], AccBytes, AccLen) -> {lists:reverse(AccBytes),AccLen}; 'enc_CSTAPrivateDataVersionList_components'([H|T],AccBytes, AccLen) -> {EncBytes,EncLen} = ?RT_BER:encode_integer([], H, []), 'enc_CSTAPrivateDataVersionList_components'(T,[EncBytes|AccBytes], AccLen + EncLen). 'dec_CSTAPrivateDataVersionList'(Bytes, OptOrMand) -> 'dec_CSTAPrivateDataVersionList'(Bytes, OptOrMand, []). 'dec_CSTAPrivateDataVersionList'(Bytes, OptOrMand, TagIn) -> %%------------------------------------------------- %% decode tag and length %%------------------------------------------------- {{_,Len},Bytes1,Rb1} = ?RT_BER:check_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], Bytes, OptOrMand), ?RT_BER:decode_components(Rb1, Len, Bytes1, fun(FBytes,_,_)-> ?RT_BER:decode_integer(FBytes,[],[], mandatory) end, [], []). %%================================ %% CSTAVersion %%================================ 'enc_CSTAVersion'({'CSTAVersion',Val}, TagIn) -> 'enc_CSTAVersion'(Val, TagIn); 'enc_CSTAVersion'(Val, TagIn) -> ?RT_BER:encode_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'(Bytes, OptOrMand) -> 'dec_CSTAVersion'(Bytes, OptOrMand, []). 'dec_CSTAVersion'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{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++[], no_length, OptOrMand). %%================================ %% CallControlServices %%================================ 'enc_CallControlServices'({'CallControlServices',Val}, TagIn) -> 'enc_CallControlServices'(Val, TagIn); 'enc_CallControlServices'(Val, TagIn) -> ?RT_BER:encode_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'(Bytes, OptOrMand) -> 'dec_CallControlServices'(Bytes, OptOrMand, []). 'dec_CallControlServices'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{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++[], no_length, OptOrMand). %%================================ %% CallAssociatedServices %%================================ 'enc_CallAssociatedServices'({'CallAssociatedServices',Val}, TagIn) -> 'enc_CallAssociatedServices'(Val, TagIn); 'enc_CallAssociatedServices'(Val, TagIn) -> ?RT_BER:encode_bit_string([], Val, [{associateData,0},{cancelTelephonyTones,1},{generateDigits,2},{generateTelephonyTones,3},{sendUserInformation,4},{changeConnectionInformation,5}], TagIn ++ []). 'dec_CallAssociatedServices'(Bytes, OptOrMand) -> 'dec_CallAssociatedServices'(Bytes, OptOrMand, []). 'dec_CallAssociatedServices'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{associateData,0},{cancelTelephonyTones,1},{generateDigits,2},{generateTelephonyTones,3},{sendUserInformation,4},{changeConnectionInformation,5}],TagIn++[], no_length, OptOrMand). %%================================ %% MediaAttachmentServices %%================================ 'enc_MediaAttachmentServices'({'MediaAttachmentServices',Val}, TagIn) -> 'enc_MediaAttachmentServices'(Val, TagIn); 'enc_MediaAttachmentServices'(Val, TagIn) -> ?RT_BER:encode_bit_string([], Val, [{attachMediaService,0},{detachMediaService,1}], TagIn ++ []). 'dec_MediaAttachmentServices'(Bytes, OptOrMand) -> 'dec_MediaAttachmentServices'(Bytes, OptOrMand, []). 'dec_MediaAttachmentServices'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{attachMediaService,0},{detachMediaService,1}],TagIn++[], no_length, OptOrMand). %%================================ %% RouteingServices %%================================ 'enc_RouteingServices'({'RouteingServices',Val}, TagIn) -> 'enc_RouteingServices'(Val, TagIn); 'enc_RouteingServices'(Val, TagIn) -> ?RT_BER:encode_bit_string([], Val, [{routeRegister,0},{routeRegisterCancel,1},{routeRegisterAbort,2},{reroute,3},{routeEnd,4},{routeReject,5},{routeRequest,6},{routeSelect,7},{routeUsed,8}], TagIn ++ []). 'dec_RouteingServices'(Bytes, OptOrMand) -> 'dec_RouteingServices'(Bytes, OptOrMand, []). 'dec_RouteingServices'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{routeRegister,0},{routeRegisterCancel,1},{routeRegisterAbort,2},{reroute,3},{routeEnd,4},{routeReject,5},{routeRequest,6},{routeSelect,7},{routeUsed,8}],TagIn++[], no_length, OptOrMand). %%================================ %% VoiceUnitServices %%================================ 'enc_VoiceUnitServices'({'VoiceUnitServices',Val}, TagIn) -> 'enc_VoiceUnitServices'(Val, TagIn); 'enc_VoiceUnitServices'(Val, TagIn) -> ?RT_BER:encode_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'(Bytes, OptOrMand) -> 'dec_VoiceUnitServices'(Bytes, OptOrMand, []). 'dec_VoiceUnitServices'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{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++[], no_length, OptOrMand). %%================================ %% LocationServices %%================================ 'enc_LocationServices'({'LocationServices',Val}, TagIn) -> 'enc_LocationServices'(Val, TagIn); 'enc_LocationServices'(Val, TagIn) -> ?RT_BER:encode_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'(Bytes, OptOrMand) -> 'dec_LocationServices'(Bytes, OptOrMand, []). 'dec_LocationServices'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{getLocationInformation,0},{setLocationInformation,1},{locationTrackkingSessionResumed,2},{locationTrackkingSessionSuspended,3},{resumeLocationTrackingSession,4},{locationInformationReport,5},{startLocationTrackingSession,6},{stopLocationTrackingSession,7},{suspendLocationTrackingCapabilities,8},{locationSessionInfo,9}],TagIn++[], no_length, OptOrMand). %%================================ %% CallControlEvents %%================================ 'enc_CallControlEvents'({'CallControlEvents',Val}, TagIn) -> 'enc_CallControlEvents'(Val, TagIn); 'enc_CallControlEvents'(Val, TagIn) -> ?RT_BER:encode_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'(Bytes, OptOrMand) -> 'dec_CallControlEvents'(Bytes, OptOrMand, []). 'dec_CallControlEvents'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{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++[], no_length, OptOrMand). %%================================ %% CallAssociatedEvents %%================================ 'enc_CallAssociatedEvents'({'CallAssociatedEvents',Val}, TagIn) -> 'enc_CallAssociatedEvents'(Val, TagIn); 'enc_CallAssociatedEvents'(Val, TagIn) -> ?RT_BER:encode_bit_string([], Val, [{callInformation,0},{charging,1},{dTMFDigitsDetected,2},{telephonyTonesDetected,3},{serviceCompletionFailure,4}], TagIn ++ []). 'dec_CallAssociatedEvents'(Bytes, OptOrMand) -> 'dec_CallAssociatedEvents'(Bytes, OptOrMand, []). 'dec_CallAssociatedEvents'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{callInformation,0},{charging,1},{dTMFDigitsDetected,2},{telephonyTonesDetected,3},{serviceCompletionFailure,4}],TagIn++[], no_length, OptOrMand). %%================================ %% MediaAttachmentEvents %%================================ 'enc_MediaAttachmentEvents'({'MediaAttachmentEvents',Val}, TagIn) -> 'enc_MediaAttachmentEvents'(Val, TagIn); 'enc_MediaAttachmentEvents'(Val, TagIn) -> ?RT_BER:encode_bit_string([], Val, [{mediaAttached,0},{mediaDetached,1}], TagIn ++ []). 'dec_MediaAttachmentEvents'(Bytes, OptOrMand) -> 'dec_MediaAttachmentEvents'(Bytes, OptOrMand, []). 'dec_MediaAttachmentEvents'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{mediaAttached,0},{mediaDetached,1}],TagIn++[], no_length, OptOrMand). %%================================ %% PhysicalDeviceFeatureEvents %%================================ 'enc_PhysicalDeviceFeatureEvents'({'PhysicalDeviceFeatureEvents',Val}, TagIn) -> 'enc_PhysicalDeviceFeatureEvents'(Val, TagIn); 'enc_PhysicalDeviceFeatureEvents'(Val, TagIn) -> ?RT_BER:encode_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'(Bytes, OptOrMand) -> 'dec_PhysicalDeviceFeatureEvents'(Bytes, OptOrMand, []). 'dec_PhysicalDeviceFeatureEvents'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{buttonInformation,0},{buttonPress,1},{displayUpdated,2},{hookswitch,3},{lampMode,4},{messageWaiting,5},{microphoneGain,6},{microphoneMute,7},{ringerStatus,8},{speakerMute,9},{speakerVolume,10}],TagIn++[], no_length, OptOrMand). %%================================ %% LogicalDeviceFeatureEvents %%================================ 'enc_LogicalDeviceFeatureEvents'({'LogicalDeviceFeatureEvents',Val}, TagIn) -> 'enc_LogicalDeviceFeatureEvents'(Val, TagIn); 'enc_LogicalDeviceFeatureEvents'(Val, TagIn) -> ?RT_BER:encode_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'(Bytes, OptOrMand) -> 'dec_LogicalDeviceFeatureEvents'(Bytes, OptOrMand, []). 'dec_LogicalDeviceFeatureEvents'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{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++[], no_length, OptOrMand). %%================================ %% DeviceMaintenanceEvents %%================================ 'enc_DeviceMaintenanceEvents'({'DeviceMaintenanceEvents',Val}, TagIn) -> 'enc_DeviceMaintenanceEvents'(Val, TagIn); 'enc_DeviceMaintenanceEvents'(Val, TagIn) -> ?RT_BER:encode_bit_string([], Val, [{backInService,0},{outOfService,1},{deviceCapabilityChanged,2},{partiallyInService,3}], TagIn ++ []). 'dec_DeviceMaintenanceEvents'(Bytes, OptOrMand) -> 'dec_DeviceMaintenanceEvents'(Bytes, OptOrMand, []). 'dec_DeviceMaintenanceEvents'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{backInService,0},{outOfService,1},{deviceCapabilityChanged,2},{partiallyInService,3}],TagIn++[], no_length, OptOrMand). %%================================ %% VoiceUnitEvents %%================================ 'enc_VoiceUnitEvents'({'VoiceUnitEvents',Val}, TagIn) -> 'enc_VoiceUnitEvents'(Val, TagIn); 'enc_VoiceUnitEvents'(Val, TagIn) -> ?RT_BER:encode_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'(Bytes, OptOrMand) -> 'dec_VoiceUnitEvents'(Bytes, OptOrMand, []). 'dec_VoiceUnitEvents'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{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++[], no_length, OptOrMand). %%================================ %% VendorSpecEvents %%================================ 'enc_VendorSpecEvents'({'VendorSpecEvents',Val}, TagIn) -> 'enc_VendorSpecEvents'(Val, TagIn); 'enc_VendorSpecEvents'(Val, TagIn) -> ?RT_BER:encode_bit_string([], Val, [{privateEvent,0}], TagIn ++ []). 'dec_VendorSpecEvents'(Bytes, OptOrMand) -> 'dec_VendorSpecEvents'(Bytes, OptOrMand, []). 'dec_VendorSpecEvents'(Bytes, OptOrMand, TagIn) -> ?RT_BER:decode_bit_string(Bytes,[],[{privateEvent,0}],TagIn++[], no_length, OptOrMand).