Siebel Communications Server Administration Guide > Upgrading from Version 6.x > Using Siebel Scripts from Version 6.x >

CTIService Object Type


The methods of the CTIService object type are described in this section.

For descriptions of the CTIData object type, see CTIData Object Type.

Scripting examples using Siebel VB and Siebel eScript follow.

The CTIService object type provides the features of the Siebel CTI integration. This object is created when the Siebel application is running with the enabled CTI option. This object type has methods that allow call control, CTI event handing, and access to CTI information.

The CTI service provides access to the communications commands by name. The communications commands and their names are specific to the particular CTI integration and are fully described in the command tables for your supported CTI middleware found in Using Siebel CTI Connect. Also refer to documentation from the middleware vendor.

GetCTIService

Application.GetCTIService -> CTIService

The GetCTIService method returns the CTIService object if the Siebel application is running with CTI enabled. If CTI is not enabled, then it returns Nothing.

IsCommandEnabled

CTIService.IsCommandEnabled command_name -> return_value

IsCommandEnabled returns 0 if the specified communications command is currently enabled and returns 1 if the command is disabled. For example, the AnswerCall command is enabled only when the phone is ringing.

IsCommandChecked

CTIService.IsCommandChecked command_name -> return_value

IsCommandChecked returns 1 if the state of the specified communications command is triggered; otherwise it returns 0. For example, when an agent is in the Not Ready state, the command ChangeNotReadyState is triggered and IsCommandChecked returns 1.

InvokeCommand

CTIService.InvokeCommand command_name [, parameter]

Invokes the device command (for a communications driver) by name, with an optional parameter.

InvokeCommandWithData

CTIService.InvokeCommandWithData command_name [, ctiDataObject]

Invokes the device command by name, with the optional ctiDataObject parameter. The ctiDataObject parameter can be used to attach user-defined data to the current call, for instance when you are transferring a call or initiating a call. It can also be used to pass multiple parameters to the command when this is required.

GetCurrentCallData

CTIService.GetCurrentCallData -> CTIData

Returns a read-only copy of the CTIData object for the current call. The returned object can be used to retrieve information about the current call, such as the CTI fields ANI, DNIS and any other switch, middleware, or user-defined data that is associated with the call.

CreateData

CTIService.CreateData -> CTIData

Creates and returns the new CTIData object. This object can be used to specify parameters for the InvokeCommandWithData method. Use this method if you need to change fields on the active call object.

NotifyEventHandlerBlocking

CTIService.NotifyEventHandlerBlocking

This method should be called before beginning a lengthy operation or interaction with the user through the user interface of the Siebel application. This will prompt Siebel CTI to complete some unfinished operations.

For example, suppose there is a Siebel VB or Siebel eScript script associated with the Answer Call button in the communications toolbar. When the phone rings and the agent clicks the Answer Call button, Siebel CTI will call the Siebel VB or Siebel eScript handler first and answer the phone only after that. Then a Service Request window can be invoked showing the current service request for the caller.

If the Siebel VB or Siebel eScript code internally performs some lengthy operation, then the agent may want to pick up the phone before the script ends. Calling the NotifyEventHandlerBlocking method accomplishes this and immediately connects the agent with the caller.


 Siebel Communications Server Administration Guide 
 Published: 23 June 2003