Dialogic Dialogic Global Call IP IP Phone User Manual


 
418 Dialogic
®
Global Call IP Technology Guide — November 2007
Dialogic Corporation
gc_ReqModifyCall( ) — request modification of call attributes
.
.
/* Dialogic Header Files */
#include <gcip.h>
#include <gclib.h>
.
.
.
/* Request remote SIP client to change call to G.729: */
/* Assumes: 1) caller has verified call to be in connected state */
/* 2) caller has enabled event handler for GCEV_MODIFY_CALL_ACK, */
/* GCEV_MODIFY_CALL_REJ, and GCEV_MODIFY_CALL_FAIL. */
int reqChangeToG729(CRN crn)
{
IP_CAPABILITY ipcap;
GC_PARM_BLK *parmblkp = NULL;
memset(&ipcap, 0, sizeof(IP_CAPABILITY));
ipcap.capability = GCCAP_AUDIO_g729;
ipcap.type = GCCAPTYPE_AUDIO;
ipcap.extra.audio.frames_per_pkt = 1;
ipcap.extra.audio.VAD = 0;
/* Specify TX direction */
ipcap.direction = IP_CAP_DIR_LCLTRANSMIT;
/* append the GC_PARM_BLK with the respective local TX codec */
gc_util_insert_parm_ref(&parmblkp,
GCSET_CHAN_CAPABILITY,
IPPARM_LOCAL_CAPABILITY,
sizeof(IP_CAPABILITY),
&ipcap);
if (NULL == parmblkp) return FAILURE;
/* Specify local RX direction */
ipcap.direction = IP_CAP_DIR_LCLRECEIVE;
/* append the GC_PARM_BLK with the respective RX codec */
gc_util_insert_parm_ref(&parmblkp,
GCSET_CHAN_CAPABILITY,
IPPARM_LOCAL_CAPABILITY,
sizeof(IP_CAPABILITY),
&ipcap);
if (NULL == parmblkp) return FAILURE;
if (gc_ReqModifyCall(crn, parmblkp, EV_ASYNC) < 0) return FAILURE;
gc_util_delete_parm_blk(parmblkp);
} /* End of function. */
The following code illustrates how this coder change is initiated in the third party call control
(3PCC) operating mode using the gc_ReqModifyCall( ) function.
.
.
.
/* Dialogic Header Files */
#include <gcip.h>
#include <gclib.h>
.
.
.