[RADIATOR] Renaming attributes in Grouped AVP

Arthur Konovalov kasjas at hot.ee
Mon Sep 14 12:59:12 CDT 2009


Thank You for the tip.

 From my understanding seems that in those examples single attributes 
are processed.
My task is more complicated.
How can I memorize  AVP-s which belong to Called-Side group and others 
with same names to Calling-Side?
Is there a way to store the whole group together and rename the 
attributes afterwards in preprocessing hook?

Regards,
Arthur

Hugh Irvine wrote:
>
>
> Yes you can manipulate the attributes in a hook.
>
> There are many example hooks in "goodies/hooks.txt", including one 
> that does something similar with multiple "cisco-avpairs".
>
> regards
>
> Hugh
>
>
>
>
> On 14 Sep 2009, at 19:40, Arthur Konovalov wrote:
>
>> 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
>>
>>
>> _______________________________________________
>> radiator mailing list
>> radiator at open.com.au
>> http://www.open.com.au/mailman/listinfo/radiator
>
>
>
> NB:
>
> Have you read the reference manual ("doc/ref.html")?
> Have you searched the mailing list archive 
> (www.open.com.au/archives/radiator)?
> Have you had a quick look on Google (www.google.com)?
> Have you included a copy of your configuration file (no secrets),
> together with a trace 4 debug showing what is happening?
> Have you checked the RadiusExpert wiki:
> http://www.open.com.au/wiki/index.php/Main_Page
>



More information about the radiator mailing list