OSB_LIB::Cdr Class Reference

Inheritance diagram for OSB_LIB::Cdr:

Inheritance graph
Collaboration diagram for OSB_LIB::Cdr:

Collaboration graph
List of all members.

Detailed Description

Usage data record as used within OSB.

Contains info of the network usage as provided by the network.

In the general usage scenario where A connects to B and B forwards to C,
the members servedParty_, calledParty_ and callingParty_ are populated as follows:

      UsageType         | served* | called* | calling
      utOriginated      |    A    |    B    |    -
      utTerminated      |    B    |    -    |    A
      utRoaming         |    B    |    -    |    A
      utIncomingGateway |    -    |    B    |    A
      utOutgoingGateway |    -    |    B    |    A
      utTransit         |    -    |    B    |    A
      utCallForward     |    B    |    C    |    A
      utEvent           |    A    |    -    |    -
      utRoaOriginated   |    A    |    B    |    -
      utRoaTerminated   |    B    |    -    |    A
      utRoaEvent        |    A    |    -    |    -

      *: where applicable `served' and `called' are mandatory.

Definition at line 493 of file cdr.h.

Public Types

Public Member Functions

Static Public Member Functions

Utility functions to deal with the status

Public Attributes

Involved parties:
Refer to the class description for their meaning in relation with the usage type.

Information about the network element:
Information related to partner networks:

Private Member Functions

Static Private Attributes


Member Typedef Documentation

typedef std::map<Id<RecordStreamInfo>, Fraction> OSB_LIB::Cdr::OrigCountList

Record accounting: track original records.

Each original, incoming usage record may ultimately result into several Cdr, during assembly several usage records may be combined into one Cdr.

The container provides the information how much the current Cdr accounts for a record in the original stream. Examples:

Definition at line 687 of file cdr.h.

typedef TypeId<Cdr, 1> OSB_LIB::Cdr::UsageType

Type of network usage.

See also:
OSB_LIB::UsageType provides symbolic constants for the usage type.

Definition at line 541 of file cdr.h.

Member Enumeration Documentation

enum OSB_LIB::Cdr::ChargeInd

Type of charge indicator.

ciNormal  Charge the calling party.
ciReverse  Charge the called party.
ciTollFree  Free of charge.
ciOther  Charge the other (third?) party.
ciUnknown  Unknown, illegal record type.

Definition at line 597 of file cdr.h.

enum OSB_LIB::Cdr::RecordType

Type of record.

rtUnknown  Unknown, illegal record type.
rtNormal  Normal, completed record.
rtFirstPartial  First partial record.
rtPartial  Intermediate artial record.
rtLastPartial  Last partial record.
rtAssembled  Assembled record.

Definition at line 587 of file cdr.h.

enum OSB_LIB::Cdr::Status

The status of the record.

This is the status of the record as provided by the network and/or elements. Possible values are divided into 2x2 groups.
The MSB (bit 32) indicates success or failure: if this bit is set (rsFailure) the network usage failed or caused an error.
Bit 31 indicates network (element) specific usage: if this bit is set (rsSpecific) the status does not match any of the defined values. This means, that except from success/failure, the network and/or element must be used in order to understand the exact meaning.

rsUnknown  Unknown, illegal status.
rsSuccess  Successful usage completion. This is the default.
rsFailure  Unsuccessful usage completion.
At the same time this is bit mask for error/success.
rsSpecific  Bit mask for network specific status.
rsMax  Maximum allowable value.

Definition at line 620 of file cdr.h.

enum OSB_LIB::Cdr::UsageSubtype

Subtype of the network usage.

The subtype of the network usage is provided for information only. In general the attribute can be derived from the usage type and other CDR attributes (used service).

The enum defines a few common constants and the flag ustSpecific which indicates a network element specific subtype.

ustUnknown  Sub type not applicable or unknown.
ustIn  Incoming leg of a network usage.

This value applies, but is not restricted, to:

  • SMS gateway: incoming SMS or delivery response.
  • transit records: incoming part.
ustOut  Outgoing leg of a network usage.

This value applies, but is not restricted, to:

  • SMS gateway: outcoming SMS or delivery response.
  • transit records: outgoing part.
ustCisco1  Cisco leg 1: answer telephony.
ustCisco2  Cisco leg 2: originate VoIP.
ustCisco3  Cisco leg 3: answer VoIP.
ustCisco4  Cisco leg 4: originate telephony.
ustSpecific  Network element specific subtype.
ustMax  Maximum value for a usage subtype.

Definition at line 552 of file cdr.h.

Constructor & Destructor Documentation

OSB_LIB::Cdr::Cdr (  ) 

Default constructor.

It calls defaultPods() to initialize all POD data member to their default.

Member Function Documentation

void OSB_LIB::Cdr::clear (  ) 

Clear all data in the CDR.

The purpose of this member is improved performance by keeping the existing STL containers together with the their allocated memory.

The function should be a synonym for:

          void foo()
              Cdr cdr;
              ...        // work with cdr
              cdr = Cdr();

void OSB_LIB::Cdr::clearErrors (  ) 

Clear all error information, but not the errored out counter.

void OSB_LIB::Cdr::defaultPods (  )  [private]

Set POD data members to their default.

For the POD the following values are set:

static bool OSB_LIB::Cdr::isFailure ( Status  s  )  [inline, static]

Error (failure) status?

Definition at line 912 of file cdr.h.

References rsFailure.

Referenced by isSuccess().

static bool OSB_LIB::Cdr::isSpecific ( Status  s  )  [inline, static]

Network (element) specific status?

Definition at line 917 of file cdr.h.

References rsSpecific.

static bool OSB_LIB::Cdr::isSuccess ( Status  s  )  [inline, static]

Successful status?

Definition at line 910 of file cdr.h.

References isFailure().

static ChargeInd OSB_LIB::Cdr::mkChargeInd ( long  ci  )  throw () [static]

Convert a long into a charge indicator.

ci Charge indicator to convert.
The corresponding charge indicator.

static Status OSB_LIB::Cdr::mkStatus ( long  s  )  throw () [static]

Convert a long into a record status.

s Status to convert. Negative values are interpreted as failure and converted accordingly.
The corresponding record status.
It is rsUnknown if s is greater than rsMax. Unknown status that do not have the "specific" bit set are set to rsSuccess or rsFailure depending on the "error" bit.

static UsageSubtype OSB_LIB::Cdr::mkUsageSubtype ( long  st  )  throw () [static]

Convert a long into a usage subtype.

st Usage subtype to convert.
The corresponding usage subtype. Its value is ustUnknown if:
  • `st' is greater than ustMax,
  • `st' is an unknown value that does not have the "specific" bit set.

static long OSB_LIB::Cdr::toLong ( Status  s  )  throw () [static]

Convert a record status into long.

s Status to convert.
The long that corresponds to s. It is negative if s has the failure bit set.

static long OSB_LIB::Cdr::toLong ( ChargeInd  ci  )  throw () [static]

Convert a charge indicator into long.

ci Charge indicator to convert.
The corresponding usage indicator.

static long OSB_LIB::Cdr::toLong ( UsageSubtype  st  )  throw () [static]

Convert a usage subtype into long.

st Usage subtype to convert.
The corresponding usage subtype, ustUnknown in a few illegal cases: the function just wraps to mkUsgSubtype(), see there for details.

UdrType OSB_LIB::Cdr::udrType (  )  const [virtual]

Type of Udr it is.

Implements OSB_LIB::Udr.

Member Data Documentation

NwAddress OSB_LIB::Cdr::calledParty_

Called party.

Definition at line 756 of file cdr.h.

NwAddress OSB_LIB::Cdr::callingParty_

Calling party.

Definition at line 758 of file cdr.h.

ChargeInd OSB_LIB::Cdr::chargeInd_

Indicate whom should be charged for the call.

Toll free is also indicated by this field.

Definition at line 766 of file cdr.h.

OsbErrors OSB_LIB::Cdr::errors_

Container for errors occurred during processing.

Definition at line 848 of file cdr.h.

DateTime OSB_LIB::Cdr::initTime_

Set-up time of network usage.

This is the date and time when the network element was first contacted to establish a network connection.
From this definition is follows that initTime is always smaller than timeStamp_.

If not available this member is not set.

Definition at line 717 of file cdr.h.

std::string OSB_LIB::Cdr::inTrkGroup_

The trunk group of the switch from which the call originated.

Definition at line 787 of file cdr.h.

long OSB_LIB::Cdr::inTrkNumber_

Incoming trunk number.

Its value is -1 if not available.

Definition at line 793 of file cdr.h.

Id2<NetworkElement> OSB_LIB::Cdr::networkElementId_

Network element object id as in the OSB database.

Note that the network is identified in the first part of this identifier.

Definition at line 776 of file cdr.h.

long OSB_LIB::Cdr::numErroredOut_

Number of times the record was error out.

This counter is reset at the beginning of each processing step, such as mediation, rating, ... .

Definition at line 842 of file cdr.h.

long OSB_LIB::Cdr::numErrors_

Total of errors for this call details records.

Definition at line 845 of file cdr.h.

OrigCountList OSB_LIB::Cdr::origCountList_

Container for the original count.

Definition at line 834 of file cdr.h.

std::string OSB_LIB::Cdr::outTrkGroup_

The trunk group from which the call left the switch.

Definition at line 795 of file cdr.h.

long OSB_LIB::Cdr::outTrkNumber_

Outgoing trunk number.

Its value is -1 if not available.

Definition at line 801 of file cdr.h.

long OSB_LIB::Cdr::partRecNo_

Running sequence number for partial records.

The field is relevant for partial records only.

Definition at line 744 of file cdr.h.

std::string OSB_LIB::Cdr::partRecRef_

Common reference number for all related partial records.

The field is relevant for partial records only.

Definition at line 737 of file cdr.h.

RatedParty OSB_LIB::Cdr::ratedParty_

Rated party information.

Definition at line 747 of file cdr.h.

RecordType OSB_LIB::Cdr::recordType_

Record type.

Definition at line 693 of file cdr.h.

std::string OSB_LIB::Cdr::remoteIpAddress_

The IP address of the remote gateway.

The usage type defines whether the IP address belongs to the incoming or outgoing network:

          usage type        |
          utOriginated      | outgoing
          utTerminated      | incoming
          utRoaming         | *ILLEGAL
          utIncomingGateway | incoming
          utOutgoingGateway | outgoing
          utTransit         | *ILLEGAL
          utCallForward     | *ILLEGAL
          utEvent           | not applicable
          utRoaOriginated   | not applicable
          utRoaTerminated   | not applicable
          utRoaEvent        | not applicable

          *: These usage types describe both, the incoming and outgoing
             leg of a call => It is not possible to decide to which
             leg the remote IP address refers.

Definition at line 827 of file cdr.h.

ServedParty OSB_LIB::Cdr::servedParty_

Served party information.

Definition at line 754 of file cdr.h.

Status OSB_LIB::Cdr::status_

Status of the record.

Definition at line 697 of file cdr.h.

std::string OSB_LIB::Cdr::switchId_

Switch id as provided by the network element that has generated the record.

Definition at line 781 of file cdr.h.

DateTime OSB_LIB::Cdr::timeStamp_

Start time of network usage.

This is the date and time when the network connection is established. For a normal telephoncall this the moment where the receiver picks up the phone.

Definition at line 706 of file cdr.h.

std::string OSB_LIB::Cdr::transactionId_

Transaction identification.

Uniquely identifies a network usage as provided by the record source (network element).
The partial records of the same transaction contain the same id and a running sequence number.

The field is not relevant and blank if the record was assembled from record with different transaction ids.

Definition at line 730 of file cdr.h.

const UdrType OSB_LIB::Cdr::udrType_ = Udr::cdrCommon [static, private]

This is a Udr of type cdrCommon.

Definition at line 495 of file cdr.h.

UsageSubtype OSB_LIB::Cdr::usageSubtype_

Usage subtype.

Definition at line 695 of file cdr.h.

UsageType OSB_LIB::Cdr::usageType_

Usage type.

Definition at line 691 of file cdr.h.

UsedServices OSB_LIB::Cdr::usedServices_

List of used services.

Definition at line 831 of file cdr.h.

The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:13:56 2006 for OSB Library by  doxygen 1.4.7