Help - deadagi sighup

How can I detect when a caller hangs up?
I’m creating an agi script in php and i’ve read this:

but don’t work…anybody can help me?

Thanks a lot!

I have never tried to catch a hang up in the agi but all calls that hang up do go to the h extension. So for example if you wanted to run a script on hang up you would do

Exten => h,1,Agi(my_script.php)