Retrieves the call control status and stores it in an NCC_CALL_STATUS structure.
DWORD nccGetCallStatus ( NCC_CALLHD callhd, NCC_CALL_STATUS *callstatus, unsigned size )
Argument |
Description |
callhd |
Handle of the call for which you want to retrieve status information. |
callstatus |
A pointer to the NCC_CALL_STATUS structure to receive the call status: typedef struct See the Details section for field descriptions. |
size |
The size (in bytes) of the user-supplied status information space. |
Return value |
Description |
SUCCESS |
|
CTAERR_BAD_ARGUMENT |
The status pointer is NULL. |
CTAERR_INVALID_HANDLE |
The call handle is not valid. It may have been released. |
CTAERR_SVR_COMM |
A server communication error occurred. |
nccGetCallStatus retrieves the status of a specified call. When the function returns, the NCC_CALL_STATUS size field contains the actual number of bytes written.
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 after NCCEVN_INCOMING_CALL is received, or by waiting for NCCEVN_CALL_STATUS_UPDATE, with a value code of NCC_CALL_STATUS_CALLINGADDR.
The NCC_CALL_STATUS structure contains the following fields:
Field |
Description |
---|---|
size |
Number of bytes written at the address pointed to by callstatus. |
state |
Current call state. Possible state values are:
|
calledaddr |
For inbound calls, the address of the requested number, if provided (for example, DNIS, DID). |
callingaddr |
For inbound calls, the address of the caller, if provided (for example, caller ID, ANI). |
callingname |
For inbound calls, the name information of the caller, if provided. |
pendingcmd |
The last call control command issued that the board has not yet acknowledged. This field is set when a call control command is sent to the board, and cleared on the next event that corresponds the acknowledgment of the pending command. Possible pendingcmd values are:
|
held |
Set to non-zero value when a call is held. |
direction |
Indicates inbound or outbound call. Possible values are:
|
linehd |
Line (context) handle on which the call resides. |