Dialogic Dialogic Global Call IP IP Phone User Manual


 
261
Dialogic Corporation
Retrieving UU-IE from Facility Messages
Because there is no Global Call state change event associated with a Facility message, a slightly
different retrieval mechanism applies to this message type. In the case of a Facility message, the
UU-IE is sent to the application in an unsolicited GCEV_EXTENSION event which has an
extension ID of IPEXTID_RECEIVEMSG rather than a Global Call state change event. The
extevtdatap field of the metaevent for this event is a pointer to an EXTENSIONEVTBLK structure
which contains a GC_PARM_BLK structure. This parameter block in turn contains a parameter
element that has the ASN.1-encoded UU-IE data as its value.
UU-IE Retrieval Code Example
The following example illustrates retrieval of a UU-IE element received in an H.323 message:
int OnEventRetrieveUUIE(METAEVENT metaevent)
{
// This function does the following:
// 1) See if the event can have a UUIE data; if not then return
// 2) Extract the GC parm block associated with the event
// 3) Go through the GC parm block to see if there exists a setid/parmid combination
// of IPSET_CALLINFO/IPPARM_UUIE_ASN1
// 4) For the GC parm data, that has the above combination, print the UUIE length and
// UUIE data bytes.
int rc;
GC_PARM_BLKP parm_blk
GC_PARM_DATA_EXT parm;
char *pChar;
int evttype;
EXTENSIONEVTBLK * pextensionBlk;
Int i;
evttype = metaevent.evttype;
switch(evttype)
{
case GCEV_OFFERED:
case GCEV_PROCEEDING:
case GCEV_ALERTING:
case GCEV_CONNECTED:
case GCEV_DISCONNECTED:
// For all these events, metaevent's extension event block will contain the actual
// GC parm block.
parm_blk = metaevent.extevtdatap;
break;
case GCEV_EXTENSION:
// For this event, metaevent's extension event block will contain the actual
// extension event block.
pextensionBlk = (EXTENSIONEVTBLK *)(metaevent.extevtdatap);
parm_blk = (&(pextensionBlk->parmblk));
if(pextensionBlk->ext_id != IPEXTID_RECEIVEMSG)
{
printf("UUIE extraction is possible only for ext id of IPEXTID_RECEIVEMSG.
Not for ext id of %d\n", pextensionBlk->ext_id);
return(-1);
}
break;