📄 ch31.htm
字号:
<td WIDTH="415">Returns the TAPI phone handle of the current Visual Voice connection. This
property is read-only. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">InterDigitTimeOut</font></tt> </td>
<td WIDTH="415">Specifies the maximum number of seconds the <tt><font FACE="Courier">GetDigits</font></tt>
method will wait between digits before timing out. The default is <tt><font FACE="Courier">0</font></tt>.
</td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">IODeviceName()</font></tt> </td>
<td WIDTH="415">Returns the names of the I/O devices, if any, attached to terminals on the
TAPI device. This property is read-only. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">IODeviceTotal</font></tt> </td>
<td WIDTH="415">Returns the total number of I/O devices attached to terminals on the TAPI
device. This property is read-only. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">LanguageDLL</font></tt> </td>
<td WIDTH="415">Specifies the language DLL to use for speaking variable information. The
default is <tt><font FACE="Courier">VVLUSA16.DLL</font></tt>. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">LanguageParams</font></tt> </td>
<td WIDTH="415">Specifies any optional parameters to change the behavior of custom
language DLLs. The default is "". </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">LinePassThrough</font></tt> </td>
<td WIDTH="415">Specifies whether every low-level TAPI device event will be exposed
through the <tt><font FACE="Courier">LinePassThrough</font></tt> event. The default is <tt><font
FACE="Courier">False</font></tt>. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">MaxDigits</font></tt> </td>
<td WIDTH="415">Specifies the maximum number of digits to receive from the digit buffer
before the <tt><font FACE="Courier">GetDigits</font></tt> method returns. The default is <tt><font
FACE="Courier">1</font></tt>. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">PhoneLine</font></tt> </td>
<td WIDTH="415">Sets the telephone line (port or channel) on which all of Visual Voice's
actions will execute. The default is<tt><font FACE="Courier"> 1</font></tt>. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">PhoneLineTotal</font></tt> </td>
<td WIDTH="415">The total number of telephone lines (ports or channels) available to
Visual Voice. This property is read-only. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">PhonePassThrough</font></tt> </td>
<td WIDTH="415">Specifies whether every low-level TAPI device phone event will be exposed
through the <tt><font FACE="Courier">PhonePassThrough</font></tt> event. The default is <tt><font
FACE="Courier">False</font></tt>. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">Precision</font></tt> </td>
<td WIDTH="415">The decimal precision to which any number or money value is played. The
default is <tt><font FACE="Courier">6</font></tt>, general precision. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">ProductInfo</font></tt> </td>
<td WIDTH="415">Returns a string that contains version information for the Visual Voice
for TAPI VBX, Visual Voice TAPI engine DLL, the TAPI API, and the TAPI drivers being used.
This property is read-only. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">Rate</font></tt></td>
<td WIDTH="415">Sets the speed voice files are played by any <tt><font FACE="Courier">Play...</font></tt>
method. The default is <tt><font FACE="Courier">0</font></tt>. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">RecordBeep</font></tt> </td>
<td WIDTH="415">Specifies whether a beep will be played before the <tt><font
FACE="Courier">RecordFile</font></tt> method records a voice file. The default is <tt><font
FACE="Courier">True</font></tt>. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">RecordTimeOut</font></tt> </td>
<td WIDTH="415">Sets the maximum length of any recording created by the <tt><font
FACE="Courier">RecordFile</font></tt> method. The default is 60 seconds. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">Rings</font></tt></td>
<td WIDTH="415">Number of incoming rings before the <tt><font FACE="Courier">RingDetected</font></tt>
event is executed. The default is <tt><font FACE="Courier">1</font></tt>. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">StartPosition</font></tt> </td>
<td WIDTH="415">Specifies the starting position, in seconds, at which subsequent <tt><font
FACE="Courier">Play...</font></tt> and <tt><font FACE="Courier">RecordFile</font></tt>
methods will play or record, respectively. The default is <tt><font FACE="Courier">0</font></tt>.
</td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">Status</font></tt> </td>
<td WIDTH="415">Stores a value describing what is occurring over the line at any given
time. This property is read-only. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">StringItemSeparator</font></tt> </td>
<td WIDTH="415">Specifies the character to be used to separate items in voice strings. The
default is <tt><font FACE="Courier">,</font></tt> (comma). </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">StringTokenSeparator</font></tt> </td>
<td WIDTH="415">Specifies the character to be used to separate tokens in voice strings.
The default is <tt><font FACE="Courier">|</font></tt> (vertical bar). </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">SystemError</font></tt> </td>
<td WIDTH="415">The <tt><font FACE="Courier">SystemError</font></tt> property contains
additional information when an internal error occurs. This property is read-only. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">SystemVoiceFile</font></tt> </td>
<td WIDTH="415">Specifies the system file listing the voice files to use for speaking
variable information. The default is <tt><font FACE="Courier">VVSYSTEM.TXT</font></tt>.
This file is the source of the most common words and phrases. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">Targetappearance</font></tt> </td>
<td WIDTH="415">The second appearance that must be specified for the <tt><font
FACE="Courier">SwapHold</font></tt> and <tt><font FACE="Courier">AttendedTransfer</font></tt>
methods. The default is <tt><font FACE="Courier">0</font></tt>. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">Value</font></tt></td>
<td WIDTH="415">Sets the value used for the <tt><font FACE="Courier">RecordFile</font></tt>,
<tt><font FACE="Courier">Dial</font></tt>, <tt><font FACE="Courier">Call</font></tt>, or
any <tt><font FACE="Courier">Play...</font></tt> method. The default is "". </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">Volume</font></tt> </td>
<td WIDTH="415">Sets the volume at which voice files are played by any <tt><font
FACE="Courier">Play...</font></tt> method. The default is <tt><font FACE="Courier">0</font></tt>.
</td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">VtermDigits</font></tt> </td>
<td WIDTH="415">Sets the terminating touch-tone digits that will stop any playing or
recording (<tt><font FACE="Courier">Play...</font></tt> and <tt><font FACE="Courier">RecordFile</font></tt>
methods). </td>
</tr>
</table>
</center></div>
<p>Finally, there are eight TAPI-related events for the <tt><font FACE="Courier">Voice</font></tt>
control. Table 31.3 shows the events, along with descriptions of their use.<br>
</p>
<p align="center"><b>Table 31.3. The <tt><font FACE="Courier">Voice </font></tt>control
events.</b> </p>
<div align="center"><center>
<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
<tr>
<td>Event</td>
<td WIDTH="415">Description</td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">CalledIDDetected</font></tt> </td>
<td WIDTH="415">Triggers after DID (Direct Inward Dialing) or DNIS (Dialed Number ID
Service) information is detected on the line. This is used to identify the exact line the
caller used to enter your switch (PBX). </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">LineDropped</font></tt> </td>
<td WIDTH="415">If the line is idle, this event executes whenever the line drops or the
user hangs up. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">PlayQueueDone</font></tt> </td>
<td WIDTH="415">Triggers when all voice strings on the queue have completed playing. Place
voice strings on the queue by way of the <tt><font FACE="Courier">PlayStringQ</font></tt>
method. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">CallerIDDetected</font></tt> </td>
<td WIDTH="415">Triggers after <tt><font FACE="Courier">CallerID</font></tt> or <tt><font
FACE="Courier">ANI</font></tt> (Automatic Number Identification) information is detected
on the line. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">LinePassThrough</font></tt> </td>
<td WIDTH="415">If the <tt><font FACE="Courier">LinePassThrough</font></tt> property is
set to <tt><font FACE="Courier">True</font></tt>, this event triggers once for every line
event returned by the TAPI device. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">RingDetected</font></tt> </td>
<td WIDTH="415">Executes after the number of rings in the <tt><font FACE="Courier">Rings</font></tt>
property have been detected on the line. The line must be allocated. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">Debug</font></tt></td>
<td WIDTH="415">If the <tt><font FACE="Courier">Debug</font></tt> property is set to <tt><font
FACE="Courier">True</font></tt>, this event triggers before every <tt><font FACE="Courier">Voice</font></tt>
control action starts and after every <tt><font FACE="Courier">Voice</font></tt> control
action finishes. </td>
</tr>
<tr>
<td WIDTH="175"><tt><font FACE="Courier">PhonePassThrough</font></tt> </td>
<td WIDTH="415">If the <tt><font FACE="Courier">PhonePassThrough</font></tt> property is
set to <tt><font FACE="Courier">True</font></tt>, this event triggers once for every phone
event returned by the TAPI device. </td>
</tr>
</table>
</center></div>
<h3><b><a NAME="TheTestControl">The <tt><font SIZE="4" FACE="Courier">Test</font></tt><font
SIZE="4"> Control</font></a></b></h3>
<p>The <tt><font FACE="Courier">Test</font></tt> control simulates the existence of a live
telephone line for your Visual Voice applications. When you are building and testing
telephony applications, one of the hardest parts of the process is testing the
application's response to inbound calls. The <tt><font FACE="Courier">Test</font></tt>
control solves this problem. Now, as you build your TAPI applications, you can test them
without having to actually link your workstation to a live telephone line (see Figure
31.2). </p>
<p><a HREF="f31-2.gif"><b>Figure 31.2 : </b><i>Viewing the Test control properties page.</a>
</i></p>
<p>The control works by communicating directly with the <tt><font FACE="Courier">Voice</font></tt>
control. Whenever the <tt><font FACE="Courier">Voice</font></tt> control invokes a <tt><font
FACE="Courier">Call</font></tt> method, the <tt><font FACE="Courier">Test</font></tt>
control's <tt><font FACE="Courier">VoiceCallInitiated</font></tt> event occurs. This
simulates the receipt of an outbound call initiated by your application. You can also use
the <tt><font FACE="Courier">VoiceConnect</font></tt> method of the <tt><font
FACE="Courier">Test</font></tt> control to simulate the appearance of an inbound call for
your TAPI application. </p>
<div align="center"><center>
<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
<tr>
<td><b>Tip</b></td>
</tr>
<tr>
<td><blockquote>
<p>When you load the <tt><font FACE="Courier">Test</font></tt> control into your Visual
Basic projects, load the <tt><font FACE="Courier">VVTEST.BAS</font></tt> module, too. This
contains predefined constants that you can use to make it easier to program with the <tt><font
FACE="Courier">Test</font></tt> control. </p>
</blockquote>
</td>
</tr>
</table>
</center></div>
<p>Table 31.4 shows the four methods of the <tt><font FACE="Courier">Test</font></tt>
control along with short descriptions of their use.<br>
</p>
<p align="center"><b>Table 31.4. Methods of the <tt><font FACE="Courier">Test </font></tt>control.</b>
</p>
<div align="center"><center>
<table BORDERCOLOR="#000000" BORDER="1" WIDTH="80%">
<tr>
<td><i>Method</i></td>
<td WIDTH="433"><i>Description</i> </td>
</tr>
<tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -