start of tap3_12_export to generate GSM TAP3.12 tap-out file for partners, RT#20768
[freeside.git] / FS / FS / cdr / gsm_tap3_12.pm
1 package FS::cdr::gsm_tap3_12;
2 use base qw( FS::cdr );
3
4 use strict;
5 use vars qw( %info );
6 use Time::Local;
7 use Data::Dumper;
8
9 %info = (
10   'name'          => 'GSM TAP3 release 12',
11   'weight'        => 50,
12   'type'          => 'asn.1',
13   'import_fields' => [],
14   'asn_format'    => {
15     'spec'     => _asn_spec(),
16     'macro'    => 'TransferBatch', #XXX & skip the Notification ones?
17     'arrayref' => sub { shift->{'callEventDetails'}; },
18     'map'      => {
19                     'startdate'          => sub { my $callinfo = shift->{mobileOriginatedCall}{basicCallInformation};
20                                                   my $timestamp = $callinfo->{callEventStartTimeStamp};
21                                                   my $localTimeStamp = $timestamp->{localTimeStamp};
22                                                   my $utcTimeOffsetCode = $timestamp->{utcTimeOffsetCode}; #XXX not handled, utcTimeOffsetInfo in header
23                                                   $localTimeStamp =~ /^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/ or die "unparsable timestamp: $localTimeStamp\n"; #. Dumper($callinfo);
24                                                   my($year, $mon, $day, $hour, $min, $sec) = ($1, $2, $3, $4, $5, $6);
25                                                   timelocal($sec, $min, $hour, $day, $mon-1, $year);
26                                                 },
27                     'duration'           => sub { shift->{mobileOriginatedCall}{basicCallInformation}{totalCallEventDuration} },
28                     'billsec'            => sub { shift->{mobileOriginatedCall}{basicCallInformation}{totalCallEventDuration} }, #same..
29                     'src'                => sub { shift->{mobileOriginatedCall}{basicCallInformation}{chargeableSubscriber}{simChargeableSubscriber}{msisdn} },
30                     'charged_party_imsi' => sub { shift->{mobileOriginatedCall}{basicCallInformation}{chargeableSubscriber}{simChargeableSubscriber}{imsi} },
31                     'dst'                => sub { shift->{mobileOriginatedCall}{basicCallInformation}{destination}{calledNumber} }, #dialledDigits?
32                     'carrierid'          => sub { shift->{mobileOriginatedCall}{locationInformation}{networkLocation}{recEntityCode} }, #XXX translate to recEntityId via info in header
33                     'userfield'          => sub { shift->{mobileOriginatedCall}{operatorSpecInformation}[0] },
34                     'servicecode'        => sub { shift->{mobileOriginatedCall}{basicServiceUsedList}[0]{basicService}{serviceCode}{teleServiceCode} },
35                     'upstream_price'     => sub { sprintf('%.5f', shift->{mobileOriginatedCall}{basicServiceUsedList}[0]{chargeInformationList}[0]{chargeDetailList}[0]{charge} / 100000 ) }, #XXX numberOfDecimalPlaces in header
36                     'calltypenum'        => sub { shift->{mobileOriginatedCall}{basicServiceUsedList}[0]{chargeInformationList}[0]{callTypeGroup}{callTypelevel1} },
37                     'quantity'           => sub { shift->{mobileOriginatedCall}{basicServiceUsedList}[0]{chargeInformationList}[0]{chargedUnits} },
38                     'quantity_able'      => sub { shift->{mobileOriginatedCall}{basicServiceUsedList}[0]{chargeInformationList}[0]{chargeableUnits} },
39                   },
40   },
41 );
42
43 #accepts qsearch parameters as a hash or list of name/value pairs, but not
44 #old-style qsearch('cdr', { field=>'value' })
45
46 use Date::Format;
47 sub tap3_12_export {
48   my %qsearch = ();
49   if ( ref($_[0]) eq 'HASH' ) {
50     %qsearch = %{ $_[0] };
51   } else {
52     %qsearch = @_;
53   }
54
55   #if these get huge we might need to get a count and do a paged search
56   my @cdrs = qsearch({ 'table'=>'cdr', %qsearch, 'order_by'=>'calldate ASC' });
57
58   eval "use Convert::ASN1";
59   die $@ if $@;
60
61   my $asn = Convert::ASN1->new;
62   $asn->prepare( _asn_spec() ) or die $asn->error;
63
64   my $TransferBatch = $asn->find('TransferBatch') or die $asn->error;
65
66   my %hash = _TransferBatch(); #static information etc.
67
68   my $utcTimeOffset = '+0300'; #XXX local timezone at least
69
70   my $now = time;
71
72   ###
73   # accountingInfo
74   ###
75
76   ###
77   # batchControlInfo
78   ###
79
80   #optional
81   $hash{batchControlInfo}->{fileCreationTimeStamp}   = { 'localTimeStamp' => time2str('%Y%m%d%H%M%S', $now),
82                                                          'utcTimeOffset'  => $utcTimeOffset,
83                                                        };
84   #XXX what do these do?  do they need to be different from fileCreationTimeStamp?
85   $hash{batchControlInfo}->{transferCutOffTimeStamp} = { 'localTimeStamp' => time2str('%Y%m%d%H%M%S', $now),
86                                                          'utcTimeOffset'  => $utcTimeOffset,
87                                                        };
88
89   $hash{batchControlInfo}->{fileAvailableTimeStamp}  = { 'localTimeStamp' => time2str('%Y%m%d%H%M%S', $now),
90                                                           'utcTimeOffset'  => $utcTimeOffset,
91                                                         };
92
93   #XXX
94   $hash{batchControlInfo}->{sender} = 'MDGTM';
95   $hash{batchControlInfo}->{recipient} = 'GNQHT';
96   $hash{batchControlInfo}->{fileSequenceNumber} = '00178'; #XXX global?  per recipient?
97
98   ###
99   # networkInfo
100   ###
101
102   $hash{networkInfo}->{utcTimeOffsetInfo}[0]{utcTimeOffset} = $utcTimeOffset;
103
104   #XXX recording entity IDs, referenced by recEntityCode
105   #$hash->{networkInfo}->{recEntityInfo}[0]{recEntityId} = '340010100';
106   #$hash->{networkInfo}->{recEntityInfo}[1]{recEntityId} = '240556000000';
107
108   ###
109   # auditControlInfo
110   ###
111
112   #mandatory
113   $hash{auditControlInfo}->{callEventDetailsCount} = scalar(@cdrs);
114
115   #these two are optional
116   $hash{auditControlInfo}->{earliestCallTimeStamp} = { 'localTimeStamp' => time2str('%Y%m%d%H%M%S', $cdrs[0]->calldate_unix),
117                                                        'utcTimeOffset'  => $utcTimeOffset,
118                                                      };
119   $hash{auditControlInfo}->{latestCallTimeStamp}   = { 'localTimeStamp' => time2str('%Y%m%d%H%M%S', $cdrs[-1]->calldate_unix),
120                                                        'utcTimeOffset'  => $utcTimeOffset,
121                                                      };
122
123   #mandatory
124   my $totalCharge = 0;
125   $totalCharge += $_->rated_price foreach @cdrs;
126   $hash{totalCharge} = sprintf('%.5f', $totalCharge);
127
128   ###
129   # callEventDetails
130   ###
131
132   #one of Mobile Originated Call, Mobile Terminated Call, Mobile Session, Messaging Event, Supplementary Service Event, Service Centre Usage, GPRS Call, Content Transaction or Location Service
133   # Each occurrence must have no more than one of these present
134
135   $hash{callEventDetails} = [
136     map {
137           { #either tele or bearer service usage originated by the mobile subscription (others?)
138             'mobileOriginatedCall' => {
139
140               #identifies the Network Location, which includes the MSC responsible for handling the call and, where appropriate, the Geographical Location of the mobile
141               'locationInformation' => {
142                                          'networkLocation' => {
143                                                                 'recEntityCode' => $_->carrierid, #XXX Recording Entity (per 2.5, from "Reference Tables")
144                                                               }
145                                        },
146
147               #Operator Specific Information: beyond the scope of TAP and has been bilaterally agreed
148               'operatorSpecInformation' => [
149                                              $_->userfield, ##'|Seq: 178 Loc: 1|'
150                                            ],
151
152               #The type of service used together with all related charging information
153               'basicServiceUsedList' => [
154                                           {
155                                             #identifies the actual Basic Service used
156                                             'basicService' => {
157                                                                 #one of Teleservice Code or Bearer Service Code as determined by the service type used
158                                                                 'serviceCode' => {
159                                                                                    #XXX
160                                                                                    #00 All teleservices
161                                                                                    #10 All Speech transmission services
162                                                                                    #11 Telephony
163                                                                                    #12 Emergency calls
164                                                                                    #20 All SMS Services
165                                                                                    #21 Short Message MT/PP
166                                                                                    #22 Short Message MO/PP
167                                                                                    #60 All Fax Services
168                                                                                    #61 Facsimile Group 3 & alternative speech
169                                                                                    #62 Automatic Facsimile Group 3
170                                                                                    #63 Automatic Facsimile Group 4
171                                                                                    #70 All data teleservices (compound)
172                                                                                    #80 All teleservices except SMS (compound)
173                                                                                    #90 All voice group call services
174                                                                                    #91 Voice group call
175                                                                                    #92 Voice broadcast call
176                                                                                    'teleServiceCode' => $_->servicecode, #'11'
177
178                                                                                    #Bearer Service Code
179                                                                                    # Must be present within group Service Code where the type of service used
180                                                                                    #  was a bearer service. Must not be present when the type of service used
181                                                                                    #  was a tele service and, therefore, Teleservice Code is present.
182                                                                                    # Group Bearer Codes, identifiable by the description ‘All’, should only
183                                                                                    #  be used where details of the specific services affected are not
184                                                                                    #  available from the network.
185                                                                                    #00 All Bearer Services
186                                                                                    #20 All Data Circuit Asynchronous Services
187                                                                                    #21 Duplex Asynch. 300bps data circuit
188                                                                                    #22 Duplex Asynch. 1200bps data circuit
189                                                                                    #23 Duplex Asynch. 1200/75bps data circuit
190                                                                                    #24 Duplex Asynch. 2400bps data circuit
191                                                                                    #25 Duplex Asynch. 4800bps data circuit
192                                                                                    #26 Duplex Asynch. 9600bps data circuit
193                                                                                    #27 General Data Circuit Asynchronous Service
194                                                                                    #30 All Data Circuit Synchronous Services
195                                                                                    #32 Duplex Synch. 1200bps data circuit
196                                                                                    #34 Duplex Synch. 2400bps data circuit
197                                                                                    #35 Duplex Synch. 4800bps data circuit
198                                                                                    #36 Duplex Synch. 9600bps data circuit
199                                                                                    #37 General Data Circuit Synchronous Service
200                                                                                    #40 All Dedicated PAD Access Services
201                                                                                    #41 Duplex Asynch. 300bps PAD access
202                                                                                    #42 Duplex Asynch. 1200bps PAD access
203                                                                                    #43 Duplex Asynch. 1200/75bps PAD access
204                                                                                    #44 Duplex Asynch. 2400bps PAD access
205                                                                                    #45 Duplex Asynch. 4800bps PAD access
206                                                                                    #46 Duplex Asynch. 9600bps PAD access
207                                                                                    #47 General PAD Access Service
208                                                                                    #50 All Dedicated Packet Access Services
209                                                                                    #54 Duplex Synch. 2400bps PAD access
210                                                                                    #55 Duplex Synch. 4800bps PAD access
211                                                                                    #56 Duplex Synch. 9600bps PAD access
212                                                                                    #57 General Packet Access Service
213                                                                                    #60 All Alternat Speech/Asynchronous Services
214                                                                                    #70 All Alternate Speech/Synchronous Services
215                                                                                    #80 All Speech followed by Data Asynchronous Services
216                                                                                    #90 All Speech followed by Data Synchronous Services
217                                                                                    #A0 All Data Circuit Asynchronous Services (compound)
218                                                                                    #B0 All Data Circuit Synchronous Services (compound)
219                                                                                    #C0 All Asynchronous Services (compound)
220                                                                                  }
221                                                                 #conditionally also contain the following for UMTS: Transparency Indicator, Fixed Network User
222                                                                 # Rate, User Protocol Indicator, Guaranteed Bit Rate and Maximum Bit Rate
223                                                               },
224
225                                             #Charge information is provided for all chargeable elements except within Messaging Event and Mobile Session call events
226                                             # must contain Charged Item and at least one occurrence of Charge Detail
227                                             'chargeInformationList' => [
228                                                                          {
229                                                                            #XXX
230                                                                            #mandatory
231                                                                            # the charging principle applied and the unitisation of Chargeable Units.  It
232                                                                            #  is not intended to identify the service used.
233                                                                            #A: Call set up attempt
234                                                                            #C: Content
235                                                                            #D: Duration based charge
236                                                                            #E: Event based charge
237                                                                            #F: Fixed (one-off) charge
238                                                                            #L: Calendar (for example daily usage charge)
239                                                                            #V: Volume (outgoing) based charge
240                                                                            #W: Volume (incoming) based charge
241                                                                            #X: Volume (total volume) based charge
242                                                                            #(?? fields to be used as a basis for the calculation of the correct Charge
243                                                                            #  A: Chargeable Units (if present)
244                                                                            #  D,V,W,X: Chargeable Units
245                                                                            #  C: Depends on the content
246                                                                            #  E: Not Applicable
247                                                                            #  F: Not Applicable
248                                                                            #  L: Call Event Start Timestamp)
249                                                                            'chargedItem' => 'D',
250
251                                                                            # the IOT used by the VPMN to price the call
252                                                                            'callTypeGroup' => {
253
254                                                                                                 #The highest category call type in respect of the destination of the call
255                                                                                                 #0: Unknown/Not Applicable
256                                                                                                 #1: National
257                                                                                                 #2: International
258                                                                                                 #10: HGGSN/HP-GW
259                                                                                                 #11: VGGSN/VP-GW
260                                                                                                 #12: Other GGSN/Other P-GW
261                                                                                                 #100: WLAN
262                                                                                                 'callTypeLevel1' => $_->calltypenum,
263
264                                                                                                 #the sub category of Call Type Level 1
265                                                                                                 #0: Unknown/Not Applicable
266                                                                                                 #1: Mobile
267                                                                                                 #2: PSTN
268                                                                                                 #3: Non Geographic
269                                                                                                 #4: Premium Rate
270                                                                                                 #5: Satellite destination
271                                                                                                 #6: Forwarded call
272                                                                                                 #7: Non forwarded call
273                                                                                                 #10: Broadband
274                                                                                                 #11: Narrowband
275                                                                                                 #12: Conversational
276                                                                                                 #13: Streaming
277                                                                                                 #14: Interactive
278                                                                                                 #15: Background
279                                                                                                 'callTypeLevel2' => 0,
280
281                                                                                                 #the sub category of Call Type Level 2
282                                                                                                 'callTypeLevel3' => 0,
283                                                                                               },
284
285                                                                            #mandatory, at least one occurence must be present
286                                                                            #A repeating group detailing the Charge and/or charge element
287                                                                            # Note that, where a Charge has been levied, even where that Charge is zero,
288                                                                            #  there must be one occurance, and only one, with a Charge Type of '00'
289                                                                            'chargeDetailList' => [
290                                                                                                    {
291                                                                                                      #mandatory
292                                                                                                      # after discounts have been deducted but before any tax is added
293                                                                                                      'charge'          => $_->rated_price * 100000, #XXX numberOfDecimalPlaces 
294
295                                                                                                      #mandatory
296                                                                                                      # the type of charge represented
297                                                                                                      #00: Total charge for Charge Information (the invoiceable value)
298                                                                                                      #01: Airtime charge
299                                                                                                      #02: reserved
300                                                                                                      #03: Toll charge
301                                                                                                      #04: Directory assistance
302                                                                                                      #05–20: reserved
303                                                                                                      #21: VPMN surcharge
304                                                                                                      #50: Total charge for Charge Information according to the published IOT
305                                                                                                      #  Note that the use of value 50 is only for use by bilateral agreement, use without
306                                                                                                      #   bilateral agreement can be treated as per reserved values, that is ‘out of range’
307                                                                                                      #69–99: reserved
308                                                                                                      'chargeType'      => '00',
309
310                                                                                                      #conditional
311                                                                                                      # the number of units which are chargeable within the Charge Detail, this may not
312                                                                                                      # correspond to the number of rounded units charged.
313                                                                                                      # The item Charged Item defines what the units represent.
314                                                                                                      'chargeableUnits' => $_->quantity_able,
315
316                                                                                                      #optional
317                                                                                                      # the rounded number of units which are actually charged for
318                                                                                                      'chargedUnits'    => $_->quantity,
319                                                                                                    }
320                                                                                                  ],
321                                                                            'exchangeRateCode' => 1, #from header
322                                                                          }
323                                                                        ]
324                                           }
325                                         ],
326
327               #MO Basic Call Information provides the basic detail of who made the call and where to in respect of mobile originated traffic.
328               'basicCallInformation' => {
329                                           #mandatory
330                                           # the identification of the chargeable subscriber.
331                                           #  The group must contain either the IMSI or the MIN of the Chargeable Subscriber, but not both.
332                                           'chargeableSubscriber' => {
333                                                                       'simChargeableSubscriber' => {
334                                                                                                      'msisdn' => $_->charged_party, #src
335                                                                                                      'imsi'   => $_->charged_party_imsi,
336                                                                                                    }
337                                                                     },
338                                           # the start of the call event
339                                           'callEventStartTimeStamp' => {
340                                                                          'localTimeStamp' => time2str('%Y%m%d%H%M%S', $_->startdate),
341                                                                          'utcTimeOffsetCode' => 1
342                                                                        },
343
344                                           # the actual total duration of a call event as a number of seconds
345                                           'totalCallEventDuration' => $_->duration,
346
347                                           #conditional
348                                           # the number dialled by the subscriber (Called Number)
349                                           #  or the SMSC Address in case of SMS usage or in cases involving supplementary services
350                                           #   such as call forwarding or transfer etc., the number to which the call is routed
351                                           'destination' => {
352                                                              #the international representation of the destination
353                                                              'calledNumber' => $_->dst,
354
355                                                              #the actual digits as dialled by the subscriber, i.e. unmodified, in establishing a call
356                                                              # This will contain ‘+’ and ‘#’ where appropriate.
357                                                              #'dialledDigits' => '322221350'
358                                                            },
359                                         }
360             }
361           };
362         }
363       @cdrs
364   ];
365
366
367   ###
368
369
370   my $pdu = $TransferBatch->encode( \%hash );
371
372   return $pdu;
373
374 }
375
376 sub _TransferBatch {
377           'accountingInfo' => {
378                                 #mandatory
379                                 'localCurrency' => 'USD',
380                                 'currencyConversionInfo' => [
381                                                               {
382                                                                 'numberOfDecimalPlaces' => 5,
383                                                                 'exchangeRate' => 152549, #???
384                                                                 'exchangeRateCode' => 1
385                                                               }
386                                                             ],
387                                 'tapDecimalPlaces' => 5,
388                                 #optional: may conditionally include taxation and discounting tables, and, optionally, TAP currency
389                               },
390           'batchControlInfo' => {
391                                   #mandatory
392                                   'specificationVersionNumber' => 3,
393                                   'releaseVersionNumber' => 12, #11?
394
395                                   #'sender' => 'MDGTM',
396                                   #'recipient' => 'GNQHT',
397                                   #'fileSequenceNumber' => '00178',
398
399                                   #'transferCutOffTimeStamp' => {
400                                   #                               'localTimeStamp' => '20121230050222',
401                                   #                               'utcTimeOffset' => '+0300'
402                                   #                             },
403                                   #'fileAvailableTimeStamp' => {
404                                   #                              'localTimeStamp' => '20121230035052',
405                                   #                              'utcTimeOffset' => '+0100'
406                                   #                            }
407
408                                   #optional
409                                   #'fileCreationTimeStamp' => {
410                                   #                             'localTimeStamp' => '20121230050222',
411                                   #                             'utcTimeOffset' => '+0300'
412                                   #                           },
413
414                                   #optional: file type indicator which will only be present where the file represents test data
415                                   #optional: RAP File Sequence Number (used where the batch has previously been returned with a fatal error and is now being resubmitted) (not fileSequenceNumber?)
416
417                                   #optional: beyond the scope of TAP and has been bilaterally agreed
418                                   'operatorSpecInformation' => [
419                                                                  '', # XXX '|File proc MTH LUXMA: 1285348027|' Operator Specific Information
420                                                                ],
421              
422
423                                 },
424
425           #Network Information is a group of related information which pertains to the Sender PMN
426           'networkInfo' => {
427                              #must be present where Recording Entity Codes are present within the TAP file
428                              'recEntityInfo' => [
429                                                   {
430                                                     'recEntityType' => 1, #MSC
431                                                     #'recEntityId' => '340010100',
432                                                     'recEntityCode' => 1
433                                                   },
434                                                   {
435                                                     'recEntityType' => 2, #SMSC
436                                                     #'recEntityId' => '240556000000',
437                                                     'recEntityCode' => 2
438                                                   },
439                                                 ],
440                              #mandatory
441                              'utcTimeOffsetInfo' => [
442                                                       {
443                                                         'utcTimeOffset' => '+0300',
444                                                         'utcTimeOffsetCode' => 1
445                                                       }
446                                                     ]
447                            },
448           'auditControlInfo' => {
449                                   #'callEventDetailsCount' => 4, #mandatory
450                                   'totalTaxValue'         => 0, #mandatory
451                                   'totalDiscountValue'    => 0, #mandatory
452                                   #'totalCharge'           => 50474, #mandatory
453
454                                   #these two are optional
455                                   #'earliestCallTimeStamp' => {
456                                   #                             'localTimeStamp' => '20121229102501',
457                                   #                             'utcTimeOffset' => '+0300'
458                                   #                           },
459                                   #'latestCallTimeStamp'   => {
460                                   #                             'localTimeStamp' => '20121229102807',
461                                   #                             'utcTimeOffset' => '+0300'
462                                   #                           }
463                                 },
464 }
465
466 sub _asn_spec {
467   <<'END';
468 --
469 --
470 -- The following ASN.1 specification defines the abstract syntax for 
471 --
472 --        Data Record Format Version 03 
473 --                           Release 12
474 --
475 -- The specification is structured as follows:
476 --   (1) structure of the Tap batch
477 --   (2) definition of the individual Tap ‘records’ 
478 --   (3) Tap data items and groups of data items used within (2)
479 --   (4) Common, non-Tap data types
480 --   (5) Tap data items for content charging
481 --
482 -- It is mainly a translation from the logical structure
483 -- diagrams. Where appropriate, names used within the 
484 -- logical structure diagrams have been shortened.
485 -- For repeating data items the name as used within the logical
486 -- structure have been extended by adding ‘list’ or ‘table’
487 -- (in some instances).
488 --
489
490
491 -- TAP-0312  DEFINITIONS IMPLICIT TAGS  ::= 
492
493 -- BEGIN 
494
495 --
496 -- Structure of a Tap batch 
497 --
498
499 DataInterChange ::= CHOICE 
500 {
501     transferBatch TransferBatch, 
502     notification  Notification,
503 ...
504 }
505
506 -- Batch Control Information must always, both logically and physically,
507 -- be the first group/item within Transfer Batch – this ensures that the
508 -- TAP release version can be readily identified.  Any new groups/items
509 -- required may be inserted at any point after Batch Control Information
510
511 TransferBatch ::= [APPLICATION 1] SEQUENCE
512 {
513     batchControlInfo       BatchControlInfo            OPTIONAL, -- *m.m.
514     accountingInfo         AccountingInfo              OPTIONAL,
515     networkInfo            NetworkInfo                 OPTIONAL, -- *m.m.
516     messageDescriptionInfo MessageDescriptionInfoList  OPTIONAL,
517     callEventDetails       CallEventDetailList         OPTIONAL, -- *m.m.
518     auditControlInfo       AuditControlInfo            OPTIONAL, -- *m.m.
519 ...
520 }
521
522 Notification ::= [APPLICATION 2] SEQUENCE
523 {
524     sender                     Sender                     OPTIONAL, -- *m.m.
525     recipient                    Recipient                  OPTIONAL, -- *m.m.
526     fileSequenceNumber           FileSequenceNumber         OPTIONAL, -- *m.m.
527     rapFileSequenceNumber        RapFileSequenceNumber      OPTIONAL,
528     fileCreationTimeStamp        FileCreationTimeStamp      OPTIONAL,
529     fileAvailableTimeStamp       FileAvailableTimeStamp     OPTIONAL, -- *m.m.
530     transferCutOffTimeStamp      TransferCutOffTimeStamp    OPTIONAL, -- *m.m.
531     specificationVersionNumber SpecificationVersionNumber OPTIONAL, -- *m.m.
532     releaseVersionNumber         ReleaseVersionNumber       OPTIONAL, -- *m.m.
533     fileTypeIndicator            FileTypeIndicator          OPTIONAL,
534     operatorSpecInformation      OperatorSpecInfoList       OPTIONAL,
535 ...
536 }
537
538 CallEventDetailList ::=  [APPLICATION 3] SEQUENCE OF CallEventDetail
539
540 CallEventDetail ::= CHOICE
541 {
542     mobileOriginatedCall   MobileOriginatedCall,
543     mobileTerminatedCall   MobileTerminatedCall,
544     supplServiceEvent      SupplServiceEvent,
545     serviceCentreUsage     ServiceCentreUsage,
546     gprsCall               GprsCall,
547     contentTransaction     ContentTransaction,
548     locationService        LocationService,
549     messagingEvent         MessagingEvent,
550     mobileSession          MobileSession,
551 ...
552 }
553
554 --
555 -- Structure of the individual Tap records
556 --
557
558 BatchControlInfo ::= [APPLICATION 4] SEQUENCE
559 {
560     sender                       Sender                         OPTIONAL, -- *m.m.
561     recipient                    Recipient                              OPTIONAL, -- *m.m.
562     fileSequenceNumber           FileSequenceNumber             OPTIONAL, -- *m.m.
563     fileCreationTimeStamp        FileCreationTimeStamp          OPTIONAL,
564     transferCutOffTimeStamp      TransferCutOffTimeStamp        OPTIONAL, -- *m.m.
565     fileAvailableTimeStamp       FileAvailableTimeStamp         OPTIONAL, -- *m.m.
566     specificationVersionNumber SpecificationVersionNumber       OPTIONAL, -- *m.m.
567     releaseVersionNumber         ReleaseVersionNumber           OPTIONAL, -- *m.m.
568     fileTypeIndicator            FileTypeIndicator              OPTIONAL,
569     rapFileSequenceNumber        RapFileSequenceNumber          OPTIONAL,
570     operatorSpecInformation      OperatorSpecInfoList           OPTIONAL,
571 ...
572 }
573
574 AccountingInfo ::= [APPLICATION 5] SEQUENCE
575 {
576     taxation                  TaxationList           OPTIONAL,
577     discounting               DiscountingList        OPTIONAL,
578     localCurrency             LocalCurrency          OPTIONAL, -- *m.m.
579     tapCurrency               TapCurrency            OPTIONAL,
580     currencyConversionInfo    CurrencyConversionList OPTIONAL,
581     tapDecimalPlaces          TapDecimalPlaces       OPTIONAL, -- *m.m.
582 ...
583 }
584
585 NetworkInfo ::= [APPLICATION 6] SEQUENCE
586 {
587     utcTimeOffsetInfo         UtcTimeOffsetInfoList OPTIONAL, -- *m.m.
588     recEntityInfo             RecEntityInfoList     OPTIONAL,
589 ...
590 }
591
592 MessageDescriptionInfoList ::= [APPLICATION 8] SEQUENCE OF MessageDescriptionInformation
593
594 MobileOriginatedCall ::= [APPLICATION 9] SEQUENCE
595 {
596     basicCallInformation    MoBasicCallInformation    OPTIONAL, -- *m.m.
597     locationInformation     LocationInformation       OPTIONAL, -- *m.m.
598     equipmentIdentifier     ImeiOrEsn                 OPTIONAL,
599     basicServiceUsedList    BasicServiceUsedList      OPTIONAL, -- *m.m.
600     supplServiceCode        SupplServiceCode          OPTIONAL,
601     thirdPartyInformation   ThirdPartyInformation     OPTIONAL,
602     camelServiceUsed        CamelServiceUsed          OPTIONAL,
603     operatorSpecInformation OperatorSpecInfoList      OPTIONAL,
604 ...
605 }    
606
607 MobileTerminatedCall ::= [APPLICATION 10] SEQUENCE
608 {
609     basicCallInformation    MtBasicCallInformation    OPTIONAL, -- *m.m.
610     locationInformation     LocationInformation       OPTIONAL, -- *m.m.
611     equipmentIdentifier     ImeiOrEsn                 OPTIONAL,
612     basicServiceUsedList    BasicServiceUsedList      OPTIONAL, -- *m.m.
613     camelServiceUsed        CamelServiceUsed          OPTIONAL,
614     operatorSpecInformation OperatorSpecInfoList      OPTIONAL,
615 ...
616 }    
617
618
619 SupplServiceEvent ::= [APPLICATION 11] SEQUENCE
620 {
621     chargeableSubscriber      ChargeableSubscriber    OPTIONAL, -- *m.m.
622     rapFileSequenceNumber     RapFileSequenceNumber   OPTIONAL,
623     locationInformation       LocationInformation     OPTIONAL, -- *m.m.
624     equipmentIdentifier       ImeiOrEsn               OPTIONAL,
625     supplServiceUsed          SupplServiceUsed        OPTIONAL, -- *m.m.
626     operatorSpecInformation   OperatorSpecInfoList    OPTIONAL,
627 ...
628 }
629
630
631 ServiceCentreUsage ::= [APPLICATION 12] SEQUENCE
632 {
633     basicInformation          ScuBasicInformation     OPTIONAL, -- *m.m.
634     rapFileSequenceNumber     RapFileSequenceNumber   OPTIONAL,
635     servingNetwork            ServingNetwork          OPTIONAL,
636     recEntityCode             RecEntityCode           OPTIONAL, -- *m.m.
637     chargeInformation         ChargeInformation       OPTIONAL, -- *m.m.
638     scuChargeType             ScuChargeType           OPTIONAL, -- *m.m.
639     scuTimeStamps             ScuTimeStamps           OPTIONAL, -- *m.m.
640     operatorSpecInformation   OperatorSpecInfoList    OPTIONAL,
641 ...
642 }
643
644 GprsCall ::= [APPLICATION 14] SEQUENCE
645 {
646     gprsBasicCallInformation  GprsBasicCallInformation  OPTIONAL, -- *m.m.
647     gprsLocationInformation   GprsLocationInformation   OPTIONAL, -- *m.m.
648     equipmentIdentifier       ImeiOrEsn                 OPTIONAL,
649     gprsServiceUsed           GprsServiceUsed           OPTIONAL, -- *m.m.
650     camelServiceUsed          CamelServiceUsed          OPTIONAL,
651     operatorSpecInformation   OperatorSpecInfoList      OPTIONAL,
652 ...
653 }
654
655 ContentTransaction ::= [APPLICATION 17] SEQUENCE
656 {
657  contentTransactionBasicInfo ContentTransactionBasicInfo OPTIONAL, -- *m.m.
658  chargedPartyInformation     ChargedPartyInformation     OPTIONAL, -- *m.m.
659  servingPartiesInformation   ServingPartiesInformation   OPTIONAL, -- *m.m.
660  contentServiceUsed          ContentServiceUsedList      OPTIONAL, -- *m.m.
661  operatorSpecInformation     OperatorSpecInfoList        OPTIONAL,
662 ...
663 }
664
665 LocationService ::= [APPLICATION 297] SEQUENCE
666 {
667     rapFileSequenceNumber         RapFileSequenceNumber       OPTIONAL,
668     recEntityCode                         RecEntityCode               OPTIONAL, -- *m.m.
669     callReference                         CallReference               OPTIONAL,
670     trackingCustomerInformation TrackingCustomerInformation OPTIONAL,
671     lCSSPInformation              LCSSPInformation            OPTIONAL,
672     trackedCustomerInformation  TrackedCustomerInformation  OPTIONAL,
673     locationServiceUsage          LocationServiceUsage        OPTIONAL, -- *m.m.
674     operatorSpecInformation       OperatorSpecInfoList        OPTIONAL,
675 ...
676 }
677
678 MessagingEvent ::= [APPLICATION 433] SEQUENCE
679 {
680     messagingEventService       MessagingEventService     OPTIONAL, -- *m.m.
681     chargedParty              ChargedParty              OPTIONAL, -- *m.m.
682     rapFileSequenceNumber       RapFileSequenceNumber     OPTIONAL,
683     simToolkitIndicator         SimToolkitIndicator       OPTIONAL,
684     geographicalLocation        GeographicalLocation      OPTIONAL,
685     eventReference            EventReference              OPTIONAL, -- *m.m.
686
687     recEntityCodeList           RecEntityCodeList         OPTIONAL, -- *m.m.  
688     networkElementList          NetworkElementList        OPTIONAL,
689     locationArea              LocationArea                OPTIONAL,
690     cellId                      CellId                            OPTIONAL,    
691     serviceStartTimestamp       ServiceStartTimestamp     OPTIONAL, -- *m.m.
692     nonChargedParty             NonChargedParty           OPTIONAL,
693     exchangeRateCode            ExchangeRateCode                  OPTIONAL,
694     callTypeGroup                       CallTypeGroup             OPTIONAL, -- *m.m.
695     charge                              Charge                    OPTIONAL, -- *m.m.
696     taxInformationList          TaxInformationList        OPTIONAL,
697     operatorSpecInformation   OperatorSpecInfoList      OPTIONAL,
698 ...
699 }
700
701 MobileSession ::= [APPLICATION 434] SEQUENCE
702 {
703     mobileSessionService        MobileSessionService      OPTIONAL, -- *m.m.
704     chargedParty              ChargedParty              OPTIONAL, -- *m.m.
705     rapFileSequenceNumber       RapFileSequenceNumber     OPTIONAL,
706     simToolkitIndicator         SimToolkitIndicator       OPTIONAL,
707     geographicalLocation        GeographicalLocation      OPTIONAL,
708     locationArea              LocationArea                OPTIONAL,
709     cellId                      CellId                            OPTIONAL,
710     eventReference            EventReference              OPTIONAL, -- *m.m.
711
712     recEntityCodeList           RecEntityCodeList         OPTIONAL, -- *m.m.
713     serviceStartTimestamp       ServiceStartTimestamp     OPTIONAL, -- *m.m.
714     causeForTerm              CauseForTerm              OPTIONAL,
715     totalCallEventDuration      TotalCallEventDuration    OPTIONAL, -- *m.m.
716     nonChargedParty             NonChargedParty           OPTIONAL,
717     sessionChargeInfoList     SessionChargeInfoList     OPTIONAL, -- *m.m.
718     operatorSpecInformation   OperatorSpecInfoList      OPTIONAL,
719 ...
720 }
721
722 AuditControlInfo ::= [APPLICATION 15] SEQUENCE
723 {
724     earliestCallTimeStamp         EarliestCallTimeStamp       OPTIONAL,
725     latestCallTimeStamp           LatestCallTimeStamp         OPTIONAL,
726     totalCharge                   TotalCharge                 OPTIONAL, -- *m.m.
727     totalChargeRefund             TotalChargeRefund           OPTIONAL,
728     totalTaxRefund                TotalTaxRefund              OPTIONAL,
729     totalTaxValue                 TotalTaxValue               OPTIONAL, -- *m.m.
730     totalDiscountValue            TotalDiscountValue          OPTIONAL, -- *m.m.
731     totalDiscountRefund           TotalDiscountRefund         OPTIONAL,
732     totalAdvisedChargeValueList TotalAdvisedChargeValueList OPTIONAL,
733     callEventDetailsCount         CallEventDetailsCount       OPTIONAL, -- *m.m.
734     operatorSpecInformation       OperatorSpecInfoList        OPTIONAL,
735 ...
736 }
737
738
739 -- 
740 -- Tap data items and groups of data items
741 --
742
743 AccessPointNameNI ::= [APPLICATION 261] AsciiString --(SIZE(1..63))
744
745 AccessPointNameOI ::= [APPLICATION 262] AsciiString --(SIZE(1..37))
746
747 ActualDeliveryTimeStamp ::= [APPLICATION 302] DateTime
748
749 AddressStringDigits ::= BCDString
750
751 AdvisedCharge ::= [APPLICATION 349] Charge
752  
753 AdvisedChargeCurrency ::= [APPLICATION 348] Currency
754  
755 AdvisedChargeInformation ::= [APPLICATION 351] SEQUENCE
756 {
757     paidIndicator         PaidIndicator         OPTIONAL,
758     paymentMethod         PaymentMethod         OPTIONAL,
759     advisedChargeCurrency AdvisedChargeCurrency OPTIONAL,
760     advisedCharge         AdvisedCharge         OPTIONAL, -- *m.m.
761     commission            Commission            OPTIONAL,
762 ...
763 }
764  
765 AgeOfLocation ::= [APPLICATION 396] INTEGER
766
767 BasicService ::= [APPLICATION 36] SEQUENCE
768 {
769     serviceCode                 BasicServiceCode       OPTIONAL, -- *m.m.
770     transparencyIndicator       TransparencyIndicator  OPTIONAL,
771     fnur                        Fnur                   OPTIONAL,
772     userProtocolIndicator       UserProtocolIndicator  OPTIONAL,
773     guaranteedBitRate           GuaranteedBitRate      OPTIONAL,
774     maximumBitRate              MaximumBitRate         OPTIONAL,
775 ...
776 }
777
778 BasicServiceCode ::= [APPLICATION 426] CHOICE 
779 {
780     teleServiceCode      TeleServiceCode,
781     bearerServiceCode    BearerServiceCode,
782 ...
783 }
784
785 BasicServiceCodeList ::= [APPLICATION 37] SEQUENCE OF BasicServiceCode
786
787 BasicServiceUsed ::= [APPLICATION 39] SEQUENCE
788 {
789     basicService                BasicService          OPTIONAL, -- *m.m.
790     chargingTimeStamp           ChargingTimeStamp     OPTIONAL,
791     chargeInformationList       ChargeInformationList OPTIONAL, -- *m.m.
792     hSCSDIndicator              HSCSDIndicator        OPTIONAL,
793 ...
794 }
795
796 BasicServiceUsedList ::= [APPLICATION 38] SEQUENCE OF BasicServiceUsed
797
798 BearerServiceCode ::= [APPLICATION 40] HexString --(SIZE(2))
799
800 EventReference ::= [APPLICATION 435]  AsciiString
801
802
803 CalledNumber ::= [APPLICATION 407] AddressStringDigits
804
805 CalledPlace ::= [APPLICATION 42] AsciiString
806
807 CalledRegion ::= [APPLICATION 46] AsciiString
808
809 CallEventDetailsCount ::= [APPLICATION 43] INTEGER 
810
811 CallEventStartTimeStamp ::= [APPLICATION 44] DateTime
812
813 CallingNumber ::= [APPLICATION 405] AddressStringDigits
814
815 CallOriginator ::= [APPLICATION 41]  SEQUENCE
816 {
817     callingNumber               CallingNumber           OPTIONAL,
818     clirIndicator               ClirIndicator         OPTIONAL,
819     sMSOriginator               SMSOriginator         OPTIONAL,
820 ...
821 }
822
823 CallReference ::= [APPLICATION 45] OCTET STRING --(SIZE(1..8))
824
825 CallTypeGroup ::= [APPLICATION 258] SEQUENCE
826 {
827     callTypeLevel1      CallTypeLevel1           OPTIONAL, -- *m.m.
828     callTypeLevel2      CallTypeLevel2           OPTIONAL, -- *m.m.
829     callTypeLevel3      CallTypeLevel3           OPTIONAL, -- *m.m.
830 ...
831 }
832
833 CallTypeLevel1 ::= [APPLICATION 259] INTEGER
834
835 CallTypeLevel2 ::= [APPLICATION 255] INTEGER
836
837 CallTypeLevel3 ::= [APPLICATION 256] INTEGER
838
839 CamelDestinationNumber ::= [APPLICATION 404] AddressStringDigits
840
841 CamelInvocationFee ::= [APPLICATION 422] AbsoluteAmount
842
843 CamelServiceKey ::= [APPLICATION 55] INTEGER
844
845 CamelServiceLevel ::= [APPLICATION 56] INTEGER
846
847 CamelServiceUsed ::= [APPLICATION 57] SEQUENCE
848 {
849     camelServiceLevel         CamelServiceLevel                 OPTIONAL,
850     camelServiceKey           CamelServiceKey                   OPTIONAL, -- *m.m.
851     defaultCallHandling       DefaultCallHandlingIndicator      OPTIONAL,
852     exchangeRateCode          ExchangeRateCode                  OPTIONAL,
853     taxInformation            TaxInformationList                OPTIONAL,
854     discountInformation       DiscountInformation               OPTIONAL,
855     camelInvocationFee        CamelInvocationFee                OPTIONAL,
856     threeGcamelDestination    ThreeGcamelDestination            OPTIONAL,
857     cseInformation            CseInformation                    OPTIONAL,
858 ...
859 }
860
861 CauseForTerm ::= [APPLICATION 58] INTEGER
862
863 CellId ::= [APPLICATION 59] INTEGER 
864
865 Charge ::= [APPLICATION 62] AbsoluteAmount
866
867 ChargeableSubscriber ::= [APPLICATION 427] CHOICE 
868 {
869     simChargeableSubscriber SimChargeableSubscriber,
870     minChargeableSubscriber MinChargeableSubscriber,
871 ...
872 }
873
874 ChargeableUnits ::= [APPLICATION 65]  INTEGER
875
876 ChargeDetail ::= [APPLICATION 63] SEQUENCE
877 {
878     chargeType              ChargeType                  OPTIONAL, -- *m.m.
879     charge                  Charge                      OPTIONAL, -- *m.m.
880     chargeableUnits         ChargeableUnits             OPTIONAL,
881     chargedUnits            ChargedUnits                OPTIONAL,
882     chargeDetailTimeStamp   ChargeDetailTimeStamp       OPTIONAL,
883 ...
884 }
885
886 ChargeDetailList ::= [APPLICATION 64] SEQUENCE OF ChargeDetail
887
888 ChargeDetailTimeStamp ::= [APPLICATION 410] ChargingTimeStamp
889
890 ChargedItem ::= [APPLICATION 66]  AsciiString --(SIZE(1))
891
892 ChargedParty ::= [APPLICATION 436] SEQUENCE
893 {
894     imsi                        Imsi                            OPTIONAL, -- *m.m.
895     msisdn                              Msisdn                  OPTIONAL,         
896     publicUserId                        PublicUserId            OPTIONAL,
897     homeBid                             HomeBid                 OPTIONAL,
898     homeLocationDescription     HomeLocationDescription OPTIONAL,
899     imei                                Imei                            OPTIONAL,
900 ...
901 }
902
903 ChargedPartyEquipment ::= [APPLICATION 323] SEQUENCE
904 {
905     equipmentIdType EquipmentIdType OPTIONAL, -- *m.m.
906     equipmentId     EquipmentId     OPTIONAL, -- *m.m.
907 ...
908 }
909  
910 ChargedPartyHomeIdentification ::= [APPLICATION 313] SEQUENCE
911 {
912     homeIdType     HomeIdType     OPTIONAL, -- *m.m.
913     homeIdentifier HomeIdentifier OPTIONAL, -- *m.m.
914 ...
915 }
916
917 ChargedPartyHomeIdList ::= [APPLICATION 314] SEQUENCE OF
918                                              ChargedPartyHomeIdentification
919
920 ChargedPartyIdentification ::= [APPLICATION 309] SEQUENCE
921 {
922     chargedPartyIdType         ChargedPartyIdType         OPTIONAL, -- *m.m.
923     chargedPartyIdentifier     ChargedPartyIdentifier     OPTIONAL, -- *m.m.
924 ...
925 }
926
927 ChargedPartyIdentifier ::= [APPLICATION 287] AsciiString
928
929 ChargedPartyIdList ::= [APPLICATION 310] SEQUENCE OF ChargedPartyIdentification
930
931 ChargedPartyIdType ::= [APPLICATION 305] INTEGER
932
933 ChargedPartyInformation ::= [APPLICATION 324] SEQUENCE
934 {
935     chargedPartyIdList       ChargedPartyIdList        OPTIONAL, -- *m.m.
936     chargedPartyHomeIdList   ChargedPartyHomeIdList    OPTIONAL,
937     chargedPartyLocationList ChargedPartyLocationList  OPTIONAL,
938     chargedPartyEquipment    ChargedPartyEquipment     OPTIONAL,
939 ...
940 }
941  
942 ChargedPartyLocation ::= [APPLICATION 320] SEQUENCE
943 {
944     locationIdType     LocationIdType     OPTIONAL, -- *m.m.
945     locationIdentifier LocationIdentifier OPTIONAL, -- *m.m.
946 ...
947 }
948  
949 ChargedPartyLocationList ::= [APPLICATION 321] SEQUENCE OF ChargedPartyLocation
950  
951 ChargedPartyStatus ::= [APPLICATION 67] INTEGER 
952
953 ChargedUnits ::= [APPLICATION 68]  INTEGER 
954
955 ChargeInformation ::= [APPLICATION 69] SEQUENCE
956 {
957     chargedItem         ChargedItem         OPTIONAL, -- *m.m.
958     exchangeRateCode    ExchangeRateCode    OPTIONAL,
959     callTypeGroup       CallTypeGroup       OPTIONAL,
960     chargeDetailList    ChargeDetailList    OPTIONAL, -- *m.m.
961     taxInformation      TaxInformationList  OPTIONAL,
962     discountInformation DiscountInformation OPTIONAL,
963 ...
964 }
965
966 ChargeInformationList ::= [APPLICATION 70] SEQUENCE OF ChargeInformation
967
968 ChargeRefundIndicator ::= [APPLICATION 344] INTEGER
969  
970 ChargeType ::= [APPLICATION 71] NumberString --(SIZE(2..3))
971
972 ChargingId ::= [APPLICATION 72] INTEGER
973
974 ChargingPoint ::= [APPLICATION 73]  AsciiString --(SIZE(1))
975
976 ChargingTimeStamp ::= [APPLICATION 74]  DateTime
977
978 ClirIndicator ::= [APPLICATION 75] INTEGER
979
980 Commission ::= [APPLICATION 350] Charge
981  
982 CompletionTimeStamp ::= [APPLICATION 76] DateTime
983
984 ContentChargingPoint ::= [APPLICATION 345] INTEGER
985  
986 ContentProvider ::= [APPLICATION 327] SEQUENCE
987 {
988     contentProviderIdType     ContentProviderIdType     OPTIONAL, -- *m.m.
989     contentProviderIdentifier ContentProviderIdentifier OPTIONAL, -- *m.m.
990 ...
991 }
992  
993 ContentProviderIdentifier ::= [APPLICATION 292] AsciiString
994
995 ContentProviderIdList ::= [APPLICATION 328] SEQUENCE OF ContentProvider
996
997 ContentProviderIdType ::= [APPLICATION 291] INTEGER
998
999 ContentProviderName ::= [APPLICATION 334] AsciiString
1000  
1001 ContentServiceUsed ::= [APPLICATION 352] SEQUENCE
1002 {
1003     contentTransactionCode       ContentTransactionCode       OPTIONAL, -- *m.m.
1004     contentTransactionType       ContentTransactionType       OPTIONAL, -- *m.m.
1005     objectType                   ObjectType                   OPTIONAL,
1006     transactionDescriptionSupp   TransactionDescriptionSupp   OPTIONAL,
1007     transactionShortDescription  TransactionShortDescription  OPTIONAL, -- *m.m.
1008     transactionDetailDescription TransactionDetailDescription OPTIONAL,
1009     transactionIdentifier          TransactionIdentifier        OPTIONAL, -- *m.m.
1010     transactionAuthCode          TransactionAuthCode          OPTIONAL,
1011     dataVolumeIncoming           DataVolumeIncoming           OPTIONAL,
1012     dataVolumeOutgoing           DataVolumeOutgoing           OPTIONAL,
1013     totalDataVolume              TotalDataVolume              OPTIONAL,
1014     chargeRefundIndicator        ChargeRefundIndicator        OPTIONAL,
1015     contentChargingPoint         ContentChargingPoint         OPTIONAL,
1016     chargeInformationList        ChargeInformationList        OPTIONAL,
1017     advisedChargeInformation     AdvisedChargeInformation     OPTIONAL,
1018 ...
1019 }
1020
1021 ContentServiceUsedList ::= [APPLICATION 285] SEQUENCE OF ContentServiceUsed
1022  
1023 ContentTransactionBasicInfo ::= [APPLICATION 304] SEQUENCE
1024 {
1025     rapFileSequenceNumber      RapFileSequenceNumber      OPTIONAL,
1026     orderPlacedTimeStamp       OrderPlacedTimeStamp       OPTIONAL,
1027     requestedDeliveryTimeStamp RequestedDeliveryTimeStamp OPTIONAL,
1028     actualDeliveryTimeStamp    ActualDeliveryTimeStamp    OPTIONAL,
1029     totalTransactionDuration   TotalTransactionDuration   OPTIONAL,
1030     transactionStatus          TransactionStatus          OPTIONAL,
1031 ...
1032 }
1033
1034 ContentTransactionCode ::= [APPLICATION 336] INTEGER
1035  
1036 ContentTransactionType ::= [APPLICATION 337] INTEGER
1037  
1038 CseInformation ::= [APPLICATION 79] OCTET STRING --(SIZE(1..40))
1039
1040 CurrencyConversion ::= [APPLICATION 106] SEQUENCE
1041 {
1042     exchangeRateCode      ExchangeRateCode      OPTIONAL, -- *m.m.
1043     numberOfDecimalPlaces NumberOfDecimalPlaces OPTIONAL, -- *m.m.
1044     exchangeRate          ExchangeRate          OPTIONAL, -- *m.m.
1045 ...
1046 }
1047
1048 CurrencyConversionList ::= [APPLICATION 80] SEQUENCE OF CurrencyConversion
1049
1050 CustomerIdentifier ::= [APPLICATION 364] AsciiString
1051
1052 CustomerIdType ::= [APPLICATION 363] INTEGER
1053
1054 DataVolume ::= INTEGER 
1055
1056 DataVolumeIncoming ::= [APPLICATION 250] DataVolume
1057
1058 DataVolumeOutgoing ::= [APPLICATION 251] DataVolume
1059
1060 --
1061 --  The following datatypes are used to denote timestamps.
1062 --  Each timestamp consists of a local timestamp and a
1063 --  corresponding UTC time offset. 
1064 --  Except for the timestamps used within the Batch Control 
1065 --  Information and the Audit Control Information 
1066 --  the UTC time offset is identified by a code referencing
1067 --  the UtcTimeOffsetInfo.
1068 --  
1069  
1070 --
1071 -- We start with the “short” datatype referencing the 
1072 -- UtcTimeOffsetInfo.
1073 -- 
1074
1075 DateTime ::= SEQUENCE 
1076 {
1077      -- 
1078      -- Local timestamps are noted in the format
1079      --
1080      --     CCYYMMDDhhmmss
1081      --
1082      -- where CC  =  century  (‘19’, ‘20’,...)
1083      --       YY  =  year     (‘00’ – ‘99’)
1084      --       MM  =  month    (‘01’, ‘02’, ... , ‘12’)
1085      --       DD  =  day      (‘01’, ‘02’, ... , ‘31’)
1086      --       hh  =  hour     (‘00’, ‘01’, ... , ‘23’)
1087      --       mm  =  minutes  (‘00’, ‘01’, ... , ‘59’)
1088      --       ss  =  seconds  (‘00’, ‘01’, ... , ‘59’)
1089      -- 
1090     localTimeStamp     LocalTimeStamp    OPTIONAL, -- *m.m.
1091     utcTimeOffsetCode  UtcTimeOffsetCode OPTIONAL, -- *m.m.
1092 ...
1093 }
1094
1095 --
1096 -- The following version is the “long” datatype
1097 -- containing the UTC time offset directly. 
1098 --
1099
1100 DateTimeLong ::= SEQUENCE 
1101 {
1102     localTimeStamp     LocalTimeStamp OPTIONAL, -- *m.m.
1103     utcTimeOffset      UtcTimeOffset  OPTIONAL, -- *m.m.
1104 ...
1105 }
1106
1107 DefaultCallHandlingIndicator ::= [APPLICATION 87] INTEGER
1108
1109 DepositTimeStamp ::= [APPLICATION 88] DateTime
1110
1111 Destination ::= [APPLICATION 89] SEQUENCE
1112 {
1113     calledNumber                CalledNumber            OPTIONAL,
1114     dialledDigits               DialledDigits         OPTIONAL,
1115     calledPlace                 CalledPlace           OPTIONAL,
1116     calledRegion                CalledRegion          OPTIONAL,
1117     sMSDestinationNumber        SMSDestinationNumber  OPTIONAL,
1118 ...
1119 }
1120
1121 DestinationNetwork ::= [APPLICATION 90] NetworkId 
1122
1123 DialledDigits ::= [APPLICATION 279] AsciiString
1124
1125 Discount ::= [APPLICATION 412] DiscountValue
1126
1127 DiscountableAmount ::= [APPLICATION 423] AbsoluteAmount
1128
1129 DiscountApplied ::= [APPLICATION 428] CHOICE 
1130 {
1131     fixedDiscountValue    FixedDiscountValue, 
1132     discountRate          DiscountRate,
1133 ...
1134 }
1135
1136 DiscountCode ::= [APPLICATION 91] INTEGER
1137
1138 DiscountInformation ::= [APPLICATION 96] SEQUENCE
1139 {
1140     discountCode        DiscountCode            OPTIONAL, -- *m.m.
1141     discount            Discount                OPTIONAL,
1142     discountableAmount  DiscountableAmount      OPTIONAL,
1143 ...
1144 }
1145
1146 Discounting ::= [APPLICATION 94] SEQUENCE
1147 {
1148     discountCode    DiscountCode    OPTIONAL, -- *m.m.
1149     discountApplied DiscountApplied OPTIONAL, -- *m.m.
1150 ...
1151 }
1152
1153 DiscountingList ::= [APPLICATION 95]  SEQUENCE OF Discounting
1154
1155 DiscountRate ::= [APPLICATION 92] PercentageRate
1156
1157 DiscountValue ::= AbsoluteAmount
1158
1159 DistanceChargeBandCode ::= [APPLICATION 98] AsciiString --(SIZE(1))
1160
1161 EarliestCallTimeStamp ::= [APPLICATION 101] DateTimeLong
1162
1163 ElementId ::= [APPLICATION 437] AsciiString
1164
1165 ElementType ::= [APPLICATION 438] INTEGER
1166
1167 EquipmentId ::= [APPLICATION 290] AsciiString
1168
1169 EquipmentIdType ::= [APPLICATION 322] INTEGER
1170
1171 Esn ::= [APPLICATION 103] NumberString
1172
1173 ExchangeRate ::= [APPLICATION 104] INTEGER
1174
1175 ExchangeRateCode ::= [APPLICATION 105] Code
1176
1177 FileAvailableTimeStamp ::= [APPLICATION 107] DateTimeLong
1178
1179 FileCreationTimeStamp ::= [APPLICATION 108] DateTimeLong
1180
1181 FileSequenceNumber ::= [APPLICATION 109] NumberString --(SIZE(5))
1182
1183 FileTypeIndicator ::= [APPLICATION 110] AsciiString --(SIZE(1))
1184
1185 FixedDiscountValue ::= [APPLICATION 411] DiscountValue
1186
1187 Fnur ::= [APPLICATION 111] INTEGER
1188
1189 GeographicalLocation ::= [APPLICATION 113]  SEQUENCE
1190 {
1191     servingNetwork              ServingNetwork                  OPTIONAL,
1192     servingBid                  ServingBid                      OPTIONAL,
1193     servingLocationDescription  ServingLocationDescription  OPTIONAL,
1194 ...
1195 }
1196
1197 GprsBasicCallInformation ::= [APPLICATION 114] SEQUENCE
1198 {
1199     gprsChargeableSubscriber    GprsChargeableSubscriber OPTIONAL, -- *m.m.
1200     rapFileSequenceNumber       RapFileSequenceNumber    OPTIONAL,
1201     gprsDestination             GprsDestination          OPTIONAL, -- *m.m.
1202     callEventStartTimeStamp     CallEventStartTimeStamp  OPTIONAL, -- *m.m.
1203     totalCallEventDuration      TotalCallEventDuration   OPTIONAL, -- *m.m.
1204     causeForTerm                CauseForTerm             OPTIONAL,
1205     partialTypeIndicator        PartialTypeIndicator     OPTIONAL,
1206     pDPContextStartTimestamp    PDPContextStartTimestamp OPTIONAL,
1207     networkInitPDPContext       NetworkInitPDPContext    OPTIONAL,
1208     chargingId                  ChargingId               OPTIONAL, -- *m.m.
1209 ...
1210 }
1211
1212 GprsChargeableSubscriber ::= [APPLICATION 115] SEQUENCE
1213 {
1214     chargeableSubscriber        ChargeableSubscriber    OPTIONAL,
1215     pdpAddress                  PdpAddress              OPTIONAL,
1216     networkAccessIdentifier     NetworkAccessIdentifier OPTIONAL,
1217 ...
1218 }
1219
1220 GprsDestination ::= [APPLICATION 116] SEQUENCE
1221 {
1222     accessPointNameNI           AccessPointNameNI      OPTIONAL, -- *m.m.
1223     accessPointNameOI           AccessPointNameOI      OPTIONAL,
1224 ...
1225 }
1226
1227 GprsLocationInformation ::= [APPLICATION 117] SEQUENCE
1228 {
1229     gprsNetworkLocation         GprsNetworkLocation     OPTIONAL, -- *m.m.
1230     homeLocationInformation     HomeLocationInformation OPTIONAL,
1231     geographicalLocation        GeographicalLocation    OPTIONAL, 
1232 ...
1233
1234
1235 GprsNetworkLocation ::= [APPLICATION 118] SEQUENCE
1236 {
1237     recEntity                   RecEntityCodeList OPTIONAL, -- *m.m.
1238     locationArea                LocationArea      OPTIONAL,
1239     cellId                      CellId            OPTIONAL,
1240 ...
1241 }
1242
1243 GprsServiceUsed ::= [APPLICATION 121]  SEQUENCE
1244 {
1245     iMSSignallingContext        IMSSignallingContext  OPTIONAL,
1246     dataVolumeIncoming          DataVolumeIncoming    OPTIONAL, -- *m.m.
1247     dataVolumeOutgoing          DataVolumeOutgoing    OPTIONAL, -- *m.m.
1248     chargeInformationList       ChargeInformationList OPTIONAL, -- *m.m.
1249 ...
1250 }
1251
1252 GsmChargeableSubscriber ::= [APPLICATION 286] SEQUENCE
1253 {
1254     imsi     Imsi   OPTIONAL,
1255     msisdn   Msisdn OPTIONAL,
1256 ...
1257 }
1258
1259 GuaranteedBitRate ::= [APPLICATION 420] OCTET STRING --(SIZE (1))
1260
1261 HomeBid ::= [APPLICATION 122]  Bid
1262
1263 HomeIdentifier ::= [APPLICATION 288] AsciiString
1264
1265 HomeIdType ::= [APPLICATION 311] INTEGER
1266
1267 HomeLocationDescription ::= [APPLICATION 413] LocationDescription
1268
1269 HomeLocationInformation ::= [APPLICATION 123] SEQUENCE
1270 {
1271     homeBid                     HomeBid                         OPTIONAL, -- *m.m.
1272     homeLocationDescription     HomeLocationDescription OPTIONAL, -- *m.m.
1273 ...
1274 }
1275
1276 HorizontalAccuracyDelivered ::= [APPLICATION 392] INTEGER
1277
1278 HorizontalAccuracyRequested ::= [APPLICATION 385] INTEGER
1279
1280 HSCSDIndicator ::= [APPLICATION 424] AsciiString --(SIZE(1))
1281
1282 Imei ::= [APPLICATION 128] BCDString --(SIZE(7..8))
1283
1284 ImeiOrEsn ::= [APPLICATION 429] CHOICE 
1285 {
1286     imei  Imei,
1287     esn   Esn,
1288 ...
1289
1290
1291 Imsi ::= [APPLICATION 129] BCDString --(SIZE(3..8))
1292
1293 IMSSignallingContext ::= [APPLICATION 418] INTEGER
1294
1295 InternetServiceProvider ::= [APPLICATION 329] SEQUENCE
1296 {
1297     ispIdType        IspIdType        OPTIONAL, -- *m.m.
1298     ispIdentifier    IspIdentifier    OPTIONAL, -- *m.m.
1299 ...
1300 }
1301  
1302 InternetServiceProviderIdList ::= [APPLICATION 330] SEQUENCE OF InternetServiceProvider
1303
1304 IspIdentifier ::= [APPLICATION 294] AsciiString
1305  
1306 IspIdType ::= [APPLICATION 293] INTEGER
1307
1308 ISPList ::= [APPLICATION 378] SEQUENCE OF InternetServiceProvider
1309
1310 NetworkIdType ::= [APPLICATION 331] INTEGER
1311
1312 NetworkIdentifier ::= [APPLICATION 295] AsciiString
1313
1314 Network ::= [APPLICATION 332] SEQUENCE
1315 {
1316     networkIdType     NetworkIdType     OPTIONAL, -- *m.m.
1317     networkIdentifier NetworkIdentifier OPTIONAL, -- *m.m.
1318 ...
1319 }
1320  
1321 NetworkList ::= [APPLICATION 333] SEQUENCE OF Network
1322  
1323 LatestCallTimeStamp ::= [APPLICATION 133] DateTimeLong
1324
1325 LCSQosDelivered ::= [APPLICATION 390] SEQUENCE
1326 {
1327     lCSTransactionStatus          LCSTransactionStatus        OPTIONAL,
1328     horizontalAccuracyDelivered   HorizontalAccuracyDelivered OPTIONAL,
1329     verticalAccuracyDelivered     VerticalAccuracyDelivered   OPTIONAL,
1330     responseTime                  ResponseTime                OPTIONAL,
1331     positioningMethod             PositioningMethod           OPTIONAL,
1332     trackingPeriod                TrackingPeriod              OPTIONAL,
1333     trackingFrequency             TrackingFrequency           OPTIONAL,
1334     ageOfLocation                 AgeOfLocation               OPTIONAL,
1335 ...
1336 }
1337
1338 LCSQosRequested ::= [APPLICATION 383] SEQUENCE
1339 {
1340     lCSRequestTimestamp           LCSRequestTimestamp         OPTIONAL, -- *m.m.
1341     horizontalAccuracyRequested   HorizontalAccuracyRequested OPTIONAL,
1342     verticalAccuracyRequested     VerticalAccuracyRequested   OPTIONAL,
1343     responseTimeCategory          ResponseTimeCategory        OPTIONAL,
1344     trackingPeriod                TrackingPeriod              OPTIONAL,
1345     trackingFrequency             TrackingFrequency           OPTIONAL,
1346 ...
1347 }
1348
1349 LCSRequestTimestamp ::= [APPLICATION 384] DateTime
1350
1351 LCSSPIdentification ::= [APPLICATION 375] SEQUENCE
1352 {
1353  contentProviderIdType         ContentProviderIdType     OPTIONAL, -- *m.m.
1354  contentProviderIdentifier     ContentProviderIdentifier OPTIONAL, -- *m.m.
1355 ...
1356 }
1357
1358 LCSSPIdentificationList ::= [APPLICATION 374] SEQUENCE OF LCSSPIdentification
1359
1360 LCSSPInformation ::= [APPLICATION 373] SEQUENCE
1361 {
1362     lCSSPIdentificationList       LCSSPIdentificationList OPTIONAL, -- *m.m.
1363     iSPList                       ISPList                 OPTIONAL,
1364     networkList                   NetworkList             OPTIONAL,
1365 ...
1366 }
1367
1368 LCSTransactionStatus ::= [APPLICATION 391] INTEGER
1369
1370 LocalCurrency ::= [APPLICATION 135] Currency
1371
1372 LocalTimeStamp ::= [APPLICATION 16] NumberString --(SIZE(14))
1373
1374 LocationArea ::= [APPLICATION 136] INTEGER 
1375
1376 LocationDescription ::= AsciiString
1377
1378 LocationIdentifier ::= [APPLICATION 289] AsciiString
1379
1380 LocationIdType ::= [APPLICATION 315] INTEGER
1381
1382 LocationInformation ::= [APPLICATION 138]  SEQUENCE
1383 {
1384     networkLocation             NetworkLocation         OPTIONAL, -- *m.m.
1385     homeLocationInformation     HomeLocationInformation OPTIONAL,
1386     geographicalLocation        GeographicalLocation    OPTIONAL,
1387 ...
1388
1389
1390 LocationServiceUsage ::= [APPLICATION 382] SEQUENCE
1391 {
1392     lCSQosRequested               LCSQosRequested       OPTIONAL, -- *m.m.
1393     lCSQosDelivered               LCSQosDelivered       OPTIONAL,
1394     chargingTimeStamp             ChargingTimeStamp     OPTIONAL,
1395     chargeInformationList         ChargeInformationList OPTIONAL, -- *m.m.
1396 ...
1397 }
1398
1399 MaximumBitRate ::= [APPLICATION 421] OCTET STRING --(SIZE (1))
1400
1401 Mdn ::= [APPLICATION 253] NumberString
1402
1403 MessageDescription ::= [APPLICATION 142] AsciiString
1404
1405 MessageDescriptionCode ::= [APPLICATION 141] Code
1406
1407 MessageDescriptionInformation ::= [APPLICATION 143] SEQUENCE
1408 {
1409     messageDescriptionCode MessageDescriptionCode OPTIONAL, -- *m.m.
1410     messageDescription     MessageDescription     OPTIONAL, -- *m.m.
1411 ...
1412 }
1413
1414 MessageStatus ::= [APPLICATION 144] INTEGER
1415
1416 MessageType ::= [APPLICATION 145] INTEGER
1417
1418 MessagingEventService ::= [APPLICATION 439] INTEGER
1419
1420 Min ::= [APPLICATION 146] NumberString --(SIZE(2..15)) 
1421
1422 MinChargeableSubscriber ::= [APPLICATION 254] SEQUENCE
1423 {
1424     min     Min    OPTIONAL, -- *m.m.
1425     mdn     Mdn    OPTIONAL,
1426 ...
1427 }
1428
1429 MoBasicCallInformation ::= [APPLICATION 147] SEQUENCE
1430 {
1431     chargeableSubscriber        ChargeableSubscriber    OPTIONAL, -- *m.m.
1432     rapFileSequenceNumber       RapFileSequenceNumber   OPTIONAL,
1433     destination                 Destination             OPTIONAL,
1434     destinationNetwork          DestinationNetwork      OPTIONAL,
1435     callEventStartTimeStamp     CallEventStartTimeStamp OPTIONAL, -- *m.m.
1436     totalCallEventDuration      TotalCallEventDuration  OPTIONAL, -- *m.m.
1437     simToolkitIndicator         SimToolkitIndicator     OPTIONAL,
1438     causeForTerm                CauseForTerm            OPTIONAL,
1439 ...
1440 }
1441
1442 MobileSessionService ::= [APPLICATION 440] INTEGER      
1443
1444 Msisdn ::= [APPLICATION 152] BCDString --(SIZE(1..9))
1445
1446 MtBasicCallInformation ::= [APPLICATION 153] SEQUENCE
1447 {
1448     chargeableSubscriber        ChargeableSubscriber    OPTIONAL, -- *m.m.
1449     rapFileSequenceNumber       RapFileSequenceNumber   OPTIONAL,
1450     callOriginator              CallOriginator          OPTIONAL,
1451     originatingNetwork          OriginatingNetwork      OPTIONAL,
1452     callEventStartTimeStamp     CallEventStartTimeStamp OPTIONAL, -- *m.m.
1453     totalCallEventDuration      TotalCallEventDuration  OPTIONAL, -- *m.m.
1454     simToolkitIndicator         SimToolkitIndicator     OPTIONAL,
1455     causeForTerm                CauseForTerm            OPTIONAL,
1456 ...
1457 }
1458
1459 NetworkAccessIdentifier ::= [APPLICATION 417] AsciiString
1460
1461 NetworkElement ::= [APPLICATION 441]  SEQUENCE
1462 {
1463 elementType             ElementType  OPTIONAL, -- *m.m.
1464 elementId               ElementId    OPTIONAL, -- *m.m.
1465 ...
1466 }
1467
1468 NetworkElementList ::= [APPLICATION 442] SEQUENCE OF NetworkElement
1469
1470 NetworkId ::= AsciiString --(SIZE(1..6))
1471
1472 NetworkInitPDPContext ::= [APPLICATION 245] INTEGER
1473
1474 NetworkLocation ::= [APPLICATION 156]  SEQUENCE
1475 {
1476     recEntityCode               RecEntityCode OPTIONAL, -- *m.m.
1477     callReference               CallReference OPTIONAL,
1478     locationArea                LocationArea  OPTIONAL,
1479     cellId                      CellId        OPTIONAL,
1480 ...
1481 }
1482
1483 NonChargedNumber ::= [APPLICATION 402] AsciiString
1484
1485 NonChargedParty ::= [APPLICATION 443]  SEQUENCE
1486 {
1487     nonChargedPartyNumber       NonChargedPartyNumber    OPTIONAL,
1488     nonChargedPublicUserId      NonChargedPublicUserId OPTIONAL,
1489 ...
1490 }
1491
1492 NonChargedPartyNumber ::= [APPLICATION 444] AddressStringDigits
1493
1494 NonChargedPublicUserId ::= [APPLICATION 445] AsciiString 
1495
1496 NumberOfDecimalPlaces ::= [APPLICATION 159] INTEGER
1497
1498 ObjectType ::= [APPLICATION 281] INTEGER
1499
1500 OperatorSpecInfoList ::= [APPLICATION 162] SEQUENCE OF OperatorSpecInformation
1501
1502 OperatorSpecInformation ::= [APPLICATION 163] AsciiString
1503
1504 OrderPlacedTimeStamp ::= [APPLICATION 300] DateTime
1505
1506 OriginatingNetwork ::= [APPLICATION 164] NetworkId 
1507
1508 PacketDataProtocolAddress ::= [APPLICATION 165] AsciiString 
1509
1510 PaidIndicator ::= [APPLICATION 346] INTEGER
1511  
1512 PartialTypeIndicator ::=  [APPLICATION 166] AsciiString --(SIZE(1))
1513
1514 PaymentMethod ::= [APPLICATION 347] INTEGER
1515
1516 PdpAddress ::= [APPLICATION 167] PacketDataProtocolAddress
1517
1518 PDPContextStartTimestamp ::= [APPLICATION 260] DateTime
1519
1520 PlmnId ::= [APPLICATION 169] AsciiString --(SIZE(5))
1521
1522 PositioningMethod ::= [APPLICATION 395] INTEGER
1523
1524 PriorityCode ::= [APPLICATION 170] INTEGER
1525
1526 PublicUserId ::= [APPLICATION 446] AsciiString 
1527
1528 RapFileSequenceNumber ::= [APPLICATION 181]  FileSequenceNumber
1529
1530 RecEntityCode ::= [APPLICATION 184] Code
1531
1532 RecEntityCodeList ::= [APPLICATION 185] SEQUENCE OF RecEntityCode
1533
1534 RecEntityId ::= [APPLICATION 400] AsciiString
1535
1536 RecEntityInfoList ::= [APPLICATION 188] SEQUENCE OF RecEntityInformation
1537
1538 RecEntityInformation ::= [APPLICATION 183] SEQUENCE
1539 {
1540     recEntityCode  RecEntityCode OPTIONAL, -- *m.m.
1541     recEntityType  RecEntityType OPTIONAL, -- *m.m.
1542     recEntityId    RecEntityId   OPTIONAL, -- *m.m.
1543 ...
1544 }
1545  
1546 RecEntityType ::= [APPLICATION 186] INTEGER
1547
1548 Recipient ::= [APPLICATION 182]  PlmnId
1549
1550 ReleaseVersionNumber ::= [APPLICATION 189] INTEGER
1551
1552 RequestedDeliveryTimeStamp ::= [APPLICATION 301] DateTime
1553
1554 ResponseTime ::= [APPLICATION 394] INTEGER
1555
1556 ResponseTimeCategory ::= [APPLICATION 387] INTEGER
1557
1558 ScuBasicInformation ::= [APPLICATION 191] SEQUENCE
1559 {
1560     chargeableSubscriber      ScuChargeableSubscriber    OPTIONAL, -- *m.m.
1561     chargedPartyStatus        ChargedPartyStatus         OPTIONAL, -- *m.m.
1562     nonChargedNumber          NonChargedNumber           OPTIONAL, -- *m.m.
1563     clirIndicator             ClirIndicator              OPTIONAL,
1564     originatingNetwork        OriginatingNetwork         OPTIONAL,
1565     destinationNetwork        DestinationNetwork         OPTIONAL,
1566 ...
1567 }
1568
1569 ScuChargeType ::= [APPLICATION 192]  SEQUENCE
1570 {
1571     messageStatus               MessageStatus          OPTIONAL, -- *m.m.
1572     priorityCode                PriorityCode           OPTIONAL, -- *m.m.
1573     distanceChargeBandCode      DistanceChargeBandCode OPTIONAL,
1574     messageType                 MessageType            OPTIONAL, -- *m.m.
1575     messageDescriptionCode      MessageDescriptionCode OPTIONAL, -- *m.m.
1576 ...
1577 }
1578
1579 ScuTimeStamps ::= [APPLICATION 193]  SEQUENCE
1580 {
1581     depositTimeStamp            DepositTimeStamp    OPTIONAL, -- *m.m.
1582     completionTimeStamp         CompletionTimeStamp OPTIONAL, -- *m.m.
1583     chargingPoint               ChargingPoint       OPTIONAL, -- *m.m.
1584 ...
1585 }
1586
1587 ScuChargeableSubscriber ::= [APPLICATION 430] CHOICE 
1588 {
1589     gsmChargeableSubscriber    GsmChargeableSubscriber,
1590     minChargeableSubscriber    MinChargeableSubscriber,
1591 ...
1592 }
1593
1594 Sender ::= [APPLICATION 196]  PlmnId
1595
1596 ServiceStartTimestamp ::= [APPLICATION 447] DateTime
1597
1598 ServingBid ::= [APPLICATION 198]  Bid
1599
1600 ServingLocationDescription ::= [APPLICATION 414] LocationDescription
1601
1602 ServingNetwork ::= [APPLICATION 195]  AsciiString
1603
1604 ServingPartiesInformation ::= [APPLICATION 335] SEQUENCE
1605 {
1606   contentProviderName           ContentProviderName           OPTIONAL, -- *m.m.
1607   contentProviderIdList         ContentProviderIdList         OPTIONAL,
1608   internetServiceProviderIdList InternetServiceProviderIdList OPTIONAL,
1609   networkList                   NetworkList                   OPTIONAL,
1610 ...
1611 }
1612
1613 SessionChargeInfoList ::= [APPLICATION 448] SEQUENCE OF SessionChargeInformation
1614
1615 SessionChargeInformation ::= [APPLICATION 449] SEQUENCE
1616 {
1617 chargedItem                     ChargedItem              OPTIONAL, -- *m.m.    
1618 exchangeRateCode                ExchangeRateCode         OPTIONAL,
1619         callTypeGroup           CallTypeGroup            OPTIONAL, -- *m.m.
1620         chargeDetailList        ChargeDetailList         OPTIONAL, -- *m.m.
1621         taxInformationList      TaxInformationList       OPTIONAL,
1622 ...
1623 }         
1624  
1625 SimChargeableSubscriber ::= [APPLICATION 199] SEQUENCE
1626 {
1627     imsi     Imsi   OPTIONAL, -- *m.m.
1628     msisdn   Msisdn OPTIONAL,
1629 ...
1630 }
1631
1632 SimToolkitIndicator ::= [APPLICATION 200] AsciiString --(SIZE(1)) 
1633
1634 SMSDestinationNumber ::= [APPLICATION 419] AsciiString
1635
1636 SMSOriginator ::= [APPLICATION 425] AsciiString
1637
1638 SpecificationVersionNumber  ::= [APPLICATION 201] INTEGER
1639
1640 SsParameters ::= [APPLICATION 204] AsciiString --(SIZE(1..40))
1641
1642 SupplServiceActionCode ::= [APPLICATION 208] INTEGER
1643
1644 SupplServiceCode ::= [APPLICATION 209] HexString --(SIZE(2))
1645
1646 SupplServiceUsed ::= [APPLICATION 206] SEQUENCE
1647 {
1648     supplServiceCode       SupplServiceCode       OPTIONAL, -- *m.m.
1649     supplServiceActionCode SupplServiceActionCode OPTIONAL, -- *m.m.
1650     ssParameters           SsParameters           OPTIONAL,
1651     chargingTimeStamp      ChargingTimeStamp      OPTIONAL,
1652     chargeInformation      ChargeInformation      OPTIONAL,
1653     basicServiceCodeList   BasicServiceCodeList   OPTIONAL,
1654 ...
1655 }
1656
1657 TapCurrency ::= [APPLICATION 210] Currency
1658
1659 TapDecimalPlaces ::= [APPLICATION 244] INTEGER
1660
1661 TaxableAmount ::= [APPLICATION 398] AbsoluteAmount
1662
1663 Taxation ::= [APPLICATION 216] SEQUENCE
1664 {
1665     taxCode      TaxCode      OPTIONAL, -- *m.m.
1666     taxType      TaxType      OPTIONAL, -- *m.m.
1667     taxRate      TaxRate      OPTIONAL,
1668     chargeType   ChargeType   OPTIONAL,
1669     taxIndicator TaxIndicator OPTIONAL,
1670 ...
1671 }
1672
1673 TaxationList ::= [APPLICATION 211]  SEQUENCE OF Taxation
1674
1675 TaxCode ::= [APPLICATION 212] INTEGER
1676
1677 TaxIndicator ::= [APPLICATION 432] AsciiString --(SIZE(1))
1678
1679 TaxInformation ::= [APPLICATION 213] SEQUENCE
1680 {
1681     taxCode          TaxCode       OPTIONAL, -- *m.m.
1682     taxValue         TaxValue      OPTIONAL, -- *m.m.
1683     taxableAmount    TaxableAmount OPTIONAL,
1684 ...
1685 }
1686
1687 TaxInformationList ::= [APPLICATION 214]  SEQUENCE OF TaxInformation
1688
1689 -- The TaxRate item is of a fixed length to ensure that the full 5 
1690 -- decimal places is provided.
1691
1692 TaxRate ::= [APPLICATION 215] NumberString --(SIZE(7))
1693
1694 TaxType ::= [APPLICATION 217] AsciiString --(SIZE(2))
1695
1696 TaxValue ::= [APPLICATION 397] AbsoluteAmount
1697
1698 TeleServiceCode ::= [APPLICATION 218] HexString --(SIZE(2))
1699
1700 ThirdPartyInformation ::= [APPLICATION 219]  SEQUENCE
1701 {
1702     thirdPartyNumber            ThirdPartyNumber        OPTIONAL,
1703     clirIndicator               ClirIndicator         OPTIONAL,
1704 ...
1705 }
1706
1707 ThirdPartyNumber ::= [APPLICATION 403] AddressStringDigits
1708
1709 ThreeGcamelDestination ::= [APPLICATION 431] CHOICE
1710 {
1711     camelDestinationNumber    CamelDestinationNumber,
1712     gprsDestination           GprsDestination,
1713 ...
1714 }
1715
1716 TotalAdvisedCharge ::= [APPLICATION 356] AbsoluteAmount
1717  
1718 TotalAdvisedChargeRefund ::= [APPLICATION 357] AbsoluteAmount
1719  
1720 TotalAdvisedChargeValue ::= [APPLICATION 360] SEQUENCE
1721 {
1722     advisedChargeCurrency    AdvisedChargeCurrency    OPTIONAL,
1723     totalAdvisedCharge       TotalAdvisedCharge       OPTIONAL, -- *m.m.
1724     totalAdvisedChargeRefund TotalAdvisedChargeRefund OPTIONAL,
1725     totalCommission          TotalCommission          OPTIONAL,
1726     totalCommissionRefund    TotalCommissionRefund    OPTIONAL,
1727 ...
1728 }
1729  
1730 TotalAdvisedChargeValueList ::= [APPLICATION 361] SEQUENCE OF TotalAdvisedChargeValue
1731
1732 TotalCallEventDuration ::= [APPLICATION 223] INTEGER 
1733
1734 TotalCharge ::= [APPLICATION 415] AbsoluteAmount
1735
1736 TotalChargeRefund ::= [APPLICATION 355] AbsoluteAmount
1737  
1738 TotalCommission ::= [APPLICATION 358] AbsoluteAmount
1739  
1740 TotalCommissionRefund ::= [APPLICATION 359] AbsoluteAmount
1741  
1742 TotalDataVolume ::= [APPLICATION 343] DataVolume
1743  
1744 TotalDiscountRefund ::= [APPLICATION 354] AbsoluteAmount
1745  
1746 TotalDiscountValue ::= [APPLICATION 225] AbsoluteAmount
1747
1748 TotalTaxRefund ::= [APPLICATION 353] AbsoluteAmount
1749  
1750 TotalTaxValue ::= [APPLICATION 226] AbsoluteAmount
1751
1752 TotalTransactionDuration ::= [APPLICATION 416] TotalCallEventDuration
1753
1754 TrackedCustomerEquipment ::= [APPLICATION 381] SEQUENCE
1755 {
1756     equipmentIdType               EquipmentIdType OPTIONAL, -- *m.m.
1757     equipmentId                   EquipmentId     OPTIONAL, -- *m.m.
1758 ...
1759 }
1760
1761 TrackedCustomerHomeId ::= [APPLICATION 377] SEQUENCE
1762 {
1763     homeIdType                    HomeIdType     OPTIONAL, -- *m.m.
1764     homeIdentifier                HomeIdentifier OPTIONAL, -- *m.m.
1765 ...
1766 }
1767
1768 TrackedCustomerHomeIdList ::= [APPLICATION 376] SEQUENCE OF TrackedCustomerHomeId
1769
1770 TrackedCustomerIdentification ::= [APPLICATION 372] SEQUENCE
1771 {
1772     customerIdType                CustomerIdType     OPTIONAL, -- *m.m.
1773     customerIdentifier            CustomerIdentifier OPTIONAL, -- *m.m.
1774 ...
1775 }
1776
1777 TrackedCustomerIdList ::= [APPLICATION 370] SEQUENCE OF TrackedCustomerIdentification
1778
1779 TrackedCustomerInformation ::= [APPLICATION 367] SEQUENCE
1780 {
1781     trackedCustomerIdList         TrackedCustomerIdList     OPTIONAL, -- *m.m.
1782     trackedCustomerHomeIdList     TrackedCustomerHomeIdList OPTIONAL,
1783     trackedCustomerLocList        TrackedCustomerLocList    OPTIONAL,
1784     trackedCustomerEquipment      TrackedCustomerEquipment  OPTIONAL,
1785 ...
1786 }
1787
1788 TrackedCustomerLocation ::= [APPLICATION 380] SEQUENCE
1789 {
1790     locationIdType                LocationIdType     OPTIONAL, -- *m.m.
1791     locationIdentifier            LocationIdentifier OPTIONAL, -- *m.m.
1792 ...
1793 }
1794
1795 TrackedCustomerLocList ::= [APPLICATION 379] SEQUENCE OF TrackedCustomerLocation
1796
1797 TrackingCustomerEquipment ::= [APPLICATION 371] SEQUENCE
1798 {
1799     equipmentIdType               EquipmentIdType OPTIONAL, -- *m.m.
1800     equipmentId                   EquipmentId     OPTIONAL, -- *m.m.
1801 ...
1802 }
1803
1804 TrackingCustomerHomeId ::= [APPLICATION 366] SEQUENCE
1805 {
1806     homeIdType                    HomeIdType     OPTIONAL, -- *m.m.
1807     homeIdentifier                HomeIdentifier OPTIONAL, -- *m.m.
1808 ...
1809 }
1810
1811 TrackingCustomerHomeIdList ::= [APPLICATION 365] SEQUENCE OF TrackingCustomerHomeId
1812
1813 TrackingCustomerIdentification ::= [APPLICATION 362] SEQUENCE
1814 {
1815     customerIdType                CustomerIdType     OPTIONAL, -- *m.m.
1816     customerIdentifier            CustomerIdentifier OPTIONAL, -- *m.m.
1817 ...
1818 }
1819
1820 TrackingCustomerIdList ::= [APPLICATION 299] SEQUENCE OF TrackingCustomerIdentification
1821
1822 TrackingCustomerInformation ::= [APPLICATION 298] SEQUENCE
1823 {
1824     trackingCustomerIdList        TrackingCustomerIdList     OPTIONAL, -- *m.m.
1825     trackingCustomerHomeIdList    TrackingCustomerHomeIdList OPTIONAL,
1826     trackingCustomerLocList       TrackingCustomerLocList    OPTIONAL,
1827     trackingCustomerEquipment     TrackingCustomerEquipment  OPTIONAL,
1828 ...
1829 }
1830
1831 TrackingCustomerLocation ::= [APPLICATION 369] SEQUENCE
1832 {
1833     locationIdType                LocationIdType     OPTIONAL, -- *m.m.
1834     locationIdentifier            LocationIdentifier OPTIONAL, -- *m.m.
1835 ...
1836 }
1837
1838 TrackingCustomerLocList ::= [APPLICATION 368] SEQUENCE OF TrackingCustomerLocation
1839
1840 TrackingFrequency ::= [APPLICATION 389] INTEGER
1841
1842 TrackingPeriod ::= [APPLICATION 388] INTEGER
1843
1844 TransactionAuthCode ::= [APPLICATION 342] AsciiString
1845  
1846 TransactionDescriptionSupp ::= [APPLICATION 338] INTEGER
1847  
1848 TransactionDetailDescription ::= [APPLICATION 339] AsciiString
1849
1850 TransactionIdentifier ::= [APPLICATION 341] AsciiString
1851  
1852 TransactionShortDescription ::= [APPLICATION 340] AsciiString
1853  
1854 TransactionStatus ::= [APPLICATION 303] INTEGER
1855
1856 TransferCutOffTimeStamp ::= [APPLICATION 227] DateTimeLong
1857
1858 TransparencyIndicator ::= [APPLICATION 228] INTEGER
1859
1860 UserProtocolIndicator ::= [APPLICATION 280] INTEGER
1861
1862 UtcTimeOffset ::= [APPLICATION 231] AsciiString --(SIZE(5))
1863
1864 UtcTimeOffsetCode ::= [APPLICATION 232] Code
1865
1866 UtcTimeOffsetInfo ::= [APPLICATION 233] SEQUENCE
1867 {
1868     utcTimeOffsetCode   UtcTimeOffsetCode OPTIONAL, -- *m.m.
1869     utcTimeOffset       UtcTimeOffset     OPTIONAL, -- *m.m.
1870 ...
1871 }
1872
1873 UtcTimeOffsetInfoList ::= [APPLICATION 234]  SEQUENCE OF UtcTimeOffsetInfo
1874
1875 VerticalAccuracyDelivered ::= [APPLICATION 393] INTEGER
1876
1877 VerticalAccuracyRequested ::= [APPLICATION 386] INTEGER
1878
1879
1880 --
1881 -- Tagged common data types
1882 --
1883
1884 --
1885 -- The AbsoluteAmount data type is used to 
1886 -- encode absolute revenue amounts.
1887 -- The accuracy of all absolute amount values is defined
1888 -- by the value of TapDecimalPlaces within the group
1889 -- AccountingInfo for the entire TAP batch.
1890 -- Note, that only amounts greater than or equal to zero are allowed.
1891 -- The decimal number representing the amount is 
1892 -- derived from the encoded integer 
1893 -- value by division by 10^TapDecimalPlaces.
1894 -- for example for TapDecimalPlaces = 3 the following values
1895 -- will be derived:
1896 --       0   represents    0.000
1897 --      12   represents    0.012
1898 --    1234   represents    1.234
1899 -- for TapDecimalPlaces = 5 the following values will be
1900 -- derived:
1901 --       0   represents    0.00000
1902 --    1234   represents    0.01234
1903 --  123456   represents    1.23456
1904 -- This data type is used to encode (total) 
1905 -- charges, (total) discount values and 
1906 -- (total) tax values. 
1907 -- 
1908 AbsoluteAmount ::= INTEGER 
1909
1910 Bid ::=  AsciiString --(SIZE(5))
1911
1912 Code ::= INTEGER
1913
1914 --
1915 -- Non-tagged common data types
1916 --
1917 --
1918 -- Recommended common data types to be used for file encoding:
1919 --
1920 -- The following definitions should be used for TAP file creation instead of
1921 -- the default specifications (OCTET STRING)
1922 --
1923 --    AsciiString ::= VisibleString
1924 --
1925 --    Currency ::= VisibleString
1926 --
1927 --    HexString ::= VisibleString
1928 --
1929 --    NumberString ::= NumericString
1930 --
1931 --    AsciiString contains visible ISO 646 characters.
1932 --    Leading and trailing spaces must be discarded during processing.
1933 --    An AsciiString cannot contain only spaces.
1934
1935 AsciiString ::= OCTET STRING
1936
1937 --
1938 -- The BCDString data type (Binary Coded Decimal String) is used to represent
1939 -- several digits from 0 through 9, a, b, c, d, e.
1940 -- Two digits are encoded per octet.  The four leftmost bits of the octet represent
1941 -- the first digit while the four remaining bits represent the following digit.  
1942 -- A single f must be used as a filler when the total number of digits to be 
1943 -- encoded is odd.
1944 -- No other filler is allowed.
1945
1946 BCDString ::= OCTET STRING
1947
1948
1949 --
1950 -- The currency codes from ISO 4217
1951 -- are used to identify a currency 
1952 --
1953 Currency ::= OCTET STRING
1954
1955 --
1956 -- HexString contains ISO 646 characters from 0 through 9, A, B, C, D, E, F.
1957 --
1958
1959 HexString ::= OCTET STRING
1960
1961 --
1962 -- NumberString contains ISO 646 characters from 0 through 9.
1963 --
1964
1965 NumberString ::= OCTET STRING
1966
1967
1968 --
1969 -- The PercentageRate data type is used to
1970 -- encode percentage rates with an accuracy of 2 decimal places. 
1971 -- This data type is used to encode discount rates.
1972 -- The decimal number representing the percentage
1973 -- rate is obtained by dividing the integer value by 100
1974 -- Examples:
1975 --
1976 --     1500  represents  15.00 percent
1977 --     1     represents   0.01 percent
1978 --
1979 PercentageRate ::= INTEGER 
1980
1981
1982 -- END
1983 END
1984 }
1985
1986 1;