RE: C# + TAPI - Answer detection problem



Hi Leonardo,

I have discussed this issue with some TAPI expert in Microsoft. Below is
his comment:

"I have two different answers for you. :)

1) There are no best practices regarding managed code. In fact, there is a
KB Article (841712) that says that TAPI from managed code this is not
supported.

TAPI is an exceptionally complicated COM interface and the automatically
generated wrapper doesn't fully function. I admit that the last time I
invested was .Net 1.1, but Microsoft is simply not putting any investment
into new TAPI development resources.

TAPI also relies heavily on unamaged DirectShow, which itself is not
supported through COM interop.

There have been several attempts to make this work by various consulting
resources, but I know of nobody that has done anything other than trivial
functionality successfully.

Customers writing TAPI code should continue to use unmanaged languages. If
necessary, they can write their own COM object in C++ and expose a much
simplier interface to be used by their managed code.

If this task is all your customer wants to do, then they would probably be
better to use TAPI 2.0 and a simple application like
ftp://ftp.microsoft.com/developr/tapi/tapiwave.zip. Trying to use TAPI 3.0
through Interop seems like a very hard way to solve this.

2) Wait for answer or busy signal. [PROBLEM]

This is not possible with a modem, regardless of what language you use.
Remember that a modem uses an analog phone line. And analog phone lines
only have audio data. This means that there is absolutely no information
"on the wire" that could be used to know when the remote end answers. So
the modem can not give an "answered" notification to the computer. Which
means that there is no trigger the application could use to know if the
remote end has answered.

Modems can *sometimes* detect busy because phone companies will usually
send an *auio signal* (a beep) that a modem can detect. However, you must
have a modem that understands the beep used by your phone company. In the
US, these tones are fairly standard but there are still modems that do not
detect tones very well. I have no idea how standard the tones are in other
countries but I'm sure you must find a modem that is aware of the tones in
that country. I suspect that a modem designed for the US won't detect
international tones.

But again, there are no "tones" that the modem can detect to know if the
remote end answered. Because of this, Unimodem will send any "audio" call
directly to CONNECTED because there is no other way to know when the call
is connected.

Commercial dialing applications usually use expensive hardware solutions
that use a digital connection to the phone company. In this way, the phone
company can tell the hardware (through the digital channel) when the call
is answered. Such a hardware vendor would have to provide a TAPI Service
Provider to make this functionality available through TAPI.

There are (or were) phone boards that could be a little more intelligent by
listening to the audio sounds to guess about whether someone has answered.
You could listen for "ringback" tones or someone saying "hello" to
determine if the other end has answered. But for this to work, the hardware
must do this analysis and the hardware must come with its own TAPI Service
Provider (because Unimodem always goes straight to CONNECTED).

Microsoft does not maintain a list of voice boards nor do we test any. I'm
not even sure if any are still being produced anymore. Dialogic used to
produce such a TSP, but they were purchased by Intel and I don't believe
they make their TSP available anymore.

Some software packages still use modems and create heuristics to deal with
this. For example, some will play 30 seconds of "There will be an
important message in 30 (20, 10) seconds". Some might play the same
message twice ("This message will be repeated") so that anyone can hear the
second message if they missed part of the first message. Or some might
listen to the incoming audio yourself and try to guess if the remote party
has answered.

Btw, Unimodem only supports half-duplex audio because almost all modems
only support half-duplex. This means that Unimodem can either play or
record, but not both. In theory you could switch between "listen" or
"play" but it takes a little while and I don't have any idea how to do this
with TAPI 3. This is another good reason to find a voice board with a TAPI
service provider.

Modems are good hardware for making point to point digital connections.
But analog phone lines are terrible for the type of application your
customer is creating."

Hope this helps.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



.



Relevant Pages

  • Re: Future or TAPI
    ... duplex and that the Unimodem driver only supported half duplex operation. ... And when the modem disconnects it does eventually know ... Modems don't have hardware support ... > TAPI application. ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Received fax errors after running SFC.exe
    ... Rockwell DPF External Modem ... Please understand we only provide technical support for the hardware in HCL ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • Re: Received fax errors after running SFC.exe
    ... Do you have a different HCL than I do? ... Rockwell DPF External Modem ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • Re: Dialer is not able to receive incoming calls..
    ... the call, there is a MODEM beep beep sound at the background, it is normal? ... and initiate Phone dialer come with Microsoft and make a call. ... Microsoft MVP for TAPI / Windows SDK ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Using Flashhook with TAPI 3.1 to Transfer w/ a Modem
    ... I'll play with the browser - and no, ... the TAPI Browser. ... I belive the modem must be a voice modem to support ...
    (microsoft.public.win32.programmer.tapi)

Loading