Post by Andreas Marschall [MVP TAPI]Post by m***@gmail.com0x80040052 which means that there is a
resource unavailable. I have had this error before and I just re-
installed my TSP and restarted my pc and phone and the error didn't
occur for some time until now.
Menno,
is your TSP returning the corresponding TAPI2 / TSPI error
LINEERR_RESOURCEUNAVAIL?
Post by m***@gmail.comFor my other problem(the one where I can't connect the call)-> for a
TAPIMEDIATYPE_AUDIO? I thought that was the right mediatype. Do you
know what the error(I don't know the hresult error code)
OLE_E_NOCONNECTION (In Dutch: Er is geen verbindings-id voor deze
verbinding) and do you know a solution for this problem as well?
I guess this is the wrong error decription.
You need to know the HRES hex value.
--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK
TAPI / TSP Developer and Tester
My TAPI and TSPI FAQ:http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
My Toto® Tools (a collection of free, mostly TAPI related tools):http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm
TAPI development around the world (Frappr! map):http://www.frappr.com/TAPIaroundTheWorld
* Please post all messages and replies to the newsgroup so all may
* benefit from the discussion. Private mail is usually not replied to.
* This posting is provided "AS IS" with no warranties, and confers no rights.
Hello Andreas,
Thanks again for your quick reply,
Regarding to my first question, I got the same message from tsp. In
my VB code I didn't dispose the tapi object and didn't close the line
in the appropriated way. That error is no longer occurring.
The error I now get is as follows: Geen verbinding voor deze
verbindings-ID (Uitzondering van HRESULT: 0x80040004
(OLE_E_NOCONNECTION))
When I looked it up I found out that this is an error from WinError.h.
Do you have any idea how to solve this problem?
I also downloaded a 'TAPI Phone Dialer from Julmar Technology, Inc.'
And it worked perfectly for both incoming en outbound calls.
Here is my VB code:
Dim gobjTapi As TAPI3Lib.TAPI
gobjTapi = New TAPI3Lib.TAPI
Call gobjTapi.Initialize()
Dim gobjAddress As TAPI3Lib.ITAddress
Dim objCollAddresses As TAPI3Lib.ITCollection
objCollAddresses = gobjTapi.Addresses
Dim bFound As Boolean
bFound = False
Dim indexAddr As Long
Dim objCrtAddress As TAPI3Lib.ITAddress
Dim objMediaSupport As TAPI3Lib.ITMediaSupport
Dim objAddressCapabilities As TAPI3Lib.ITAddressCapabilities
Dim nSelectedType As Integer =
TAPI3Lib.TapiConstants.LINEADDRESSTYPE_PHONENUMBER
For indexAddr = 1 To objCollAddresses.Count
objCrtAddress = objCollAddresses.Item(indexAddr)
objMediaSupport = objCrtAddress
objAddressCapabilities = objCrtAddress
If
objMediaSupport.QueryMediaType(TAPI3Lib.TapiConstants.TAPIMEDIATYPE_AUDIO)
And objCrtAddress.AddressName.StartsWith("Cisco") Then
bFound = True
End If
objAddressCapabilities = Nothing
objMediaSupport = Nothing
objCrtAddress = Nothing
If bFound = True Then Exit For
Next indexAddr
If (bFound = True) Then
MsgBox("Valid address")
Else
MsgBox("No valid address")
End If
gobjAddress = Nothing
gobjAddress = objCollAddresses.Item(indexAddr)
Dim gobjCall As TAPI3Lib.ITBasicCallControl
gobjCall = gobjAddress.CreateCall("123",
TAPI3Lib.TapiConstants.LINEADDRESSTYPE_PHONENUMBER,
TAPI3Lib.TapiConstants.TAPIMEDIATYPE_AUDIO)
'gobjCall.Pickup(1)
gobjCall.Connect(False)
When I execute this line of code: gobjCall.Pickup(1) my IP phone
starts to make some noise, like a dial tone, so it is connected.
I really hope you have any idea what may be the problem here.
Hopefully you can help me further.
Thanks in advance (again).
Menno.
P.s. here is a TB log file in which everything seems to be working.
lineInitialize params:
lphLineApp=x167f1ba4
hInstance=x16c6
lpfnCallback=x16ef2e00
lpszAppName=x16cf00c0
lpdwNumDevs=x16c7b01a
lineInitialize returned SUCCESS
num line devs = 38
lineOpen params:
hLineApp=x17270000
dwDeviceID=x0
lphLine=x167f1c1c
APIVersion=x10003
dwExtVersion=x0
dwCallbackInstance=x0
dwPrivileges=x1
dwMediaModes=x10
lpCallParams=x167f15be
lineOpen returned SUCCESS
lineMakeCall params:
hLine=x1026e
lphCall=x167f1d12
lpszDestAddress=x16cf0060
dwCountryCode=x0
lpCallParams=x167f15be
lineMakeCall returned x10019
received LINE_REPLY : hDev=x0, cbInst=x0
p1=x10019,
p2=x0,
p3=x1015d,
NOTE: *lphCall==NULL, freeing call data structure
received LINE_CALLSTATE : hDev=x1015d, cbInst=x0
p1=x10, DIALING
p2=x0,
p3=x0,
received LINE_CALLSTATE : hDev=x1015d, cbInst=x0
p1=x4000, DISCONNECTED
p2=x40, NOANSWER
p3=x0,
received LINE_CALLSTATE : hDev=x1015d, cbInst=x