Re: RESOLVED: RegisterCallNotifications for Multiple Modems?



Thanks, It seems that this is just the way things are.
Thank you very much.
From time to time though, for no aparent reason it stops getting
CALLINFOCHANGE evens, and then after a while starts again. I have yet to
figure out a pattern here, but so it seems.

Thanks again for your insight.
--
Thankfully, YisMan


"Grant Schenck" wrote:

It's a bit more subtle then always open with owner mode. If it works with
owner mode but not monitor then that tends to narrow the scope of what the
issue could be.

Part of the issue is that if you are using a modem and monitor mode and no
other application has the line open in owner mode then you won't get events.
However, if another app DOES have the line open in owner mode then you will
get events.

In any case, glad to hear things are working for you.

Regards,
--
Grant Schenck
http://grantschenck.tripod.com/

"YisMan" <yisman@xxxxxxx> wrote in message
news:75315F96-47CF-4D6F-BA1E-DDDA3CD10C11@xxxxxxxxxxxxxxxx
Hello everybody!
It's workin!

Thank You Grant!
Thank You Andreas!
Thank you Matthias!

Okay. Now I'll put down the information for "POST"erity.
First, the problem had NOTHING to do with multiple modems. The problem was
directly related to other TAPI-related programs running on that computer.

Second, As all of the TAPI gurus here pointed out, it is neccessary to
register for TAPI events with owner priviliges. It is not "always"
neccessary, but sometimes. I tried shutting down PhoneTray and
closing/disconnecting HyperTerminal. I also lowered the priority of the
fax
device manager and Presto! it worked. But only with using fOwner=true and
MediaTypes=16. Don't ask me why. But this is the current setup and it
works.
Another PC does not have PhoneTray installed and my code works fine with
Monitor Only mode. Who opens the TAPI connection there? Dunno.
On this computer that this post is about, If I disabled HyperTerminal and
PhoneTray and used Monitor mode, I did not get a single event at all.

I appreciate all your help. I will also appreciate any further insight as
to
why one computer works fine in monitor mode even if PhoneTray is not
installed. There are no other programs that display CID info on that
machine.
my VBA module is currently the only display of CID information.

Blessings to all of you,
I would have never got anywhere without you.
Thankfully,
YisMan

P.S. I now want to check out if I can get CID info from call waiting, but
I'll start first with Google. I hope I'll manage on my own. If not, expect
to
here from me soon ;-)

"Grant Schenck" wrote:

I'm not a big fan of TAPI 3.x (I prefer 2.x) so I can't really say.

You are opening the lines with OWNER Mode, correct? That is a
requirement
with modem based TAPI lines as using just Monitor does not result in any
events.

However, the obvious issue is that you are perhaps opening the wrong TAPI
line? Did you confirm in the TAPI browser that the line is the correct
one?
If the browser doesn't get events then perhaps the Unimodem .INF file is
incorrect for the modem? Unimodem uses a data file to tell it how to
decode
the events generated by a give brand of modem. If this is incorrect then
results would vary.

If you are familiar with the 2.x browser and can check the installed
line's
properties and make sure you open the correct one then post a trace from
that one.

As for TAPI getting better, I lied! It is staying the same. What is
getting better from TAPI's standpoint is MS' continued failure to come up
with anything better.
--
Grant Schenck
http://grantschenck.tripod.com/

"YisMan" <yisman@xxxxxxx> wrote in message
news:182631AE-51DA-402E-BCBD-C750FA56C6A5@xxxxxxxxxxxxxxxx
Hi Grant.
Thanks for Waiting out. I'm back now with more information.

#1 HyperTerminal catches the calls and shows the Caller ID without a
hitch.

#2 I tried TAPI Browser and It did not pick up any events whatsoever.
I'm
posting the output here. I did not get any error messages of any kind
it
just
does not get any events. Again, I've used the same CallbackInstance
number
(990) for each registration. Is that the correct way to do it?

Only Address2_1 and Address2_2 allowed the RegisterCallNotifications.
The
other addresses I guess are not relevent.

Here is the output:
ITTAPI.CreateInstance ITTAPI_1
returned hr = 0x00000000

ITTAPI_1.Initialize returned hr = 0x00000000

ITTAPI_1.EnumerateAddresses returned hr = 0x00000000
IEnumAddress_1

IEnumAddress_1.Next ITAddress2_1
returned hr = 0x00000000

ITTAPI_1.AdviseEventNotification returned hr = 0x00000000
cookie 990

ITTAPI_1.put_EventFilter
long plFilterMask : 131071 (0x0001ffff)
returned hr = 0x00000000

ITTAPI_1.RegisterCallNotifications
ITAddress* pAddress : ITAddress2_1
VARIANT_BOOL fMonitor : 1
VARIANT_BOOL fOwner : 0
long lMediaTypes : 16 (0x00000010)
long lCallbackInstance : 990 (0x000003de)
returned hr = 0x00000000
long* plRegister = 956 (0x000003bc)

ITAddress2_1.get_AddressName returned hr = 0x00000000
BSTR* ppName = CXT AC-Link Modem for Intel

IEnumAddress_1.Next ITAddress2_2
returned hr = 0x00000000

ITAddress2_2.get_AddressName returned hr = 0x00000000
BSTR* ppName = Brother MFC-9700 USB

ITTAPI_1.put_EventFilter
long plFilterMask : 131071 (0x0001ffff)
returned hr = 0x00000000

ITTAPI_1.RegisterCallNotifications
ITAddress* pAddress : ITAddress2_2
VARIANT_BOOL fMonitor : 1
VARIANT_BOOL fOwner : 0
long lMediaTypes : 16 (0x00000010)
long lCallbackInstance : 990 (0x000003de)
returned hr = 0x00000000
long* plRegister = 922 (0x0000039a)

IEnumAddress_1.Next ITAddress2_3
returned hr = 0x00000000

ITAddress2_3.get_AddressName returned hr = 0x00000000
BSTR* ppName = RAS PPPoE Line0000

IEnumAddress_1.Next ITAddress2_4
returned hr = 0x00000000

ITAddress2_4.get_AddressName returned hr = 0x00000000
BSTR* ppName = RAS VPN Line 0

IEnumAddress_1.Next ITAddress2_5
returned hr = 0x00000000

ITAddress2_5.get_AddressName returned hr = 0x00000000
BSTR* ppName = WAN Miniport (L2TP)

IEnumAddress_1.Next ITAddress2_6
returned hr = 0x00000000

ITAddress2_6.get_AddressName returned hr = 0x00000000
BSTR* ppName = IPCONF LINE

IEnumAddress_1.Next ITAddress2_7
returned hr = 0x00000000

ITAddress2_7.get_AddressName returned hr = 0x00000000
BSTR* ppName = H323 Line

IEnumAddress_1.Release

ITAddress2_1.Release

ITAddress2_2.Release

ITAddress2_3.Release

ITAddress2_4.Release

ITAddress2_5.Release

ITAddress2_6.Release

ITAddress2_7.Release

ITTAPI_1.Shutdown returned hr = 0x00000000

ITTAPI_1.Release


Thanks again for your time and patience.
With appreciation,
YisMan


"Grant Schenck" wrote:

TAPI showing it's age? Pah! Its not getting older... it's getting
better!

Obvious question is what happens when you test this in the MS TAPI
Browser?
Does it work from there?
--
Grant Schenck
http://grantschenck.tripod.com/

"YisMan" <yisman@xxxxxxx> wrote in message
news:54C0B6D0-C06C-4CD9-816E-58E858DA6221@xxxxxxxxxxxxxxxx
Hi everyone.

This is definetly one of the most wonderful newsgroups on the web,
thanks
to
the wonderful people who monitor these posts and give of their time
and
efforts to guide and assist. (also partially thanks to Microsoft,
because
they haven't updated TAPI since 1998!!)

I need a tip here. After much work and trial and error, I have
managed
to
develop a MS Access class module for retieving caller ID info.
Finally,
finally it works. One problem I have though is on a computer with
multiple
modems (actually 2 modems). On that computer, no TAPI events are
raised
at
all.
All TAPI articles seem to state that the RegisterCallNotifications
can
be
called as many times as needed. Well thats what im doing and it just
doesn't
work. I iterate through the Addresses and call the
RegisterCallNotifications
method for each address, but nothing doing.
I was wondering if i need a different RegCookie variable for each
call?
or
change the ICallBackInstance parameter? or something else entirely?

Here is my code for the Register procedure in the class module.
As a note: RegCookie is a class level integer variable

Sub Register()
Dim Address As ITAddress
Dim oAddress As ITAddress
For Each Address In oTAPI.Addresses
If Address.State = ADDRESS_STATE.AS_INSERVICE Then
Dim MediaSupport As ITMediaSupport
Set MediaSupport = Address
Dim MediaTypes As Long
MediaTypes = MediaSupport.MediaTypes
Set MediaSupport = Nothing
If (MediaTypes And TAPIMEDIATYPE_DATAMODEM) =
TAPIMEDIATYPE_DATAMODEM Then
If (MediaTypes And TAPIMEDIATYPE_AUDIO) =
TAPIMEDIATYPE_AUDIO Then
Set oAddress = Address
RegCookie =
oTAPI.RegisterCallNotifications(oAddress,
True, False, MediaTypes, 1)
oTAPI.EventFilter = (1 Or 2 Or 4 Or 8 Or 16 Or 32
Or
64
Or 128 Or 256 Or 512 Or 1024 Or 2048 Or _
4096 Or 8192 Or 16384 Or 32768 Or 65536 Or 131072
Or
262144 Or 524288 Or 1048576 Or 2097152 Or 4194304 Or _
8388608 Or 16777216 Or 33554432)
Debug.Print oAddress.AddressName & " Registered
at "
&
Time()
End If
End If
.



Relevant Pages

  • Re: RESOLVED: RegisterCallNotifications for Multiple Modems?
    ... owner mode but not monitor then that tends to narrow the scope of what ... Part of the issue is that if you are using a modem and monitor mode and ... Second, As all of the TAPI gurus here pointed out, it is neccessary to ... Here is my code for the Register procedure in the class module. ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Tapi Events
    ... I looked at my modems manual, and there is an S Register ... > which contains the number of seconds it should wait for a dial tone. ... Unimodem will sent the configured modem init ... Michael Dunn is a TAPI Developer and Tester ...
    (microsoft.public.win32.programmer.tapi)
  • Re: RESOLVED: RegisterCallNotifications for Multiple Modems?
    ... It sounds sensible what you write that CID info might be available prior to ... owner mode but not monitor then that tends to narrow the scope of what ... Part of the issue is that if you are using a modem and monitor mode and ... Second, As all of the TAPI gurus here pointed out, it is neccessary to ...
    (microsoft.public.win32.programmer.tapi)
  • RESOLVED: RegisterCallNotifications for Multiple Modems?
    ... Second, As all of the TAPI gurus here pointed out, it is neccessary to ... with modem based TAPI lines as using just Monitor does not result in any ... BSTR* ppName = CXT AC-Link Modem for Intel ...
    (microsoft.public.win32.programmer.tapi)
  • Re: RESOLVED: RegisterCallNotifications for Multiple Modems?
    ... If you get the caller ID when you first learn about the call and then ... isn't being provided in these cases by the modem TAPI Service Provider ... Best I can suggest is to look at the low level modem log (check Andreas' ... It sounds sensible what you write that CID info might be available prior ...
    (microsoft.public.win32.programmer.tapi)