Dialogic
®
System Release 6.1 CompactPCI for Windows
®
Release Update 88
Code Examples
Specifying CPN Field for Receiving
A code example of how to specify the CPN fields for receiving is shown below. This
example is just for the Calling Number Type of Number field. The method to specify the
other CPN data would be similar.
int getCPNInfo(CRN crn)
{
GC_PARM_BLKP gcParmBlk = NULL;
GC_PARM_BLKP retParmBlk;
int frc;
frc = gc_util_insert_parm_val(&gcParmBlk,
IPSET_CALLINFO,
IPPARM_CGPN_TYPE_OF_NUMBER,
sizeof(unsigned char),1);
if (GC_SUCCESS != frc)
{
return GC_ERROR;
}
frc = gc_Extension (GCTGT_GCLIB_CRN,
crn,
IPEXTID_GETINFO,
gcParmBlk,
&retParmBlk,
EV_ASYNC);
if (GC_SUCCESS != frc)
{
return GC_ERROR;
}
gc_util_delete_parm_blk(gcParmBlk);
return GC_SUCCESS;
}
Retrieving CPN Information
A code example of how to extract CPN information from an unsolicited
GCEV_EXTENSIONCMPLT event received as a result of a request for call-related
information is shown below:
int OnExtension(GC_PARM_BLKP parm_blk,CRN crn)
{
GC_PARM_DATA *parmp = NULL;
parmp = gc_util_next_parm(parm_blk,parmp);
if (!parmp)
{
return GC_ERROR;
}
while (NULL != parmp)
{
switch (parmp->set_ID)
{
case IPSET_CALLINFO:
Kommentare zu diesen Handbüchern