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