Who released the channel in the call transfer

Hi Guys,
I want to track the calls in asterisk by saving the call release from if anyone has done it before please help me. I have following scenario:

A calls to an IVR which lands in Context parent-context
IVR dials out to all the available attendees
One of them receives the call say its B
B initiates attended call transfer to C which lands in transfer-context
B and C speak with each other and B leaves the channel
and now goes to hangup of transfer-context

Since B released the call but I don’t know who released the channel. Is there anyway to know who released the channel in the hangup extension?

Thanks!