Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: srvishnu on June 09, 2009, 12:38:36 PM
-
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!
-
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.
-
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;
}
-
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.