Dialogic Dialogic Global Call IP IP Phone User Manual


 
410 Dialogic
®
Global Call IP Technology Guide — November 2007
Dialogic Corporation
gc_RejectModifyCall( ) — reject proposed modification of call attributes
.
.
.
} /* endof switch */
} /* endof process_event function */
The following code example illustrates how the gc_RejectModifyCall( ) function is used in third
party call control (3PCC) operating mode.
// Assume application has enabled GCEV_200OK and GCEV_SIP_ACK eventing.
.
.
.
/* Dialogic Header Files */
#include <gcip.h>
#include <gclib.h>
.
.
.
/* SRL event handler: */
for (;;)
{
if (-1 != sr_waitevt(500)) process_event();
}
void process_event(void)
{
METAEVENT metaevent;
GC_INFO t_info;
/* Populate the metaEvent structure */
if(GC_SUCCESS != gc_GetMetaEvent(&metaevent)) return;
/* process GlobalCall events */
if ((metaevent.flags & GCME_GC_EVENT) == 0) return;
switch (metaevent.evttype)
{
.
.
.
case GCEV_REQ_MODIFY_CALL: /* request to modify call attribute */
{
EXTENSIONEVTBLK *extblkp = metaevent.extevtdatap;
GC_PARM_BLKP parm_blkp = &extblkp->parmblk;
GC_PARM_BLKP replyParmblkp = NULL;
GC_PARM_DATA_EXT parm;
GC_PARM_DATAP curParm = NULL;
IP_CAPABILITY cap;
RTP_ADDR rtp;
int frc;
bool proposal_accepted;
GC_PARM_BLKP parm_blkp = metaeventp->extevtdatap;
INIT_GC_PARM_DATA_EXT(&parm);
frc = gc_util_find_parm_ex(parm_blkp,
(unsigned long)IPSET_SDP,
(unsigned long)IPPARM_SDP_OFFER,
&parm);
if (frc == GC_SUCCESS)
{
// Raw SDP is in memory location parm.pData and is
// of length parm.data_size.
char sdpResponse[1000];
int sdpResponseSize = 1000;