Uri,
AVPs are associated with particular transactions, and that context is visible only in an onreply_route that is specifically armed when that transaction is created (i.e. via t_relay()):
t_on_reply("MY_REPLY_ROUTE");
The default onreply_route processes replies statelessly -- that's why it's the default onreply_route, when no other will do. It doesn't have access to any of the attributes of any given TM transaction, including AVPs.
-- Alex