public ACDResponse Login(string agentId, string pwd, string extension) { string token = ""; token = ACDService.AgentLogin(agentId, extension, pwd); return(new ACDResponse(token, true)); }
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); }
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)); }
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)); }
private bool ValidateACDToken(string token, string extension) { bool isValid = false; log.Debug("Validate acd token: " + token); try { isValid = ACDService.Validate(token, extension); } catch (AuthenticationExpiredException aee) { log.Error("ACD Token is invalid: token as expired"); throw aee; } catch (AuthenticationMismatchException ame) { log.Error("ACD Token is invalid: token does not match dn"); throw ame; } log.Debug("ACD Token is valid: " + isValid.ToString()); return(isValid); }
public ReasonCode[] GetNotReadyReasonCodes() { return(ACDService.GetNotReadyReasonCodes()); }
public ReasonCode[] GetLogoffReasonCodes() { return(ACDService.GetLogoffReasonCodes()); }