Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The UDRs in PCC.Buckets store usage related data for each subscriber. Use the APL function pccBucketDataLookup (see the section pccBucketDataLookup in APL - PCC BucketData Support - Buckets) to get a BucketDataHolder from the database and the APL function pccBucketDataStore (see the section pccBucketDataStore in APL - PCC BucketData Support - Buckets) to store a BucketDataHolder in the database.

See APL - PCC BucketData Support - Buckets for further information about how to use the PCC.Buckets UDRs with APL and REST HTTP Interface - Buckets for information on how to access the PCC.Buckets UDRs from the REST HTTP interface.

From the BucketDataHolder all usage related data for a subscriber is accessible via the following objects in the data model:

ObjectDescription

Buckets

Stores the actual usage information and statistics. There can be multiple buckets and multiple types of information counted. When a recurring usage counter is reset, its previous values can be kept for future processing.

Sessions

Stores session related data. No additional data to uphold a session should be needed, that is, do not rely on workflow memory to hold any session information.

Subscriber

Stores meta data about the subscriber necessary for usage counting. The amount of data should be kept to a minimum and only hold data to reduce the number of times an external subscriber database needs to be queried.

Overview of the BucketDataHolder Data Model

The different UDRs within the BucketDataHolder Data Model are connected as follows:

Image Added

Overview of the BucketDataHolder Data Model

BucketDataHolder UDR

The BucketDataHolder UDR holds information about all usage related data for a subscriber.

Field

Description

Subscriber (Subscriber(PCC.Buckets.Subscriber))>

Holds the subscriber meta data necessary for usage counting, see the section below, Subscriber UDR.

Buckets (list<PCC.Buckets.Bucket>)

The list of buckets associated with the subscriber, see the section below Bucket UDR.

Sessions (list<PCC.Buckets.Session>)

The session list associated with the subscriber, see the section below Session UDR.

Below is a screenshot of the UDR Assistance displaying the BucketDataHolder UDR:

Image Added

BucketDataHolder UDR

Info
titleExample - BucketDataHolder UDR

The following values:

Code Block
Subscriber=Udr('PCC.Buckets.Subscriber', 
     IsChanged=False, 
     Notifications=[700,702,703], 
     SentNotifications=None)) 
 Buckets=Udr('PCC.Buckets.Buckets', 
     Counters=[Udr('PCC.Buckets.Counter', 
         Usage={0: 100,1: 200,2: 300})], 
     ID='1', 
     Product=100, 
     StartTime='2011-10-01 00:00:00', 
     StopTime=2011-10-30 18:00:00), 
     ('PCC.Buckets.Buckets', 
     Counters=[Udr('PCC.Buckets.Counter', 
         Usage={0: 20,1: 100,2: 120})], 
     ID='3', 
     Product=120, 
     StartTime='2011-10-01 00:00:00', 
     StopTime=2011-11-01 00:00:00) 
 Sessions=Udr('PCC.Buckets.Session', 
     Destination='127.0.0.1', 
     ID='ggsn1.operator.se;555111', 
     InstalledRules=[1,2], 
     LastActive='2011-10-24 10:34:42', 
     Protocol='Gx', 
     Reservations=[Udr('PCCBuckets.Reservation', 
         Granted=500000, 
         Product=100], 
     Workflow='PCC.Multibucket.workflow_1')

 Subscriber=Udr('PCC.Buckets.Subscriber', 
     IsChanged=True, 
     Notifications=[700,703], 
     SentNotifications=None)) 
 Buckets=('PCC.Buckets.Buckets', 
     Counters=[Udr('PCC.Buckets.Counter', 
         Usage={0: 50,1: 300,2: 350})], 
     ID='2', 
     Product=110, 
     StartTime='2011-10-01 18:00:00', 
     StopTime=2011-11-01 00:00:00) 
 Sessions=Udr('PCC.Buckets.Session', 
     Destination='127.0.0.1', 
     ID='ggsn2.operator.se;555222', 
     InstalledRules=[3], 
     LastActive='2011-10-25 16:12:53', 
     Protocol='Gy', 
     Reservations=[Udr('PCCBuckets.Reservation', 
         Granted=250000, 
         Product=110], 
     Workflow='PCC.Multibucket.workflow_2')

will give the following setup:

  • The subscriber for the first bucket data holder will receive notifications 700, 702 and 703, while the subscriber for the second bucket data holder will receive notifications 700 and 703.

  • The subscriber for the first bucket data holder has two buckets, 1 and 3, where the usage is counted for product 100.

  • The subscriber for the second bucket data holder has one bucket, 2, where the usage is counted for product 110.

  • The subscriber for the first bucket data holder had a session with ID ggsn1.operator.se;555111 open towards IP-address 127.0.0.1 where the installed rules with IDs 1 and 2 was applied, the protocol Gx was used, and a reservation of 500.000 bytes of data for product 100 was granted. The last request for the session was received on the 24th of October, 2011, at 10:34:42.

  • The subscriber for the second bucket data holder had a session with ID ggsn2.operator.se;55522 open towards IP-address 127.0.0.1 where the installed rule with ID 3 was applied, the protocol Gy was used, and a reservation of 250.000 bytes of data for product 110 was granted. The last request for the session was received on the 25th of October, 2011, at 16:12:53.

Subscriber UDR

The Subscriber UDR holds the subscriber meta data necessary for usage counting, such as information if the subscriber information has been updated, the different notifications a subscriber should receive, etc.

Field

Description

Groups (list<string>)

Indicates the group(s) that the subscriber belongs to.

IsChanged (boolean)

Indicates whether bucket structure needs to be updated from an external source.

Notifications (list<int>)

The notifications that the subscriber should receive, see Notification UDR in Product Data Model.

SentNotifications (list<int>)

The notifications that has been sent to the subscriber.

Misc (map<string, any>)

See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the Subscriber UDR:

Image Added

Subscriber UDR

Info
titleExample - Subscriber UDR

The following values:

IsChanged=true
Notifications=[700,702,703]

IsChanged=false
Notifications=[703]

will give the following setup:

  • The data for the first subscriber has been updated externally, and the bucket structure needs to be updated accordingly.

  • The data for the second subscriber has not been updated.

  • The first subscriber will receive notifications 700, 702 and 703, while the second subscriber will only receive notification 703.

Both subscribers will also receive any notifications that has been set to be Required, see Notification UDR in Product Data Model.

Bucket UDR

The Bucket UDR stores the actual usage information and statistics. Each bucket references one product and has a start time and stop time that determines when the bucket should be activated and expire. Each bucket also contains one or several counters which are depending on the configuration for the selected product.

Field

Description

ID (string)

The ID of the bucket. The ID must be unique within the bucket list, and is used to identify a particular bucket both in the BucketDataHolder UDR, and from the REST HTTP interface.

Product (int)

References a product using its identifier. Each bucket must be associated with a product. The product has information that controls the behavior of the bucket.

StartTime (date)

The date and time when the bucket is to be activated, or when the last reset was done, depending on if the date is in the future or in the past.

StopTime (date)

The date and time when the bucket expires.

Counters (list<PCC.Buckets.Counter>)

Holds a list of counters. Each counter in the list can count multiple items. The list can retain multiple counters depending on the product configuration.

Misc (map<string, any>)

See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the Bucket UDR:

Image Added

Bucket UDR

Info
titleExample - Bucket UDR

The following values:

Code Block
ID=1
Product=[100]
StartTime='2011-10-01 00:00:00'
StopTime='2011-10-30 18:00:00'
Counters=[Udr('PCC.Buckets.Counter',
    Usage={0: 100, 1: 200, 2:300})]

ID=2
Product=[110]
StartTime='2011-10-01 18:00:00'
StopTime='2011-11-01 00:00:00'
Counters=[Udr('PCC.Buckets.Counter',
    Usage={0: 50, 1: 300, 2:350})]

ID=3
Product=[120]
StartTime='2011-10-01 00:00:00'
StopTime='2011-11-01 00:00:00'
Counters=[Udr('PCC.Buckets.Counter',
    Usage={0: 20, 1: 100, 2:120})]

will give the following setup:

  • The IDs for the three buckets; 1, 2 and 3, are used in the BucketDataHolder UDR for determining which buckets usage should be counted in.

  • All of the buckets will start on the 1st of October and expire by the end of the 30th October, but at different times of the day.

  • The counters for the first bucket has counted 100 bytes in output, 200 bytes in input and 300 bytes in total.

  • The counters for the second bucket has counted 50 bytes in output, 300 bytes in input and 350 bytes in total.

  • The counters for the third bucket has counted 20 bytes in output, 100 bytes in input and 120 bytes in total.

Counter UDR

The Counter UDR counts usage. Each counter can count multiple items.

Field

Description

Usage (map<byte, long>)

Records usage counts for multiple items; 0 - Input, 1 - Output, 2 - Total, 3 - Other.

Below is a screenshot of the UDR Assistance displaying the Counter UDR:

Image Added

Counter UDR

Info
titleExample - Counter UDR

The following values when counting usage in bytes:

Code Block
Usage={0: 100, 1: 200, 2: 300}

Usage={0: 50, 1: 300, 2:350}

Usage={0: 20, 1: 100, 2:120}

will give the following setup:

  • The first counter has counted 100 bytes in input, 200 bytes in output and 300 bytes in total.

  • The second counter has counted 50 byte in input, 300 bytes in output and 350 bytes in total

  • The third counter has counted 20 bytes in input, 100 bytes in output and 120 bytes in total.

Note
titleNote!

This is an example configuration. Usage can be used for measuring other types of usage, and other keys than 0, 1 and 2 may be used.


Session UDR

The Session UDR stores data related to Diameter sessions, which includes information about the rules that applies, the workflow that is responsible for the session, any reservations made, when the session was last active, the session destination and the protocol used for the session.

Field

Description

ID (string)

The ID of the session. This ID must be unique within the session list. Usually a Diameter session id is used as the id.

InstalledRules (list<InstalledRule>)

Records the rules installed by this session, if any.

Reservations (list<Reservation>)

Records the reservations made by this session, if any.

LastActive (date)

The date and time when the session was last active.

Workflow (string)

Holds the name of the workflow responsible for this session.

Destination (string)

The destination for the session, for instance the Diameter destination host.

Protocol (string)

The protocol for this session, for instance Gx or Gy.

Misc (map<string, any>)

See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the Session UDR:

Image Added

Session UDR

Info
titleExample - Session UDR

The following values:

Code Block
ID=ggsn1.operator.se;555111 
 InstalledRules=[1,2] 
 Reservations=[Udr('PCCBuckets.Reservation', 
     Granted=500000,Product=100] 
 LastActive='2011-10-24 10:34:42' 
 Workflow='PCC.Multibucket.workflow_1' 
 Destination='127.0.0.1' 
 Protocol='Gx'

 ID=ggsn2.operator.se;555222 
 InstalledRules=[3] 
 Reservations=[Udr('PCCBuckets.Reservation', 
     Granted=25000,Product=110] 
 LastActive='2011-10-25 16:12:53' 
 Workflow='PCC.Multibucket.workflow_2' 
 Destination='127.0.0.1' 
 Protocol='Gy'

will give the following setup:

  • The IDs for the two sessions; ggsn1.operator.se;555111 and ggsn2.operator.se;55522 are used in the BucketDataHolder UDR for mapping the sessions to their respective subscribers.

  • The first session uses rules 1 and 2, while the second session uses rule 3.

  • The first session uses has a reservation of 500.000 bytes for product 100 and the second session has a reservation of 250.000 bytes for product 110.

  • The first session was last active on the 24th of October, 10.34.42, while the second session was last active on the 25th of October, 16:12:53.

  • The workflow instance PCC.MultiBucket.workflow_1 is responsible for the first session, and the workflow instance PCC.MultiBucket.workflow_2 is responsible for the second session.

  • Both sessions have 127.0.0.1 as destinations.

  • The first session handles with Gx sessions, while the second session deals with Gy sessions.

InstalledRule UDR

The InstalledRule UDR contains rule settings used by the Session UDR. Each installed rule references one bearer as well as the rules and QoS levels installed for the bearer.

Field

Description

Bearer (bytearray)

The bearer on which this rule is installed.

QoS (int)

The QoS installed for the bearer.

Rules (list<int>)

The list of rules installed on the bearer.

Misc (map<string, any>)

See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the InstalledRule UDR:

Image Added

InstalledRule UDR

Info
titleExample - InstalledRule UDR

The following values:

Code Block
Bearer=375
QoS=4
Rules=1,2

Bearer=532
QoS=2
Rules=3

will give the following setup:

  • The rules in the first InstalledRules setting is installed on bearer 375 and the second InstalledRules setting is installed on bearer 532.

  • The first InstalledRules setting uses QoS level 4, while the second InstalledRules setting uses QoS level 2.

  • The first InstalledRules setting uses rules 1 and 2 and the second InstalledRules setting uses rule 3.

Reservation UDR

The Reservation UDR controls the amount of data granted for the used counter items, i e products and buckets.

Field

Description

Granted (map<byte, long>)

Holds the amount of data granted for the used counter items.

Products (list<int>)

Records the list of products, and indirectly the buckets, that the reservation refers to, if applicable.

Misc (map<string, any>)

See Misc Field for more information.

Below is a screenshot of the UDR Assistance displaying the Reservation UDR:

Image Added

Reservation UDR

Info
titleExample - Reservation UDR

The following values:

Granted=500000
Products=[100]

Granted=250000
Products=[110]

will give the following setup:

  • The first reservation grants product 100 500000 bytes of data.

  • The second reservation grants product 110 250000 bytes of data.