Ejemplo n.º 1
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));
        }
Ejemplo n.º 2
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));
        }