CTIOS Toolkit Blogs CTIOS Toolkit Blogs
CTIOS 8.5(2) provides support for .NET Framework 3.5
Cisco CTI OS .NET Toolkit Release 8.5(2) introduces support for application development using Microsoft Visual Studio .NET 2010 and the .NET 3.5 framework. Existing .NET 2.0 controls do not need to be modified. Additionally, the CTI .NET CIL supports Visual Studio .NET 2010.

Note that Visual Studio 2010 by default uses Framework 4.0 You must change the framework for your CTIOS 8.5(2) .NET Cil project to use the .NET 3.5 framework.

UCCE 8.5(2) Release Notes
Filter mode skill group statistics sample in Java
This main.java sample demonstrates creating a filter mode application to receive skill group statistics.

Here's the source code:

import com.cisco.cti.ctios.cil.CtiOsSession;
import com.cisco.cti.ctios.cil.CtiOs_Enums;
import com.cisco.cti.ctios.util.CtiOs_IKeywordIDs;
import com.cisco.cti.ctios.cil.CtiOs_Enums.SubscriberList;
import com.cisco.cti.ctios.cil.Arguments;
import com.cisco.cti.ctios.util.CtiOs_IKeywordIDs;


import com.cisco.cti.ctios.cil.IGenericEvents;

public class Main implements CtiOs_IKeywordIDs,
CtiOs_Enums.CilError,
CtiOs_Enums.EventID,
CtiOs_Enums.AgentState,
CtiOs_Enums.ButtonEnablement
{

// connection parameter
final String CTIOSA = "localhost";
final int PORTA = 42028;
final String CTIOSB = "localhost";
final int PORTB = 42028;
final int HEARTBEAT = 5;

// skill group parameter
final String SKILL_GRP_Num = "1001"; // use your configured skill group number
final String PERI__ID = "5000"; // use your configured peripheralid

private CtiOsSession session = null;



// main() method execution starts from here
public static void main(String[] args) {

// create and initialise Main class obj
Main testRun = new Main();
}
/** Creates a new instance of Main */
public Main() {
// create new CTIOS session
session = new CtiOsSession();

// create CTI events listner
CTIEventListner eventListner = new CTIEventListner();
// eventListner = new EventSink();

// add event listner to ctios session.
// Here we register to receive agent and session events; therefore,
// in the AddEventListener() method you must use as parameters the field
// CtiOs_Enums.SubscriberList.eAgentList and CtiOs_Enums.SubscriberList.eSessionList.
// Or you can use the CtiOs_Enums.SubscriberList.eAllInOneList.
session.AddEventListener(eventListner,SubscriberList.eAllInOneList);

// set up values of connection parameter
Arguments connectionParam = new Arguments();
connectionParam.SetValue(CtiOs_IKeywordIDs.CTIOS_CTIOSA, CTIOSA);
connectionParam.SetValue(CtiOs_IKeywordIDs.CTIOS_PORTA, PORTA);
connectionParam.SetValue(CtiOs_IKeywordIDs.CTIOS_CTIOSB, CTIOSB);
connectionParam.SetValue(CtiOs_IKeywordIDs.CTIOS_PORTB, PORTB);
connectionParam.SetValue(CtiOs_IKeywordIDs.CTIOS_HEARTBEAT, HEARTBEAT);

// connect to server
System.out.println("Connecting to server..");
System.out.println("Connection parameters are: "+ connectionParam.toString());
int returnCode = session.Connect(connectionParam);
System.out.println("return code for connect is: " +returnCode);

//Must wait for on connection event to set message filter


}





class CTIEventListner implements IGenericEvents, CtiOs_IKeywordIDs,
CtiOs_Enums.CilError,
CtiOs_Enums.EventID,
CtiOs_Enums.AgentState,
CtiOs_Enums.ButtonEnablement
{
public void SetFilter(){
// set message filter parameter
int returnCode;

// These are some filters I tried. Try your own.
//String filter = S_FILTERTARGET + "=" + eOnNewSkillGroupStatisticsEvent + "," + eAgentStateEvent;
//String filter = S_MESSAGEID + "=" + eAgentStateEvent+","+eOnNewAgentStatisticsEvent;
//String filter = S_MESSAGEID + "=*" ;
//filter = filter + ";"+ S_AGENTID + "=" + "5000";
//filter = filter + ";" + S_FILTERTARGET + "=" + "SkillGroupStats";

// Here's the actual filter for SkillGroupStats
String filter = S_FILTERTARGET + "=" + "SkillGroupStats";

Arguments eventFilterParam = new Arguments();
eventFilterParam.SetValue(CtiOs_IKeywordIDs.CTIOS_FILTER, filter);

// set message filter
System.out.println("Setting message filter..");
System.out.println("Filter parameters are: " +eventFilterParam);
returnCode = session.SetMessageFilter(eventFilterParam);
System.out.println("Set Message Filter rc = " + returnCode);

// set up skill group and peripheral arguments
Arguments skillGrpParam = new Arguments();
skillGrpParam.SetValue(CtiOs_IKeywordIDs.CTIOS_SKILLGROUPNUMBER, SKILL_GRP_Num);
skillGrpParam.SetValue(CtiOs_IKeywordIDs.CTIOS_PERIPHERALID, PERI__ID);

//Enable skill group statistics
System.out.println("Enabling skill group statics..");
System.out.println("Skill group parameters are: " +skillGrpParam.toString());
returnCode = session.EnableSkillGroupStatistics(skillGrpParam);
System.out.println("Enable Skill Group Statistics rc = " + returnCode);
}

// this is the event handler we register to handle events
public void OnEvent(int iEventID, Arguments arguments) {
switch (iEventID) {
case eOnConnection:
System.out.println("**eOnConnection event received");
SetFilter();
break;
case eOnConnectionFailure:
System.out.println("**eOnConnectionFailure event received");
break;
case eOnNewSkillGroupStatisticsEvent:
System.out.println("***eOnNewSkillGroupStatisticsEvent event received");
System.out.println("Skill group info: "+arguments.toString());
System.out.println("PeripheralID: "+ arguments.GetValueString(CtiOs_IKeywordIDs.CTIOS_PERIPHERALID));
System.out.println("AgentsNotReady: "+ arguments.GetValueString(CtiOs_IKeywordIDs.CTIOS_AGENTSNOTREADY));
System.out.println("AgentsNotReady: "+ arguments.GetValueString("AgentsNotReady"));
System.out.println("SkillGroupID: "+ arguments.GetValueString("SkillGroupID"));
System.out.println("TimerInterval: "+ arguments.GetValueString("TimerInterval"));
System.out.println("Statistics: " + arguments.GetValueArray("Statistics"));
Arguments args = arguments.GetValueArray("Statistics");
System.out.println("Statistics: " + args.toString());
System.out.println("AgentsNotReady: " + args.GetValueString("AgentsNotReady"));
break;
case eAgentStateEvent:
System.out.println("***eAgentStateEvent event received");
System.out.println("AgentStateInfo: "+arguments.toString());
break;

case eOnHeartbeat:
System.out.println("HeartBeat event received");
break;
default:
System.out.println("***Unfiltered event received");
System.out.println("Event arguments: " + arguments.toString());

}

}


}

} // Class Main


Here's the output:

Connecting to server..
Connection parameters are: (CtiOsA:localhost CtiOsB:localhost PortA:42028 PortB:
42028 Heartbeat:5)
return code for connect is: 1
***Unfiltered event received
Event arguments: (SystemEventID:15 FailureCode:10 StatusBarMessage:Offline)
**eOnConnection event received
Setting message filter..
Filter parameters are: (Filter:FilterTarget=SkillGroupStats)
Set Message Filter rc = 1
Enabling skill group statics..
Skill group parameters are: (PeripheralID:5000 SkillGroupNumber:1001)
Enable Skill Group Statistics rc = 1
***Unfiltered event received
Event arguments: (EventTime:0 ConnectionMode:2)
***eOnNewSkillGroupStatisticsEvent event received
Skill group info: (InvokeID:does not exist PeripheralID:5000 SkillGroupNumber:10
01 SkillGroupID:4294967295 UniqueObjectID:skillgroup.5000.1001 MessageID:eOnNewS
killGroupStatisticsEvent Statistics:(HandledCallsToday:0 HandledCallsTalkTimeTod
ay:0 AgentsLoggedOn:0 AgentsNotReady:0 AgentsReady:0 AgentsTalkingIn:0 AgentsTal
kingOut:0 AgentsTalkingOther:0 AgentsWorkNotReady:0 AgentsWorkReady:0 AgentsBusy
Other:0 AgentsReserved:0 AgentsHold:0 RouterCallsQNow:0 LongestRouterCallQNow:0)
TimerInterval:10)
PeripheralID: 5000
AgentsNotReady: null
AgentsNotReady: null
SkillGroupID: 4294967295
TimerInterval: 10
Statistics: (HandledCallsToday:0 HandledCallsTalkTimeToday:0 AgentsLoggedOn:0 Ag
entsNotReady:0 AgentsReady:0 AgentsTalkingIn:0 AgentsTalkingOut:0 AgentsTalkingO
ther:0 AgentsWorkNotReady:0 AgentsWorkReady:0 AgentsBusyOther:0 AgentsReserved:0
AgentsHold:0 RouterCallsQNow:0 LongestRouterCallQNow:0)
Statistics: (HandledCallsToday:0 HandledCallsTalkTimeToday:0 AgentsLoggedOn:0 Ag
entsNotReady:0 AgentsReady:0 AgentsTalkingIn:0 AgentsTalkingOut:0 AgentsTalkingO
ther:0 AgentsWorkNotReady:0 AgentsWorkReady:0 AgentsBusyOther:0 AgentsReserved:0
AgentsHold:0 RouterCallsQNow:0 LongestRouterCallQNow:0)
AgentsNotReady: 0
HeartBeat event received
Terminate batch job (Y/N)? y

C:\>
Cisco Live! London - Jan. 31-Feb 3, 2011


Cisco Developer Network will be presenting a CDN Developer Track at Cisco Live! London the week of January 31, 2011.

We are presenting technical sessions which highlight Application Programming interfaces (APIs) and Software Developer Kits (SDKs) for Cisco technologies such as Unified Communications, IOS, and Access Routing Technologies ¿ including the new Cisco Cius Application Development SDK ! You¿ll get technical insight into the available interfaces, hear from subject matter experts and learn about the benefits of becoming a Cisco developer.

Learn more about the new Cisco Live track for the Developer Network Program!

http://www.ciscolive.com/europe/attendees/education/dnp
Avoiding a Memory Leak in your CTIOS Filter mode application.
It is important if you are implementing a filter mode application that you include End Call events in your filter.

The end call events are recognized by the CIL (Client Interface Library) to know to release the call object. If you don't include the end call event in your filter, the CIL will not see that event (it will not be sent to the Client by the CTIOS Server) and consequently the CIL will not know to release the call object. This will cause the memory used by the CIL for call objects to continue growing, eventually crashing your application.
Showing 1 - 5 of 12 results.
Items per Page 5
of 3