Queue Wait Time solution

For subjects not covered elsewhere

Queue Wait Time solution

Postby nscottbrown » Tue Apr 07, 2015 6:01 pm

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.

my $connect_time = $osdial->get_datetime();
my $unique_id = $AGI->{uniqueid};
#$osdial->agi_output("Uniqueid: $unique_id");
my $sql = "UPDATE osdial_closer_log SET agent_connect_time='$connect_time' WHERE uniqueid='$unique_id';";
$osdial->agi_output($sql);
my $agent_connect_time = $osdial->sql_query($sql);

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.

Thanks for any feedback you might be able to provide.
nscottbrown
 
Posts: 17
Joined: Fri Mar 13, 2015 8:24 am

Re: Queue Wait Time solution

Postby fadmin » Tue Apr 07, 2015 7:13 pm

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.
Forum Administrator
OSDial
http://osdial.com
fadmin
Site Admin
 
Posts: 283
Joined: Fri Feb 12, 2010 7:27 am


Return to General

Who is online

Users browsing this forum: MrGammix, onesmence and 1 guest

cron