Author Message
Ahmadqadri
Joined: Oct 8, 2018
Messages: 54
Offline
Hello,

I'm trying to set agent (ready,notReady) states manually via dmcc sdk using release 7.1. Can someone please mention a flow of how this can be achieved. Currently I'm using SetAgentState() to login an agent and it works fine. The agent gets login in not ready state.
When I try to setAgentState() to ready it's not happening. Reason unknown.
Here is my code:

public void Ready(string agentId, string agentPassword, string DeviceId)

{
try
{
//serviceProvider.getThirdPartyCallController.MakeCall("257", "*17" + "219", null); //Tried making a call but no sucess
//Agent Login
ThirdPartyCallController.SetAgentStateParameters param = new ThirdPartyCallController.SetAgentStateParameters();
//TODO: before agent login, check if the agent is already logged in
//if(serviceProvider.getThirdPartyCallController.GetAgentState(DeviceId, null))
param.AgentId = agentId;
param.Password = agentPassword;
param.Device = DeviceId;
//param.RequestedAgentState = ThirdPartyCallController.RequestedAgentState.AM_LOG_IN;
[b]param.WorkMode = ThirdPartyCallController.WorkMode.AutoIn[/b]; // does this works or something else is required.
serviceProvider.getThirdPartyCallController.SetAgentState(param, null);
}
catch (Exception ex)
{

}

}


Any help would be highly appreciated. Thanks
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Offline
When you login an agent, it does not immediately become Ready. You must perform something like the following to do that:

ThirdPartyCallController.SetAgentStateParameters p = new ThirdPartyCallController.SetAgentStateParameters();
p.Device = ownerDevice.getDeviceIdAsString;
p.RequestedAgentState = ThirdPartyCallController.RequestedAgentState.AM_READY;
serviceProvider.getThirdPartyCallController.SetAgentState(p, null);

The trick is that you must always reference the agent via his phone, not his AgentID which may seem a bit counter-intuitive.

You had a question about WorkMode.AutoIn in your code snippet. AutoIn does not affect the initial state of the agent. It means that the agent will become ready immediately after each call ends. By default (or ManualIn) the agent goes into After Call Work (ACW) state after each call and must be made ready again by pressing the feature button, dialing the FAC or an application setting his state as above.

Martin
Ahmadqadri
Joined: Oct 8, 2018
Messages: 54
Offline
Thanks martin !!
Go to:   
Mobile view