Rejects an incoming call.
DWORD nccRejectCall ( NCC_CALLHD callhd, unsigned method, void *rejectparms )
Argument |
Description |
callhd |
Handle of the incoming call. |
method |
Method to be used to reject the call. |
rejectparms |
Pointer to a protocol-specific NaturalAccess reject call parameter structure. For a protocol-independent application using default parameters, pass NULL. See the protocol-specific documentation for details. |
Return value |
Description |
SUCCESS |
|
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 NCC_REJECT_USER_AUDIO is specified when the protocol in use does not support the media capability. The application can determine whether the protocol supports this capability by examining the NCC_CAP_MEDIA_IN_SETUP bit in the capabilitymask returned by nccQueryCapability. |
Event |
Description |
NCCEVN_REJECTING_CALL |
The reject call operation completed successfully and the call entered the rejecting state. |
NCCEVN_CALL_DISCONNECTED |
The remote party disconnected. |
After receiving an NCCEVN_INCOMING_CALL event, the application must invoke nccAnswerCall, nccAcceptCall, or nccRejectCall.
nccRejectCall causes the protocol to reject the incoming call using the method specified by method. Valid methods are:
Method |
Description |
---|---|
NCC_REJECT_PLAY_REORDER |
Play reorder tone. |
NCC_REJECT_PLAY_BUSY |
Play busy tone. |
NCC_REJECT_PLAY_RINGTONE |
Play ring tone. |
NCC_REJECT_USER_AUDIO |
User will supply audio. This method is valid only if the NCC_CAP_MEDIA_IN_SETUP bit in the capabilitymask returned using nccQueryCapability is set. |
When a call is rejected, the application receives NCCEVN_REJECTING_CALL.
To use the default rejection behavior for the current protocol, set method to 0.
If the remote party disconnects while the application is rejecting the call, the application receives NCCEVN_CALL_DISCONNECTED and not NCCEVN_REJECTING_CALL.