Exemplo n.º 1
0
 /// <summary>
 /// Sets the Agent State for any given situation... TAPI Demo does not support Direct Agent State.
 /// </summary>
 /// <param name="stateChangeRequest"></param>
 /// <returns></returns>
 public override bool SetAgentState(CtiStateRequest stateChangeRequest)
 {
     if (ctiProvider != null)
     {
         if (stateChangeRequest.StateType == StateRequestType.AGENT)
         {
             if (stateChangeRequest.StateName.Equals(CtiAgentStates.AVAILABLE, StringComparison.OrdinalIgnoreCase))
             {
                 //raise Agent ready Event.
                 if (AgentStateChangedEvent != null)
                 {
                     AgentStateChangedEvent(this, new CtiCoreEventArgs("AgentStateChange", CtiAgentStates.AVAILABLE, string.Empty));
                     return(true);
                 }
             }
             if (stateChangeRequest.StateName.Equals(CtiAgentStates.UNAVAILABLE, StringComparison.OrdinalIgnoreCase))
             {
                 //raise Agent ready Event.
                 if (AgentStateChangedEvent != null)
                 {
                     AgentStateChangedEvent(this, new CtiCoreEventArgs("AgentStateChange", CtiAgentStates.UNAVAILABLE, string.Empty));
                     return(true);
                 }
             }
         }
         if (stateChangeRequest.StateType == StateRequestType.CALL)
         {
         }
     }
     return(true);
 }
 /// <summary>
 /// Called by UII’s Cti Subsystem, Request the adapter to set the state of an Agent
 /// </summary>
 /// <param name="stateChangeRequest"></param>
 /// <returns></returns>
 public override bool SetAgentState(CtiStateRequest stateChangeRequest)
 {
     throw new NotImplementedException();
 }