(Page 4 of 80 in this chapter)


adiAnswerCall

Description

Answers an incoming call.

Prototype

DWORD adiAnswerCall( CTAHD ctahd,
unsigned ringcount )

ctahd Context handle returned by adiOpenPort.

ringcount Indicates the number of rings before answering.

Return Values

Events

Details

After the ADIEVN_INCOMING_CALL event is delivered, the application must invoke either adiAnswerCall or adiRejectCall. adiAnswerCall answers an incoming call after the specified number of rings. ringcount specifies the total number of rings permitted before the application takes action.

The ringcount action performed by adiAnswerCall is protocol-specific. For example, in the loop start protocol, ringcount indicates the number of rings to be detected before answering. In the DID protocol, ringcount indicates the number of rings played to the caller before answering.

adiAnswerCall may be invoked multiple times as long as the specified context's call control state is ADI_CC_STATE_INCOMING or ADI_CC_STATE_ANSWERING. The ringcount supplied with the most recent invocation of adiAnswerCall overrides any previous value.

For example, if adiAnswerCall is invoked with a ringcount of 100000, the line will ring for what seems forever, until the remote party disconnects. If adiAnswerCall is invoked subsequently with a ringcount of 5, the line will be answered if the total ring count since the incoming call arrived is greater than or equal to 5. A zero ringcount forces an immediate answer.

Note: This function is not available when using the NOCC protocol.

See Also

adiStartProtocol, adiRejectCall, adiReleaseCall

Example

See adiPlaceCall example.



(Page 4 of 80 in this chapter)


Tech_Support@nmss.com
Copyright © 1996, Natural MicroSystems, Inc. All rights reserved.