Getting ANSWEREDTIME in astcc.agi

HI,

From wiki I found out that:

"If the AGI application dials outward, the script returns execution to the dialplan and loses contact with the asterisk server. The script continues to run in the background by itself and is free to clean up and do post-dial processing. "

and this is exactly my problem in astcc.agi:

if ($res->{tech} eq “Zap”) {
$dialstr = “Zap/$res->{path}/$phone|30|HL(” . ($maxtime *
60 * 1000) . “:60000:30000)”;
$res = $AGI->exec(“DIAL $dialstr”);
$answeredtime = $AGI->get_variable(“ANSWEREDTIME”);
$dialstatus = $AGI->get_variable(“DIALSTATUS”);
$callstart = localtime();
return $dialstatus;
}

right after executing dial command in AGI the rest of the script will be executed and I will get ANSWEREDTIME=0 no matter how long the conversation would be!!

Am I missing something? I am using ZAP channels to connect two PSTN lines.