Ryan,
Why are you working so hard? Why don't you just use xlog() or sqlops[1] to log whatever SIP messages you want to log, whenever you want to log them, wherever you want to log them, into a schema of your choosing, on your terms, and without any regard for the innards of the ACC module or worrying about relationships between logging and transaction state?
-- Alex
[1] http://kamailio.org/docs/modules/4.2.x/modules/sqlops.html