Author Message
SumitSharmaItneer
Joined: Jul 2, 2015
Messages: 6
Offline
Hi there,

I am using setAgentState method to update the agent state

int SetAgentState(SetAgentStateParameters param, object userState);

so the response of this method comes with an integer value.

can someone let me what is the use of that number? can I assume if it return true then the agent state got succesfully changed?

And is there any other way from SetAgentStateResponse to identify the agent state got changed?

thanks in advance!

Sumit Sharma
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Online
From the reference document, .../DMCC_net/dmcc-dotnet-sdk-7-0/Docs/html/Avaya.ApplicationEnablement.DMCC.ThirdPartyCallController.SetAgentState.htm:

Return Value: The Invoke ID of the XML message sent to the server.

Each request the application makes to AE Services gets a unique Invoke ID which allows the application to match requests with responses.

In order to see if the request succeeded or not, you will need to listen for the OnSetAgentStateResponse.

Martin
SumitSharmaItneer
Joined: Jul 2, 2015
Messages: 6
Offline
Thanks Martin,

I need the imidiatly know the agent state status, instead of listening in OnSetAgentStateResponse.

can we do that?
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Online
No. You must wait for the response from AE Services which is provided in the OnSetAgentStateResponse.

Martin
Ahmadqadri
Joined: Oct 8, 2018
Messages: 54
Offline
Can you please provide an example where this response handler is used. I cant find any using the .net sdk release 7.1.1
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Online
I don't think there is an example. However, look at the PopupApp sample application. It will operate very like how the Call Control monitor is started:

RegisterCallback:
serviceProvider.getThirdPartyCallController.OnStartMonitorResponse += new ThirdPartyCallControlStartMonitorResponseHandler(getThirdPartyCallController_OnStartMonitorResponse);

Start Monitor (in your case SetAgentState()):
serviceProvider.getThirdPartyCallController.StartMonitor(DeviceId, CallControlEvents, null);

Define Callback method:
getThirdPartyCallController_OnStartMonitorResponse(object Sender, ThirdPartyCallController.StartMonitorResponseArgs e)

Martin
Go to:   
Mobile view