@post-accounting

Variant of @post-execute for @accounting which is only executed for accounting requests. This is executed regardless of whether the main @accounting pipeline accepted or rejected the request, but is skipped if the @pre-accounting pipeline rejected the request.

Note: The @ prefix is required for pipeline blocks. The legacy syntax without @ (e.g., post-accounting {}) is deprecated and emits warnings. Use @post-accounting {} for new configurations.

Result of this pipeline is ignored; it cannot change the outcome of the request. However, it can modify the reply attributes, log information, or perform other side effects.

See also

Example

@post-accounting {
    if all {
        acct.status == "Stop";
    } then {
        log {
            message "Session ended";
            context {
                identity aaa.identity;
                duration acct.duration;
            }
        }
    }
}