Cisco Cisco Computer Telephony Integration OS 8.5 Guide Du Développeur
4-24
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 8.0(1)
Chapter 4 Building Your Application
Connecting to the CTI OS Server
When to Use Agent Mode
You use Agent mode for connections when the client application must log in and control a specific agent.
When in Agent mode, the connection also receives call events for calls on that agent’s instrument, as
well as system events.
When in Agent mode, the connection also receives call events for calls on that agent’s instrument, as
well as system events.
How to Select Agent Mode
To select Agent mode for the connection, in the OnConnection() event:
Step 1
Set properties for the agent.
Note
The properties required for the agent depend on the type of ACD you are using. The
following example demonstrates the required properties for Unified CC users.
following example demonstrates the required properties for Unified CC users.
Step 2
Set the agent for the Session object to that Agent object.
Note
In the Java CIL only: If the SetAgent() method is called on a session in which the current
agent is different than the agent parameter in the SetAgent() method, the Java CIL
automatically calls the Disconnect() method on the current session instance, generating an
OnCloseConnection() event, then attempts to reconnect, generating an OnConnection()
event. Then the new agent is set as the current agent.
agent is different than the agent parameter in the SetAgent() method, the Java CIL
automatically calls the Disconnect() method on the current session instance, generating an
OnCloseConnection() event, then attempts to reconnect, generating an OnConnection()
event. Then the new agent is set as the current agent.
The following example, which assumes the Session object has been created and connected to the CTI
OS Server, demonstrates this task in
OS Server, demonstrates this task in
Java:
void OnConnection(Arguments rArgs) {
/* 1. Create and agent and set the required properties. */
Agent agent = new Agent();
agent.SetValue(CtiOs_IKeywordIDs.CTIOS_AGENTID, "275");
agent.SetValue(CtiOs_IKeywordIDs.CTIOS_PERIPHERALID, "5002");
/* 2. Set the session's agent */
int returnValue = session.SetAgent(agent);
}
When successful, the SetAgent() method generates the following events:
•
OnQueryAgentStateConf()
•
OnSetAgentModeConf()
•
OnSnapshotDeviceConf(), if the agent is already logged in
•
OnSnapshotCallConf(), if there is a call and the agent is already logged in
•
OnCTIOSFailureEvent()
When to Use Monitor Mode
Applications that need to receive all events that CTI OS Server publishes, or a specified subset of those
events should use Monitor Mode. Monitor mode applications may receive events for calls, multiple
agents, or statistics. The session receives specific events based on the event filter specified when setting
the session to Monitor mode.
events should use Monitor Mode. Monitor mode applications may receive events for calls, multiple
agents, or statistics. The session receives specific events based on the event filter specified when setting
the session to Monitor mode.