Dialogic Dialogic Global Call IP IP Phone User Manual


 
// Insert SIP Event field
if (pEvent)
{
gc_util_insert_parm_ref_ex(&parmblkp,
IPSET_SIP_MSGINFO,
IPPARM_EVENT_HDR,
(unsigned long)(strlen(pEvent)),
pEvent);
}
// Insert SIP Call ID field
if (pCallID)
{
gc_util_insert_parm_ref-ex(&parmblkp,
IPSET_SIP_MSGINFO,
IPPARM_CALLID_HDR,
(unsigned long)(strlen(pCallID)),
pCallID);
}
if (parmblkp == NULL)
{
// memory allocation error
return;
}
// transmit SUBSCRIBE 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_bSubscribeSent = true;
}
4.15.2 Receiving Responses to SUBSCRIBE Requests
After a SUBSCRIBE request is sent, the remote entity responds with an accept or reject reply,
which the call control library passes to the application as a GCEV_EXTENSION event of type
IPEXTID_RECEIVEMSG.
The data associated with the Extension event will contain the following parameter element:
IPSET_MSG_SIP
IPPARM_MSGTYPE
and one of the following two values:
IP_MSGTYPE_SIP_SUBSCRIBE_ACCEPT
IP_MSGTYPE_SIP_SUBSCRIBE_REJECT