Re: RegisterCallNotifications for Multiple Modems?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Andreas.
Thanks for your answers.

About your post...

Maybe it is worth buying a 2nd modem yourself, so that you can test the two
modem config locally...

I've meanwhile figured out that it has nothing to do with the 2 modems (see
previous posts). Rather, it was related , as you already pointed out, to call
ownership.

CALLINFOCHANGE usually indicates that callinfo has CHANGEd.
But you may not expect to (always) get a CALLINFOCHANGE if the callinfo if
available for the 1st time.
The intitial generation of CALLINFOCHANGE my depend on the TSP.
So I suggest to always check for callinfo initially (even without
CALLINFOCHANGE) on an call and on each received CALLINFOCHANGE.

Actually, I check for CID in the TE_ADDRESS event as well. Between the two
events I USUALLY get the caller ID. For some reason, periodically it stops
receiving CID info for some time and then starts again. Might you have any
suggestions?I have not yet figured out a pattern here. Here's the code for
handling the TE_ADDRESS event:

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

16 is datamodem,
8 is audio.
Does it work if you set it to 8?
If not then the modem doesn't seem to be a voice modem.

I could try with 8. And I might try it if the need be. for the meanwhile 16
is working out. But why shouldn't it be the number which is returned by the
MediaSupport.MediaTypes method as in the following snippet?

(realize that for the time being i'm not using the info returned from
MediaSupport.MediaTypes as I'm hardcoding "16"!)
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, True, 16, 1)
--
Always appreciative of your great input and analysis,
YisMan


"Andreas Marschall [MVP TAPI]" wrote:

"YisMan" <yisman@xxxxxxx> schrieb im Newsbeitrag
news:5DCF1BC7-0E1B-4FC8-85F1-081F22C79EC5@xxxxxxxxxxxxxxxx
Hi Again, Grant, Thanks for your post.
And thank you Andreas for joining us.
Your input are ever so valuable!
I read through evert word of your posts.

YisMan, you are welcome.

I apologize for the delay, but it was just now that I managed to get access
to the remote machine. Here are my findings:

Maybe it is worth buying a 2nd modem yourself, so that you can test the two
modem config locally...


1. OWNER:

Already answered by Matthias.

2. CALLERID: As you can see from the TB log, I am not receiving any
CALLINFOCHANGE events, which are required for retrieving CID info. What's
even odder is the fact, that one time, once only I did get a CALLINFOCHANGE
event, but never again.

To make sure that it wasn't an object leek or the like I restarted the
computer un & re -plugged the modem to the phone line and tried again. This
time I didn't even get it once. I don't know why.

I may note that the one call that did trigger the CALLINFOCHANGE event was
an OOA (Out of Area) call.

CALLINFOCHANGE usually indicates that callinfo has CHANGEd.
But you may not expect to (always) get a CALLINFOCHANGE if the callinfo if
available for the 1st time.
The intitial generation of CALLINFOCHANGE my depend on the TSP.
So I suggest to always check for callinfo initially (even without
CALLINFOCHANGE) on an call and on each received CALLINFOCHANGE.


3. MEDIATYPES: My code sets the lMediaTypes parameter to the
MediaSupport.MediaTypes value of the ITAddress object. It usually (or
always)
comes out as 24. Since I started setting the fOwner to True, the
RegisterCallNotifications method threw an error number -2147221500. I
changed
it to 16 (which is the number which works in TB) and it registers OK.

16 is datamodem,
8 is audio.
Does it work if you set it to 8?
If not then the modem doesn't seem to be a voice modem.


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




.



Relevant Pages

  • Re: RegisterCallNotifications for Multiple Modems?
    ... I read through evert word of your posts. ... Maybe it is worth buying a 2nd modem yourself, so that you can test the two ... CALLINFOCHANGE events, which are required for retrieving CID info. What's ... Microsoft MVP for TAPI / Windows SDK ...
    (microsoft.public.win32.programmer.tapi)
  • Re: URGENT: NEED HELP WITH TAPI
    ... Pls disregard all my previous posts within this thread. ... My Modem supports voice. ... Microsoft MVP for TAPI / Windows SDK ...
    (microsoft.public.win32.programmer.tapi)
  • Re: CallerID after transfer
    ... During development I'm using the TMDEMO.TSP (Vitual PBX system TSP emulator ... customer using the driver from Aastra Telecom Schweiz AG, OIP Tapi Service ... the TE_CALLNOTIFICATION and TE CALLINFOCHANGE. ... the final connect at the end of the consulting of an consulting transfer. ...
    (microsoft.public.win32.programmer.tapi)