Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Jay on February 16, 2010, 05:46:17 AM

Title: Monitor Agent login/logout State via Voice Platform SDK
Post by: Jay on February 16, 2010, 05:46:17 AM
Hi,

I am trying to connect to TServer via the Application Blocks and trying to monitor Agent State changes, i.e Agent Login, Agent Ready, Agent Not Ready and Agent Logout etc...

My Question here is, can I simply go ahead and register respective EventAgentXXXX handlers upon opening the protocol object or do I need to first get a list of DN's and then request for events against each DN to know which agent login and logout?

Any hints/suugestions!!!

-Jay
Title: Re: Monitor Agent login/logout State via Voice Platform SDK
Post by: imaki on February 16, 2010, 06:49:37 AM
You don't need to register each event against each dn. You only need to register all dns and all events, you want to see..

Tserver needs to know who is listening each dn, and application block(?) wants to know what events you want to receive.
Title: Re: Monitor Agent login/logout State via Voice Platform SDK
Post by: Jay on February 16, 2010, 07:38:50 AM
Thanks imaki..

Thanks for a quick reply.

So, how can i register all DN's, which I would like to monitor?

FYI-
So far my code has snippets to create a TServerConfiguration object, registered with ProtocolManagementServiceImpl of PMAB, openes the protocol manager object to conect to TServer and then had code to register event handlers to EventBrokerService. Just like the API described.

I also have code to monitor EventAgentLogin and EventAgentLogout, trying to get agentId and associated DN.

- Jay
Title: Re: Monitor Agent login/logout State via Voice Platform SDK
Post by: imaki on February 16, 2010, 01:07:49 PM
One way is to write all by hand. The second is to use ConfigurationSDK, and get list of all dns from configserver..

If you mean, that how to register dn itself. Pick up the VoicePlatformSDK example, and find the loginbuttonhandler.

There you can find this:
..
  RequestRegisterAddress requestRegisterAddress = RequestRegisterAddress.Create(thisDn, RegisterMode.ModeShare, ControlMode.RegisterDefault, AddressType.DN);

  int uniqueId = GenerateUniqueId();
  requestRegisterAddress.ReferenceID = uniqueId;

  mProtocolManager[tServerName].Send(requestRegisterAddress);
..

Hopefully this is something you look after..
Title: Re: Monitor Agent login/logout State via Voice Platform SDK
Post by: Jay on February 17, 2010, 04:44:51 AM
Well, I am trying to just listen and log the events from all the phones, which are already available in a contactcenter/bpo using the Platform SDK.

- Jay
Title: Re: Monitor Agent login/logout State via Voice Platform SDK
Post by: Jay on February 17, 2010, 02:21:32 PM
Imaki,

Is RequestRegisterAddress is used to register a new DN into genesys system or can i use to monitor an already existing DN?

Thanks
- Jay
Title: Re: Monitor Agent login/logout State via Voice Platform SDK
Post by: René on February 17, 2010, 03:54:58 PM
Hi Jay,

RequestRegisterAddress is a request telling to TServer that your application wants to be notified about operations/status related to specified DN. If TServer itself hasn't registered that DN on the switch then it will do it. But be careful because TServer can be configured to not allow registration of DNs that are not present in Genesys configuration (CME).

R.

Title: Re: Monitor Agent login/logout State via Voice Platform SDK
Post by: Jay on February 17, 2010, 05:12:04 PM
Cool...

That is what I want it to do.

I am just intrested in monitoring an existing DN's operations/statuses.

Thank you...Unfortunate thing is that, i dont have a genesys environment as of now, just codeing in dark.

Expecting to have the environment soon...

Will update you guys with my findings...

Thank you again...
- Jay
Title: Re: Monitor Agent login/logout State via Voice Platform SDK
Post by: Jay on February 21, 2010, 03:53:33 PM
Thank you Guys,

I was able to receive both Agent and Call state event msg's from TServer.

Adios
Jay