There is available a new enhancement of the acc module that allows you
(via extra accounting) to log also information related to the SIP reply
of that transaction.
So far, all PV from extra accounting were evaluated in the context of
the SIP request, so you were able do directly log only info from the SIP
request; for information related to SIP reply, you had to use a
onreply_route to get the reply, to put the info you are interested in in
some AVPS and than use the AVPS in extra accounting.
Now, you can simply do:
use the "/reply" marker to say you want that PV to be evaluated in the
context of the reply; by default (without the marker), the evaluation is
done in the request context.