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

Script Example: Making a Call


This section shows example Siebel VB or Siebel eScript scripts that use CTI objects to make a call and shows how to attach such a script to a communications command.

For more information about defining communications events and commands, see Configuring Session Communications and Configuring Events and Commands.

Siebel VB Script Example

The following is an example of a Siebel VB script that uses CTI objects to make a call.

Function NewMakeCall(dim Phonenum as string) as Integer

   dim CTI as CTIService
   dim Data as CTIData
   dim Phonenum as string

   set CTI = TheApplication.GetCTIService
   set Data = CTI.GetCurrentCallData
   Phonenum = Data.GetFieldValue("PhoneNumber")

   CTI.InvokeCommand "MakeCall", Phonenum

NewMakeCall = OperationComplete

End Function

Siebel eScript Script Example

The following is an example of a Siebel eScript script that uses CTI objects to make a call.

function NewMakeCall()
{
   var CTI;
   var Data;
   var Number;

   CTI = TheApplication().GetCTIService();
   Data = CTI.GetCurrentCallData();
   Number = Data.GetFieldValue("PhoneNumber");

   CTI.InvokeCommand("MakeCall", Number);

   return ContinueOperation;
}

Siebel Communications Server Administration Guide