⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch31.htm

📁 MAPI__SAPI__TAPI
💻 HTM
📖 第 1 页 / 共 5 页
字号:
    <td WIDTH="427">Specifies whether the <tt><font FACE="Courier">SendData()</font></tt> 
    property array and the <tt><font FACE="Courier">SendDataTotal</font></tt> property will be 
    cleared after a <tt><font FACE="Courier">Send</font></tt> or <tt><font FACE="Courier">Request</font></tt> 
    method is complete. Default is <tt><font FACE="Courier">True</font></tt>. </td>
  </tr>
  <tr>
    <td WIDTH="163"><tt><font FACE="Courier">Debug</font></tt></td>
    <td WIDTH="427">If this property is set to <tt><font FACE="Courier">True</font></tt>, the <tt><font
    FACE="Courier">Debug</font></tt> event executes at the start and finish of every <tt><font
    FACE="Courier">Vlink</font></tt> control action. The default is <tt><font FACE="Courier">False</font></tt>. 
    </td>
  </tr>
  <tr>
    <td WIDTH="163"><tt><font FACE="Courier">NodeDescription</font></tt> </td>
    <td WIDTH="427">A string that describes the node. The default is null. </td>
  </tr>
  <tr>
    <td WIDTH="163"><tt><font FACE="Courier">NodeDescriptionList</font></tt> </td>
    <td WIDTH="427">Returns the descriptions of all active nodes. </td>
  </tr>
  <tr>
    <td WIDTH="163"><tt><font FACE="Courier">NodeName</font></tt> </td>
    <td WIDTH="427">Specifies the name of the node.</td>
  </tr>
  <tr>
    <td WIDTH="163"><tt><font FACE="Courier">NodeNameList</font></tt> </td>
    <td WIDTH="427">Returns a list of node names for all active nodes. </td>
  </tr>
  <tr>
    <td WIDTH="163"><tt><font FACE="Courier">NodeTotal</font></tt> </td>
    <td WIDTH="427">Returns the total number of active nodes in the system. </td>
  </tr>
  <tr>
    <td WIDTH="163"><tt><font FACE="Courier">ReceivedData</font></tt> </td>
    <td WIDTH="427">Returns an array of strings sent from another node. </td>
  </tr>
  <tr>
    <td WIDTH="163"><tt><font FACE="Courier">ReceivedDataTotal</font></tt> </td>
    <td WIDTH="427">Returns the number of items in the <tt><font FACE="Courier">ReceivedData()</font></tt> 
    property array when another node sends or returns data. This property is read-only. </td>
  </tr>
  <tr>
    <td WIDTH="163"><tt><font FACE="Courier">SendData</font></tt> </td>
    <td WIDTH="427">Specifies an array of strings to send to another node. </td>
  </tr>
  <tr>
    <td WIDTH="163"><tt><font FACE="Courier">SendDataTotal</font></tt> </td>
    <td WIDTH="427">Specifies the number of elements in the <tt><font FACE="Courier">SendData()</font></tt> 
    property array to send during a <tt><font FACE="Courier">Send</font></tt> or <tt><font
    FACE="Courier">Request</font></tt> method or when returning data in a <tt><font
    FACE="Courier">RequestReceived</font></tt> event. </td>
  </tr>
  <tr>
    <td WIDTH="163"><tt><font FACE="Courier">SendSubject</font></tt> </td>
    <td WIDTH="427">Specifies the subject of the data being sent. </td>
  </tr>
  <tr>
    <td WIDTH="163"><tt><font FACE="Courier">SendToNode</font></tt> </td>
    <td WIDTH="427">Specifies which node will be the target of any subsequent <tt><font
    FACE="Courier">Send</font></tt> or <tt><font FACE="Courier">Request</font></tt> method. </td>
  </tr>
</table>
</center></div>

<p>There are three events defined for the <tt><font FACE="Courier">Vlink</font></tt> 
control. Table 31.9 shows the three events and their meaning. <br>
</p>

<p align="center"><b>Table 31.9. The events of the <tt><font FACE="Courier">Vlink </font></tt>control.</b> 
</p>
<div align="center"><center>

<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
  <tr>
    <td><i>Event</i></td>
    <td WIDTH="409"><i>Description</i> </td>
  </tr>
  <tr>
    <td WIDTH="181"><tt><font FACE="Courier">DataReceived</font></tt> </td>
    <td WIDTH="409">This event is triggered when another node has sent data by way of the <tt><font
    FACE="Courier">Send</font></tt> method and the data is now available at this node. </td>
  </tr>
  <tr>
    <td WIDTH="181"><tt><font FACE="Courier">Debug</font></tt></td>
    <td WIDTH="409">If the <tt><font FACE="Courier">Debug</font></tt> property is set to <tt><font
    FACE="Courier">True</font></tt>, this event is triggered before every Visual Link action 
    starts and after every Visual Link action finishes. </td>
  </tr>
  <tr>
    <td WIDTH="181"><tt><font FACE="Courier">RequestReceived</font></tt> </td>
    <td WIDTH="409">This event is triggered when another node has sent a request by way of the 
    <tt><font FACE="Courier">Request</font></tt> method. </td>
  </tr>
</table>
</center></div>

<p>That completes the tour of the Visual Voice controls. Next you'll learn about the 
various support programs and development tools that are supplied with the Visual Voice 
Telephony TAPI Toolkit for Win32. </p>

<h3><a NAME="TheVoiceWorkbench"><b>The Voice Workbench</b></a> </h3>

<p>The Voice Workbench is an essential tool for building Visual Voice TAPI applications. 
The Workbench allows you to create and maintain four key Visual Voice objects: 

<ul>
  <li><font COLOR="#000000">Voice files</font> </li>
  <li><font COLOR="#000000">Voice strings</font> </li>
  <li><font COLOR="#000000">Voice queries</font> </li>
  <li><font COLOR="#000000">Subroutine templates</font> </li>
</ul>

<p><i>Voice files</i> are the actual WAV format recordings of human speech. The Voice 
Workbench allows you to record and catalog voice files for later reference in your Visual 
Basic project. Typical voice file objects would be &quot;Welcome to Visual Voice,&quot; or 
&quot;Press one to continue,&quot; and so on. Figure 31.4 shows the Voice Workbench while 
reviewing a set of voice files. </p>

<p><a HREF="f31-4.gif"><b>Figure 31.4 : </b><i>Reviewing voice files with the Voice 
Workbench .</i></a> </p>

<p><i>Voice strings</i> are a collection of one or more voice files plus literal or 
variable values. The Workbench lets you link several prerecorded phrases along with fixed 
or variable data retrieved from a database or computed by your Visual Basic program. For 
example, you might create a voice string object that returns the total number of messages 
in your voice-mail inbox: </p>

<p>&quot;There are&quot; <tt><font FACE="Courier">MsgTable[MsgCount]</font></tt> &quot;new 
messages&quot; </p>

<p>The phrase above links two voice files (possibly named <tt><font FACE="Courier">ThereAre.WAV</font></tt> 
and <tt><font FACE="Courier">NewMsgs.WAV</font></tt>) with a pointer to a field (<tt><font
FACE="Courier">MsgCount</font></tt>) in a database table (<tt><font FACE="Courier">MsgTable</font></tt>). 
This is one of the most powerful aspects of the Workbench. You can very easily link your 
voice output to variables in your program or to data stored in a shared database. Figure 
31.5 shows the Workbench building a voice string using a database link. </p>

<p><a HREF="f31-5.gif"><b>Figure 31.5 : </b><i>Building a voice string using Voice 
Workbench .</i></a> </p>

<p>You can also build and maintain voice query objects with the Voice Workbench. <i>Voice 
queries</i> are just like voice strings except that they ask the user for a predetermined 
response in the form of keypad selections. You can build your queries to expect a set 
amount of input before continuing with your TAPI application. Figure 31.6 shows the 
Workbench editing an existing voice query. </p>

<p><a HREF="f31-6.gif"><b>Figure 31.6 : </b><i>Generating Visual Basic code using a 
Workbench template.</i></a> </p>

<p>Lastly, the Workbench also lets you create and store your own <i>subroutine templates</i>. 
These templates can link voice strings, voice queries, and pure Visual Basic code into a 
single unit. Once the template is completed, you can ask the Workbench to generate Visual 
Basic code for you to place into your application. In this way you can build complex 
telephony logic without spending a great deal of time writing Visual Basic code. Figure 
31.7 shows an example of Workbench-generated code using a Visual Voice template object. </p>

<p><a HREF="f31-7.gif"><b>Figure 31.7 : </b><i>Generating Visual Basic code using a 
Workbench template .</i></a> </p>

<h3><a NAME="TheVoiceMonitor"><b>The Voice Monitor</b></a></h3>

<p>The Voice Monitor is a Visual Basic application that can monitor activity on multiline 
phone installations (see Figure 31.8). </p>

<p><a HREF="f31-8.gif"><b>Figure31.8 : </b><i>Using Voice Monitor to track line activity .</i></a> 
</p>

<p>This is very useful when you have a multiline telephony card in your TAPI workstation 
and are running one or more Visual Basic applications on each line. </p>

<h4><b>The Virtual Phone</b></h4>

<p>The Virtual Phone is a very handy testing tool. This tool simulates the appearance of a 
live telephone line for your Visual Voice applications (see Figure 31.9). </p>

<p><a HREF="f31-9.gif"><b>Figure 31.9 : </b><i>Running the Virtual Phone .</i></a> </p>

<p>The program is actually written in Visual Basic using Visual Voice's <tt><font
FACE="Courier">Test</font></tt> control, and the source code is included in the complete 
toolkit. The program works by talking directly to the <tt><font FACE="Courier">Voice</font></tt> 
control rather than to a telephone line. For this reason, you cannot use the Virtual Phone 
for any other TAPI applications that do not use the <tt><font FACE="Courier">Voice</font></tt> 
control. </p>

<p>You can set values for the <tt><font FACE="Courier">CallerID</font></tt> and <tt><font
FACE="Courier">CalledID</font></tt> in the Virtual Phone and have these values passed into 
your Visual Basic application that uses the <tt><font FACE="Courier">Voice</font></tt> 
control. In this way you can even test applications that require advanced telephony 
service features without having to use a live telephone line. </p>

<h3><a NAME="TheTAPIExaminerandtheStylusTraceA"><b>The TAPI Examiner and the Stylus Trace 
Applications</b></a></h3>

<p>The TAPI Examiner is an excellent tool for testing your hardware's compatibility with 
TAPI services. The examiner runs through all the major service requests, including 
selecting and opening lines, placing outbound calls, receiving inbound calls, even testing 
advanced features such as transfer, park, and hold (see Figure 31.10). </p>

<p><a HREF="f31-10.gif"><b>Figure 31.10 : </b><i>Using the TAPI Examiner </i></a></p>

<p>You also get the ability to log your test results to a text file for later reference. 
This is a very handy tool for testing new workstations and is a useful general diagnostic 
tool as well. </p>

<p>The Stylus Trace application provides an easy way to log and trace all activity 
involving Stylus controls. Listing 31.1 shows a sample of trace output. </p>

<hr>

<blockquote>
  <b><p>Listing 31.1. Sample output from the Stylus Trace application. <br>
  </b></p>
</blockquote>

<blockquote>
  <tt><font FACE="Courier"><p>Executing VV_VoiceInit<br>
  VVE ?: TAPI initialized 6 lines, 6 phones<br>
  VV_VoiceInit returned 0x00000000<br>
  VVE ?: 1 line license detected<br>
  Using profile C:\WINDOWS\VVOICETP.INI<br>
  Executing VV_SetSystemFileExtension(wav)<br>
  VV_SetSystemFileExtension returned 1<br>
  Executing VV_SetBeepFileName(C:\VVOICETP\TESTSNDS\BEEP.WAV, 0) <br>
  VV_SetBeepFileName returned 1<br>
  Executing VV_AllocateLine(PhoneLine = 1 Rings = 1)<br>
  VVE ?: Mapping VV PhoneLine 1 to TAPI device 5 [Windows Telephony Service Provider for 
  Universal Modem Driver - TeleCommander 2500 Voice]<br>
  VVE ?: line 5 - total appearances = 1<br>
  VVE 5: appearance 0: [&acute;]<br>
  VVE ?: lineOpen (OWNER, AUTOMATEDVOICE)<br>
  VVE ?: Allocated line ed0084. Line handle = 372f1e3e<br>
  VV_AllocateLine returned 0<br>
  Allocated line 1. 1 appearances</font></tt> </p>
</blockquote>

<hr>
<div align="center"><center>

<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
  <tr>
    <td><b>Note</b></td>
  </tr>
  <tr>
    <td><blockquote>
      <p>Since this product works by monitoring activity within the Stylus components, not 
      within the Windows Telephony API, you cannot use the Stylus Trace to monitor non-Visual 
      Voice telephony programs.</p>
    </blockquote>
    </td>
  </tr>
</table>
</center></div>

<h2><a NAME="PronexusVBVoiceDevelopmentKit"><b><font SIZE="5" COLOR="#FF0000">Pronexus' 
VBVoice Development Kit</font></b></a></h2>

<p>The Pronexus VBVoice telephony development system is quite different from the Visual 
Voice toolkit. Each provides the same basic services, but in a very different way. While 
the Visual Voice toolkit emphasizes the use of custom controls linked together with Visual 
Basic code, the VBVoice system emphasizes the use of visual programming instead of Visual 
Basic code. In fact, you can build an entire VBVoice application without writing any 
Visual Basic code at all. </p>

<p>The VBVoice system is made up of 20 different OCX controls. These 20 controls represent 
all the major actions that can occur during a telephony sess

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -