# Accepting a call

To accept an incoming call, use nccAcceptCall. This function causes the provisional response 180 Ringing to be sent to the calling party.

#### Prototype

DWORD NMSAPI nccAcceptCall ( NCC_CALLHD callhd, unsigned mode, void *acceptparms)

Argument | Description
callhd | Call handle returned to the application with the NCCEVN_SEIZURE_DETECTED event.
mode | Not used.
acceptparms | Pointer to the acceptparms SIP information structure. The acceptparms data structure is a buffer that contains SIP IEs. This buffer can send SDP information. You are not required to send SDP information with every SIP message. If the SDP information is sent using nccAcceptCall, then nccAnswerCall can be passed a NULL pointer to the answerparms buffer.

#### Example

DWORD b[256];
NCC_SIP_INFO *ie;
NCC_SIP_INFO_INIT ( b, &ie );
NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_SDP_ORIGIN_USERNAME, "user" );
NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_SDP_ORIGIN_SESSION_ID, "01234567890" );
NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_SDP_ORIGIN_VERSION, "0987654321" );
NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_SDP_ORIGIN_ADDRESS, "<sip:user@192.162.2.2:5060>");
NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_SDP_SESSION_NAME, "NMS SIP" );
NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_SDP_CONNECTION_NET_TYPE, "IN" );
NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_SDP_CONNECTION_ADDR_TYPE, "IP4" );
NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_SDP_CONNECTION_ADDRESS, "192.168.2.2" );
NCC_SIP_INFO_ADD_NUM ( b, &ie, SIP_IE_SDP_MEDIA_TYPE, SDP_MEDIA_TYPE_AUDIO );
NCC_SIP_INFO_ADD_NUM ( b, &ie, SIP_IE_SDP_MEDIA_PORT, 8006 );
NCC_SIP_INFO_ADD_NUM ( b, &ie, SIP_IE_SDP_MEDIA_PROTOCOL, SDP_MEDIA_PROTOCOL_RTP );
NCC_SIP_INFO_ADD_NUM ( b, &ie, SIP_IE_SDP_ENCODING, 0 );
ret = nccAcceptCall( callhd, 0, b );