Dialogic Dialogic Global Call IP IP Phone User Manual


 
gc_util_insert_parm_ref_ex(&parmblkp,
IPSET_SIP_MSGINFO,
IPPARM_SIP_HDR,
(unsigned long)(strlen(szAcceptE)+1),
szAcceptE);
gc_util_insert_parm_ref_ex(&parmblkp,
IPSET_SIP_MSGINFO,
IPPARM_SIP_HDR,
(unsigned long)(strlen(szAcceptL)+1),
szAcceptL);
gc_util_insert_parm_ref_ex(&parmblkp,
IPSET_SIP_MSGINFO,
IPPARM_SIP_HDR,
(unsigned long)(strlen(szSupp)+1),
szSupp);
gc_util_insert_parm_ref_ex(&parmblkp,
IPSET_SIP_MSGINFO,
IPPARM_SIP_HDR,
(unsigned long)(strlen(szAllow)+1),
szAllow);
//insert a message body
gc_Extension(GCTGT_GCLIB_CHAN,
devhandle,
IPEXTID_SENDMSG,
parmblkp,
&retblkp,
EV_ASYNC);
“Failed” Response Message
“Failed” responses to OPTIONS requests use the IPSET_MSG_SIP set ID and
IPPARM_MSGTYPE parameter ID with a value of IP_MSGTYPE_SIP_OPTIONS_FAILED.
When sending the response message, the application must include the Call-ID header field value
that was retrieved from the incoming OPTIONS request. The response is on the board device (that
is, the gc_Extension( ) call uses the board handle that was obtained when opening the board
device), and the Call-ID is used to identify the specific request to which the response applies.
The application can also set a specific SIP response code in a “Failed” OPTIONS response
message using IPSET_MSG_SIP / IPPARM_MSG_SIP_RESPONSE_CODE. If the application
does not set a specific response code, Global Call uses the default value 486 (Busy Here).
The following pseudo-code illustrates sending a “Failed” response with the response code 486.
gc_util_insert_parm_val(&parmblkp,
IPSET_MSG_SIP,
IPPARM_MSGTYPE,
sizeof(int),
IP_MSGTYPE_SIP_OPTIONS_FAILED);
gc_util_insert_parm_ref_ex(&parmblkp,
IPSET_SIP_MSGINFO,
IPPARM_CALLID_HDR,
(unsigned long)(strlen(g_CurrentCallID)+1),
g_CurrentCallID);