excelvbams-officetapi

Excel VBA TAPI to blind transfer extension


I have dialed a number using tapirequestmakecall function using Excel VBA.

https://msdn.microsoft.com/en-us/library/ms737210(v=vs.85).aspx

Declare Function tapiRequestMakeCall Lib "tapi32.dll" _
(ByVal stNumber As String, ByVal stDummy1 As String, _
ByVal stDummy2 As String, ByVal stDummy3 As String) As Long

Sub DialNumber(Number As String)
Dim lngStatus As Long

 lngStatus = tapiRequestMakeCall(Number, "", "", "")

 If lngStatus < 0 Then
  MsgBox "Failed to dial number " & Number, vbExclamation
 End If

End Sub

I have to transfer the call to extension like 100 after call is connected.

How to do this? Am using TAPI 2.2. Any help would be highly appreciated..


Solution

  • As far as I'm aware, this is not possible. The built-in office TAPI integration is only intended for making an outgoing call with a "1st party"-TAPI driver (a subset of drivers intended for single extension use). Office also limits the access to the API (for "easy" use), hence you do not have access to the normal output of a dial action (= the handle of the created call, to perform further actions).

    I would suggest you do not use the built-in office methods but build directly on TAPI (tapi32.dll) itself. Unfortunately, that is a considerably more difficult job.