Most of the functions, events, and parameters in the NCC service have names similar to their functional counterparts in the ADI service, except that they begin with the letters NCC. For example: nccStartProtocol; NCCEVN_START_PROTOCOL_DONE; NCC.START.eventmask. In most cases, functions, events, and parameters in the two services that have similar names operate similarly.
Functions in the two services differ mainly in the arguments that can be passed to them. For example, in the NCC service, a pointer can be sent with most functions referencing a structure containing protocol-specific extended arguments. In the ADI service, extended arguments are set up using adiSetExtendedArgs, and are passed with the next call control function invocation.
The following table gives NCC counterparts for ADI functions, and describes the differences:
Note: ADI call control is no longer supported. The call control-specific information in this table is provided for your convenience as you transition from ADI to NCC.
|
ADI function |
NCC counterpart |
Description of differences |
|---|---|---|
|
adiAcceptIncomingAddress |
(Implemented differently under NCC) |
Under NCC, incoming digits change the call state to receiving digits. At any time while the call is in this state, the application can call nccAcceptCall, nccAnswerCall or nccRejectCall, depending upon the incoming digits. |
|
adiAnswerCall |
nccAnswerCall takes a call handle instead of a context handle. It also takes an additional argument pointing to a protocol-specific answer parameter structure. | |
|
adiBlockCalls |
nccBlockCalls takes an additional argument pointing to a protocol-specific call blocking parameter structure. Successful completion of this function indicates that the line has changed to Blocking line state. | |
|
adiGetCallStatus |
nccGetCallStatus, nccGetExtendedCallStatus, nccGetLineStatus |
nccGetCallStatus returns the NCC_CALL_STATUS structure, containing protocol-independent information about a call. This function takes a call handle. nccGetExtendedCallStatus returns a protocol-specific call status structure. This function takes a call handle. nccGetLineStatus returns an NCC_LINE_STATUS structure containing information about the current line state. This function takes a context handle. |
|
adiPlaceCall |
nccPlaceCall takes additional arguments: the calling address (caller ID); a pointer to a protocol-specific parameter structure; and the call handle to assign to the successfully initialized call. Another pointer references a structure containing the connectmask and disconnectmask. This structure references another containing call progress parameters. | |
|
adiPlaceSecondCall |
(Implemented differently under NCC) |
Supervised transfer is implemented differently under NCC. For details, see Transferring calls. |
|
adiRejectCall |
This function takes a call handle instead of a context handle. It also takes an additional argument pointing to a protocol-specific extended argument structure. Rejecting a call changes its call state to rejecting. The application can then disconnect the call using nccDisconnectCall, and then release the call with nccReleaseCall. | |
|
adiReleaseCall |
These functions take call handles instead of context handles. They each also optionally take an additional argument pointing to a protocol-specific extended argument structure. nccReleaseCall releases resources associated with a call, and destroys the call handle. It is invoked after the call is in disconnected call state. When a call is released, it is no longer in any state. | |
|
adiReleaseSecondCall |
(Not needed under NCC) |
Supervised transfer is implemented differently under NCC. For details, see Transferring calls. |
|
adiSetBilling |
This function takes a call handle instead of a context handle. It also takes an additional argument pointing to a protocol-specific extended argument structure. | |
|
adiSetExtendedArgs |
Under NCC, extended arguments can be sent in three ways:
| |
|
adiStartProtocol |
This function is called when the line is in uninitialized line state. Successful starting of a protocol changes the line to idle line state. nccStartProtocol has three pointers. One references a protocol-independent parameter structure containing generic NCC protocol-starting parameters. The other two pointers reference manager-specific and protocol-specific protocol-starting parameter structures. | |
|
adiStopProtocol |
Successful execution of this command causes the line state to change to uninitialized. | |
|
adiTransferCall |
nccAutomaticTransfer takes a call handle instead of a context handle. It also takes additional arguments pointing to protocol-specific parameter structures. | |
|
adiUnBlockCalls |
nccUnblockCalls takes an additional argument pointing to a protocol-specific call blocking parameter structure. Successful completion of this function indicates that the line has changed from blocking line state to idle line state. | |
|
(Protocol-specific operation, activated using extended arguments) |
New function, not included in ADI. In some protocols under ADI, call hold/retrieve was implemented using extended arguments. | |
|
(Protocol-specific operation, activated using extended arguments) |
New function, not included in ADI. In some protocols under ADI, call hold/retrieve was implemented using extended arguments. |
When using the Natural Call Control service, the adiGetContextInfo function does not fill in the tcpname field of the context information structure. To retrieve this information, the application must call nccGetLineStatus and look at the protocol field of the NCC_LINE_STATUS structure, as shown in this sample code:
NCC_LINE_STATUS nccinfo;
unsigned ret;
ret = nccGetLineStatus( ctahd, &nccinfo, sizeof( nccinfo ), NULL, 0 );
if ( ret != SUCCESS )
return ret;
printf("Protocol = %s\n", nccinfo.protocol );
For more details about retrieving line status information, refer to Getting line status information.