Bookshelf Home | Contents | Index | Search | PDF |
Siebel Communications Server Administration Guide > Upgrading from Version 6.x > Using Siebel Scripts from Version 6.x >
Script Example: Handling an Incoming Call
This section shows example Siebel VB or Siebel eScript scripts that use CTI objects to handle an incoming call and shows how to attach such a script to a communications event.
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 Siebel VB script that uses CTI objects to handle an incoming call.
Function HandleCallUsingANI(arg1 As String, arg2 As String) As Integer
TheApplication.TraceOn "c:\trace.log", "Allocation", "All"
Dim CTI As CTIService
Dim Data As CTIData
Dim ANI As String
Set CTI = TheApplication.GetCTIService
Set Data = CTI.GetCurrentCallData
ANI = Data.GetFieldValue("ANI")
CTI.NotifyEventHandlerBlocking
TheApplication.Trace "ANI = " & ANI
TheApplication.Trace "arg1 = " & arg1
TheApplication.Trace "arg2 = " & arg2
TheApplication.TraceOff
HandleCallUsingANI = ContinueOperation
End FunctionSiebel eScript Script Example
The following is an example Siebel eScript script that uses CTI objects to handle an incoming call.
function HandleCallUsingANI(arg1, arg2)
{
TheApplication().TraceOn("c:\\trace.log", "Allocation", "All");
var CTI = TheApplication().GetCTIService();
var Data = CTI.GetCurrentCallData();
var ANI = Data.GetFieldValue("ANI");
TheApplication().Trace("ANI = " + ANI)
TheApplication().Trace("arg1 = " + arg1)
TheApplication().Trace("arg2 = " + arg2)
TheApplication().TraceOff()
return ContinueOperation;
}
Bookshelf Home | Contents | Index | Search | PDF |
Siebel Communications Server Administration Guide Published: 23 June 2003 |