Dialogic Dialogic Global Call IP IP Phone User Manual


 
case GCEV_EXTENSION:
if( pextensionBlk->ext_id== IPEXTID_RECEIVEMSG)
{
while ((l_pParm = gc_util_next_parm(pParmBlock, l_pParm )) != 0)
{
int l_mtype= (int)(*( l_pParm->value_buf));
switch (l_pParm->set_ID)
{
case IPSET_MSG_SIP:
if(l_pParm ->parm_ID == IPPARM_MSGTYPE)
{
if(l_mtype== IP_MSGTYPE_SIP_OPTIONS )
{
printf("OPTIONS request received\n");
}
}
break
case IPSET_SIP_MSGINFO:
switch(l_pParm ->parm_ID)
{
case IPPARM_CALLID_HDR:
strncpy(g_CurrentCallID,(char*)parmp->value_buf,parmp->value_size);
g_CurrentCallID[parmp->value_size]='\0';
break;
//(process other headers)
default :
break;
}
}
4.14.6 Responding to OPTIONS Requests
If SIP OPTIONS access is enabled, it is the application’s responsibility to respond to incoming
OPTIONS requests, assuming that there is a channel available to handle the incoming request. (If
there is no channel available, Global Call automatically sends a “busy” response.)
OPTIONS responses are sent as Global Call Extension messages using gc_Extension( ). There are
separate message types for “OK and “Failed” response messages, but both types must use the
Call-ID header obtained from the received request.
“Success” Response Message
“OK” responses to OPTIONS requests use the IPSET_MSG_SIP / IPPARM_MSGTYPE
parameter set and ID with a value of IP_MSGTYPE_SIP_OPTIONS_OK.
The following parameters in the parameter set IPSET_SIP_MSGINFO are used to set the header
fields in the OPTIONS response message, using the general techniques described in Section 4.9.5,
“Setting SIP Header Fields for Outbound Messages”:
parm_ID value_buf Default value