Changeset 530:825a2992e3b9 in freeDiameter for extensions/app_radgw/rgwx_acct.c
- Timestamp:
- Sep 6, 2010, 2:28:53 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_radgw/rgwx_acct.c
r526 r530 827 827 828 828 /* While here, we also add the Accouting-Record-Number AVP. 829 We don't have a dedicated counter nor a state, so we just use the Diameter message End-to-end id here, which fits the conditions on the value. */ 829 The Accounting-Record-Number AVP (AVP Code 485) is of type Unsigned32 830 and identifies this record within one session. As Session-Id AVPs 831 are globally unique, the combination of Session-Id and Accounting- 832 Record-Number AVPs is also globally unique, and can be used in 833 matching accounting records with confirmations. An easy way to 834 produce unique numbers is to set the value to 0 for records of type 835 EVENT_RECORD and START_RECORD, and set the value to 1 for the first 836 INTERIM_RECORD, 2 for the second, and so on until the value for 837 STOP_RECORD is one more than for the last INTERIM_RECORD. 838 839 -- we actually use the end-to-end id of the message here, which remains constant 840 if we send a duplicate, so it has the same properties as the suggested algorithm. 841 Anyway, it assumes that we are not converting twice the same RADIUS message. 842 . */ 830 843 CHECK_FCT( fd_msg_avp_new ( cs->dict.Accounting_Record_Number, 0, &avp ) ); 831 844 value.u32 = e2eid;
Note: See TracChangeset
for help on using the changeset viewer.