Create a CTI Control
To manage agent states and call states, computer telephony integration (CTI) scenarios require the following user interface (UI) controls:
Agent state management control: Displays the current state of the agent within a User Interface Integration (UII) desktop (such as Unified Service Desk. This control doesn’t need to be tied to the CTI system, but it allows you to map CTI agent states with the current agent state, which is the visual state of the agent desktop.
Call control: Provides buttons that the agent can use to make a call, answer a call, put a call on hold, transfer a call to another agent, or hang up.
Both of these controls are normal UII hosted controls that inherit from either the HostedControl or HostedWpfControl class. You can also choose to merge both the controls into a single UII hosted control. More information: Use UII hosted controls with Unified Service Desk
Interfaces for implementing a CTI Control
Use the following interfaces to implement the user interface of a CTI Control.
The ICtiAgentStateControl interface is a specialized interface for describing a hosted control that is used for processing and/or displaying agent state information. This interface contains the Boolean) method that’s used to set the state of an agent.
The IDesktopUserActionsConsumer interface is not specific to CTI, but it is typically used by the CTI Controls to provide access to desktop operations. It has two members:
DesktopLoadingComplete: Raised when the desktop has completed loading. This is raised in a separate thread from the main desktop UI thread.
IDesktopUserActions): Used by the desktop loader to set a pointer to itself in the hosted control that implemented the ICtiEnabledControlConsumer interface. It is the pointer to the desktop interface (shell).
By implementing this interface, you get access to all user actions, as shown in the following example.
bool AppExistsInUI(string applicationName); bool CloseDynamicApplication(string applicationName); bool CloseSession(); bool CloseSession(Session sessionToClose); bool CreateDynamicApplication(string applicationName); WorkflowData GetCurrentWorkflowState(); bool SetFocusOnApplication(string applicationName); string UserDefinedCommand(string command, string request);
This interface has method definitions to perform following functions:
Object): Called by UII when a control that implements this interface is initialized.
SessionControllerEventArgs): Called by UII when a session is closing.
Configure the CTI Control hosted control in Unified Service Desk
Sign in to Unified Service Desk Administrator.
Select Hosted Controls under Basic Settings.
Select + New.
On the New Hosted Control page, specify the following values:
Field Value Name Specify a name. Unified Service Desk Component Type CCA Hosted Application Hosted Application Type Hosted Control Application is Global Checked Display Group CtiPanel Adapter Use No Adapter
Select the Hosting tab, and specify the following:
Field Value Assembly URI This is the name of your assembly (.dll) file that you built in the previous step. Assembly Type This is the name of your assembly followed by a dot, and then the class name of your CTI Control. For example, if your assembly (dll) name is
MyCtiControl, and the name of the class of your CTI project is
CtiControl, type the following in this field:
Select Save to create the hosted control.