we are developing a screen pop application, when a call arrived to an agent, we need to find the agent id, we followed the code described here.
https://www.devconnectprogram.com/site/global/products_resources/avaya_aura_application_enablement_services/support/faq/jtapi/programming.gsp#280
We obtained a VDN from the systme and add TerminalConnectionListener to the VDN
so every call come to the VDN will have listener. when the agent answered the call, the method terminalConnectionCreated will be notified.
we are trying to retrieve the agent ID from here.
TerminalConnection tc = evt.getTerminalConnection()
Terminal terminal = tc.getTerminal()
if(terminal instanceof AgentTerminal)
{
AgentTerminal agentTerminal= (AgentTerminal)terminal;
Agent[] agents = agentTerminal.getAgents();
}
the problem happen at agentTerminal.getAgents();
sometimes it returns agent ID who logged on the station 2 days ago, it keep an array of history agents.
sometimes, it return empty, (there is actually an agent logged on).
We don't use the 'addAgent' / removeAgent on the Terminal. (agent logon to the station manually dial the FAC code on the phone)
The agentTerminal.getAgents() should always return one agent currently logged on to the station.
Can anyone help to understand the problem ?