Dialogic Global Call IP Benutzerhandbuch
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;
}
}
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 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.
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.
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
fields in the OPTIONS response message, using the general techniques described in
:
parm_ID
value_buf
Default value