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

TAPI 2.2 Sample Code Please?

735 views
Skip to first unread message

Larry Lindstrom

unread,
Oct 2, 2008, 6:00:28 AM10/2/08
to
Hi Folks:

Developing on XP Home, VS 2008 Pro, WIN32 no MFC.

I want to add dialer functionality to my application.
It's C++ code, I believe TAPI 2.2 is based on C code, so
that seems like a a good match.

I've found the first page of a TAPI 2.2 tutorial at
http://www.geocities.com/cool_ranju/tapi/index.html.

The author does an excellent job of describing
lineInitializeEx().

The code derived from that sample seems to work.
When first run, before I installed a phone modem, the
function reported 6 TAPI devices. After the modem was
added the function reports 7 TAPI devices.

So now it's time to do something with the initialized
TAPI, and progress is grinding quickly to a halt.

Are there some simple code samples, that do simple
tasks, like dialing a number?

Andreas Marschall has something called a TAPI browser,
but I don't see any source code.

Suggestions?

Thanks
Larry

Angus

unread,
Oct 2, 2008, 6:12:03 AM10/2/08
to
That looks quite an interesting intro.

You should find some samples on Andreas site. Have a look there.

The next thing you need to do is enumerate the devices checking for
capabilities. lineGetDevCaps. You probably want INTERACTIVEVOICE. Or if
you are doing answering machine stuff maybe AUTOMATEDVOICE.

Set that as your next task. you will need to find a hardware device on your
system which is capable of the task you intend. For example if you find you
have a modem or an extension on a switch which is capable of interactive
voice you can then do a lineOpen on the device and then you can do all sorts
of exciting things like lineMakeCall etc.

Don't forget to setup your callback mechanism to detect events passed back
by your switch/telephony device.

TAPI Browser is a tool provided in the Microsoft Platform SDK. I don't
believe source code is available. That's a shame of course - because would
be v useful to see. I believe there is a similar piece of software around
with source. Also look at Julmar site - mentioned on Andreas site.

Good luck.

Angus


"Larry Lindstrom" <nob...@nowhere.com> wrote in message
news:OdOdnf07vNkgBnnV...@comcast.com...

Christian ASTOR

unread,
Oct 2, 2008, 6:21:13 AM10/2/08
to
On 2 oct, 12:00, Larry Lindstrom <nob...@nowhere.com> wrote:

>     Are there some simple code samples, that do simple
> tasks, like dialing a number?

Have you seen PSDK samples, like dialer.c ?

Matthias Moetje [MVP]

unread,
Oct 2, 2008, 1:13:45 PM10/2/08
to
Larry,

you can find all current and retired PSDK TAPI samples here:

http://www.tapi.info/default.aspx/TAPI/PSDKSamples.html

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

"Larry Lindstrom" <nob...@nowhere.com> wrote in message
news:OdOdnf07vNkgBnnV...@comcast.com...

Larry Lindstrom

unread,
Oct 4, 2008, 2:44:20 AM10/4/08
to

Thanks Christian:

To the best of my knowledge, I've done a full install of
VS 2008 Pro and it's SP1.

There are two dialer.cpp code samples, both under
Windows Mobile 5.0 SDK R2.

A search on my system for "PSDK" and shows no matches.
A search for "platform" shows some matches, but nothing
line "Platform SDK".

I've also searched for "PSDK" on MSDN, and I've found a
free CD for "Microsoft Platform SDK for Windows XP SP2
August 2004 Edition".

Do I need to get this SDK? Is there any place where I
can download it?

Can I get what I need from the samples in the mobile
SDK give me what I need?

I appreciate your assistance.

Thanks
Larry

Larry Lindstrom

unread,
Oct 4, 2008, 4:38:04 AM10/4/08
to
Larry Lindstrom wrote:
> Christian ASTOR wrote:
>> On 2 oct, 12:00, Larry Lindstrom <nob...@nowhere.com> wrote:
>>
>>> Are there some simple code samples, that do simple
>>> tasks, like dialing a number?
>>
>> Have you seen PSDK samples, like dialer.c ?

< Snip >

Hi Again Christian:

I think I've found it. A TAPI 2 dialer called dialer.c.

Thanks
Larry

Larry Lindstrom

unread,
Oct 4, 2008, 5:17:17 AM10/4/08
to
Angus wrote:
> That looks quite an interesting intro.
>
> You should find some samples on Andreas site. Have a look there.
>
> The next thing you need to do is enumerate the devices checking for
> capabilities. lineGetDevCaps. You probably want INTERACTIVEVOICE. Or if
> you are doing answering machine stuff maybe AUTOMATEDVOICE.

Thanks Angus, Christian and Matthias:

I'm sorry about not getting back to you yesterday, but I was
called to other tasks.

I believe I've found the dialer.c sample Christian was talking
about. It's a TAPI 2 project, and I've built a VS 2008 solution
around it, so I can step through it with the debugger. I've been
unable to find a reference to INTERACTIVEVOICE in the sample code.

When I run the sample, it asks that I select a line. The choices,
sybject to my typos, are:

H323 Line
IPCONF LINE
LPT1T
RAS PPPoE Line0000
RAS VPN Line 0
SM56USBCXT
WAN Miniport (L2TP)

I have a 56k USB modem, so I selected SM56USBCXT, punched
my cell number on the sample app's keypad, hit dial, nothing,
hit dial a couple of more times, nothing, clicked on an menu
item and the modem started clicking, and my phone started
ringing. So something works.

Needless to say, I'd to shield the user from such a confusing
choce.

lineGetDevCaps() fills a LINEDEVCAPS structure. Am I supposed
to look for an item in the LINEDEVCAPS with a value of
INTERACTIVEVOICE?

> Set that as your next task. you will need to find a hardware device on your
> system which is capable of the task you intend. For example if you find you
> have a modem or an extension on a switch which is capable of interactive
> voice you can then do a lineOpen on the device and then you can do all sorts
> of exciting things like lineMakeCall etc.
>
> Don't forget to setup your callback mechanism to detect events passed back
> by your switch/telephony device.

Yea, I decided to use the callback on the code I built from that
first sample.

> TAPI Browser is a tool provided in the Microsoft Platform SDK. I don't
> believe source code is available. That's a shame of course - because would
> be v useful to see. I believe there is a similar piece of software around
> with source. Also look at Julmar site - mentioned on Andreas site.
>
> Good luck.

I'll need it.

Thanks
Larry

Matthias Moetje [MVP]

unread,
Oct 5, 2008, 5:16:26 AM10/5/08
to
Larry,

the application API (2.X) for TAPI applications on Windows CE
is pretty much the same like Windows Desktop version (except for
the event notification mechanisms), so all Desktop samples should
be easily portable. Some PSDK samples that have been removed
from recent PSDK versions can be found here:

http://www.tapi.info/default.aspx/TAPI/PSDKSamples.html

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

"Larry Lindstrom" <nob...@nowhere.com> wrote in message

news:wvGdneRM_stVjXrV...@comcast.com...

Matthias Moetje [MVP]

unread,
Oct 5, 2008, 5:18:09 AM10/5/08
to
Larry,

there is not INTERACTIVEVOICE defined, the correct definition
is LINEMEDIAMODE_INTERACTIVEVOICE.

You should get it by including tapi.h


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

"Larry Lindstrom" <nob...@nowhere.com> wrote in message

news:efadnXpCQvA_qXrV...@comcast.com...

Larry Lindstrom

unread,
Oct 6, 2008, 4:24:17 PM10/6/08
to
Matthias Moetje [MVP] wrote:
> Larry,
>
> there is not INTERACTIVEVOICE defined, the correct definition
> is LINEMEDIAMODE_INTERACTIVEVOICE.
>
> You should get it by including tapi.h

Thanks Matthias, and all who responded:

I was going to use TAPI 2 because of it's C origins.

But I've found a sample TAPI 3 dialer, so I guess
I'll just go with the current technology.

Hopefully, this will put me in a good position to
take advantage of any TAPI 3 features in the future.

I haven't had time to add the sample code into my
application, so there might be some unforeseen
problem, but this is the plan for now.

I appreciate everybody's assistance.

Andreas Marschall [MVP TAPI]

unread,
Oct 15, 2008, 10:55:27 AM10/15/08
to
"Larry Lindstrom" <nob...@nowhere.com> schrieb im Newsbeitrag
news:efadnXpCQvA_qXrV...@comcast.com...

> > TAPI Browser is a tool provided in the Microsoft Platform SDK. I don't
> > believe source code is available. That's a shame of course - because
would
> > be v useful to see. I believe there is a similar piece of software around
> > with source. Also look at Julmar site - mentioned on Andreas site.

> I'll need it.

Larry,
unfortunately Angus is correct in his assumption that the sources of the MS
TAPI Browsers are not publicly or, to be correct, freely available.
It is accessible via MSDN Code Center Premium which requires a licensing
contract with MS.
I have access to it via MVPSLP but of course can't share any of the code since
it is MS property.

The executable of TB are publicly available though.
See my TAPI and TSPI FAQ:

Q: Where can I download TAPI Browser ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Where_can

Q: Is there a user guide available for TAPI Browser TB20 ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Is_there_1

Q: Is there a user guide available for TAPI Browser TB3x ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Is_there_2


There is a collection of very usefull TAPI tools (including open source in
C++) from JulMar:
http://www.julmar.com/tapi/
Please take a look at JulMar Phone.exe first.

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

0 new messages