On Test Machine , When sending a request to FRONT END, i have great response (two seconds). On production, request takes 30 sec or more , organization have more than 5000 users. If have another away to get SIPs Status using UCMA? UCWA cannot using. any idea ?
Code :
public Dictionary<string, string> GetAgentsAvailability(List<string> usersUris)
{
lock (lockObj)
{
AgentsAvailability = new Dictionary<string, string>();
try
{
if (usersUris != null && usersUris.Count > 0)
{
IAsyncResult agentAvailabilityCheck = ApplicationEndPoint.PresenceServices.BeginPresenceQuery(usersUris, new string[] { "state" },null, null);
WaitHandle[] w = new WaitHandle[] { agentAvailabilityCheck.AsyncWaitHandle };
WaitHandle.WaitAll(w, 3000);
}
else
{
WriteEntry.ELog("Platform - GetAgentsAvailability - No Agent SIPs to check.", EventLogEntryType.Information);
}
}
catch (Exception ex)
{
WriteEntry.ELog(ex.ToString(), EventLogEntryType.Error);
throw;
}
return AgentsAvailability;
}
}