[RADIATOR] Renaming attributes in Grouped AVP
Arthur Konovalov
kasjas at hot.ee
Mon Sep 14 04:40:47 CDT 2009
Hi!
I have a task to store statistics from Diameter accounting messages.
There are 2 identical Media-Statistics grouped AVP in one message- one
from Calling-Side and another from Called-Side.
Part of logfile:
Mon Sep 14 11:20:11 2009: DEBUG: mmtest.emm.hot.ee <- proxy1.emm.hot.ee
recv_v1msg:
Code: 271 (Accounting)
Version: 1
Flags: 0xc0 (RP)
Application ID: 3 (Base Accounting)
Hop-to-Hop ID: 319540787
End-to-End ID: 319540787
Attributes:
Session-Id: .M., proxy1.emm.hot.ee;18;1081;ppb1_bs13-R6A at blade_0_19
Origin-Host: .M., proxy1.emm.hot.ee
Origin-Realm: .M., emm.hot.ee
Destination-Realm: .M., emm.hot.ee
Destination-Host: .M., mmtest.emm.hot.ee
Accounting-Record-Type: .M., STOP_RECORD
Accounting-Record-Number: .M., 2
Acct-Application-Id: .M., BASE_ACCOUNTING
Event-Timestamp: .M., 3461905212
Role-Of-Node: VM., 1
Time-Stamps: VM.,
SIP-Request-Timestamp: VM., 3461905212
SIP-Response-Timestamp: VM., 3461905212
IMS-Charging-Identifier: VM., proxy1.emm.hot.ee-1252-916407-737035
Cause-Code: VM., 0
Node-Functionality: VM., 110
Media-Statistics: VM.,
Media-Interface-Statistics: VM.,
User-Side: VM., Called-Side
Media-Interface-Flow-Statistics: VM.,
Media-Component-Number: VM., 1
Accounting-Input-Octets: .M., 32000
Accounting-Input-Packets: .M., 160
Accounting-Output-Octets: .M., 24636
Accounting-Output-Packets: .M., 124
Packets-Discarded-Filtering: VM., 0
Octets-Discarded-Filtering: VM., 0
Packets-Discarded-Policing: VM., 0
Octets-Discarded-Policing: VM., 0
Packets-Out-Of-Sequence: VM., 0
Packets-Lost: VM., 0
RTCP-Reported-Average-Jitter: VM., 0
RTCP-Reported-Packets-Lost: VM., 0
Media-Interface-Statistics: VM.,
User-Side: VM., Calling-Side
Media-Interface-Flow-Statistics: VM.,
Media-Component-Number: VM., 1
Accounting-Input-Octets: .M., 24636
Accounting-Input-Packets: .M., 124
Accounting-Output-Octets: .M., 32000
Accounting-Output-Packets: .M., 160
Packets-Discarded-Filtering: VM., 0
Octets-Discarded-Filtering: VM., 0
Packets-Discarded-Policing: VM., 0
Octets-Discarded-Policing: VM., 0
Packets-Out-Of-Sequence: VM., 0
Packets-Lost: VM., 0
RTCP-Reported-Average-Jitter: VM., 0
RTCP-Reported-Packets-Lost: VM., 0
Mon Sep 14 11:20:11 2009: DEBUG: StateMachine::event R-Rcv-Message in
state R-Open. Calling Process
Mon Sep 14 11:20:11 2009: DEBUG: mmtest.emm.hot.ee Process
Mon Sep 14 11:20:11 2009: DEBUG: Packet dump:
*** Diameter request converted to Radius request ....
Code: Accounting-Request
Identifier: UNDEF
Authentic: ,-<232><141><181><152><30>+<180><128><212><137><251>MN<220>
Attributes:
Acct-Session-Id =
"proxy1.emm.hot.ee;18;1081;ppb1_bs13-R6A at blade_0_19"
NAS-Identifier = "proxy1.emm.hot.ee"
Acct-Status-Type = 2
Event-Timestamp = 3461905212
Role-Of-Node = 1
SIP-Request-Timestamp = 3461905212
SIP-Response-Timestamp = 3461905212
IMS-Charging-Identifier = "proxy1.emm.hot.ee-1252-916407-737035"
Cause-Code = 0
Node-Functionality = 110
User-Side = "Called-Side"
Media-Component-Number = 1
Acct-Input-Octets = 32000
Acct-Input-Packets = 160
Acct-Output-Octets = 24636
Acct-Output-Packets = 124
Packets-Discarded-Filtering = 0
Octets-Discarded-Filtering = 0
Packets-Discarded-Policing = 0
Octets-Discarded-Policing = 0
Packets-Out-Of-Sequence = 0
Packets-Lost = 0
RTCP-Reported-Average-Jitter = 0
RTCP-Reported-Packets-Lost = 0
User-Side = "Calling-Side"
Media-Component-Number = 1
Acct-Input-Octets = 24636
Acct-Input-Packets = 124
Acct-Output-Octets = 32000
Acct-Output-Packets = 160
Packets-Discarded-Filtering = 0
Octets-Discarded-Filtering = 0
Packets-Discarded-Policing = 0
Octets-Discarded-Policing = 0
Packets-Out-Of-Sequence = 0
Packets-Lost = 0
RTCP-Reported-Average-Jitter = 0
RTCP-Reported-Packets-Lost = 0
I can't store in MySQL table two different attributes with same name.
Is it possible to rename attributes (by script, for example) in grouped
AVP to excluding names overlapping? For instance by adding prefix or
suffix to Calling and Called part attribute names.
Please give me any hint, help or workaround.
Regards,
Arthur
More information about the radiator
mailing list