I think I have figured out how to capture the date/time that the agent was connected to the caller. I'd like to have some feedback on my solution and if I'm missing anything. I'm fairly new to the OSDial infrastructure.

In the agi-OSDagent_conf.agi file I added the following lines after the $AGI->answer() method. I also added a column to the osdial_closer_log table called agent_connect_time.

This seems to be capturing date datetime stamp in side the table. I should now be able to find the difference in this time and the answer time to calculate the time the caller sat on hold waiting for an agent to answer his/her call.

Actually this is above me. But I'd test on a non production machine in case it messes up something else. OSDial grew out of Vicidial some six years ago. That was/is a very interdependent piece of code where you could not easily get away with modifying tables without causing some poorly written I/O to crash because the table no longer matches the layout. Any change you do make sure you run through everything that might touch that table, as you can easily make something else fail. I'm told there's always a celebration when some original code is replaced.