예제 #1
0
 public QueueStatistics[] GetAgentQueueStatistics(string token, string extension)
 {
     QueueStatistics[] ast = null;
     if (ValidateACDToken(token, extension))
     {
         log.Debug("Get agent statistics: " + ACDService.GetAgentIdFromToken(token));
         ast = ACDService.GetQueueStatistics(ACDService.GetAgentIdFromToken(token));
     }
     return(ast);
 }
예제 #2
0
        public ACDResponse SetAgentState(string token, string extension, ushort reasoncode, ushort state)
        {
            bool success = false;

            if (ValidateACDToken(token, extension))
            {
                log.Debug("Set agent state: " + ACDService.GetAgentIdFromToken(token));
                success = ACDService.ChangeAgentState(ACDService.GetAgentIdFromToken(token), ACDService.GetExtensionFromToken(token), ACDService.GetPwdFromToken(token), reasoncode, state);
            }
            return(new ACDResponse(ACDService.UpdateToken(token), success));
        }
예제 #3
0
        public ACDResponse Logoff(string token, string extension)
        {
            bool success = false;

            if (ValidateACDToken(token, extension))
            {
                log.Debug("Logoff agent: " + ACDService.GetAgentIdFromToken(token));
                success = ACDService.AgentLogoff(ACDService.GetAgentIdFromToken(token), ACDService.GetExtensionFromToken(token), ACDService.GetPwdFromToken(token));
            }
            return(new ACDResponse(ACDService.UpdateToken(token), success));
        }