NCC_CALL_STATUS structure

nccGetCallStatus returns the NCC_CALL_STATUS structure:

#define NCC_MAX_DIGITS 31
#define NCC_MAX_CALLING_NAME 63
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+1]; /* 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;

The NCC_CALL_STATUS structure contains the following fields:

Field

Description

size

Number of bytes written at the address pointed to by the callstatus argument passed to nccGetCallStatus.

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 called party address. For ISDN Software, the digits are formatted as follows:

d1...dn * t1...tn

...where:

  • d1...dn are the digits, and

  • t1...tn are the subaddress digits, if available. If no subaddress is available, the * and t digits do not appear in the string.

callingaddr

For inbound calls, the calling party address - the automatic number identification (ANI) digits. For ISDN Software, the digits are formatted as follows:

a1...an * s1...sn

...where:

  • a1...an are the ANI digits, and

  • s1...sn are the subaddress digits, if available. If no subaddress is available, the * and s digits do not appear in the string.

callingname

(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 to the acknowledgment of the pending command.

Values applicable to ISDN Software are:

0 - No command pending.

NCC_PENDINGCMD_ACCEPT_CALL

NCC_PENDINGCMD_ANSWER_CALL

NCC_PENDINGCMD_PLACE_CALL

NCC_PENDINGCMD_REJECT_CALL

NCC_PENDINGCMD_DISCONNECT_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.

Because the values of these fields depend on the information associated with the incoming call, and on the protocol used to set up the call, not all fields are necessarily filled during call set up.

Each ISDN variant fills different fields in the NCC_CALL_STATUS structure at different times. The following table shows which fields are filled by which variant. Each field may be filled at any time with the exception of the callingaddr and pendingcmnd fields. The callingaddr and pendingcmnd fields may be filled at the beginning of the call.

Field

D
M
S

N
I
2

4
E
S
S

5
E
S
S

N
T
T

A
U
S

H
K
T

K
O
R

T
W
N

V
N
6

E
U
R

Q
S
I
G

D
P
N
S
S

T
1
6
0
7

size

x

x

x

x

x

x

x

x

x

x

x

x

x

x

state

x

x

x

x

x

x

x

x

x

x

x

x

x

x

calledaddr

x

x

x

x

x

x

x

x

x

x

x

x

x

x

callingaddr

x

x

x

x

x

x

x

x

x

x

x

x

x

x

callingname

x

 

 

 

 

 

 

 

 

 

 

x

 

 

pendingcmd

x

x

x

x

x

x

x

x

x

x

x

x

x

x

held

 

 

 

 

 

 

 

 

 

 

 

 

 

 

direction

x

x

x

x

x

x

x

x

x

x

x

x

x

x

linehd

x

x

x

x

x

x

x

x

x

x

x

x

x

x