Custom Diameter ACR AVPs for SIP

When using diameter accounting, you can populate reserved ACR AVPs for SIP calls with custom data by using header manipulation rules (HMR).

You configure HMR to add data to AVP IDs 123 to 153, which are reserved for this purpose. Never use these AVPs for other purposes. You can configure multiple rules to add multiple headers from any SIP message header, which will include multiple custom AVPs in the ACR. See Header Manipulation Rules Guide for complete HMR configuration information.

When you configure HMR, the rules apply to RADIUS and diameter accounting, whichever is in use. The reserved AVPs correspond to RADIUS VSAs 200-230. When creating rules, you reference the VSA number, not the AVP number.

For example, the following rules instruct the SBC to locally store the value of the from header of a SIP INVITE, then add the P-Acme-VSA header with the locally stored value, prefixed with 200. When generating CDRs and ACRs, if a session agent, realm, or SIP interface is configured to use the customVSA ruleset, the SBC checks the SIP message for the P-Acme-VSA header, and uses it to add the value to the relevant VSA or AVP; in this case, VSA 200 or AVP ID 123.


sip-manipulation
        name                          customVSA
        header-rule
                name                  storeFrom
                header-name           from
                action                store
                comparison-type       pattern-rule
                msg-type              request
                methods               INVITE
                match-value           .*
        header-rule                
                name                  generateVSA200
                header-name           P-Acme-VSA
                action                add
                methods               INVITE
                new-value             200:+$storeFrom.$0
You can configure HMR to populate the custom AVPs for:
  • Start ACR: Generated for the initial INVITE (timing depends on the value of generate-start on the account-config).
  • Interim ACR: Generated for reINVITEs (timing depends on the value of generate-interim on the account-config).
  • Stop ACR: Generated when the call is disconnected, after receiving a 200 OK from the callee in response to a BYE.
  • Event ACR: Generated for events such as SMS, or 400-level errors.

    Custom AVPs are not populated for REGISTER Event ACRs. The Acme-Packet-Specific-Extension-Rf(1) group AVP is not included in the ACR when an event ACRs is generated due to REGISTER.

If HMR configuration is removed during an ongoing call, the custom AVPs are still populated for subsequent ACRs on that call with the values from the last ACR where HMR applied.

For more information about using HMR to populate the custom AVPs, including how to configure the sip-header-rules element, see Custom RADIUS CDR VSAs for SIP in the Call Signaling Accounting Configuration chapter of this guide. The HMR configuration steps are the same for RADIUS and diameter accounting.

Note:

In RADIUS accounting, because START records are not created until the session is initiated, you cannot use HMR to add custom VSAs on START records in the CDR. However, because diameter accounting can create START records before the session is initiated, you can use HMR to add custom AVPs on START records in the ACR.

For detailed information about HMR, including functionality, configuration, and examples of other use cases, see Header Manipulation Rules Guide.

Logging for Custom Diameter AVPs

The SBC captures logs in the log.sipd and log.radd files.

The log entries for successful AVP generation appear in the following format:


Packing Custom VSAs in ACR recType:      type
Current VSA List size :                  count 
  ID = VSA_number VALUE = value

where:

  • type is the ACR type the custom AVPs were added to (START, STOP, INTERIM, orEVENT)
  • count is the total number of custom AVPs added or updated
  • VSA_number is the VSA, from 200 to 230, that corresponds to the AVP IDs from 123 to 153.