?? overvw1_1ahz.htm
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML DIR="LTR"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso8859-1">
</HEAD>
<TITLE>Event Routing</TITLE>
<SCRIPT SRC="/library/psdk/linkcss.js"></SCRIPT>
<META NAME="MS-HAID" CONTENT="_tapi2_event_routing">
</HEAD>
<BODY TOPMARGIN="0">
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->
<!--SYNC_START-->
<script language="JavaScript" src='/library/synch.js'></script>
<!--SYNC_END-->
<H2><A NAME="_tapi2_event_routing"></A>Event Routing</H2>
<P>With the <A HREF="func2_0vn0.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_0vn0.htm"><B>lineSetTerminal</B></A> function, the application can control or suppress the routing of specified low-level events (exchanged between the switch and the station) to a device. With <B>lineSetTerminal</B>, the application specifies the terminal device to which these events (such as line, address, or call media-stream events) are routed. </P>
<P>The routing of the different classes of events can be individually controlled, allowing separate terminals to be specified for each event class. Event classes include lamps, buttons, display, ringer, hookswitch, and media stream. </P>
<P>For example, the media stream of a call (voice, for example) can be sent to any transducer device if the service provider and the hardware is capable of doing so. In general, a <I>transducer</I> means the same as what is referred to as a <I>hookswitch</I> device in TAPI, something that has a microphone and a speaker. Ring events from the switch to the phone can be mapped into a visual alert on the computer's screen or they can be routed to a phone device. Lamp events and display events can be ignored or routed to a phone device (which appears to behave as a normal phone set). Finally, button presses at a phone device may or may not be passed to the line. In any case, this routing of low-level signals from the line does not affect the operation of the line portion of TAPI, which always maps low-level events to their functional equivalent. To determine the terminals a line device has available (and their capabilities), consult the line device's capabilities with <A HREF="func1_2lbn.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_2lbn.htm"><B>lineGetDevCaps</B></A>. </P>
<P>Assume initially that the application has suppressed the routing of all events (with <A HREF="func2_0vn0.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_0vn0.htm"><B>lineSetTerminal</B></A>), and the user selects a headset as the current I/O device. An incoming call sends a <A HREF="msgs_1xid.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_1xid.htm">LINE_CALLSTATE</A> message, and a <A HREF="msgs_402t.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_402t.htm">LINE_LINEDEVSTATE</A> message with the <I>ringing</I> indication. Because routing of all events is suppressed, ring events are not routed to the phone, so ringing is suppressed. Instead, the application notifies the user with a pop-up dialog box and a system beep in the headset. </P>
<P>The user decides to answer the call. Because the user's current I/O device is the headset, the telephony application invokes <B>lineSetTerminal</B> on the incoming call to route the call's media to the headset and answer the call. The application may also invoke <B>lineSetTerminal</B> to route lamp and display information events to the phone set so that it will behave as usual. </P>
<P>As a second example, assume that an incoming call is alerting at the user's computer. Instead of selecting the answer option with the mouse, the user decides to just pick up the phone's handset to answer the call. The offhook status at the phone sends a message to the application. The application can interpret this status as a request by the user to select the phone handset to conduct the conversation. The application then invokes <A HREF="func2_0vn0.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_0vn0.htm"><B>lineSetTerminal</B></A> to route the voice data on the call to the phone set. </P>
<DIV CLASS="footer">Built on Monday, August 14, 2000</DIV>
<!--FOOTER_START-->
<DIV CLASS="footer" STYLE="color:#000000;font-size:90%;">
<A HREF="mailto:sdkfdbk@microsoft.com">Send feedback</A> to the Platform SDK.</P>
<P><A HREF="javascript:if(confirm('http://msdn.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm \n\n這個文件不能通過 Teleport Pro 取回, 因為 地址在一個域或為它的開始地址設定的邊界的外部路徑上. \n\n你想從服務器打開它嗎?'))window.location='http://msdn.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm'" tppabs="http://msdn.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm" TARGET="_top">© 1999 Microsoft Corporation. All rights reserved. Terms of use.</A></P>
</DIV>
<!--FOOTER_END-->
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -