CTI Outbound Call - Custom Script Needed to Update End Call Duration After Screen Pop and Activity Creation
Last updated on MARCH 02, 2017
Applies to:Siebel CTI - Version 126.96.36.199 SIA  and later
z*OBSOLETE: Microsoft Windows 2000
This document was previously published as Siebel SR 38-1059530361.
***Checked for Relevance 23-Jun-2013***
***Checked for Relevance 29-Dec-2014***
We have defined one event response called "OnInboundCallEstablished" fired when an inbound call is established. As we have to know who (Contact) is calling and national or international calls are handled we use a customized Script called "fOnInboundCallEstablished" that searches around the database using ANI, creates the activity call record and associate it to the intended contact. In this case, we understand that Siebel Communication Administration features aren't enough for our functional requirements.
Below you have the Script code in VB:
Function fOnInboundCallEstablished (aPhone As String) As Integer
Dim BO As BusObject
Dim BC As BusComp
Dim BOAction As BusObject
Dim BCAction As BusComp
Dim iRet As Integer
Dim I As Integer
Dim sView As String
Dim IdContact As String
Dim sDescripcion As String
Dim IdActividad As String
If Left(aPhone, 1) <> "+" Then
'National inbound call
aPhone = "+34" + aPhone
Set BO = TheApplication.GetBusObject("Contact")
Set BC = BO.GetBusComp("Contact")
.ActivateField "Work Phone #"
.ActivateField "Cellular Phone #"
.ActivateField "Home Phone #"
.SetSearchSpec "Work Phone #", "=" + aPhone + " OR [Cellular Phone#]=" + aPhone + " OR [Home Phone #]= " + aPhone
I = .FirstRecord
Do While I
iRet = iRet + 1
IdContact = .GetFieldValue("Id")
I = .NextRecord
If iRet = 1 Then
sView = "TG Service Contact Detail View"
If iRet > 1 Then
'n Contacts matching SearchSpec criteria
sView = "TG Contact List View"
If iRet = 0 Then
But we also need to get the activity created by the custom script to be updated at the end of the call like the AfterWork fieds in a standard CTI event log. How we can achieve that?
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms