Accepting calls

Receipt of NCCEVN_INCOMING_CALL indicates that NCC detected the incoming call and gathered all necessary call information. The call is in the incoming call state.

At this point, the application can accept, answer, or reject the call with nccAcceptCall, nccAnswerCall, or nccRejectCall. It can also choose to ignore the call completely. If the call is ignored for a certain interval it is automatically rejected. The NCC.START.waitforPCtime parameter determines this interval.

By invoking nccAcceptCall, the call enters the accepting call state, where it has been accepted, but has been neither answered nor rejected. This state allows applications to perform media functions, such as playing a voice file, before connecting the call.

Note: Some protocols do not support nccAcceptCall and the accepting call state. The application can call nccQueryCapability to determine whether the protocol supports this capability.

With most protocols, arguments passed to nccAcceptCall can prompt playing of a ring tone or user audio when the call enters the state. The application can call nccQueryCapability to determine if the protocol supports these arguments. The acceptance method to use is specified in the method argument in the function call. The valid values are:

Method

Action

NCC_ACCEPT_PLAY_RING

Play ring tone.

NCC_ACCEPT_PLAY_SILENT

Play nothing.

NCC_ACCEPT_USER_AUDIO

Allow the application to generate tones and perform voice playback functions.

When the call enters the accepting state, the application receives NCCEVN_ACCEPTING_CALL. The event value field contains the acceptance method. The call remains in the accepting state until the application invokes nccAnswerCall or nccRejectCall. Receipt of NCCEVN_ANSWERING_CALL or NCCEVN_REJECTING_CALL indicates that the call was answered or rejected, or that the telephone network timed out. The call is no longer in the accepting call state.

The application can receive NCCEVN_CALL_DISCONNECTED while the call is in the accepting call state. This event indicates that the remote party hung up. The event value field contains the reason. The application then invokes nccReleaseCall to release the call.

If the remote party disconnects while the application is accepting the call, the application receives NCCEVN_CALL_DISCONNECTED. In this case, NCCEVN_ACCEPTING_CALL is not delivered.