Hooking into hangupcall

I want to trap the rtcp stats off the SIP channel gracefully. From what I can read in extensions.conf I don’t see much ability in macro-hangupcall. Am I missing something obvious or is this really difficult?

I’m running 2.6.0.1.

Thanks!