Results 1 to 3 of 3

Thread: Tapi

  1. #1
    Join Date
    Nov 2003
    Location
    Rotterdam, Netherlands
    Posts
    127

    Question Unanswered: Tapi

    Hi,
    I am trying to write a tapi application using VB6.0
    The problem I am facing is that, as soon as i create a call and try to connect using ITCallControl.Connect method, the status shows as INPROGRESS and immediately DISCONNECTED without even dialing.

    Ofcourse It dials the number if i don't hangup, but dosenot generate any events after that. SO i am not able to get further call status.

    Can anyone please guide me what could be wrong.

    Regards
    Shelva

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'd check:

    1) Coding error (everybody makes mistakes, first timers more than most)
    2) Bad cable (possibly on PC board too)
    3) Incorrect modem settings
    4) Com port problems (if applicable)

    -PatP

  3. #3
    Join Date
    Nov 2003
    Location
    Rotterdam, Netherlands
    Posts
    127

    Question

    The above things are good because it dials the target phone number and it rings. The modem hangs up once i disconnect the phone.
    But the program is not able to generate these events.

    Here is the piece of code used to dial the number
    The event is handled by implementing the TAPI object withevents.


    Public Sub CallUser(pForm As Form)
    Set gobjTapi = New TAPI
    Dim objAddressCapabilities As ITAddressCapabilities
    Call gobjTapi.Initialize
    Const TAPI3_CALL_EVENTS = TE_CALLMEDIA Or TE_CALLNOTIFICATION Or TE_CALLSTATE _
    Or TE_ADDRESS Or TE_REQUEST Or TE_TAPIOBJECT Or TE_CALLHUB Or TE_DIGITEVENT Or TE_PRIVATE _

    gobjTapi.EventFilter = TAPI3_CALL_EVENTS
    fOwner = True
    fMonitor = True
    lMediaTypes = TAPIMEDIATYPE_AUDIO
    lCallbackInstance = 2

    Set objCollAddresses = gobjTapi.Addresses

    bFound = False
    For indexAddr = 1 To objCollAddresses.Count
    Set objCrtAddress = objCollAddresses.Item(indexAddr)
    Set objMediaSupport = objCrtAddress
    Set objAddressCapabilities = objCrtAddress
    If objMediaSupport.QueryMediaType(lMediaTypes) Then
    bFound = True
    End If

    Set objAddressCapabilities = Nothing
    Set objMediaSupport = Nothing
    Set objCrtAddress = Nothing

    If bFound = True Then Exit For
    Next indexAddr

    Set gobjAddress = objCollAddresses.Item(indexAddr)
    Debug.Print gobjAddress.AddressName

    glRegistrationToken = gobjTapi.RegisterCallNotifications(gobjAddress, fMonitor, fOwner, lMediaTypes, lCallbackInstance)
    If glRedistrationToken = S_OK Then
    Debug.Print "Registration OK"
    End If

    Set pForm.gobjTapiWithEvents = gobjTapi
    Set objCallControl = gobjAddress.CreateCall("00624241599", 1, lMediaTypes)
    gobjTapi.SetApplicationPriority App.EXEName, lMediaTypes, True
    objCallControl.Connect True
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •