Project

General

Profile

Actions

Support #2360

closed

Read CDR via CTRL interface in SGSN

Added by oramadan over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Target version:
-
Start date:
07/11/2017
Due date:
% Done:

100%

Spec Reference:

Description

How can you access per subscriber CDRs in the SGSN with either GETs or TRAPs(preferable)?


Related issues

Related to Cellular Network Infrastructure - Bug #2362: rate_ctr with name prefix containing "." not visible on CTRL interfaceClosedlaforge07/11/2017

Actions
Actions #1

Updated by laforge over 6 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 40

The only capability related to CDR is the capability to write CDRs in CSV format. Related functionality is contained in http://git.osmocom.org/openbsc/tree/openbsc/src/gprs/sgsn_cdr.c which will write format like this:
"timestamp,imsi,imei,msisdn,cell_id,lac,hlr,event,pdp_duration,ggsn_addr,sgsn_addr,apni,eua_addr,vol_in,vol_out,charging_id\n"

It will write CDR records to a text file ("cdr filename NAME") in the following events:
  • gprs attach
  • routing area update
  • gprs detach
  • release of mm context
  • PDP context activation
  • PDP context deactivation
  • PDP context termination
  • PDP context release
  • periodically with a configurable timer ("cdr interval <1-2147483647>")

The internal statistics counters for per-MM-context and per-PDP-context in/out bytes and packets should be readable via the CTRL interface, but this is currenrly broken due to bad choice of naming, see #2362

Actions #2

Updated by laforge over 6 years ago

  • Related to Bug #2362: rate_ctr with name prefix containing "." not visible on CTRL interface added
Actions #3

Updated by laforge over 6 years ago

Actions #4

Updated by laforge over 6 years ago

laforge wrote:

The only capability related to CDR is the capability to write CDRs in CSV format. Related functionality is contained in http://git.osmocom.org/openbsc/tree/openbsc/src/gprs/sgsn_cdr.c which will write format like this:
"timestamp,imsi,imei,msisdn,cell_id,lac,hlr,event,pdp_duration,ggsn_addr,sgsn_addr,apni,eua_addr,vol_in,vol_out,charging_id\n"

Please also see chapter 9.4 of http://ftp.osmocom.org/docs/latest/osmosgsn-usermanual.pdf describing this feature.

Actions #5

Updated by laforge over 6 years ago

  • Status changed from In Progress to Feedback
  • Assignee changed from laforge to oramadan

How do we proceed here?

We have the existing CSV format support as described above. It would be relatively easy to add TRAPs in similar fashion, i.e. send the CSV line as a trap (rathe than a file write). But are the existing/stated triggers

gprs attach
routing area update
gprs detach
release of mm context
PDP context activation
PDP context deactivation
PDP context termination
PDP context release
periodically with a configurable timer ("cdr interval <1-2147483647>")

sufficient?

Actions #6

Updated by laforge over 6 years ago

ping?

Actions #7

Updated by oramadan over 6 years ago

Sorry for missing this! i recall working with the CSV was a little challenging if you want to rotate the file. Also the flexibility of sending over the network. The triggers and csv format you've described are great.

Actions #8

Updated by laforge over 6 years ago

  • Assignee changed from oramadan to 4368
Actions #9

Updated by laforge over 6 years ago

  • Priority changed from High to Urgent
Actions #10

Updated by laforge over 6 years ago

  • Status changed from Feedback to New
Actions #11

Updated by laforge over 6 years ago

  • Assignee changed from 4368 to pespin
Actions #12

Updated by pespin over 6 years ago

  • Status changed from New to In Progress
Actions #13

Updated by pespin over 6 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 40 to 90

Implemented in:

remote:   https://gerrit.osmocom.org/5086 sgsn_cdr: Split log formatting into a snprintf function
remote:   https://gerrit.osmocom.org/5087 Add vty cmd 'cdr trap' to send CDR through CTRL iface

Waiting for review.

Actions #14

Updated by pespin over 6 years ago

  • Status changed from Feedback to In Progress

Merged. Available in osmo-sgsn 2e9ea50f7824e2028e44a27b72d5ae268cfc66f0.

TODO: Document it in osm-gsm-manuals. Also: Clean a bit the table which states that some csv columns only apply for events starting with "pdp-".

Actions #15

Updated by pespin over 6 years ago

  • Status changed from In Progress to Feedback

Documentation submitted in gerrit:

remote: New Changes:
remote:   https://gerrit.osmocom.org/5113 OsmoSGSN: configuration: Move pdp ctx specific CDR fields to its own table
remote:   https://gerrit.osmocom.org/5114 OsmoSGSN: configuration: Add missing pdp-periodic event
remote:   https://gerrit.osmocom.org/5115 OsmoSGSN: configuration: Document CDR CTRL interface
Actions #16

Updated by laforge over 6 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100

merged.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)