Table of Contents Index NMS Glossary Previous Page Next Page (Page 7 of 23 in this chapter) Version


nccGetCallStatus

Description

Retrieves the call control status and stores it in an NCC_CALL_STATUS structure.

Prototype

DWORD nccGetCallStatus ( NCC_CALLHD callhd,
NCC_CALL_STATUS *callstatus,
unsigned size )

callhd The call handle of the call to retrieve status information for.

callstatus A pointer to the NCC_CALL_STATUS structure, as shown:

typedef struct
{
 DWORD size;         /* No of bytes written to by callstatus    */ 
DWORD state; /* Current call state */
char calledaddr [NCC_MAX_DIGITS+1]; /* Called number address */
char callingaddr[NCC_MAX_DIGITS+1]; /* Calling number address */
char callingname[NCC_MAX_CALLING_NAME]; /* Calling name info */
DWORD pendingcmd; /* Last command not ack'ed by board */
DWORD held; /* Non--zero value when call is held */
DWORD direction; /* Indicates inbound or outbound call */
CTAHD linehd; /* Line handle on which call resides */
} NCC_CALL_STATUS;
size The size (in bytes) of the user-supplied status information space.

Return Values

Events

None.

Details

This function retrieves the status of a specified call handle. 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 once 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:

NCC_CALLSTATE_INVALID

NCC_CALLSTATE_SEIZURE

NCC_CALLSTATE_RECEIVING_DIGITS

NCC_CALLSTATE_INCOMING

NCC_CALLSTATE_ACCEPTING

NCC_CALLSTATE_ANSWERING

NCC_CALLSTATE_REJECTING

NCC_CALLSTATE_CONNECTED

NCC_CALLSTATE_DISCONNECTED

NCC_CALLSTATE_OUTBOUND_INITIATED

NCC_CALLSTATE_PLACING

NCC_CALLSTATE_PROCEEDING

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 has not yet been acknowledged by the board. 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:

(0) No command pending.

NCC_PENDINGCMD_ACCEPT_CALL

NCC_PENDINGCMD_ANSWER_CALL

NCC_PENDINGCMD_AUTOMATIC_TRANSFER

NCC_PENDINGCMD_DISCONNECT_CALL

NCC_PENDINGCMD_HOLD_CALL

NCC_PENDINGCMD_PLACE_CALL

NCC_PENDINGCMD_REJECT_CALL

NCC_PENDINGCMD_RETRIEVE_CALL

NCC_PENDINGCMD_SET_BILLING

NCC_PENDINGCMD_TRANSFER_CALL

NCC_PENDINGCMD_RELEASE_CALL

held

Set to non-zero value when a call is held.

direction

Indicates inbound or outbound call. Possible values:

NCC_CALL_INBOUND

NCC_CALL_OUTBOUND

linehd

Line (context) handle on which the call resides.

See Also

nccGetExtendedCallStatus, nccGetLineStatus



Table of Contents Index NMS Glossary Previous Page Next Page (Page 7 of 23 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.