📄 ch31.htm
字号:
<html>
<head>
<title>Chapter 31 -- Third Party TAPI Tools</title>
<meta NAME="GENERATOR" CONTENT="Microsoft FrontPage 3.0">
</head>
<body TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#CE2910">
<!-- Spidersoft WebZIP Ad Banner Insert -->
<!-- End of Spidersoft WebZIP Ad Banner Insert-->
<h1><font COLOR="#FF0000">Chapter 31</font></h1>
<h1><b><font SIZE="5" COLOR="#FF0000">Third Party TAPI Tools</font></b> </h1>
<hr WIDTH="100%">
<h3 ALIGN="CENTER"><font SIZE="+2" COLOR="#000000">CONTENTS<a NAME="CONTENTS"></a> </font></h3>
<ul>
<li><a HREF="#TheVisualVoiceTelephonyToolktforW">The Visual Voice Telephony Toolkit for
Windows</a> <ul>
<li><a HREF="#TheVoiceControl">The Voice Control</a> </li>
<li><a HREF="#TheTestControl">The Test Control</a> </li>
<li><a HREF="#TheVlinkControl">The Vlink Control </a></li>
<li><a HREF="#TheVoiceWorkbench">The Voice Workbench</a> </li>
<li><a HREF="#TheVoiceMonitor">The Voice Monitor</a> </li>
<li><a HREF="#TheTAPIExaminerandtheStylusTraceA">The TAPI Examiner and the Stylus Trace
Applications</a> </li>
</ul>
</li>
<li><a HREF="#PronexusVBVoiceDevelopmentKit">Pronexus' VBVoice Development Kit</a> <ul>
<li><a HREF="#TheVBFrameControl">The VBFrame Control</a> </li>
<li><a HREF="#TheVBVoiceControls">The VBVoice Controls</a> </li>
<li><a HREF="#TheProcessofBuildingaVBVoiceApplic">The Process of Building a VBVoice
Application</a> </li>
<li><a HREF="#VBVoiceandVoiceFiles">VBVoice and Voice Files</a> </li>
<li><a HREF="#VBVoiceTestMode">VBVoice Test Mode</a> </li>
</ul>
</li>
<li><a HREF="#MicrosoftPhone">Microsoft Phone</a> <ul>
<li><a HREF="#AddingAnnouncementMessageandAutoFa">Adding Announcement, Message, and AutoFax
Mailboxes</a> </li>
<li><a HREF="#ConfiguringtheMicrosoftPhoneAnswerin">Configuring the Microsoft Phone
Answering Machine</a> </li>
</ul>
</li>
<li><a HREF="#Summary">Summary</a> </li>
</ul>
<hr>
<p>In the previous chapters you learned how the TAPI system works and how you can use
Visual Basic and Microsoft C++ to build your own TAPI-compliant applications. In this
chapter you'll learn how to use two of the most popular third-party development tools for
TAPI services. Each of these tools has a unique approach to building TAPI-enabled
applications. At the end of the chapter, you'll also get a look at Microsoft Phone, the
new application from Microsoft that combines MAPI, SAPI, and TAPI services. </p>
<p>The first TAPI tool you'll review is the Visual Voice Telephony Toolkit for Windows
from Stylus Innovation, Inc. This system includes a handful of OCX controls that you place
on your Visual Basic forms to gain access to TAPI services. By setting control properties,
invoking methods, and responding to defined events, you can build solid multiline
telephony applications in a very short time. </p>
<div align="center"><center>
<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
<tr>
<td><b>Note</b></td>
</tr>
<tr>
<td><blockquote>
<p>The Visual Voice system comes in several versions for both 16- and 32-bit Windows
operating systems. Visual Voice also sells versions for TAPI- and MWAVE-based systems. The
version covered here is the 32-bit TAPI system. It runs fine on both 16- and 32-bit
Windows.</p>
</blockquote>
</td>
</tr>
</table>
</center></div>
<p>The second TAPI development tool you'll test is the VBVoice system from Pronexus. The
VBVoice approach to TAPI design is quite different. Instead of placing controls on your
form and using them to gain access to TAPI services, the VBVoice system allows you to
visually build your telephony application by linking the controls in a flow diagram. Using
this method, you can build complete telephony applications without writing a single line
of Visual Basic code. </p>
<p>Finally, you'll get a peek at Microsoft Phone-the new application from Microsoft that
combines MAPI, SAPI, and TAPI services into a single communication application. You'll
learn how to install and configure Microsoft Phone and see how you can combine telephony,
e-mail, and speech into a single system. </p>
<h2><a NAME="TheVisualVoiceTelephonyToolktforW"><b><font SIZE="5" COLOR="#FF0000">The
Visual Voice Telephony Toolkit for Windows</font></b></a></h2>
<p>The Visual Voice Telephony Toolkit is one of the most popular TAPI systems for Visual
Basic development. The kit contains eight basic Visual Voice components. Three of these
components are controls:
<ul>
<li><font COLOR="#000000">The </font><tt><font FACE="Courier">Voice</font></tt> control-This
is the main TAPI control. It gives you access to the standard TAPI events and methods. </li>
<li><font COLOR="#000000">The </font><tt><font FACE="Courier">Test</font></tt> control-This
control is used to simulate a live telephone line. With this control and a sound card, you
can fully test your application without having to use live telephone lines. </li>
<li><font COLOR="#000000">The </font><tt><font FACE="Courier">Vlink</font></tt> control-This
control is used to create conversation links between separate Visual Basic applications on
the same machine. This is similar to a Visual Basic OLE server. </li>
</ul>
<p>There are also five valuable support applications you can use to build and manage your
TAPI applications:
<ul>
<li>The <i>Voice Workbench</i>-This is a tool for creating and managing Visual Voice
objects, including voice files, voice strings, voice queries, and code templates. </li>
<li><font COLOR="#000000">The </font><i>Voice Monitor</i>-This is a Visual Basic application
that can be used to monitor line activity on a multiline TAPI workstation. You'll use this
to keep track of telephony activity on your TAPI pc. </li>
<li><font COLOR="#000000">The </font><i>Virtual Phone</i>-This is a Visual Basic application
that allows you to completely test your TAPI system without having to connect to and use
live telephone lines. This application was built using the <tt><font FACE="Courier">Test</font></tt>
control mentioned above. </li>
<li><font COLOR="#000000">The </font><i>TAPI Examiner</i>-This is a Visual Basic program
that allows you to test individual TAPI services. It is a helpful debugging tool. </li>
<li><i>Stylus Trace</i>-This is a stand-alone program that you can use to trace all Visual
Voice activity on your workstation. It is excellent for debugging and checking out your
Visual Voice installation. </li>
</ul>
<div align="center"><center>
<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
<tr>
<td><b>Note</b></td>
</tr>
<tr>
<td><blockquote>
<p>You'll find a demonstration copy of the Visual Voice Toolkit on the CD-ROM that ships
with this book. You can read this section of this chapter without installing the Visual
Voice software, but you'll get more out of the material if you have Visual Voice up and
running.</p>
</blockquote>
</td>
</tr>
</table>
</center></div>
<p>There are three Visual Voice controls. The <tt><font FACE="Courier">Voice</font></tt>
control is the main TAPI interface control. You'll use this control to gain access to TAPI
services on your workstation. The <tt><font FACE="Courier">Test</font></tt> control can be
used to perform tests on your applications without the need for a live telephone line. The<tt><font
FACE="Courier"> VLink</font></tt> control can be used to pass information between running
Visual Basic Visual Voice applications. </p>
<p>The following sections review the controls and their methods, properties, and events
more closely. </p>
<div align="center"><center>
<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
<tr>
<td><b>Note</b></td>
</tr>
<tr>
<td><blockquote>
<p>The reviews of the methods, properties, and events of the Visual Voice components
covers the OCX controls only. The Visual Voice Toolkit for Win32 also contains DLLs for
use with C++ applications (or other programming languages that use DLLs). The descriptions
of methods, properties, and events described for the Visual Basic controls are the same
for the API calls in the DLL support files.</p>
</blockquote>
</td>
</tr>
</table>
</center></div>
<h3><b><a NAME="TheVoiceControl">The <tt><font SIZE="4" FACE="Courier">Voice</font></tt> <font
SIZE="4">Control</font></a></b></h3>
<p>The <tt><font FACE="Courier">Voice</font></tt> control has 33 methods that you can
invoke. Most of them correspond to methods found in the <tt><font FACE="Courier">TAPILINE</font></tt>
control and specific API functions defined within TAPI. For example, there is an <tt><font
FACE="Courier">AllocateLine</font></tt> method to open a line for voice output. There are
also <tt><font FACE="Courier">DeallocateLine</font></tt> and <tt><font FACE="Courier">Stop</font></tt>
methods for closing a line and shutting down TAPI services (see Figure 31.1). </p>
<p><a HREF="f31-1.gif"><b>Figure 31.1 : </b><i>Viewing the Voice control properties page .</i></a>
</p>
<p>You can use the <tt><font FACE="Courier">Voice</font></tt> control to place an outbound
call by setting the <tt><font FACE="Courier">Value</font></tt> property to
"555-1212" and then invoking the <tt><font FACE="Courier">Call</font></tt>
method. When a call comes in to the line, the <tt><font FACE="Courier">RingDetected</font></tt>
event fires and you can use the <tt><font FACE="Courier">PickUp</font></tt> method to
answer the call. </p>
<p>The <tt><font FACE="Courier">Voice</font></tt> control has several other unique, and
very useful, methods. For example, the <tt><font FACE="Courier">Voice</font></tt> control
contains several <tt><font FACE="Courier">Play...</font></tt> methods that can be used to
play back numbers, dates, words, phrases, even complete sound files. There are also
properties that identify the caller, including <tt><font FACE="Courier">CallerID</font></tt>,
<tt><font FACE="Courier">ANI</font></tt> (<i>Automatic Number Identification</i>), and
others. </p>
<div align="center"><center>
<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
<tr>
<td><b>Tip</b></td>
</tr>
<tr>
<td><blockquote>
<p>There is also a Visual Basic BAS module called <tt><font FACE="Courier">VOICETP.BAS</font></tt>.
This module contains constant definitions and sample and helper functions and subroutines.
This additional code is not required when using the <tt><font FACE="Courier">Voice</font></tt>
control, but it does come in quite handy. When you add the <tt><font FACE="Courier">Voice</font></tt>
control to your project, you should add the <tt><font FACE="Courier">VOICETP.BAS</font></tt>
module, too. </p>
</blockquote>
</td>
</tr>
</table>
</center></div>
<p>Table 31.1 lists all of the TAPI-related methods along with short descriptions of their
use.<br>
</p>
<p align="center"><b>Table 31.1. The <tt><font FACE="Courier">Voice </font></tt>control
methods.</b> </p>
<div align="center"><center>
<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
<tr>
<td><i>Method</i></td>
<td WIDTH="397"><i>Description</i> </td>
</tr>
<tr>
<td WIDTH="193"><tt><font FACE="Courier">AbortTransfer</font></tt> </td>
<td WIDTH="397">Aborts a transfer previously initiated through the <tt><font
FACE="Courier">AttendedTransfer</font></tt> method. </td>
</tr>
<tr>
<td WIDTH="193"><tt><font FACE="Courier">AllocateLine</font></tt> </td>
<td WIDTH="397">Attempts to allocate the phone line specified in the <tt><font
FACE="Courier">PhoneLine</font></tt> property that will be used for all subsequent Visual
Voice actions. </td>
</tr>
<tr>
<td WIDTH="193"><tt><font FACE="Courier">AttendedTransfer</font></tt> </td>
<td WIDTH="397">Begins an attended transfer or conference to the extension specified in
the <tt><font FACE="Courier">Value</font></tt> property. </td>
</tr>
<tr>
<td WIDTH="193"><tt><font FACE="Courier">BlindTransfer</font></tt> </td>
<td WIDTH="397">Blindly transfers the call to the number specified in the <tt><font
FACE="Courier">Value</font></tt> property and then hangs up. </td>
</tr>
<tr>
<td WIDTH="193"><tt><font FACE="Courier">Call</font></tt></td>
<td WIDTH="397">Dials the digits stored in the <tt><font FACE="Courier">Value</font></tt>
property and returns when call progress detection has completed. The <tt><font
FACE="Courier">ActionResult</font></tt> property will contain the status of the call. </td>
</tr>
<tr>
<td WIDTH="193"><tt><font FACE="Courier">CheckError</font></tt> </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -