I'm using Asterisk to route calls. The logic of my application is rather complex, therefore I'm using PHPAGI.
I would like to execute Dial command and track several things:
- Has the call been answered?
- How many time it took for callee to answer the call?
- How many time did take the talk?
All I have now is the $agi->exec('Dial', ...) function. The Dial command allows me to specify a macro, that is being called when the callee answers the call. But how can I specify any php callback instead of this? How can I track the answer moment in my phpagi script?
Thank you!