Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TAPI 3 problems

889 views
Skip to first unread message

menno...@gmail.com

unread,
Mar 26, 2008, 5:19:51 AM3/26/08
to
Hello Andreas,

Thank you for your quick reply. I was trying to reproduce the error
but
instead of the error I expected I get the following error -> HRESULT:
0x80040052 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.

Can you tell me a solution for this problem? I read about the TAPI3
wrapper(don't know if that is a solution for my problem) but the link
to the .zip file wasn't working anymore.

For my other problem(the one where I can't connect the call)-> for a
call with a Cisco IP Phone, must I use the mediatype:
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 really hope you can help me and point me in the right direction.

Thanks in advance.

Greetings Menno.

Andreas Marschall [MVP TAPI]

unread,
Mar 26, 2008, 7:10:39 AM3/26/08
to
<menno...@gmail.com> schrieb im Newsbeitrag
news:dcf6b493-ba33-4831...@s37g2000prg.googlegroups.com...

> instead of the error I expected I get the following error -> HRESULT:
> 0x80040052 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?


> For my other problem(the one where I can't connect the call)-> for a
> call with a Cisco IP Phone, must I use the mediatype:
> 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.

menno...@gmail.com

unread,
Mar 27, 2008, 7:18:09 AM3/27/08
to
On 26 mrt, 12:10, "Andreas Marschall [MVP TAPI]" <Andreas.Marsch...@I-
B-A-M.de> wrote:
> <mennodr...@gmail.com> schrieb im Newsbeitragnews:dcf6b493-ba33-4831...@s37g2000prg.googlegroups.com...

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

Andreas Marschall [MVP TAPI]

unread,
Mar 27, 2008, 9:55:13 AM3/27/08
to
<menno...@gmail.com> schrieb im Newsbeitrag
news:64981768-bf28-4d4a...@s8g2000prg.googlegroups.com...

> Hello Andreas,
>
> Thanks again for your quick reply,

Menno, you are welcome.

> 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?

You are (again!) looking at the wrong error code description.
It is:
TAPI3 error code: 0x80040004 = The MEDIATYPE passed in to this method was
invalid.
See my TAPI and TSPI FAQ:
Q: Where are TAPI errors codes defined ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Where_are


> 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:

Sorry I'm not a VB guy.

> 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.

Do you want to make a (new) call, then use ::Connect();
or do you actually want to picku an existing call that is currently ringing at
*another* station, only then use ::Pickup().
Please clarify.

menno...@gmail.com

unread,
Mar 27, 2008, 11:48:11 AM3/27/08
to
On 27 mrt, 14:55, "Andreas Marschall [MVP TAPI]" <Andreas.Marsch...@I-
B-A-M.de> wrote:
> <mennodr...@gmail.com> schrieb im Newsbeitragnews:64981768-bf28-4d4a...@s8g2000prg.googlegroups.com...

>
> > Hello Andreas,
>
> > Thanks again for your quick reply,
>
> Menno, you are welcome.
>
> > 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?
>
> You are (again!) looking at the wrong error code description.
> It is:
> TAPI3 error code: 0x80040004 = The MEDIATYPE passed in to this method was
> invalid.
> See my TAPI and TSPI FAQ:
> Q: Where are TAPI errors codes defined ?http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_W...

Hello Andreas,

This is really the error that I get: Geen verbinding voor deze


verbindings-ID (Uitzondering van HRESULT: 0x80040004
(OLE_E_NOCONNECTION))

It is a error from WinError.h and not from Tapi3Err.h. The mediatype
that I use is TAPI3Lib.TapiConstants.TAPIMEDIATYPE_AUDIO.
I tried also tried this: MediaTypes =
TAPI3Lib.TapiConstants.TAPIMEDIATYPE_AUDIO Or
TAPI3Lib.TapiConstants.TAPIMEDIATYPE_DATAMODEM Or
TAPI3Lib.TapiConstants.TAPIMEDIATYPE_G3FAX Or
TAPI3Lib.TapiConstants.TAPIMEDIATYPE_MULTITRACK Or
TAPI3Lib.TapiConstants.TAPIMEDIATYPE_VIDEO
but again the same error.
So I guess the mediatype is correct. Do you have any experience with
this error, or do you have a suggestion in which direction I must
look?

I want to make a new call from my VB application. So I tried the
'connect' method. With the 'pickup' method I wanted to let you know
that the connection between the VB application and my IP phone was ok.

Thanks again.

Greeting Menno.

chirag.f...@gmail.com

unread,
Feb 5, 2014, 12:48:00 AM2/5/14
to
Hello Andreas,

I got an exception on CALL button click event.
System.Runtime.InteropServices.COMException : There is no connection for this connection ID (Exception from HRESULT: 0x80040004 (OLE_E_NOCONNECTION))
at TAPI3Lib.ITBasicCallControl.Connect(Boolean fSync)
at tapi3_dev.Form1.button2_Click(Object sender, EventArgs e)

Please help me.
Thanks in advance

Andreas Marschall [exMVP TAPI]

unread,
Feb 5, 2014, 6:40:23 AM2/5/14
to
You are looking at the wrong error code description.
It is:
TAPI3 error code: 0x80040004 = The MEDIATYPE passed in to this method was invalid.
See my TAPI and TSPI FAQ:
--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK / Visual C++ 2003-2008
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
* Please post all messages and replies to the group / forum so all may
0 new messages