From what I can observe, the situation is as follows:
- The agent’s browser stops sending ping requests, so last_update_time under vicidial_live_agents stops getting updated
- VICIdial detects that the agent has been gone for 30 seconds, and changes the agent’s status within vicidial_live_agents to “PAUSED”
- As the agent is still on a call, and thus has lead_id in vicidial_live_agents set, the Real-Time Main Report misreports the agent’s status as “DISPO”
There is a small problem.
Step (b) is performed by AST_VDauto_dial.pl. I have added custom logging to this script, and that action never occurs (but if I add an “else” statement, it will log that no lagged agents were detected). I even broke this script by mistake (copied my PHP logging code into a Perl script) and the symptoms persisted even with that script unable to start.
This means that somehow the code portion of AST_VDauto_dial.pl responsible for idle detection is dead, and some other portion of the software handles this task instead.
I have tried the following search to locate anywhere that is updated in any fashion:
cd /
grep -n -i -r -E --exclude-dir=proc --exclude-dir=sys --exclude-dir=usr/src --include=*.{php,pl,cgi,agi} 'UPDATE.+vicidial_live_agents' /
Having examined every single result, every line of code that could possibly make that change, is covered by my own logging, and no such change is ever detected.
Is there something else besides AST_VDauto_dial.pl that handles lag detection? Does something unexpectedly call into /usr/src/astguiclient/ somehow? Some obscure script with no filename extension (relying on #! for execution)? I just searched for *.pm just in case, although I’ve never seen any Perl modules for this.