Dialogic 05-2239-009 User Manual

Page of 604
gc_util_insert_parm_val(&parmblkp,
                        IPSET_MSG_SIP,
                        IPPARM_MSGTYPE,
                        sizeof(int),
                        IP_MSGTYPE_SIP_INFO_FAILED);
// Insert SIP response code
gc_util_insert_parm_val(&parmblkp,
                        IPSET_MSG_SIP,
                        IPPARM_MSG_SIP_RESPONSE_CODE,
                        sizeof(int),
                        501);
// transmit INFO response message to network 
retval = gc_Extension(GCTGT_GCLIB_CRN, crn, IPEXTID_SENDMSG, parmblkp, &retblkp, EV_ASYNC); 
4.14
Sending and Receiving SIP OPTIONS Messages
The SIP OPTIONS method provides a means for a SIP User Agent to query the capabilities of 
another UA or proxy, either within or outside of a SIP dialog. As an example, a client can use the 
OPTIONS method to discover the content types, extensions, methods, codecs, etc. that are 
supported by another party without having to “ring” the party by sending an INVITE. 
RFC 3261 requires all user agents to support the OPTIONS method. The default behavior of the 
Dialogic
®
 Global Call API library is to send automatic responses to incoming OPTIONS requests 
and not provide facilities for applications to send OPTIONS requests. Optionally, an IPT virtual 
board can be configured to enable application access to OPTIONS messages. When access is 
enabled, applications can send OPTIONS requests to remote parties and are responsible for 
responding to incoming OPTIONS requests.
The following topics describe the Dialogic
®
 Global Call API library’s implementation of support 
for the OPTIONS method.
4.14.1
Default OPTIONS Behavior
If the SIP OPTIONS access feature is not enabled when the ipt virtual board device is started, the 
SIP stack in the Dialogic
®
 Global Call API library responds to incoming OPTIONS requests 
automatically, using default information, because all SIP User Agents are required to support the 
OPTIONS method. The application has no control over the content of these automatic response 
messages, nor can it send OPTIONS requests.