SQL is NTP server for web and dialers and all times are in sync.
I have an issue I have not seen before with the vicidial_agent_log and call_log with inbound calls. It seems that when an agent takes an inbound call, a new agent_log_id is created, but when the call is dispo'd the previous agent_log_id is updated. The call_log records all inbound calls as 1 second long.
Here's what happens. Agent is logged in, still paused:
- Code: Select all
> select user, event_time,lead_id, pause_epoch, wait_epoch, talk_epoch, status, sub_status, uniqueid
from vicidial_agent_log where agent_log_id=542;
+------+---------------------+---------+-------------+------------+------------+--------+------------+----------+
| user | event_time | lead_id | pause_epoch | wait_epoch | talk_epoch | status | sub_status | uniqueid |
+------+---------------------+---------+-------------+------------+------------+--------+------------+----------+
| 1003 | 2017-04-29 12:31:43 | NULL | 1493483503 | 1493483503 | NULL | NULL | LOGIN | |
+------+---------------------+---------+-------------+------------+------------+--------+------------+----------+
Agent Unpaused:
- Code: Select all
> select user, event_time,lead_id, pause_epoch, wait_epoch, talk_epoch, status, sub_status, uniqueid
from vicidial_agent_log where agent_log_id=542;
+------+---------------------+---------+-------------+------------+------------+--------+------------+----------+
| user | event_time | lead_id | pause_epoch | wait_epoch | talk_epoch | status | sub_status | uniqueid |
+------+---------------------+---------+-------------+------------+------------+--------+------------+----------+
| 1003 | 2017-04-29 12:31:43 | NULL | 1493483503 | 1493483606 | NULL | NULL | LOGIN | |
+------+---------------------+---------+-------------+------------+------------+--------+------------+----------+
Agent gets inbound call. Agent_log_id 543 is added, but talk epoch updated in id 542:
- Code: Select all
> select user, event_time,lead_id, pause_epoch, wait_epoch, talk_epoch, status, sub_status, uniqueid
from vicidial_agent_log where agent_log_id in(542,543);
+------+---------------------+---------+-------------+------------+------------+--------+------------+----------+
| user | event_time | lead_id | pause_epoch | wait_epoch | talk_epoch | status | sub_status | uniqueid |
+------+---------------------+---------+-------------+------------+------------+--------+------------+----------+
| 1003 | 2017-04-29 12:31:43 | 205 | 1493483503 | 1493483606 | 1493483670 | NULL | LOGIN | |
| 1003 | 2017-04-29 12:35:43 | NULL | 1493483743 | 1493483743 | NULL | NULL | NULL | |
+------+---------------------+---------+-------------+------------+------------+--------+------------+----------+
Agent dispo's call as SALE. Id 542 is updated, 543 unchanged:
- Code: Select all
]> select user, event_time,lead_id, pause_epoch, wait_epoch, talk_epoch, status, sub_status, uniqueid
from vicidial_agent_log where agent_log_id in(542,543);
+------+---------------------+---------+-------------+------------+------------+--------+------------+----------------+
| user | event_time | lead_id | pause_epoch | wait_epoch | talk_epoch | status | sub_status | uniqueid |
+------+---------------------+---------+-------------+------------+------------+--------+------------+----------------+
| 1003 | 2017-04-29 12:31:43 | 205 | 1493483503 | 1493483606 | 1493483670 | SALE | LOGIN | 1493483669.205 |
| 1003 | 2017-04-29 12:35:43 | NULL | 1493483743 | 1493483743 | NULL | NULL | NULL | |
+------+---------------------+---------+-------------+------------+------------+--------+------------+----------------+
The vicidial_closer_log has all correct data:
- Code: Select all
> select start_epoch, end_epoch, length_in_sec
from vicidial_closer_log where uniqueid=1493483669.205;
+-------------+------------+---------------+
| start_epoch | end_epoch | length_in_sec |
+-------------+------------+---------------+
| 1493483670 | 1493483731 | 61 |
+-------------+------------+---------------+
But the call was 61 seconds long, but the call_log says 1 second:
- Code: Select all
> select uniqueid, start_time, end_time, caller_code from call_log where uniqueid=1493483669.205;
+----------------+---------------------+---------------------+-------------+
| uniqueid | start_time | end_time | caller_code |
+----------------+---------------------+---------------------+-------------+
| 1493483669.205 | 2017-04-29 12:34:29 | 2017-04-29 12:34:30 | 7274106404 |
+----------------+---------------------+---------------------+-------------+
Now, the next call to that agent will create 544 but update agent_log_id 543.
So, can anyone suggest what I might have messed up or incorrectly configured here?