257
Dialogic Corporation
TSM Retrieval Code Example
The following code example shows how an application might handle the process of requesting
tunneled signaling message after it has received a Global Call event associated with one of the
supported H.225 message types.
GC_PARM_BLKP gcParmBlk = NULL;
GC_PARM_BLKP retParmBlk;
GC_PARM_DATA_EXT parm_data_ext;
INIT_GC_PARM_DATA_EXT(&parm_data_ext);
int frc;
switch(event)
{
case GCEV_ALERTING:
frc = gc_util_insert_parm_val(&gcParmBlk,
IPSET_TUNNELEDSIGNALMSG,
IPPARM_TUNNELEDSIGNALMSG_CONTENT,
sizeof(int),
1);
frc = gc_util_insert_parm_val(&gcParmBlk,
IPSET_TUNNELEDSIGNALMSG,
IPPARM_TSM_CONTENT_EVENT,
sizeof(int),
TSM_CONTENT_ALERTING);
frc = gc_Extension(GCTGT_GCLIB_CRN,
crn,
IPEXTID_GETINFO,
gcParmBlk,
&retParmBlk,
EV_ASYNC);
break;
case GCEV_CONNECTED:
frc = gc_util_insert_parm_val(&gcParmBlk,
IPSET_TUNNELEDSIGNALMSG,
IPPARM_TUNNELEDSIGNALMSG_CONTENT,
sizeof(int),
1);
frc = gc_util_insert_parm_val(&gcParmBlk,
IPSET_TUNNELEDSIGNALMSG,
IPPARM_TSM_CONTENT_EVENT,
sizeof(int),
TSM_CONTENT_CONNECTED);
frc = gc_Extension(GCTGT_GCLIB_CRN,
crn,
IPEXTID_GETINFO,
gcParmBlk,
&retParmBlk,
EV_ASYNC);
break;
...
//Similar cases for other event types of interest
...
case GCEV_EXTNCMPLT:
GC_PARM_DATA *parmp = NULL;
while (GC_SUCCESS == (gc_util_next_parm_ex(parm_blk, &parm_data_ext)))
{
switch (parmp->set_ID)
{
case IPSET_TUNNELEDSIGNALMSG:
switch (parm_data_ext.parm_ID)