Hello again,
I still did not solve this issue, we opened an issue with Avaya Support and we have seen the following.
I will explain the test:
We have 2 agents logged, only one of them belonging to a skill that we are querying.
Check in CMS and CM that only one agent is in the skill
Then add the other agent to the skill
Check in CMS and CM that both agents are in the skill
Then remove the second agent from the skill
Check in CMS and CM that only one agent is in the skill
My code:
@Override
public String[] getReadyAgentsInGroupExtension(String sGroupExt) throws InvalidArgumentException, MethodNotSupportedException
{
logger.debug(">> getReadyAgentsInGroupExtension: " + sGroupExt);
ArrayList<String> asAgents = new ArrayList<String>();
if ( sGroupExt != null ) {
Object auxACD = oProvider.getAddress(sGroupExt);
if ( auxACD != null && auxACD instanceof ACDAddress){
ACDAddress oACD = (ACDAddress) auxACD;
[b]Agent[] agents = oACD.getLoggedOnAgents();[/b]
if ( agents != null && agents.length > 0){
for (Agent oAgent : agents){
[b]logger.debug(oAgent.getAgentID() + ": " + oAgent.getState());[/b]
if(oAgent.getState() == Agent.READY || oAgent.getState() == Agent.WORK_READY)
asAgents.add(oAgent.getAgentID());
}
}else{
logger.info("No agents logged on " + sGroupExt);
}
}else{
logger.warn("oACD is null. Group extension: " + sGroupExt);
}
}else{
logger.warn("Group extension is null");
}
logger.debug("<< getReadyAgentsInGroupExtension: " + asAgents);
return asAgents.toArray(new String[asAgents.size()]);
}
The issue is that after the third step of the test getLoggedOnAgents keeps returning both agents. These are the logs:
2018-06-07 16:48:14 DEBUG JtapiCallGenerator:249 - >> getReadyAgentsInGroupExtension: 1262
2018-06-07 16:48:15 DEBUG JtapiCallGenerator:260 - 1314: 3
...
2018-06-07 16:54:31 DEBUG JtapiCallGenerator:249 - >> getReadyAgentsInGroupExtension: 1262
2018-06-07 16:54:32 DEBUG JtapiCallGenerator:260 - 1314: 3
2018-06-07 16:54:32 DEBUG JtapiCallGenerator:260 - 1316: 3
...
2018-06-07 16:57:02 DEBUG JtapiCallGenerator:249 - >> getReadyAgentsInGroupExtension: 1262
2018-06-07 16:57:03 DEBUG JtapiCallGenerator:260 - 1314: 3
2018-06-07 16:57:03 DEBUG JtapiCallGenerator:260 - 1316: 3
Agent 1316 keeps showing until he/she logs out, even when it does not belong to 1262.
Another strange thing that we just discover is that in the jtapi logs it does not show.
How is it possible that it does not show on jtapi logs but it is returned by the method?
These are the libraries that I am using:
<dependency>
<groupId>com.avaya</groupId>
<artifactId>ecsjtapia</artifactId>
<version>6.3.0.121</version>
</dependency>
<dependency>
<groupId>com.avaya</groupId>
<artifactId>jtapiex</artifactId>
<version>6.3.0.121</version>
</dependency>
I hope that, with this new information, someone is able to help me here.
I have logs to send if necessary.
Thank you again.
Ricardo Sosa.