# Getting extended call status information

To retrieve extended call status information about a call, use nccGetExtendedCallStatus.

#### Prototype

DWORD NMSAPI nccGetExtendedCallStatus ( NCC_CALLHD callhd, void *extendedcallstatus, unsigned size)

Argument | Description
callhd | Call handle returned to the application with the NCCEVN_SEIZURE_DETECTED event or returned from nccPlaceCall.
extendedcallstatus | Pointer to an address of a buffer to receive the extended call status information.
size | Size of the buffer.

#### Details

extendedcallstatus is a buffer containing a fixed size structure that contains both data and offset information followed by a variable length data area containing SIP IEs. The NCC data structure NCC_SIP_EXT_CALL_STATUS specifies the layout of this buffer. It contains the To and From addresses for this session along with the SDP information for the remote and local users. A series of offsets is used to directly access SIP IEs stored in the data area. If the offset is zero, then the information element is not present.

typedef struct
{
DWORD size; // size of extended call status information
NCC_SIP_ADDRESS to; // the to address or called user
NCC_SIP_ADDRESS from; // the from address or calling user
NCC_SIP_SDP sdpL; // SDP information for local user
NCC_SIP_SDP sdpR; // SDP information for remote user
BYTE data[1]; // SIP IEs (variable length data area)
};

#### Example

DWORD buffer[256];
DWORD toPort;
char toAddress[128];
NCC_SIP_EXT_CALL_STATUS *xcs = (NCC_SIP_EXT_CALL_STATUS *)buffer;
ret = nccGetExtendedCallStatus( callhd, xcs, sizeof(buffer) );
if (xcs->to.port)
toPort = xcs->to.port;
if (xcs->to.address)
strcpy(toAddress, NCC_SIP_STRING(*xcs,to.address));