Get Tranfer callee extension in my AGI script

I am a newbie for asterisk. What I am looking for I want to get when user transfer call to a callee

E.g
 Bob = 100 
 Nick = 101 
 Jemas = 102

Bob (100) call to Nick(101) after some conversation Nick transfer attended call to James ( 102 ), So I want
When Jemas or Bob disconnect or complete the call I want to 102 extensions in my AGI script

Does someone have an idea how to achieve this?

Thanks in advance

I dont remember which variable hold the value so start looking here

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Variables