" /> Need Help - Voice platform sdk- retreive Reason Codes from the switch of TServer - Genesys CTI User Forum

Author Topic: Need Help - Voice platform sdk- retreive Reason Codes from the switch of TServer  (Read 3456 times)

Offline srvishnu

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Advertisement
Hi

I am using voice platform sdk 7.6, I would need some help in regards of the logical scenario:
When the agent logs/registered, i need to fetch all the unavailable reason codes configured on the switch T server.

A sample program implemented for Ayava AIC:

public java.util.Map<String, String> retrieveUnavailableReasonCodes() throws CtiException {
java.util.Map<String, String> reasonCodes = new java.util.TreeMap<String, String> ();
CodesList cl = ctiSession.getAuxReasonCodes();
Collection col = (Collection)cl.getCodes();
Iterator iter = col.iterator();
while(iter.hasNext()) {
Code code = (Code)iter.next();
reasonCodes.put(code.getId(), code.getDisplayName());
return reasonCodes;
}

Here we use a "ctiSession" object to get the AuxReason codes.. Could you please guide me which genesys voice platform object would be helpfull in fetching the Reason Codes for unavailable configured in the genesys T server switch.

Could you kindly provide me a sample program for the following approach.

Thank You

Vishnu!
« Last Edit: June 10, 2009, 05:39:11 AM by srvishnu »

David Leam

  • Guest
I have a similar question, i wanna know how to get the Aux codes from T server after RequestRegisterAddress which i can use in a later functionality.

Offline srvishnu

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
From Victor.. Thank You Victor:)


This information is in the agent-related Event:

Key is : agent:TEventReasons
Value is a KV list of all the Reasons.

details are inside Genesys Agent Desktop .Net Toolkit Dev guide (section Getting Events)

To summarize:

com.genesyslab.ail.ws.KeyValue[] attrs = @event.attributes;

if (attrs != null)

{

String key;

Object value;

String reason;

for (int i = 0; i < attrs.Length; i++)

{

key = attrs.key;

value = attrs.value;

if ("agent:dnEventReason".Equals (key))

reason = value;

}


Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Srvishnu,

Are you really sure the code you posted is the right one? I'm not.. Why?

1/ You wrote that you need code for Voice Platform SDK but posted code uses Agent Desktop .NET Toolkit SDK (BTW that SDK is EOL now).

2/ You wrote that you want to get list of reason codes configured (enabled) on T-Server. Again, the code you posted here won't give you such information...

3/ Last note - agent:DnEventReason won't return you current AUX code - it is enum with 3 values - LOGGED_IN, STATUS_CHANGED, INFO_CHANGED.

R.