Share via


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 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
    A handle to the open line device.
  • dwAddressID
    An address on the line device. An address identifier is permanently associated with an address; the identifier remains constant across operating system upgrades.
  • 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 succeeds or a negative error number if an error occurs. Possible error values are as follows:

LINEERR_INVALLINEHANDLE LINEERR_UNINITIALIZED
LINEERR_OPERATIONFAILED LINEERR_NOMEM
LINEERR_INVALADDRESSID LINEERR_RESOURCEUNAVAIL

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.

An application that is the owner of a call in the offering state and that received a LINE_DEVSTATE 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 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 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

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Tapi.h   Coredll.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

lineGetNumRings, LINE_CALLSTATE, LINE_LINEDEVSTATE,

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.