Author Message
UmeshC
Joined: Apr 18, 2011
Messages: 89
Offline
Hi,

My team wants to check if particular agent id is logged-in on any station or not before calling addAgent method. Is there any JTAPI API for this? I haven't found in Avaya JTAPI doc.

Thanks & Regards,
Umesh
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Online
You can get from an Agent ID to the state of the agent using the following steps:

1. Address address = provider.getAddress()
2. Terminal terminal using address.getTerminals()
3. Agent agent using (AgentTerminal)terminal.getAgents()

If getAgents() returns null, the agent it not logged in

4. If the agent is logged in, (LucentAgent)agent.getStateInfo() returns the state of the logged-in agent.

Martin
UmeshC
Joined: Apr 18, 2011
Messages: 89
Offline
Thanks for reply Martin.
Above is to check if any agent is logged-in on given extension whereas we want to check if given agentid is already logged-in on which extension.

This I am already using to get agent state but we want to return station/extension where requested agent id is logged-in and that extension may be different from the requested extension.

e.g
- Agent requested with agentid=2001 and extension=1010 but agent already logged-in to extension 1014.
- in this case addAgent throws exception that "agent already logged-in to some other station" but we want to inform requested client that "agentid=2001 already logged-in to station 1014"

Can you suggest step to achieve above?

Thanks & Regards,
Umesh
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
according to the JTAPI Programmer's reference,
https://www.devconnectprogram.com/fileMedia/download/ad552f6a-a4dc-4b1b-a5c2-da5492d7ca1e

"The following TSAPI requests are currently un-implemented by this JTAPI implementation.
Therefore, there is no access to the private data for these TSAPI requests."

The table that follows includes "cstaQueryDeviceInfo" which would be the direct path to answer your need. There is the chance that the table is out of date. I don't see an alternative path (e.g. querying a split for logged in agents which may also return station extension info - it doesn't). The person I know who knows the most about JTAPI is on holiday till Jan 2, I will leave him a message to review this thread upon his return in the hopes he can be helpful.
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Online
Testing with the JTAPI Explorer, I see that Agent.getAgentID() returns the number of the station where the agent is logged in.

Martin
UmeshC
Joined: Apr 18, 2011
Messages: 89
Offline
Martin,

Agent.GetAgentId() returns Agent Id of the particular Agent object. We don't have object of Agent class here as we need to get this info before call addAgent() method.

We will wait for your JTAPT expert till 2nd Jan.

Thanks & Regards,
Umesh
MichaelHerman2
Joined: Jan 9, 2014
Messages: 102
Offline
Prior to calling Agent.getAgentID(), call AgentTerminal.getAgents().

Test it yourself with the JTAPI Exerciser.

1) Create a Provider
2) Create a Terminal object (using the Agent ID)
3) Call AgentTerminal.getAgents()
4) Call Agent.getAgentID()
UmeshC
Joined: Apr 18, 2011
Messages: 89
Offline
Thanks Michael.

This will give list of agents logged-in on requested terminal/extension.

I want to check if requested agentid is logged-in or not and if logged-in on which terminal/station/extension.

Thanks & Regards,
Umesh
MichaelHerman2
Joined: Jan 9, 2014
Messages: 102
Offline
As Martin pointed out, Agent.getAgentID() is returning the number of the station where the agent is logged in.

Please test it using the JTAPI Exerciser. If you continue to have any issues, please open a DevConnect technical support ticket and include the output/logs of your test.

Thank you.
Go to:   
Mobile view