Use nccSendCapabilityQuery to send a SIP OPTIONS message when requesting capability information from the remote end. The nccSendCapabilityQuery parameters specify a line handle (linehd) and a SIP IE list to use for building the OPTIONS method headers (sipIEs).
DWORD nccSendCapabilityQuery( CTAHD linehd, void * sipIEs)
Argument |
Description |
linehd |
Line handle used to open the NCC service instance. |
sipIEs |
NULL or pointer to a buffer containing SIP IEs. |
The following table lists the optional and required information elements (IEs):
Information element (IE) |
Required or optional |
Description |
SIP_IE_TO_FULL_ADDRESS |
Required |
SIP URI of the remote user. |
SIP_IE_FROM_FULL_ADDRESS |
Required |
SIP URI of the local user. |
SIP_IE_REQUEST_URI |
Required |
Address for requested URI. |
SIP_IE_OTHER_HEADER |
Required |
Specifies the Accept header. |
SIP_IE_CONTACT_ADDRESS |
Optional |
Contact address. |
The following example illustrates how to request capability information using nccSendCapabilityQuery:
DWORD b[2048];
NCC_SIP_INFO *ie;
NCC_SIP_INFO_INIT ( b, &ie );
NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_TO_FULL_ADDRESS, sip.to );
NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_FROM_FULL_ADDRESS, sip.from );
NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_REQUEST_URI, sip.requestUri );
NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_OTHER_HEADER, "Accept:application/sdp" );
NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_CONTACT_ADDRESS, sip.contact );
ret = nccSendCapabilityQuery( ctahd, b);