Dialogic Dialogic Global Call IP IP Phone User Manual


 
// transmit NOTIFY message to network
retval = gc_Extension(GCTGT_GCLIB_CHAN,
hsendboard,
IPEXTID_SENDMSG,
parmblkp,
&retblkp,
EV_ASYNC);
if (retval != GC_SUCCESS)
{
gc_ErrorInfo( &gc_error_info );
printf ("Error : gc_Extension() on HANDLE: 0x%lx,
GC ErrorValue: 0x%hx - %s,
CCLibID: %i - %s,
CC ErrorValue: 0x%lx - %s\n",
boardh,
gc_error_info.gcValue,
gc_error_info.gcMsg,
gc_error_info.ccLibId,
gc_error_info.ccLibName,
gc_error_info.ccValue,
gc_error_info.ccMsg);
return;
}
// clean up
gc_util_delete_parm_blk(parmblkp);
if (pBody) gc_util_delete_parm_blk(parmblkbody);
m_bNotifySent=true;
}
4.15.6 Receiving Responses to NOTIFY Requests
After a NOTIFY request is sent, the remote entity responds with an accept or reject reply, which the
call control library sends to the application as a GCEV_EXTENSION event of type
IPEXTID_RECEIVEMSG.
The GC_PARM_BLK associated with the Extension event for a NOTIFY response contains the
following parameter element:
IPSET_MSG_SIP
IPPARM_MSGTYPE
and one of the following two values:
IP_MSGTYPE_SIP_NOTIFY_ACCEPT
IP_MSGTYPE_SIP_NOTIFY_REJECT
The application must retrieve the necessary SIP message header information by copying it into its
own buffer before the next call to gc_GetMetaEvent( ). Once the next gc_GetMetaEvent( ) call is
issued, the header information is no longer available from the metaevent buffer.
A code example that illustrates the general technique for retrieving information from all incoming
messages associated with the SUBSCRIBE and NOTIFY methods is included in Section 4.15.2,
“Receiving Responses to SUBSCRIBE Requests”, on page 225.