AGISTATUS bug in Asterisk

Hi All,

I was just verifying different states of AGISTATUS variable i.e SUCCESS,FAILURE,NOTFOUND and HANGUP. I have noticed a weird behaviour in one of my test cases. In this test case, I am trying to hang up call (from caller side) while it is in AGI script. I got AGISTATUS as FAILURE when I was expecting HANGUP. Below I am putting a simple context and script to repeat the bug.

exten => _CALL-.,1,Answer()
exten => _CALL-.,n,AGI(agi-test.php)
exten => _CALL-.,n,NoOp(foo)
exten => _CALL-.,n,Hangup()
exten => h,1,NoOp(${AGISTATUS})



<?php sleep(7); ?>

Any help/advice would be very much appreciated.