The following table lists NCC API functions and solicited events. Solicited events signify acknowledgments from the TCP of particular function calls. Functions are listed in alphabetical order. For detailed documentation of the functions, parameters, and events, refer to the Dialogic® NaturalAccess™ NaturalCallControl™ API Developer’s Manual.
Function |
Description and associated events |
---|---|
nccAcceptCall |
Accepts an incoming call without answering or rejecting it. This allows the application to perform media functions (such as playing a voice file) before connecting (or rejecting) an inbound call. Note: 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 application accepts the call, then the application receives NCCEVN_CALL_DISCONNECTED. In this case, no NCCEVN_ACCEPTING_CALL event is delivered to the application. The application can accept a call using the following modes:
Note: 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. Associated events:
|
nccAnswerCall |
Answers an incoming call. If nccAnswerCall completes successfully, the call enters the answering call state. The application receives NCCEVN_ANSWERING_CALL. When the call is connected, the application receives NCCEVN_CALL_CONNECTED, and the call enters the connected call state. If the remote party disconnects while the call is in the answering call state, the application receives NCCEVN_CALL_DISCONNECTED. Associated events:
|
nccAutomaticTransfer |
Transfers a call on a PBX, Centrex, or Centrex-like line. nccAutomaticTransfer executes a blind transfer by performing placement of a second call and completing call transfer. nccAutomaticTransfer operates only when the first call handle is in the connected state or is on hold. Note: Not all protocols support automatic call transfer. The application can determine if the protocol supports this state by examining the NCC_CAP_AUTOMATIC_TRANSFER bit in the capabilitymask returned by nccQueryCapability. The application determines when the call is to be transferred by specifying:
Associated events:
Note: Other protocol-specific errors or reasons for disconnecting may be reported.
|
nccBlockCalls |
Blocks calls on a specified line handle. nccBlockCalls may be invoked from any line state, however, incoming calls will not be blocked until there are no calls on the line (the line has returned to idle line state). When using nccBlockCalls, specify the method to be used to block calls. Two methods are valid:
When the line state has changed to blocking, the application receives NCCEVN_CALLS_BLOCKED. The value returned with this event contains the chosen blocking method. The line remains in the blocking state until nccUnblockCalls is called. The application may receive NCCEVN_INCOMING_CALL after invoking nccBlockCalls and before receiving NCCEVN_CALLS_BLOCKED. The application must handle the incoming call (accept it, answer it, etc.). The application will not receive the NCCEVN_CALLS_BLOCKED event until it releases all calls. If the blocking request fails for some reason, the application receives NCCEVN_BLOCK_FAILED. The line remains in the current state. nccUnBlockCalls can be used to cancel a blocking request initiated using nccBlockCalls. A blocking request can be canceled any time before NCCEVN_CALLS_BLOCKED is received. Associated events:
|
nccDisconnectCall |
Disconnects a call that is connected to the network. nccDisconnectCall may also be used to abandon outbound call placement. The NCC_CAP_DISCONNECT_IN_ANY_STATE bit in the capabilitymask returned by nccQueryCapability determines the states in which nccDisconnectCall can be invoked. If the bit is set, nccDisconnectCall may be invoked in any call state except disconnected. If the bit is cleared, nccDisconnectCall can only be invoked in the connected call state. A disconnected call is no longer active. If no active calls exist on a line, the line state changes to idle. Associated event: NCCEVN_CALL_DISCONNECTED indicates that the disconnect operation has completed successfully and the call has entered the disconnected call state. |
nccGetCallStatus |
Retrieves the call control status and stores it in an NCC_CALL_STATUS structure. Caller ID data is written to the NCC_CALL_STATUS structure. Applications that require caller ID data can check the calling party's ID by invoking nccGetCallStatus once NCCEVN_INCOMING_CALL is received, or by waiting for NCCEVN_CALL_STATUS_UPDATE, with a value code of NCC_CALL_STATUS_CALLINGADDR. For more information, refer to the NCC_CALL_STATUS structure. Associated events: None. |
nccGetExtendedCallStatus
|
Retrieves protocol-specific status information for a call and stores it in an NCC_CAS_EXT_CALL_STATUS structure. For more information, refer to the NCC_CAS_EXT_CALL_STATUS structure. Associated events: None. |
nccGetLineStatus |
Retrieves a snapshot of the port status and stores it in an NCC_LINE_STATUS structure. Associated events: None. |
nccHoldCall |
Puts a connected call on hold. There is no call state transition, but a call on hold is no longer active. Since there are no active calls currently on the line, the line state changes to idle. The call is on hold only after the application receives an NCCEVN_CALL_HELD event. The held field in the NCC_CALL_STATUS structure is set to a non-zero value. Use nccRetrieveCall to take the call off hold. Some protocols do not support the capability to put a call on hold. The application can determine if the protocol supports call hold/retrieve by examining the NCC_CAP_HOLD_CALL bit in the capabilitymask returned by nccQueryCapability. Some protocols allow a call to be put on hold only from the connected state. The application can determine whether or not a call can be put on hold from any state by examining the NCC_CAP_HOLD_IN_ANY_STATE bit in the capabilitymask returned by nccQueryCapability. Associated events:
|
nccPlaceCall |
Places an outbound call to a specified digit string according to call placement parameters specified in NCC_ADI_PLACECALL_PARMS. NCCEVN_PLACING_CALL indicates that the call placement operation has completed successfully and the call has entered the placing call state. If the application receives NCCEVN_CALL_RELEASED (with an NCC_RELEASED_FALSE_SEIZURE reason code) instead of NCCEVN_PLACING_CALL, the line was seized for an incoming call before glare was resolved, and the TCP has released the outgoing call. The application should immediately abandon outbound call placement and handle the incoming call. The address digits can be sent all at once when invoking the function, or (with some protocols) digits can be sent in an overlapped fashion. Associated events:
|
nccQueryCapability |
Queries the capabilities of the protocol on a given line handle. The application can invoke this function to determine if the current protocol supports a given feature. nccQueryCapability returns an NCC_PROT_CAP structure containing capability information for the protocol. Associated events: None. |
nccRejectCall |
Rejects an incoming call. nccRejectCall causes the protocol to reject the incoming call using the method specified by method. Valid methods are:
When a call is being rejected, the application receives NCCEVN_REJECTING_CALL. To use the default rejection behavior for the current protocol, set method to 0. Note: If the remote party disconnects while the application is rejecting the call, the application receives NCCEVN_CALL_DISCONNECTED only. In this case, NCCEVN_REJECTING_CALL is not delivered. Associated events:
|
nccReleaseCall |
Releases resources associated with a call in the disconnected state, and destroys a call handle. nccReleaseCall can only be called when a call is in the disconnected state. When a call is released, it is completely destroyed. The application can no longer retrieve call status information. Associated event: NCCEVN_CALL_RELEASED is returned after the protocol has performed the network procedures for releasing the call. All internal resources allocated to the call are released. After the application receives this event, no more DSP-related events are generated for this call handle. |
nccRetrieveCall |
Retrieves a call previously placed on hold with nccHoldCall. The call becomes active again. The line state changes to active. Associated events:
|
nccSendCallMessage |
Pass through mechanism to send a protocol-specific call message directly to the TCP. Not used for CAS protocols. Associated events: None. |
nccSendDigits |
Continues the process of sending digits to place an outbound call (for protocols that support overlapped sending of digits). Associated events: None. |
nccSendLineMessage |
Pass through mechanism to send a protocol-specific line message. Not used for CAS protocols. Associated events: None. |
nccStartProtocol |
Prepares an uninitialized line to be used by a protocol to accept and/or place calls. When invoked, nccStartProtocol returns NCCEVN_START_PROTOCOL_DONE. This event acknowledges the protocol startup attempt. The event value field indicates whether the attempt was successful or not. Associated event: NCCEVN_START_PROTOCOL_DONE: Acknowledges the attempt by the application to start a protocol on a context (line handle). The event value field indicates if the protocol was started or not. The following reason codes may be returned:
|
nccStopProtocol |
Uninitializes an NCC line. If this command succeeds, the line state becomes uninitialized. Any calls that are on the line are released. An NCCEVN_CALL_RELEASED event is generated for each released call. Then an NCCEVN_STOP_PROTOCOL_DONE event is returned. Associated events:
|
nccTransferCall |
Completes supervised transfer of two calls. Only one of the two call handles can be in the connected state and not be on hold. Both calls must be on the same line (context) handle. When the transfer is completed, the application should invoke nccReleaseCall for both call handles to release their resources. Note: Not all protocols support supervised call transfer. The application can determine if the protocol supports this state by examining the NCC_CAP_SUPERVISED_TRANSFER bit in the capabilitymask returned by nccQueryCapability. When the transfer is completed, call nccReleaseCall to go back to the idle state. Associated event: NCCEVN_CALL_DISCONNECTED should be returned twice, once for each call. The event indicates that the call is disconnected (from the point of view of the application). If the call transfer is successful, the NCC_DIS_TRANSFER reason code is returned with this event. Other protocol-specific reason codes may be reported for failure to complete transfer. The CTA_EVENT structure containing this event also contains the first call handle (callhd1) of the nccTransferCall invocation. |
nccUnBlockCalls |
Used to release blocking of calls on the specified line (context) handle. When the line state has changed from blocking to idle, the application receives NCCEVN_CALLS_UNBLOCKED. It can then receive or place new calls. nccUnblockCalls may be used to cancel a previous nccBlockCalls invocation before the protocol is able to start blocking calls on the specified line. In this case, the application receives no events. If the call unblocking request fails for some reason, the application receives NCCEVN_UNBLOCK_FAILED. The line remains in the blocking line state. Associated events:
|
The NCC.START.eventmask parameter dictates whether certain informational call control events are generated. For detailed information about this structure, refer to the Dialogic® NaturalAccess™ NaturalCallControl™ API Developer’s Manual.