Problems with ANSWEREDTIME & DIALSTATUS variables

Hi all , I’m trying to get the ANSWEREDTIME & DIALSTATUS variables after each CALL inside an AGI script,If the channel is not hangup by the side that originated the call all works fine and I get correct values otherwise they return empty strings , is this a know bug or I’m missing something?

How are you attempting to get the variables?

You should be able to detect the SIGHUP that Asterisk generates to tell your program to exit on a hangup. Catch the SIGHUP and before you exit get the variables that you need.

I’ve used this method before to get the DIALSTATUS of a call. Not sure about ANSWEREDTIME.