Configuring BAMS for P01 Output


Overview

This chapter describes how to configure the Cisco Billing and Measurements Server (BAMS) for P01 billing records. You enable P01 output with the NODEPARMS tag ID. For more information, see the "NODEPARMS Tag ID" section on page 5-10.

P01 Output

P01 output files are created by the P01 task. These files are stored in the p001 subdirectory of the data directory. The file layout of the P01 output format includes a header record, call detail record(s), and a trailer record. This data format is binary and is not viewable by a standard text viewer. The P01 file-naming conventions are explained in "File-Naming Conventions" section on page A-4.

Customized MML Parameters

By default, BAMS generates ASCII output records when processing MGC input data. To turn on the generation of P01 data files, set the p01 output parameter in the Node Parameters table to 1.

The P01 filename format is based on the filename of the raw data files from the MGC:

<p01prefix><raw MGC data filename>

The default P01 prefix is p01_. You can change this prefix by modifying the p01prefix parameter in the Node Parameters table. For example, suppose that an input MGC file is named cdr_200012252359_012345.bin. The output P01 file is named p01_cdr_200012252359_012345.bin. Setting this parameter to NULL creates an output filename that is the same as the input filename.

Examples:

Change the filename prefix of P01 files to "info_":

$ mml

Copyright (C) 1998-2002, Cisco Systems, Inc.
mml:1>prov-sta::srcver=active,dstver=example,confirm
Billing and Measurements Server - BAMS-00 2002-03-27 13:59:06
B  COMPLD
   ;
mml:1>prov-ed:nodeparms:p01prefix="info_"
Billing and Measurements Server - BAMS-00 2002-03-27 13:59:37
B  COMPLD
   "NODEPARMS"
   ;
mml:1>prov-rtrv:nodeparms:
Billing and Measurements Server - BAMS-00 2002-03-27 14:00:03
B  RTRV   
NODEPARMS:statoutput=1,bafoutput=0,asciioutput=0,lookupinfo=1,bafinfo=0,p01output=1, 
p01prefix="info_""
   ;
mml:1>prov-dply::
Billing and Measurements Server - BAMS-00 2002-03-27 14:00:23
B  COMPLD
   ;
mml:1>quit

Turn off the generation of P01 files:


$ mml

Copyright (C) 1998-2002, Cisco Systems, Inc.
mml:1>prov-sta::srcver=active,dstver=example,confirm
Billing and Measurements Server - BAMS-00 2002-03-27 13:59:06
B  COMPLD
   ;
mml:1>prov-ed:nodeparms:p01output=0
Billing and Measurements Server - BAMS-00 2002-03-27 13:59:57
B  COMPLD
   "NODEPARMS"
   ;
mml:1>prov-rtrv:nodeparms:
Billing and Measurements Server - BAMS-00 2002-03-27 14:00:03
B  RTRV   
NODEPARMS:statoutput=1,bafoutput=0,asciioutput=0,lookupinfo=1,bafinfo=1,p01output=0, 
p01prefix="info_""
   ;
mml:1>prov-dply::
Billing and Measurements Server - BAMS-00 2002-03-27 14:00:23
B  COMPLD
   ;
mml:1>quit

Filtering Calls Based on Cause Codes

You can configure the P01 program to filter out certain types of calls based on the cause code of the original MGC data record. The P01FILTER tag ID has four parameters that define the call type: ANSWERED, NOANSWER, BUSY, and OTHER. You can set these parameters to 1 to output CDR records of the specified call type, or to 0 to filter the specified records from the output. The call types are defined by the cause code values (see Table 8-1).

Table 8-1 P01 Call Types and Cause Codes

Cause Code
P01 Call Type

16, 31

ANSWERED

19

NOANSWER

17

BUSY

ALL OTHER CODES

OTHER


You can use the prov-ed command in conjunction with the P01FILTER tag ID to edit the default filtering values. For more information about configuring P01 filtering, see the "Updating the P01 Filter Table" section on page 5-15.

The following example shows how to turn off all output except for answered calls:

$ mml
mml:1> prov-sta::srcver=active,dstver=example,confirm
Billing and Measurements Server - BAMS-00 2002-03-27 14:02:02
B  COMPLD
   ;
mml:1>prov-rtrv:p01filter:
Billing and Measurements Server - BAMS-00 2002-03-27 14:02:12
B  RTRV
   "P01FILTER:answered=1,noanswer=1,busy=1,other=1"
   ;
mml:1>prov-ed:p01filter:noanswer=0,busy=0,other=0
Billing and Measurements Server - BAMS-00 2002-03-27 14:02:42
B  COMPLD
   "P01FILTER"
   ;
mml:1>prov-rtrv:p01filter:
Billing and Measurements Server - BAMS-00 2002-03-27 14:02:51
B  RTRV
   "P01FILTER:answered=1,noanswer=0,busy=0,other=0"
   ;
mml:1>prov-dply::
Billing and Measurements Server - BAMS-00 2002-03-27 14:02:56
B  COMPLD
   ;

P01 Data Format

Table 8-2, Table 8-3, and Table 8-4 define the header, call detail, and trailer data records of the P01 output format. The field name, length, description, format/contents, and MGC mapping for the P01 header record are described in Table 8-2.

Table 8-2 PO1 Header Record 

Field
Field Name
Length (Bytes)
Description
Format/Contents
MGC Mapping

1

Length

2

Record length

BCD /(= 60)

 

2

Record identifier

1

Record identifier

BCD/(= 00)

 

3

Switch ID

30

Switch name

ASCII, left aligned filled with spaces

Tag 6000

4

Creation date

4

Logical block creation date

BCD

Tag 4001 is converted from UTC to Local time.

5

Creation time

3

Logical block creation date

BCD

Tag 4001 is converted from UTC to Local time.

6

Spare

20

Spare

(filled with HEX 0xFF)

 

The field name, length, description, format/contents, and MGC mapping for the P01 call detail record are described in Table 8-3.

Table 8-3 P01 Call Detail Record 

Field
Field Name
Length (Bytes)
Description
Format/Contents
MGC Mapping

1

Length

2

Record length

BCD (= 110)

Fixed

2

Record type

1

Record type

BCD (= 11)

Fixed

3

Called number

12

Called number

BCD (left aligned, filler F)

Tag 4012

4

Called number type

2

Called number type

BCD

Derived from tag 3005 (Dialed Number Nature of Address) and populated as follows:

NoA = international: "0"

NoA = national: "1"

NoA = subscriber: "2"

5

Calling category

2

Calling category

BCD

Derived from tag 3000 (Calling Party Category) populated as follows:

CPC unknown: "0"

Operator, language French: "1"

Operator language English: "2"

Operator language German: "3"

Operator language Russian: "4"

Operator language Spanish: "5"

...

Payphone: "15"

6

Conversation start date

4

Conversation start date

BCD, format yyyymmdd

Tag 4104 or 4105 is converted from UTC to Local time

7

Conversation start time

4

Conversation start time

BCD, format hhmmsst

Tag 4104 or 4105 is converted from UTC to Local time

8

Conversation duration

5

Conversation duration (tenths of seconds)

BCD

Derived, 4106 minus 4104 or 4105

9

Call type

2

Call typology

BCD

If (Tag 4069 ==1) then callType=7; else callType=4

10

Destination

12

Real number used for call

BCD (left-aligned, filler "F")

Tag 4014

11

Destination type

2

Destination number type

BCD

Derived from tag 3007 (Called Number Nature of Address) and populated as follows:

NoA = international: "0"

NoA = national: "1"

NoA = subscriber: "2"

NoA = other values: "1"

12

Incoming trunk

13

Incoming trunk ID

ASCII (left-aligned, filled with spaces)

BAMS augmented

13

Outgoing trunk

13

Outgoing trunk ID

ASCII

This field is populated according to the following conditions:

For nailed mode; that is, if NODEPARMS nailed-cfg = 0, this field is always populated with FF.

For switched mode; that is, if NODEPARMS nailed-cfg = 1, this field is populated with the Egress Trunk Group, which is derived from tag 4015, but only when the trunk group is present in the trunk group table. The field is left blank if the trunk group is not present in the trunk group table.

14

Calling number

12

Calling number

BCD (left-aligned, filler "F")

Tag 4010

15

Calling number type

2

Calling number type

BCD

Derived from tag 3003 (Calling Number Nature of Address) as follows:

NoA = international: "0"

NoA = national: "1"

NoA = subscriber: "2"

NoA = other values: "1"

16

Bearer capability

2

Bearer capability

BCD

Derived from tag 3001 (User Service Information) as follows:

Speech 3.1 kHZ: "0"

Audio 3.1 kHZ: "1"

Digital 64 kbit/s: "2"

Audio 7 kHZ: "6"

17

Call result

2

Call result

BCD

Derived from the last seven bits of tag 3008 as follows:

Call successful with answer: "1"

Call successful without answer (no reply): "4"

Call successful, user busy: "5"

18

Teleservice

2

Teleservice

BCD

This field is hard coded to the value "4"

19

Call connection type

2

Call connection type

BCD

Logic based on Field 16

20

DST indicator

1

DST indicator

BCD

BAMS augmented

21

Partial record

1

Partial record

BCD (= "0")

Default 0

22

LCE-id

3

LCE-id

BCD (filled with HEX "FF")

Hex FF

23

Call identity number

3

Call identity number

BCD (filled with HEX "FF")

Hex FF

24

Restart/reload indicator

1

Restart/reload indicator (future use)

BCD (filled with HEX "FF")

Hex FF

25

Spare

5

Spare

Filled with HEX "FF"

Hex FF


The field name, length, description, format/contents, and MGC mapping for the P01 tail record are described in Table 8-4.

Table 8-4 P01 Tail Record 

Field
Field Name
Length (Bytes)
Description
Format/Contents
MGC Mapping

1

Length

2

Record length

BCD (= 18)

18

2

Record identifier

1

Record identifier

BCD (= 90)

90

3

CDR number

5

Number of CDR contained in logical block

BCD

Counted and inserted in BAMS

4

Spare

10

Spare

Filled with HEX "FF"

FF