?? func1_7mgc.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>lineMakeCall</TITLE>
<SCRIPT SRC="/library/psdk/linkcss.js"></SCRIPT>
<META NAME="MS-HKWD" CONTENT="lineMakeCall">
<META NAME="MS-HAID" CONTENT="_tapi2_linemakecall">
</HEAD>
<BODY TOPMARGIN="0">
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->
<!--SYNC_START-->
<script language="JavaScript" src='/library/synch.js'></script>
<!--SYNC_END-->
<H1><A NAME="_tapi2_linemakecall"></A>lineMakeCall</H1>
<P>The <B>lineMakeCall</B> function places a call on the specified line to the specified destination address. Optionally, call parameters can be specified if anything but default call setup parameters are requested. </P>
<PRE class=syntax><B>LONG WINAPI lineMakeCall(
HLINE</B><I> hLine</I><B>, </B>
<B> LPHCALL</B><I> lphCall</I><B>, </B>
<B> LPCSTR</B><I> lpszDestAddress</I><B>, </B>
<B> DWORD</B><I> dwCountryCode</I><B>, </B>
<B> LPLINECALLPARAMS const</B><I> lpCallParams </I>
<B>);</B></PRE>
<H4>Parameters</H4>
<DL>
<DT><I>hLine</I> </DT>
<DD>A handle to the open line device on which a call is to be originated. </DD>
<DT><I>lphCall</I> </DT>
<DD>A pointer to an HCALL handle. The handle is only valid after the <A HREF="msgs_65mh.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_65mh.htm">LINE_REPLY</A> message is received by the application indicating that the <B>lineMakeCall</B> function successfully completed. Use this handle to identify the call when invoking other telephony operations on the call. The application is initially the sole owner of this call. This handle is void if the function returns an error (synchronously or asynchronously by the reply message). </DD>
<DT><I>lpszDestAddress</I> </DT>
<DD>A pointer to the destination address. This follows the standard dialable number format. This pointer can be NULL for non-dialed addresses (as with a hot phone) or when all dialing is performed using <A HREF="func1_0p0s.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_0p0s.htm"><B>lineDial</B></A>. In the latter case, <B>lineMakeCall</B> allocates an available call appearance that would typically remain in the <I>dialtone</I> state until dialing begins. Service providers that have inverse multiplexing capabilities can allow an application to specify multiple addresses at once. </DD>
<DT><I>dwCountryCode</I> </DT>
<DD>The country code of the called party. If a value of 0 is specified, a default is used by the implementation. </DD>
<DT><I>lpCallParams</I> </DT>
<DD>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. This structure allows the application to specify how it wants the call to be set up. If NULL is specified, a default 3.1 kHz voice call is established and an arbitrary origination address on the line is selected. This structure allows the application to select elements such as the call's bearer mode, data rate, expected media mode, origination address, blocking of caller ID information, and dialing parameters.
</DD>
</DL>
<H4>Return Values</H4>
<P>Returns a positive request identifier if the function is completed asynchronously, or a negative error number if an error occurs. The <I>dwParam2</I> parameter of the corresponding <A HREF="msgs_65mh.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_65mh.htm">LINE_REPLY</A> message is zero if the function succeeds or it is a negative error number if an error occurs. Possible return values are: </P>
<P>LINEERR_ADDRESSBLOCKED, LINEERR_INVALLINEHANDLE, LINEERR_BEARERMODEUNAVAIL, LINEERR_INVALLINESTATE, LINEERR_CALLUNAVAIL, LINEERR_INVALMEDIAMODE, LINEERR_DIALBILLING, LINEERR_INVALPARAM, LINEERR_DIALDIALTONE, LINEERR_INVALPOINTER, LINEERR_DIALPROMPT, LINEERR_INVALRATE, LINEERR_DIALQUIET, LINEERR_NOMEM, LINEERR_INUSE, LINEERR_OPERATIONFAILED, LINEERR_INVALADDRESS, LINEERR_OPERATIONUNAVAIL, LINEERR_INVALADDRESSID, LINEERR_RATEUNAVAIL, LINEERR_INVALADDRESSMODE, LINEERR_RESOURCEUNAVAIL, LINEERR_INVALBEARERMODE, LINEERR_STRUCTURETOOSMALL, LINEERR_INVALCALLPARAMS, LINEERR_UNINITIALIZED, LINEERR_INVALCOUNTRYCODE, LINEERR_USERUSERINFOTOOBIG.</P>
<H4>Remarks</H4>
<P>If LINEERR_INVALLINESTATE is returned, the line is currently not in a state in which this operation can be performed. A list of currently valid operations can be found in the <B>dwLineFeatures</B> member (of the type LINEFEATURE_) in the <A HREF="struc2_40oi.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_40oi.htm"><B>LINEDEVSTATUS</B></A> structure. Calling <A HREF="func1_4377.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_4377.htm"><B>lineGetLineDevStatus</B></A> updates the information in <B>LINEDEVSTATUS</B>. If LINEERR_DIALBILLING, LINEERR_DIALQUIET, LINEERR_DIALDIALTONE, or LINEERR_DIALPROMPT is returned, none of the actions otherwise performed by <B>lineMakeCall</B> have occurred; for example, none of the dialable address prior to the offending character has been dialed, no hookswitch state has changed, and so on. </P>
<P>After dialing has completed, several <A HREF="msgs_1xid.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_1xid.htm">LINE_CALLSTATE</A> messages are usually sent to the application to notify it about the progress of the call. No generally valid sequence of call-state transitions is specified, as no single fixed sequence of transitions can be guaranteed in practice. A typical sequence can cause a call to transition from <I>dialtone</I>, <I>dialing</I>, <I>proceeding</I>, <I>ringback</I>, to <I>connected</I>. With non-dialed lines, the call can typically transition directly to <I>connected</I> state. </P>
<P>An application has the option to specify an originating address on the specified line device. A service provider that models all stations on a switch as addresses on a single line device allows the application to originate calls from any of these stations using <B>lineMakeCall</B>. </P>
<P>The call parameters allow the application to make non-voice calls or request special call setup options that are not available by default. </P>
<P>An application can partially dial using <B>lineMakeCall</B> and continue dialing using <A HREF="func1_0p0s.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_0p0s.htm"><B>lineDial</B></A>. To abandon a call attempt, use <A HREF="func1_1i5s.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_1i5s.htm"><B>lineDrop</B></A>. </P>
<P>After <B>lineMakeCall</B> returns a success reply message to the application, a LINE_CALLSTATE message is sent to the application to indicate the current state of the call. This state is not necessarily LINECALLSTATE_DIALTONE. </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="javascript:if(confirm('http://msdn.microsoft.com/library/psdk/tapi3/tapiovr2_3ib6.htm \n\n這個文件不能通過 Teleport Pro 取回, 因為 地址在一個域或為它的開始地址設定的邊界的外部路徑上. \n\n你想從服務器打開它嗎?'))window.location='http://msdn.microsoft.com/library/psdk/tapi3/tapiovr2_3ib6.htm#_tapi3_dialable_addresses'" tppabs="http://msdn.microsoft.com/library/psdk/tapi3/tapiovr2_3ib6.htm#_tapi3_dialable_addresses">Dialable Addresses</A>, <A HREF="msgs_1xid.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_1xid.htm">LINE_CALLSTATE</A>, <A HREF="msgs_65mh.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/msgs_65mh.htm">LINE_REPLY</A>, <A HREF="struc1_904y.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc1_904y.htm"><B>LINECALLPARAMS</B></A>, <A HREF="struc2_40oi.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/struc2_40oi.htm"><B>LINEDEVSTATUS</B></A>, <A HREF="func1_0p0s.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_0p0s.htm"><B>lineDial</B></A>, <A HREF="func1_1i5s.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_1i5s.htm"><B>lineDrop</B></A>, <A HREF="func1_4377.htm" tppabs="http://msdn.microsoft.com/library/psdk/tapi22/func1_4377.htm"><B>lineGetLineDevStatus</B></A></P>
<P></P>
<P></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 + -