How can I get call status Dial plan

Hi i am new to asterisk and php agi

i am making call using below script
$status=$agi->exec(‘RetryDial’,“please-wait,5,$retry,DAHDI/g1/0$number,30”);

i am trying to get the call status on same page/scripts.
how do I get the call status from agi script, whether call is answered or busy after the call hes made.

Kindly help and give some suggestion.

Thanks!!
Ajai :smile:

Hi,
use the phpagi library. It has all handy functions and examples here is the link
phpagi.sourceforge.net/