Table Of Contents
CTITest Utility Program
This chapter describes the CTITest utility program, and the associated utility programs DispCTI and dumplog. It includes:
•An overview of CTITest
•Instructions on how to set up CTITest
•The CTITest command set
•Capturing and displaying events (DispCTI)
•Using dumplog to view server information
CTITest is a utility program that can be used in place of an interactive CTI client for debugging or demonstration purposes.
CTITest is a console program that runs in a window and displays CTI events to the screen. Depending on how CTITest is configured, it attaches to the CTI Server via a socket connection and then displays either all the events that are occurring on the switch (simulating a CTI Bridge client application) or only the events which pertain to a single desk top (simulating an agent workstation client application).
CTITest shows you every event that your integrating application receives. If CTITest has the same configuration that your application does, then the expected events and switch behavior will be seen in the CTITest program.
The CTITest program can be found in the tools directory of the Cisco CTI CD.
CTITest Directory Setup
We recommend that you make a new directory for just the CTITest program and trace DLL:
Step 1 Make a new directory. Give it any name you like; for example, c:\program files\geotel\cti desktop\ctitester.
Step 2 Copy the CTITest.exe program from the CD into the newly created \ctitester directory.
Step 3 Copy the icrmsgs.dll library from the CD into the \ctitester directory.
Creating a Shortcut
You may find it helpful to create a shortcut. This allows you to easily start up the application and have a standard working directory that all your capture files will go to.
To create a shortcut:
Step 1 Right-click CTITest.exe and select Create Shortcut. This creates the shortcut.
Step 2 Drag-and-drop the shortcut to wherever you want it; for example, to your desktop.
Step 3 Change the name of the shortcut, if you wish.
Step 4 Right-click the shortcut icon and select Properties.
Step 5 Select the Shortcut tab.
Step 6 The Target field contains the complete path of your file. If you intend to have more than one version of CTITest, include a profile name, so as to retain a particular configuration for each of the versions. (If you are just using one version of CTITest, no profile name is necessary, since the most recent configuration of CTITest will automatically be preserved.) Assuming our example path, and that you want to use all as the profile name, the Target field entry should be: c:\program files\geotel\cti desktop\ctitester\ctitest.exe /p all
Step 7 Click OK.
No command line arguments are required to start CTITest. You can double-click the shortcut you created in the preceding section to start the application.
The screen that appears will look something like the following.
Figure 5-1 CTITest Initial Screen
To increase the height or width of the screen buffer:
Step 1 Right-click the icon in the upper-left corner of the title bar (to the left of BobC in Figure 5-1).
Step 2 Select Properties.
Step 3 Select the Layout tab.
Step 4 Edit the height and width of the screen buffer size as you wish. (An initial value of 9999 for the height is reasonable.)
Step 5 Click OK.
Step 6 Check the Modify shortcut option if you want to permanently change the size of the screen buffer; check the current window option if you only want to change the size for the current session.
Step 7 Click OK.
There are basically only a handful of items that need to be configured. These configurations are retained in the registry so that this configuration setup need only be performed once. The next time that CTITest is started, the profile defaults to the last used settings.
Step 1 You need to configure the IP address and port number of the CTI Server by using the following command:
config /hostA ctiserver_hostname /portA ctiserver_portnumber
config /hostA CiscoHost /portA 42027
You should see a change on the CONFIG line immediately.
If you are using CTISim on your computer, rather than using a real CTI Server, you would enter:
config /hostA localhost /portA 199
Step 2 Next you need to configure the service mode in which you will interact with the CTI Server. These modes are:
•ALL_EVENTS service mode. All the events for all stations will be delivered to the CTITest application. This would be used for simulating a CTI Bridge client.
•CLIENT_EVENTS service mode. Only the events for a specific desktop station will be delivered to the CTITest application. This would be used for simulating an agent workstation client.
•CALL_DATA_UPDATE service mode. Allows for data about the call to be sent to the CTITest program.
•CLIENT_CONTROL service mode. Allows CTITest to control the state of the phone or the agent.
Typical CTI Bridge service configuration:
config /service ALL_EVENTS+CALL_DATA_UPDATE+ CLIENT_CONTROL
Typical desktop client service configuration:
config /service CLIENT_EVENTS+CALL_DATA_UPDATE+ CLIENT_CONTROL
Similarly you can, if you wish, configure the mask of call event messages desired and the mask of agent state events desired. The list of possible values can be obtained by typing help in place of the service or mask, for example:
config /callmask /help
Step 3 If you need to, you can change the CTI Server protocol version—discussed in the "CTI Server Protocol Versions" section. For example, to change to protocol version 3, enter:
config /version 3
Configuring the Agent
Next, if applicable, enter configuration information for a specific agent and telephone set. This is normally used with a client-mode CTI Bridge application.
agent /periph 1 /ext 23901 /id 23955 /instrument 23901
This profile will be retained within the registry.
Opening and Closing the CTI Server Connection
The open command performs a socket connection to the CTI Server and then issues the appropriate command to the CTI Server to establish messaging communication.
By default, CTITest repeatedly attempts to open a session until it either opens a session, or the close or quit command is given. CTITest automatically attempts to switch to the other side following a failure of the CTI Server.
When a session is opened, all messages received from the CTI Server are displayed on the screen. The messages can be tailored by using the display_calls and display_agents commands: long displays all message fields, short displays a one line subset of message fields, off displays no message.
CTITest Command Set
Some examples, using the following commands, are given in the "Scenario Examples" section.
The following examples would be typed into the CTITest application. The values assumed for the examples are:
The general syntax for the examples is found in the "CTITest Command Set" section.
agent_login 23851 23852 /periph 1 /instrument 23801
login 23851 23852 /periph 1 /instrument 23801
agent_logout /agentID 23851 /periph 1
logout /agentID 23851 /periph 1
Ready to Accept Calls
agent_ready /periph 1 /instrument 23801
ready /periph 1 /instrument 23801
Making a Call
Making a call to the phone 23802 from agent 23851 on set 23801.
make_call 23802 /periph 1 /instrument 23801or
mc 23802 /periph 1 /instrument 23801
Answering a Call
The callid is available from the output typically in the CALL_DELIVERED_EVENT displayed when the call is begun.
answer_call /periph 1 /callid 487.23801
answer /periph 1 /callid 487.23801
Clearing a Call
clear_call /periph 1 /callid 487.23801
clear /periph 1 /callid 487.23801
Event Capture Facility
The CTITest program has a capture command that writes the messaging information to a file to be looked at later, or to be used to document behavior. The general syntax for capture is found in the "CTITest Command Set" section.
The CTITest program will write the file in the working directory ("start in") defined in the shortcut for the CTI program. The event capture file is in binary format that can be read by the DispCTI utility.
To turn on the capture facility, enter:
capture /file filename
To turn off the capture facility, enter:
Displaying Captured Events: DispCTI
The DispCTI (Display CTI) program will convert binary event capture information and write it into human-readable ASCII text.
Note The DispCTI utility is only available when you have done a full ICM software/CTI Server installation. It is not available on the Cisco CTI CD.
In a command window, change to the directory where the capture file is located, then enter the following command if you want an output file:
dispcti capturefile_filename > output_filename
The DispCTI program writes to standard out. By redirecting the output to a file, you can use an editor to search or locate information within the file.
Sample Output from DispCTI
Example 5-1 DispCTI Release 2.5, Build 0303509:46:33 Trace: Playback active from the start of file Example.cap09:46:33 Trace: Capture session started at 12/31/1998 09:59:16:23409:46:33 Trace: First message in playback was recorded at time 12/31/1997 09:59:19:158ELAPSED_TIME DELTA ENTERPRISE_CTI_MESSAGE_CONTENTS0:00:00.000 0.000 OPEN_REQ (InvokeID:0x5000000 VersionNumber:3IdleTimeout:4294967295 PeripheralID:2 ServiceMask:0x7CallMsgMask:0x7ffff AgentStateMask:0x3ff Reserved:0Reserved:0 Reserved:0 ClientID:"Example"ClientPassword:<0x> ClientSignature:"MyWorkstation"AgentID:"1125" )0:00:00.000 0.000 OPEN_CONF (InvokeID:0x5000000 ServiceMask:0x7PGStatus:NORMAL PeripheralType:AspectAgentState:AVAILABLE AgentExtension:"125"AgentID:"1125" AgentInstrument:"125" )0:00:10.335 10.335 BEGIN_CALL_EVENT (PeripheralID:2 PeripheralType:AspectNumCTIClients:0 CallType:CALLTYPE_PREROUTE_ACD_INConnectionDeviceIDType:CONNECTION_ID_DYNAMICConnectionCallID:4 ConnectionDeviceID:"0"ANI:"9782755100" DNIS:"0006"DialedNumber:"8002755010" CED:"1"RouterCallKeyDay:145000 RouterCallKeyCallID:34320231CallVariable1:"1234567" CallVariable2:"0"CallVariable3:"0006" CallVariable5:"26000 123-45-6789Not Valid " CallVariable6:"1001123-45-678926000000000038404LPCFAA" CallVariable7:"THIBAULT,JOHN C. " CallVariable8:"CISCOTESPHE " )0:00:10.736 0.401 CALL_DELIVERED_EVENT (PeripheralID:2 PeripheralType:AspectConnectionDeviceIDType:CONNECTION_ID_DYNAMICConnectionCallID:4 LineHandle:0LineType:LINETYPE_INBOUND_ACD ServiceNumber:1ServiceID:1AlertingDeviceType:DEVID_DEVICE_IDENTIFIERCallingDeviceType:DEVID_TRUNK_IDENTIFIERCalledDeviceType:DEVID_DEVICE_IDENTIFIERLastRedirectDeviceType:DEVID_NONELocalConnectionState:LCS_ALERTING EventCause:CEC_NONEConnectionDeviceID:"0" AlertingDeviceID:"125"CallingDeviceID:"1000" CalledDeviceID:"125" )0:00:10.946 0.210 AGENT_STATE_EVENT (PeripheralID:2 PeripheralType:AspectSkillGroupState:TALKING StateDuration:0SkillGroupNumber:1 SkillGroupID:21SkillGroupPriority:0 AgentState:TALKINGClientSignature:"MyWorkstation" AgentID:"1125"AgentExtension:"125" AgentInstrument:"125" )0:00:11.036 0.090 CALL_DATA_UPDATE_EVENT (PeripheralID:2PeripheralType:Aspect NumCTIClients:1CallType:CALLTYPE_PREROUTE_ACD_INConnectionDeviceIDType:CONNECTION_ID_DYNAMICConnectionCallID:4NewConnectionDeviceIDType:CONNECTION_ID_DYNAMICNewConnectionCallID:4 ConnectionDeviceID:"0"NewConnectionDeviceID:"0"CTIClientSignature:"MyWorkstation"CTIClientTimestamp:0x34aaa421 (12/31/97 14:59:29) )0:00:11.226 0.190 CALL_ESTABLISHED_EVENT (PeripheralID:2PeripheralType:AspectConnectionDeviceIDType:CONNECTION_ID_DYNAMICConnectionCallID:4 LineHandle:0LineType:LINETYPE_INBOUND_ACD ServiceNumber:1ServiceID:1 SkillGroupNumber:1 SkillGroupID:21SkillGroupPriority:0AnsweringDeviceType:DEVID_DEVICE_IDENTIFIERCallingDeviceType:DEVID_TRUNK_IDENTIFIERCalledDeviceType:DEVID_DEVICE_IDENTIFIERLastRedirectDeviceType:DEVID_NONELocalConnectionState:LCS_CONNECT EventCause:CEC_NONEConnectionDeviceID:"0" AnsweringDeviceID:"125"CallingDeviceID:"1000" CalledDeviceID:"0006" )0:00:40.308 29.082 CALL_CLEARED_EVENT (PeripheralID:2 PeripheralType:AspectConnectionDeviceIDType:CONNECTION_ID_DYNAMICConnectionCallID:4 LocalConnectionState:LCS_NONEEventCause:CEC_NONE ConnectionDeviceID:"0" )0:00:40.418 0.110 AGENT_STATE_EVENT (PeripheralID:2 PeripheralType:AspectSkillGroupState:WORK_READY StateDuration:0SkillGroupNumber:1 SkillGroupID:21SkillGroupPriority:0 AgentState:WORK_READYClientSignature:"MyWorkstation" AgentID:"1125"AgentExtension:"125" AgentInstrument:"125" )0:00:40.538 0.120 CALL_DATA_UPDATE_EVENT (PeripheralID:2PeripheralType:Aspect NumCTIClients:0CallType:CALLTYPE_PREROUTE_ACD_INConnectionDeviceIDType:CONNECTION_ID_DYNAMICConnectionCallID:4NewConnectionDeviceIDType:CONNECTION_ID_DYNAMICNewConnectionCallID:4 ConnectionDeviceID:"0"NewConnectionDeviceID:"0" CallWrapupData:"Autowrap #6by Example" )0:00:40.548 0.010 SET_CALL_DATA_REQ (InvokeID:0x5000001 PeripheralID:2ConnectionDeviceIDType:CONNECTION_ID_DYNAMICConnectionCallID:4 ConnectionDeviceID:"0"CallWrapupData:"Autowrap #6 by Example" )0:00:40.659 0.111 SET_CALL_DATA_CONF (InvokeID:0x5000001 )0:00:41.600 0.941 RELEASE_CALL_CONF (InvokeID:0x5000002 )0:00:41.600 0.000 RELEASE_CALL_REQ (InvokeID:0x5000002 PeripheralID:2ConnectionDeviceIDType:CONNECTION_ID_DYNAMICConnectionCallID:4 ConnectionDeviceID:"0" )0:00:45.375 3.775 END_CALL_EVENT (PeripheralID:2 PeripheralType:AspectConnectionDeviceIDType:CONNECTION_ID_DYNAMICConnectionCallID:4 ConnectionDeviceID:"0" )0:00:45.415 0.040 AGENT_STATE_EVENT (PeripheralID:2 PeripheralType:AspectSkillGroupState:AVAILABLE StateDuration:0SkillGroupNumber:1 SkillGroupID:21SkillGroupPriority:0 AgentState:AVAILABLEClientSignature:"MyWorkstation" AgentID:"1125"AgentExtension:"125" AgentInstrument:"125" )0:00:51.324 5.909 CLOSE_REQ (InvokeID:0x5000003 Status:E_CTI_NO_ERROR )0:00:51.344 0.020 CLOSE_CONF (InvokeID:0x5000003 )09:46:34 Trace: Playback session complete from playback file Example.cap.09:46:34 Trace: Closing playback file Example.cap. Current file position 1498
The dumplog utility is a program that produces an ASCII text file from the EMS log file for any process on an ICM software system. All ICM software processes use the EMS logging facility for logging information. If you need to see the information regarding a server, you would use the dumplog facility.
Note The dumplog utility is only available when you have done a full ICM software/CTI Server installation. It is not available on the Cisco CTI CD.
For help on dumplog, enter the following in a command window:
To use the facility, you need to be in the logfile directory.
To navigate to the CTI Server Gateway (CG), you need to know the peripheral number of the CG. The following command changes to that directory:
cdlog customer_number CG_or_PG_number
cdlog MySystem CG2a
This should place you into the directory in the format:
\icr\ customer_number\ CG_or_PG_number\logfiles
In our example, this would be:
dumplog will produce a lot of information. We recommend using the switches to segment the time period you are interested in. For example:
dumplog ctisvr /bt 8:00
where 8:00 is the current time of the current day.