Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tapi Speakerphone

2 views
Skip to first unread message

Limited_Atonement

unread,
Oct 1, 2009, 10:38:52 AM10/1/09
to
Dear Sirs,

I tried to post this already, but I think it failed.

I am looking to do a simple telephony project at home. I'm using
WIN32 (C++) SDK Tapi 3 (in visual studio 2008 on XP SP3), and I would
like to make the microphone and speakers from my soundcard work as a
speakerphone. Sometimes, accidentally, I get the sound coming out of
my speakers, but I didn't exactly do it on purpose... Does anyone
know of a simple tutorial for this kind of thing?
I would also like the capability to record telephone calls. From
what I understand, I have to create rendering and capturing terminals
and select them onto my stream. I think I'm succeeding at that (and
all the stuff before that: getting an address, basic call, et cetera),
but when I actually attempt to make a call, it silently fails. I call
the dial method and connect method, and I can't tell that anything
happens, the methods return immediately and nothing comes out my
speakers. I think the return is S_OK. I'm pretty sure I have Full
Duplex (or whatever it's called) functionality on my soundcard (I'm
able to record and playback at the same time).
Let me know if you would like a minimal source code example of what
I'm doing (which would basically be the whole project). Again, feel
free to point me to existing material. Thanks in advance.

In Christ,
Aaron Laws

Andreas Marschall [exMVP TAPI]

unread,
Oct 1, 2009, 2:29:00 PM10/1/09
to
"Limited_Atonement" <dart...@gmail.com> schrieb im Newsbeitrag
news:601f4dbf-2fe6-4b06...@w36g2000yqm.googlegroups.com...

> I am looking to do a simple telephony project at home. I'm using
> WIN32 (C++) SDK Tapi 3 (in visual studio 2008 on XP SP3), and I would
> like to make the microphone and speakers from my soundcard work as a
> speakerphone. Sometimes, accidentally, I get the sound coming out of
> my speakers, but I didn't exactly do it on purpose... Does anyone
> know of a simple tutorial for this kind of thing?
> I would also like the capability to record telephone calls. From
> what I understand, I have to create rendering and capturing terminals
> and select them onto my stream. I think I'm succeeding at that (and
> all the stuff before that: getting an address, basic call, et cetera),
> but when I actually attempt to make a call, it silently fails. I call
> the dial method and connect method, and I can't tell that anything
> happens, the methods return immediately and nothing comes out my
> speakers. I think the return is S_OK. I'm pretty sure I have Full
> Duplex (or whatever it's called) functionality on my soundcard (I'm
> able to record and playback at the same time).

Aaron,
what telephony device are you using? A voice modem?
Please note the full-duplex issue with modems:
http://www.tapi.info/default.aspx/TAPI/UnimodemFullDuplexSupport.html

--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK / Visual C++ 2003-2008
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.

Limited_Atonement

unread,
Oct 5, 2009, 9:37:17 AM10/5/09
to
Dear Mr. Marschall,

This is copied from my sent mail...I thought I sent it Thursday or
Friday. I'm using the modem that came with my computer. I suppose
it's a voice modem; is there some reason why I ought to suspect it's
not. I know it also handles faxes. Perhaps I need to investigate
this. What other types might it be and how can I identify mine? I
use a Dell ... Inspiron err...ellipse err.. not optiplex...whatever,
one of those popular Dell desktops with the factory modem. I look
forward to hearing back from someone.
In my original post, I think I answered the part about full-duplex:


>I'm pretty sure I have Full
> Duplex (or whatever it's called) functionality on my soundcard (I'm
> able to record and playback at the same time)."

Perhaps you're reminding me to be absolutely sure about that -- I'll
check it tonight or soon, thank you.
Thanks again for your help.

In Christ,
Aaron Laws

On Oct 1, 2:29 pm, "Andreas Marschall [exMVP TAPI]"

Andreas Marschall [exMVP TAPI]

unread,
Oct 5, 2009, 5:06:30 PM10/5/09
to
"Limited_Atonement" <dart...@gmail.com> schrieb im Newsbeitrag
news:362a5899-d92b-41d4...@o35g2000vbi.googlegroups.com...

> I'm using the modem that came with my computer. I suppose
> it's a voice modem; is there some reason why I ought to suspect it's
> not. I know it also handles faxes. Perhaps I need to investigate
> this. What other types might it be and how can I identify mine?

Aaron,
those built-in modems are often only fax/data modems.
You can check whether it has DeviceClasses "wave/in" and wave/out" in
LINEDEVCAPS / LIONEADDRESSCAPS.

> In my original post, I think I answered the part about full-duplex:
> >I'm pretty sure I have Full
> > Duplex (or whatever it's called) functionality on my soundcard (I'm
> > able to record and playback at the same time)."
> Perhaps you're reminding me to be absolutely sure about that -- I'll
> check it tonight or soon, thank you.

My point wasn't the duplex capabilties of your soundcard but of your
modem...

> Thanks again for your help.

You are welcome.

Limited_Atonement

unread,
Oct 6, 2009, 9:12:06 AM10/6/09
to
Dear Mr. Marschall,

Thank you very much for your expertise. I will check further soon.
It seems that a fax modem ought to be able to do everything a voice
modem can do. If the modem can play the analog sound it hears coming
from the phone line, and it can transmit an analog singal, why can't
it take that signal from the sound card, or my program for that
matter? Perhaps I could write a program imitating a fax machine such
that after the phone rings four or six times, my program can translate
wav data into 'fax' data (whatever transformation that would be...)
then play a beep, then begin recording the incoming 'fax' (caller's
voice)?
Thanks again, and I'll check soon about what you told me to
check.

In Christ,
Aaron Laws

On Oct 5, 5:06 pm, "Andreas Marschall [exMVP TAPI]"


<Andreas.Marsch...@I-B-A-M.de> wrote:
> Aaron,
> those built-in modems are often only fax/data modems.
> You can check whether it has DeviceClasses "wave/in" and wave/out" in
> LINEDEVCAPS / LIONEADDRESSCAPS.
>

> My point wasn't the duplex capabilties of your soundcard but of your
> modem...
>

Matthias Moetje [exMVP]

unread,
Oct 8, 2009, 8:20:12 PM10/8/09
to
Aaron,

> Thank you very much for your expertise. I will check further soon.
> It seems that a fax modem ought to be able to do everything a voice
> modem can do. If the modem can play the analog sound it hears coming
> from the phone line, and it can transmit an analog singal, why can't
> it take that signal from the sound card, or my program for that
> matter?

No, it can't! Fax transmission as well as data transmission is handled
by DSPs in the hardware of modems. You never get at the "raw" data.
The raw data is actually analog audio (as it is an analog phone line),
which is running through different filters and is then digitized and
processed
by the TSP. Then the actual fax page bits are sent to the computer.

For analog audio different filtering and AD conversion has to be performed.
Either a modem has implemented this in its hardware or not!

> Perhaps I could write a program imitating a fax machine such
> that after the phone rings four or six times, my program can translate
> wav data into 'fax' data (whatever transformation that would be...)
> then play a beep, then begin recording the incoming 'fax' (caller's
> voice)?

No...

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

Limited_Atonement

unread,
Oct 9, 2009, 9:23:46 AM10/9/09
to
Dear Mr. Moetje,

If you don't feel like answering this, don't bother, but I'm
wondering about the history of this. If I were creating this (and I
AM a novice), I would make it such that the data would come in to the
modem (analog, of course), and the modem would convert it to digital
(AD at the sample rate specified by the program, or TAPI, but perhaps
ultimately by the program) and send it on. Then, the program (either
fax or other) would take care of those bits. This 'taking care of'
could be done by a service of the windows 32 framework (TAPI, for
instance), then the program can get the info, either translating as
audio or fax, or a custom use (whatever that might be).
What is the advantage of hiding the data from the programmer and
putting more work on the modem side where parameters can't be
specified? Or perhaps here my ignorance betrays me here with `where
parameters can't be specified.' Do modems have a standard sample
rate? I am now beginning to see why there might be a Most Valuable
Professional in this field: because of the obtuse nature of phone-line/
computer interchange. At first blush, I thought it would be a simple
thing, just standard audio manipulation, and if I wanted to create a
fax machine, I would not treat those digital samples as audio samples,
but as data bits. Oh well. Thanks again for your time.

In Christ,
Aaron Laws

On Oct 8, 8:20 pm, "Matthias Moetje [exMVP]"

> Augustenstraße 24

Matthias Moetje [exMVP]

unread,
Oct 16, 2009, 4:28:51 PM10/16/09
to
Aaron,

the history behind this is as follows:

Older computers simply were not fast enough to perform
the required signal processing. Therefore this was done
in DSPs. DSPs are highly specialiced processors, not
suitable to drive a computer but able to perform certain
signal processing tasks much faster than a usual CPU.

In these times everything was done to save the CPU
processing power for other tasks. Additionally through
their multitasking implementations the operating systems
were not able to guarantee a permanent stream of realtime
processing. Another process could "steal" CPU cycles and
this could cause the data stream on the phone line to interrupt.

Similar things apply to audio cards or graphic cards.

Recently PC designs were introduced that in fact use the processor
to perform such things. There are audioc codecs (like AC97)
and also modem codecs where the processing is done by the
CPU. But even in these cases this is handled by some components
on the chipset but not by software in the OS.

One more thing: Data transmission over analog lines is not
as simple as digitizing the data like with consumer audio. There
is much more to it as a frequency multiplex is used and complex
algorithms are used to MOdulate and DEModulate.

If you really would be presented with a digitized stream of the
audio, you would never be able to get the real data out of it.
Additionally this is a duplex operation: One modem must respond
reception or misreception instantly. There is not enogh time
as that this could be done reliably through a process running
in user mode.


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


"Limited_Atonement" <dart...@gmail.com> wrote in message
news:3993a061-201b-4552...@z24g2000yqb.googlegroups.com...

>> Augustenstra�e 24

Limited_Atonement

unread,
Oct 19, 2009, 8:28:47 AM10/19/09
to
Dear Mr. Moetje,

Your expertise is appreciated. Thanks again for allowing yourself
to be publically questioned, day after day. Do you or the other guru
here get paid for spending SO MUCH time answering newbie questions? I
bow before your experience!!

In Christ,
Aaron Laws

On Oct 16, 4:28 pm, "Matthias Moetje [exMVP]"
<moetje@terasens_nospam_.de> wrote:
> Aaron,
>

> Augustenstraße 24

Matthias Moetje [exMVP]

unread,
Nov 5, 2009, 11:16:33 AM11/5/09
to
Aaron,

thanks for your reply, you're welcome!

PS: No, we don't get paid...


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

"Limited_Atonement" <dart...@gmail.com> wrote in message

news:5061e8ea-dcbd-48d3...@t2g2000yqn.googlegroups.com...

>> Augustenstra�e 24

0 new messages