Re: RESOLVED: RegisterCallNotifications for Multiple Modems?
- From: "Grant Schenck" <schenckg@xxxxxxxxxxxxx>
- Date: Sat, 3 Nov 2007 19:03:47 -0400
If you get the caller ID when you first learn about the call and then
whenever you get a CALLINFOCHANGED then you are doing all you can and should
do as an application writer. If you still aren't getting caller ID then it
isn't being provided in these cases by the modem TAPI Service Provider
(Unimodem.)
Best I can suggest is to look at the low level modem log (check Andreas'
site for information on enabling.) If you see the caller ID in their for
calls where you don't get it from TAPI then something is flawed in (perhaps)
the modem's specific .INF file. The .INF file is modem specific and defined
the features of the particular modem Unimodem is interfacing with.
Grant Schenck
http://grantschenck.tripod.com/
"YisMan" <yisman@xxxxxxx> wrote in message
news:61C16514-CD00-4998-B627-9D2C676E1762@xxxxxxxxxxxxxxxx
Hi.
Thanks for your post, Grant.
It sounds sensible what you write that CID info might be available prior
to
the CALLINFOCHANGE event. Actually I do try to capture CID info in the
TE_ADDRESS event as well, as I posted in this thread on 11/2/2007 12:38 AM
PST. I'll repost the code here:
Case TE_ADDRESS '2
Debug.Print "TE_ADDRESS Event Raised at " & Time()
Dim oITAddressEvent As ITAddressEvent
Set oITAddressEvent = pEvent
Select Case oITAddressEvent.Event
Case AE_RINGING
Debug.Print "Calls Count: ";
oITAddressEvent.Address.Calls.Count
If oITAddressEvent.Address.Calls.Count > 0 Then
On Error Resume Next
Do Until Retry >= MaxRetries Or CallerID <> ""
Set oITCallInfo =
oITAddressEvent.Address.Calls.Item(1)
CallerID =
oITCallInfo.CallInfoString(CIS_CALLERIDNUMBER)
If Err Then
Debug.Print "Error #:"; Err.Number; " - ";
Err.Description; " at "; Time()
e = Err.Number
Err.Clear
Retry = Retry + 1
Debug.Print Retry
End If
Set oITCallInfo = Nothing
Loop
Debug.Print CallerID
If CallerID <> "" Then HandleIncomingCall CallerID
On Error GoTo eHandler
End If
End Select
Between the two events (TE_ADDRESS and TE_CALLINFOCHANGE) I usally succeed
in getting the CID. Oddly enough, I do not always get the CID. Apparently
for
no odd reason it seems to stop working from time to time and then starts
working again. What I mean by working is speciffically the CID retrieval;
events I always get.
When else is it possible to receive CID info beside the above events?
TE_CALLHUB? or TE_CALLNOTIFICATION? I'd appreciate some leads. We're
really
getting far, with all your help.
The obvious question is what is the LINECALLINFO values that are changed
in
the event?
I did not understand what you mean to ask here. Obviously the CID name &
number are supposed to change with each call. I guess youre leading
somewhere. Please elaborate.
Thankful and Grateful,
YisMan
"Grant Schenck" wrote:
Regarding call info change events, remember that you only get these if
the
info changes. So, for example, caller ID might be available when a call
first presents or might be delayed. In the first case you would NOT get
a
call info event while in the second you would.
The obvious question is what is the LINECALLINFO values that are changed
in
the event?
--
Grant Schenck
http://grantschenck.tripod.com/
"YisMan" <yisman@xxxxxxx> wrote in message
news:B51C3FEE-9DA8-4FCA-B3AF-A7CB0F7B1EF9@xxxxxxxxxxxxxxxx
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
.
- References:
- Re: RESOLVED: RegisterCallNotifications for Multiple Modems?
- From: Grant Schenck
- Re: RESOLVED: RegisterCallNotifications for Multiple Modems?
- From: YisMan
- Re: RESOLVED: RegisterCallNotifications for Multiple Modems?
- From: Grant Schenck
- Re: RESOLVED: RegisterCallNotifications for Multiple Modems?
- From: YisMan
- Re: RESOLVED: RegisterCallNotifications for Multiple Modems?
- Prev by Date: Re: RESOLVED: RegisterCallNotifications for Multiple Modems?
- Next by Date: Re: visual basic .net with tapi
- Previous by thread: Re: RESOLVED: RegisterCallNotifications for Multiple Modems?
- Next by thread: Re: problems with incomming caller ID's
- Index(es):
Relevant Pages
|