Share via


lineSetNumRings

This 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 lineSetNumRings returns the minimum number of rings requested. It can be used by the application that answers incoming calls to determine the number of rings it should wait before answering the call.

LONG WINAPI lineSetNumRings(
  HLINE hLine, 
  DWORD dwAddressID, 
  DWORD dwNumRings
);

Parameters

  • hLine
    Handle to the open line device.
  • dwAddressID
    Address on the line device. An address identifier is permanently associated with an address; the identifier remains constant across operating system upgrades.
  • dwNumRings
    Number of rings before a call should be answered in order to honor the toll-saver requests from all applications.

Return Values

Zero indicates success. A negative error number indicates that an error occurred. The following table shows the return values for this function.

Value Description
LINEERR_INVALLINEHANDLE The line handle is invalid.
LINEERR_OPERATIONFAILED The operation failed.
LINEERR_INVALADDRESSID The address id is invalid.
LINEERR_UNINITIALIZED The parameter is uninitialized.
LINEERR_NOMEM Not enough memory is available.
LINEERR_RESOURCEUNAVAIL The resource is unavailable.

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 returns 0xFFFFFFFF.

If call classification is performed by TAPI by means of answering incoming calls of unknown media type and filtering the media stream, TAPI honors this number as well.

Note   This operation is purely informational and does not affect the state of any calls on the line device.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Tapi.h.
Link Library: Coredll.lib.

See Also

lineGetNumRings | LINE_CALLSTATE | LINE_LINEDEVSTATE

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.