Is there a way to enforce the decoding of Diameter base AVPs into a message() record, regardless of the Diameter application to which the Request/Answer belongs to?
There are Diameter base AVPs which appear in any Request/Answer regardless of the actual Diameter application; e.g.: Origin-Host, Origin-Realm, Destination-Host, Destination-Realm, User-Name aso. See also here: RFC 6733 - Diameter Base Protocol.
… and there are “relay”-like applications which may need to efficiently access those AVPs.
The option would be to read the AVPs through the avp() list in #diameter_packet{}…
See here for details about #diameter_packet{} and how it is supposed to be used:
I feel your pain, I have struggled with that sort of issue too. The thing is though that the DIAMETER protocol is structured around “applications” defined in dictionaries and diameter does code generation from those dictionaries.
When I was faced with the problem of interworking group AVP payloads between two applications (Swx and SWm) I implemented a CODEC to do it. A bit of a PITA, but I’m over it.