Utilize the power of CTILink through an easy to use Phone Bar OCX and/or its extensive COM interface to customize your own Visual Basic, C++, Delphi, Microsoft Office Application or HTML form.

Add functionality and customize the appearance of CTILink through its built in browser window.
Installing the Phone Bar (CTIBarX.ocx)
  • Visual Basic - Right click on the Toolbox and select Components. On the Controls tab of the Components dialog box check CTILinkBarX Library and click OK. Select the CTILinkBar on the Toolbox palette and add it to your form.
  • Visual Interdev - Select the ActiveX Controls tab on the Toolbox, right click and choose "Customize Toolbox...". On the ActiveX Controls tab, check CTILinkBar Control and click OK. Drag the CTILinkBar ActiveX control from the Toolbox palette to your form
  • In an HTML form - Add the following source code:
    <OBJECT classid=clsid:07245D45-97EE-11D2-B621-00104B97FCB1>
Coding examples
  • Place a call in VbScript:

    Sub DialString(DialStr,Name,Extension)

    'create an instance of CTILink
    Set CTIPhoneBar = CreateObject("CTILink.CTILinkComserver")
    'dial the number
    CTIPhoneBar.DialNumber DialStr,Name,Extension
    'now wait to hangup, this example does not use events
    MsgBox "Press OK to Hangup"
    'CTILink is in the connected state
    'so clicking the connect button hangs up
    'free the CTILink instance
    set CTIPhoneBar = Nothing
    MsgBox "Disconnected"
    End Sub

  • Place a call in JScript:

    function DialString(DialStr,Name,Extension) {

    'create an instance of CTILink
    var oCTILink = new ActiveXObject("CTILink.CTILinkComServer")
    //dial the number
    //now wait to hangup, this example does not use events
    alert("Press OK to hangup");
    //CTILink is in the connected state
    //so clicking the connect button hangs up

  • Getting a Caller ID Event in Visual Basic

    Set a reference to CTILink by clicking "Project" - "References" and checking "CTILink Library". Then enter the following code:

    Dim WithEvents oCTILink As CTILinkComServer

    Private Sub Form_Load()

    Set oCTILink = GetObject("", "CTILink.CTILinkComServer")
    End Sub

    Private Sub Form_Unload(Cancel As Integer)

    Set oCTILink = Nothing
    End Sub

    Private Sub oCTILink_HaveCallerID(ByVal DeviceID As Long, ByVal AssociatedContact As Variant, ByVal CallerNbr As String, ByVal CalledNbr As String, ByVal CallerName As String)

    MsgBox "The Caller Number is: " & CallerNbr

    End Sub

  • Getting a Caller ID Event in JScript Using the Phone Bar ocx

    Place the following object tag somewhere in the HTML body. This creates an instance of the CTILink Phone Bar. Notice that the width and height are set to 1 pixel because we don't want the phone bar to be visible, but still need it on the page so it will be activated.

    <OBJECT id=CTILinkBar style="WIDTH: 1px; HEIGHT: 1px"

    The following script block catches the caller ID event and displays the caller number:

    <SCRIPT LANGUAGE=javascript FOR=CTILinkBar EVENT=OnHaveCallerID(DeviceID,AssociatedContact,CallerNbr,CalledNbr,CallerName)>

    <!-- alert("Caller Number is: " + CallerNbr); //-->

    For a more in-depth example, examine the code in ctilinkdialdemo.htm in the help sub-directory of the CTILink directory.