Dialogic Dialogic Global Call IP IP Phone User Manual


 
// transmit NOTIFY message to network
retval = gc_Extension(GCTGT_GCLIB_CHAN, boardh,
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);
m_bSubscribeRejectSent = true;
}
4.15.5 Sending NOTIFY Requests
To send a NOTIFY message, the application begins by creating a GC_PARM_BLK that contains
an element of the following type:
IPSET_MSG_SIP
IPPARM_MSGTYPE
value = IP_MSGTYPE_SIP_NOTIFY
The application adds elements for the desired header fields and one or more MIME body parts, if
appropriate, to the parameter block, then uses the gc_Extension( ) function to send the message.
The header fields that can be set and the general technique for setting them are described in
Section 4.9.5, “Setting SIP Header Fields for Outbound Messages”. The technique for constructing
MIME bodies is described in Section 4.10.4, “Sending MIME Information”.
The header fields that normally must be set in a NOTIFY request include the following:
Request-URI
To display string
From display string
Event header field
Call-ID header field
If the NOTIFY being sent is a subscribed NOTIFY, the Call-ID header field must contain the same
Call-ID value as the SUBSCRIBE request that the NOTIFY relates to. For an unsubscribed
NOTIFY, the Call-ID header field must be NULL.
The following code snippet illustrates how an application constructs and sends a NOTIFY request.