Discussion:
Tapi events bug?
(too old to reply)
c***@ngi.it
2008-07-23 14:15:17 UTC
Permalink
Hi everyone,

someone of you may remember I had a strange problem with Tapi 3
events: I didn't get some of them, mainly CallState CS_DISCONNECTED.
Until now I biased Delphi for it (which do have some troubles with
TAPI, but that's another story).

Keeping on with my attempts, and having exhausted all the "logical"
ways, I tried and "illogical" one: AddRef the incoming event without
Release it. Suddenly all the events started to come in.

Can I reproduce with Tapi Browser 3 ? It requires some luck, but the
answer is "yes".
I belive TB3 does actually AddRef any object it creates without
Release it: that's the way it builds the list of interfaces you can
see in the middle. In example you can always click an ITCallStateEvent
received half an hour ago and execute a get_State on it.
But if I manually Release a CS_OFFERING immediatly after I recevie it,
I no longer get CS_CONNECTED or CS_DISCONNECTED.

The provider is from LG-Nortel, and AFAIK it's a TAPI 2 provider.
Maybe it's a provider bug? Maybe the trouble is the conversion layer
between TAPI 2 and TAPI 3?

Does anyone experienced a similar trouble?

Kind regards,
Corrado
Matthias Moetje [MVP]
2008-07-27 23:34:48 UTC
Permalink
Corrado,

I am not a Delphi guy, but I am quite sure that it's

- not a TSP bug and
- not a TAPI3 layer bug
Post by c***@ngi.it
But if I manually Release a CS_OFFERING immediatly after I recevie it,
I no longer get CS_CONNECTED or CS_DISCONNECTED
You should AddRef the ITCallInfo in the ITCallNotificationEvent
rather than the event itself. Otherwise TAPI3 might do lineDeallocateCall.

AddRef-ing event objects might create other problems and would suggest
against doing so. This is a known problem with VB. More information on
this subject can be found here:

http://msdn.microsoft.com/en-us/library/ms727020(VS.85).aspx


Best regards,

Matthias Moetje
-------------------------------------
TAPI WIKI: http://www.tapi.info
-------------------------------------
TERASENS GmbH
Augustenstraße 24
80333 Munich, GERMANY
-------------------------------------
e-mail: moetje at terasens dot com
www: www.terasens.com
-------------------------------------
Post by c***@ngi.it
Hi everyone,
someone of you may remember I had a strange problem with Tapi 3
events: I didn't get some of them, mainly CallState CS_DISCONNECTED.
Until now I biased Delphi for it (which do have some troubles with
TAPI, but that's another story).
Keeping on with my attempts, and having exhausted all the "logical"
ways, I tried and "illogical" one: AddRef the incoming event without
Release it. Suddenly all the events started to come in.
Can I reproduce with Tapi Browser 3 ? It requires some luck, but the
answer is "yes".
I belive TB3 does actually AddRef any object it creates without
Release it: that's the way it builds the list of interfaces you can
see in the middle. In example you can always click an ITCallStateEvent
received half an hour ago and execute a get_State on it.
But if I manually Release a CS_OFFERING immediatly after I recevie it,
I no longer get CS_CONNECTED or CS_DISCONNECTED.
The provider is from LG-Nortel, and AFAIK it's a TAPI 2 provider.
Maybe it's a provider bug? Maybe the trouble is the conversion layer
between TAPI 2 and TAPI 3?
Does anyone experienced a similar trouble?
Kind regards,
Corrado
Loading...