Dialstatus variable

Hi
I want to develop a script in PHP to handle the status of a call (channel) since the Queue to the hang-up (including transfer, and hungup cause).

I used the Events, but no way, I want to use somme AGI scripts (Class phpAGI …), I took as an example the “dialparties.agi” but from what I understand it just return the channel for the call or to modify the DialStatus variable…
I want to know how I can monitor this “variable”…
Thank’s a lot