Need help on phpagi logging


I have a phpagi script that is executed when a call comes in, based on the CLI it plays certain IVR prompts through $agi->get_data then waits for results then again plays certain prompts then executes stored procedure. What I would like to do is caputre the entire process through a log, like following:

CLI of caller
what prompt is played
what selection is done via dtmf by the caller
what stored procedure is executed

I know it can be done through verbose, dont exactly know how would i look at above requirement, any help would be highly appreciated.