?? func2_34by.htm
字號:
<P>The LINEOPENOPTION_SINGLEADDRESS option affects only TAPI's assignment of initial call <I>ownership</I> of calls created by the service provider using a <A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/tspi21/messgs_8bn0.htm \n\n這個文件不能通過 Teleport Pro 取回, 因為 地址在一個域或為它的開始地址設定的邊界的外部路徑上. \n\n你想從服務器打開它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/tspi21/messgs_8bn0.htm'" tppabs="http://msdn.microsoft.com/library/psdk/tspi21/messgs_8bn0.htm">LINE_NEWCALL</A> message. An application that opens the line with LINECALLPRIVILEGE_MONITOR continues to receive monitoring handles to all calls created on the line. Furthermore, the application is not restricted in any way from making calls or performing other operations that affect other addresses on the opened line.
<P>When the LINEOPENOPTION_PROXY option is specified (TAPI 2.0 or higher only), the application must also indicate which specific proxy requests it is prepared to handle. It does so by passing, in the <I>lpCallParams</I> parameter, a pointer to a <A HREF="struc1_904y.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc1_904y.htm"><B>LINECALLPARAMS</B></A> structure in which the <B>dwDevSpecificSize</B> and <B>dwDevSpecificOffset</B> members have been set to delimit an array of <B>DWORD</B>s. Each element of this array shall contain one of the <A HREF="constnts_0vsj.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/constnts_0vsj.htm">LINEPROXYREQUEST_ Constants</A>. For example, a proxy handler application that supports all five of the Agent-related functions would pass in an array of five <B>DWORD</B>s (<B>dwDevSpecificSize</B> would be 20 decimal) containing the five defined LINEPROXYREQUEST_ values.
<P>The proxy request handler application can run on any machine that has authorization to control the line device. However, requests are always routed through the server on which the service provider is executing that actually controls the line device. Thus, it is most efficient if the application handling proxy requests (such as ACD agent control) executes directly on the server along with the service provider.
<P>Subsequent attempts, by the same application or other applications, to open the line device and register to handle the same proxy requests as an application that is already registered fail with LINEERR_NOTREGISTERED.
<P>To stop handling requests on the line, the application simply calls <A HREF="func1_2zhh.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_2zhh.htm"><B>lineClose</B></A>.
<P>Other flag combinations return the LINEERR_INVALPRIVSELECT error.
</DD>
<DT><I>dwMediaModes</I> </DT>
<DD>The media type or modes of interest to the application. This parameter is used to register the application as a potential target for incoming call and call handoff for the specified media type. This parameter is meaningful only if the bit LINECALLPRIVILEGE_OWNER in <I>dwPrivileges</I> is set (and ignored otherwise). This parameter uses one or more of the <A HREF="constnts_0x6b.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/constnts_0x6b.htm">LINEMEDIAMODE_ Constants</A>. </DD>
<DT><I>lpCallParams</I> </DT>
<DD>A pointer to a structure of type <A HREF="struc1_904y.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc1_904y.htm"><B>LINECALLPARAMS</B></A>. This pointer is only used if LINEMAPPER is used; otherwise <I>lpCallParams</I> is ignored. It describes the call parameter that the line device should be able to provide.
</DD>
</DL>
<H4>Return Values</H4>
<P>Returns zero if the request succeeds or a negative error number if an error occurs. Possible return values are: </P>
<P>LINEERR_ALLOCATED, LINEERR_LINEMAPPERFAILED, LINEERR_BADDEVICEID, LINEERR_NODRIVER, LINEERR_INCOMPATIBLEAPIVERSION, LINEERR_NOMEM, LINEERR_INCOMPATIBLEEXTVERSION, LINEERR_OPERATIONFAILED, LINEERR_INVALAPPHANDLE, LINEERR_RESOURCEUNAVAIL, LINEERR_INVALMEDIAMODE, LINEERR_STRUCTURETOOSMALL, LINEERR_INVALPOINTER, LINEERR_UNINITIALIZED, LINEERR_INVALPRIVSELECT, LINEERR_REINIT, LINEERR_NODEVICE, LINEERR_OPERATIONUNAVAIL.</P>
<H4>Remarks</H4>
<P>If LINEERR_ALLOCATED is returned, the line cannot be opened due to a "persistent" condition, such as that of a serial port being exclusively opened by another process. If LINEERR_RESOURCEUNAVAIL is returned, the line cannot be opened due to a dynamic resource overcommitment such as in DSP processor cycles or memory. This overcommitment can be transitory, caused by monitoring of media type or tones, and changes in these activities by other applications can make it possible to reopen the line within a short time period. If LINEERR_REINIT is returned and TAPI reinitialization has been requested (for example, as a result of adding or removing a telephony service provider), then <B>lineOpen</B> requests are rejected with this error until the last application shuts down its usage of the API (using <A HREF="func2_7sq6.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7sq6.htm"><B>lineShutdown</B></A>); at that time the new configuration becomes effective and applications are once again permitted to call <A HREF="func1_2o54.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_2o54.htm"><B>lineInitializeEx</B></A>. </P>
<P>Opening a line always entitles the application to make calls on any address available on the line. The ability of the application to deal with incoming calls or to be the target of call handoffs on the line is determined by the <I>dwMediaModes</I> parameter. The <B>lineOpen</B> function registers the application as having an interest in monitoring calls or receiving ownership of calls that are of the specified media types. If the application just wants to monitor calls, then it can specify LINECALLPRIVILEGE_MONITOR. If the application just wants to make outgoing calls, it can specify LINECALLPRIVILEGE_NONE. If the application is willing to control unclassified calls (calls of unknown media type), it can specify LINECALLPRIVILEGE_OWNER and LINEMEDIAMODE_UNKNOWN. Otherwise, the application should specify the media type it is interested in handling. </P>
<P>The media types specified with <B>lineOpen</B> add to the default value for the provider's media type monitoring for initial incoming call type determination. The <A HREF="func2_2zkx.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_2zkx.htm"><B>lineMonitorMedia</B></A> function modifies the mask that controls <A HREF="msgs_0ext.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_0ext.htm">LINE_MONITORMEDIA</A> messages. If a line device is opened with owner privilege and an extension media type is not registered, then the error LINEERR_INVALMEDIAMODE is returned. </P>
<P>An application that has successfully opened a line device can always initiate calls using <A HREF="func1_7mgc.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_7mgc.htm"><B>lineMakeCall</B></A>, <A HREF="func2_6ktn.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_6ktn.htm"><B>lineUnpark</B></A>, <A HREF="func2_6do0.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_6do0.htm"><B>linePickup</B></A>, and <A HREF="func2_7z8l.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7z8l.htm"><B>lineSetupConference</B></A> (with a NULL <I>hCall</I>), as well as use <A HREF="func1_36jo.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_36jo.htm"><B>lineForward</B></A> (assuming that doing so is allowed by the device capabilities, line state, and so on). </P>
<P>A single application can specify multiple flags simultaneously to handle multiple media types. Conflicts can arise if multiple applications open the same line device for the same media type. These conflicts are resolved by a priority scheme in which the user assigns relative priorities to the applications. Only the highest priority application for a given media type will ever receive ownership (unsolicited) of a call of that media type. Ownership can be received when an incoming call first arrives or when a call is handed off. </P>
<P>Any application (including any lower priority application) can always acquire ownership with <A HREF="func1_1fg3.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_1fg3.htm"><B>lineGetNewCalls</B></A> or <A HREF="func1_5qlv.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_5qlv.htm"><B>lineGetConfRelatedCalls</B></A>. If an application opens a line for monitoring at a time that calls exist on the line, <A HREF="msgs_1xid.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_1xid.htm">LINE_CALLSTATE</A> messages for those existing calls are not automatically generated to the new monitoring application. The application can query the number of current calls on the line to determine how many calls exist, and, if it wants, it can call <B>lineGetNewCalls</B> to obtain handles to these calls. </P>
<P>An application that handles automated voice should also select the interactive voice open mode and be assigned the lowest priority for interactive voice. The reason for this is that service providers report all voice media types as interactive voice. If media type determination is not performed by the application for the UNKNOWN media type, and no interactive voice application has opened the line device, voice calls would be unable to reach the automated voice application, and would be dropped. </P>
<P>The same application, or different instantiations of the same application, can open the same line multiple times with the same or different parameters. </P>
<P>When an application opens a line device it must specify the negotiated API version and, if it wants to use the line's extensions, it should specify the line's device-specific extension version. These version numbers should have been obtained with <A HREF="func2_9kxa.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_9kxa.htm"><B>lineNegotiateAPIVersion</B></A> and <A HREF="func2_3p66.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_3p66.htm"><B>lineNegotiateExtVersion</B></A>. Version numbering allows the mixing and matching of different application versions with different API versions and service provider versions. </P>
<P>LINEMAPPER allows an application to select a line indirectly梑y means of the services it wants from it. When opening a line device using LINEMAPPER, the following is true: All members from beginning of the <A HREF="struc1_904y.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc1_904y.htm"><B>LINECALLPARAMS</B></A> data structure through <B>dwAddressMode</B> are relevant. If <B>dwAddressMode</B> is LINEADDRESSMODE_ADDRESSID it means that any address on the line is acceptable, otherwise if <B>dwAddressMode</B> is LINEADDRESSMODE_DIALABLEADDR, indicating that a specific originating address (phone number) is searched for, or if it is a provider-specific extension, then <B>dwOrigAddressSize/Offset</B> and the portion of the variable part they refer to are also relevant. If <B>dwAddressMode</B> is a provider-specific extension, additional information can be contained in the <B>dwDeviceSpecific</B> variably sized member. </P>
<H4><A HREF="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/sdkintro/guide_927n.htm \n\n這個文件不能通過 Teleport Pro 取回, 因為 地址在一個域或為它的開始地址設定的邊界的外部路徑上. \n\n你想從服務器打開它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/sdkintro/guide_927n.htm'" tppabs="http://msdn.microsoft.com/library/psdk/sdkintro/guide_927n.htm">Requirements</A> </H4>
<P><B> Windows NT/2000: </B>Requires Windows NT 4.0 SP3 or later.<BR>
<B> Windows 95/98: </B>Requires Windows 95 or later.<BR>
<B> Version: </B>Requires TAPI 1.3 or later.<BR>
<B> Header: </B>Declared in Tapi.h.<BR>
<B> Library: </B>Use Tapi32.lib.<BR>
<B> Unicode: </B>Implemented as Unicode and ANSI versions on all platforms.</P>
<H4>See Also</H4>
<P><A HREF="quickref_1okl.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/quickref_1okl.htm">TAPI 2.2 Reference Overview</A>, <A HREF="quickref_1pnp.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/quickref_1pnp.htm">Basic Telephony Services Reference</A>, <A HREF="msgs_1xid.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_1xid.htm">LINE_CALLSTATE</A>, <A HREF="msgs_0ext.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_0ext.htm">LINE_MONITORMEDIA</A>, <A HREF="msgs_3cfo.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_3cfo.htm">LINE_PROXYREQUEST</A>, <A HREF="struc1_904y.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc1_904y.htm"><B>LINECALLPARAMS</B></A>, <A HREF="func1_2zhh.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_2zhh.htm"><B>lineClose</B></A>, <A HREF="func1_36jo.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_36jo.htm"><B>lineForward</B></A>, <A HREF="func1_5qlv.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_5qlv.htm"><B>lineGetConfRelatedCalls</B></A>, <A HREF="func1_2gf8.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_2gf8.htm"><B>lineGetID</B></A>, <A HREF="func1_1fg3.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_1fg3.htm"><B>lineGetNewCalls</B></A>, <A HREF="func1_2o54.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_2o54.htm"><B>lineInitializeEx</B></A>, <A HREF="func1_7mgc.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_7mgc.htm"><B>lineMakeCall</B></A>, <A HREF="func2_2zkx.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_2zkx.htm"><B>lineMonitorMedia</B></A>, <A HREF="func2_9kxa.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_9kxa.htm"><B>lineNegotiateAPIVersion</B></A>, <A HREF="func2_3p66.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_3p66.htm"><B>lineNegotiateExtVersion</B></A>, <A HREF="func2_6do0.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_6do0.htm"><B>linePickup</B></A>, <A HREF="func1_9411.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_9411.htm"><B>lineProxyMessage</B></A>, <A HREF="func1_4lyd.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_4lyd.htm"><B>lineProxyResponse</B></A>, <A HREF="func2_7z8l.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7z8l.htm"><B>lineSetupConference</B></A>, <A HREF="func2_7sq6.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_7sq6.htm"><B>lineShutdown</B></A>, <A HREF="func2_6ktn.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func2_6ktn.htm"><B>lineUnpark</B></A></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 + -