Accepts a call without answering or rejecting it.
DWORD nccAcceptCall ( NCC_CALLHD callhd, unsigned mode, void *acceptparms)
Argument |
Description |
callhd |
Handle of the incoming call. |
mode |
Mode to accept an incoming call. See Details. |
acceptparms |
Pointer to a protocol-specific NaturalAccess call acceptance parameter structure. Specify NULL to use the default values. See the protocol-specific documentation for details. |
Return value |
Description |
SUCCESS |
|
CTAERR_BAD_ARGUMENT |
mode is invalid. |
CTAERR_INVALID_HANDLE |
The call handle is not valid. It may have been released. |
CTAERR_INVALID_STATE |
The line is not in the appropriate state to invoke this function. |
CTAERR_SVR_COMM |
A server communication error occurred. |
NCCERR_INVALID_CALL_STATE |
The call is not in the appropriate state to invoke this function. |
NCCERR_NOT_CAPABLE |
Returned when the protocol does not support the accepting call state. Also returned if mode is NCC_ACCEPT_PLAY_RING or NCC_ACCEPT_USER_AUDIO and the protocol does not support the media capability. |
Event |
Description |
NCCEVN_ACCEPTING_CALL |
The function completed successfully. The call entered the accepting state. |
NCCEVN_CALL_DISCONNECTED |
The remote party disconnected. The call entered the disconnected state. |
nccAcceptCall accepts a call without answering or rejecting it, allowing the application to perform media functions, such as playing a voice file, before connecting or rejecting the call.
Not all protocols support this function and the accepting state. The application can determine if the protocol supports this state by examining the NCC_CAP_ACCEPT_CALL bit in the capabilitymask returned by nccQueryCapability.
If the remote party disconnects while the call is in the accepting state, the application receives NCCEVN_CALL_DISCONNECTED. In this case, no NCCEVN_ACCEPTING_CALL event is delivered to the application.
The application can specify one of the following modes to accept an incoming call:
Mode |
Description |
---|---|
NCC_ACCEPT_PLAY_SILENT |
Do not play anything. |
NCC_ACCEPT_PLAY_RING |
Play a ring tone. |
NCC_ACCEPT_USER_AUDIO |
User will supply audio. |
NCC_ACCEPT_PLAY_RING and NCC_ACCEPT_USER_AUDIO are not supported by all protocols. The application can determine if the protocol supports this capability by examining the NCC_CAP_MEDIA_IN_SETUP bit in the capabilitymask returned by nccQueryCapability. NCC_ACCEPT_PLAY_SILENT is the default accept mode supported by all protocols.