|
lineSetNumRings
The lineSetNumRings function sets the number of rings that must occur before an incoming call is
answered. This function can be used to implement a toll-saver-style function.
It allows multiple independent applications to each register the number of
rings. The function lineGetNumRings returns the minimum number of all number of rings requested. It can be used
by the application that answers inbound calls to determine the number of rings
it should wait before answering the call.
LONG lineSetNumRings(
HLINE hLine,
|
| DWORD dwAddressID,
|
| DWORD dwNumRings
|
| );
|
|
Parameters
hLine
A handle to the open line device.
dwAddressID
An address on the line device.
dwNumRings
The number of rings before a call should be answered in order to honor the
toll-saver requests from all applications.
Return Values
Returns zero if the request is successful or a negative error number if an
error has occurred. Possible return values are:
LINEERR_INVALLINEHANDLE, LINEERR_OPERATIONFAILED, LINEERR_INVALADDRESSID,
LINEERR_RESOURCEUNAVAIL, LINEERR_NOMEM, LINEERR_UNINITIALIZED.
Remarks
The lineGetNumRings and lineSetNumRings functions, when used in combination, provide a mechanism to support the
implementation of toll-saver features across multiple independent applications. If
no application ever calls lineSetNumRings, lineGetNumRings will return 0xFFFFFFFF.
An application that is the owner of a call in the offering state and that received a LINE_LINEDEVSTATE ringing message should wait a number of rings equal to the number returned by lineGetNumRings before answering the call in order to honor the toll-saver settings across
all applications. A separate LINE_LINEDEVSTATE ringing message is sent to the application for each ring cycle, so the application
should count these messages. If this call disconnects before being answered, and
another call comes in shortly thereafter, the LINE_CALLSTATE message should allow the application to determine that ringing is related to
the second call.
If call classification is performed by TAPI by means of answering inbound
calls of unknown media mode and filtering the media stream, TAPI will honor this
number as well.
Note that this operation is purely informational and does not affect the state
of any calls on the line device.
See Also
LINE_CALLSTATE, LINE_LINEDEVSTATE, lineGetNumRings
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Unix Manual Pages
|