Author Message
EsmeraldaH
Joined: May 24, 2018
Messages: 28
Offline
Hello,
I am using the GetPhysicalDeviceInformation(deviceId, null) request, to request the Agents Id(s) loggedin in an extension.
When server sends response, i want to also get the device id for the list of agents.
Is there any way i can take it from the this response?
I need to make a mapping between deviceId and agentId and in my scenario, this could be the only solution to make the mapping.

Thank you in advance.
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Online
If you are using the .Net SDK, the response will come in a GetPhysicalDeviceInformationResponseArgs to your callback method. The method GetPhysicalDeviceInformationResponseArgs.getOtherLogicalDeviceList() will return a list of Strings. I think there will only ever be a maximum of one string. This string contains the Agent ID. You will need to check the exact format of the Agent ID but I think it will look like a Third Party Device ID (AgentID:SwitchName::0).

The Java SDK should work in a similar manner.

Martin
EsmeraldaH
Joined: May 24, 2018
Messages: 28
Offline
Yes Martin, that's exactly what i am doing.
I do receive the agent ID from server's response.
The point is that i am monitoring several VDNs. When a call is answered, i get the "OnDeliveredEvent" and on that event i can get the device ID. Using that device ID i send a request to the server to give me the agent ID for that device ID.

When server responds and i get the agent ID i also want to have the device ID, to which this agent ID belongs to..
And the GetPhysicalDeviceInformationResponseArgs doesn't return the device ID so this is where it gets complicated ..
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Online
Assuming you are using the .Net SDK, you can use the deviceID as the userState object in GetPhysicalDeviceInformation(). When the response is returned, use GetPhysicalDeviceInformationResponseArgs.getUserState to retrieve it.

Martin
EsmeraldaH
Joined: May 24, 2018
Messages: 28
Offline
Okay, it was so simple like this.
Thank you very much Martin, as always very helpful.
Go to:   
Mobile view