Dialogic IP Phone 05-2239-009 User Manual

Page of 604
336
Dialogic Corporation
The ipm_SetParm( ) function is called asynchronously even though gc_SetUserInfo( ) is a 
synchronous function. The return value of the ipm_SetParm( ) function call is passed through as 
the return value for the gc_SetUserInfo( ) call and must be interpreted as it is for the asynchronous 
ipm_SetParm( ) call; specifically, the success return value only indicates that the ipm_SetParm( ) 
function began execution successfully. If the set parameter operation completes successfully, an 
IPMEV_SETPARM event will be generated by IPML, but there will be no corresponding Global 
Call event because there is no completion event for the synchronous gc_SetUserInfo( ) function. If 
an error occurs while setting the parameter, there an IPMEV_ERROR event is generated by IPML 
and a GCEV_TASKFAIL event is generated by Global Call.
The following example illustrates how a Global Call application might enable echo cancellation:
IPM_PARM_INFO ipmParmInfo;
Int echoCancellation = ECACTIVE_ON;
ipmParmInfo.eParm = PARMCH_ECACTIVE;
ipmParmInfo.pvParmValue = (void *)&echoCancellation;
gc_util_insert_parm_ref(&parmblkp,
                        IPSET_CONFIG,
                        IPPARM_IPMPARM,
                        (unsigned long)sizeof(IPM_PARM_INFO),
                        &ipmParmInfo);
gc_SetUserInfo(GCTGT_GCLIB_CHAN, lineDev, parmblkp, GC_ALLCALLS);
gc_util_delete_parm_blk(parmblkp);
The following code example illustrates how the TOS field might be set from a Global Call 
application:
IPM_PARM_INFO ipmParmInfo;
char tos=5;
ipmParmInfo.eParm = PARMCH_TOS;
ipmParmInfo.pvParmValue = (void *)&tos;
gc_util_insert_parm_ref(&parmblkp,
                        IPSET_CONFIG,
                        IPPARM_IPMPARM,
                        (unsigned long)sizeof(IPM_PARM_INFO),
                        &ipmParmInfo);
gc_SetUserInfo(GCTGT_GCLIB_CHAN, port[index].ldev, parmblkp, GC_ALLCALLS);
gc_util_delete_parm_blk(parmblkp);