Dialogic 05-0867-005 Table Top Game User Manual


 
Appendix A - Call Control Scenarios
407
FACILITY_IE_LAYOUT *tbct_ie;
.
IE_BLK ie_list;
ext_id = (EXTENSIONEVTBLK*) (metaevt.extevtdatap);
/*assumes metaevt is filled by gc_GetMetaEvent */
switch ( event )
{
.
.
case GCEV_EXTENSION:
switch (ext_id)
{
.
.
.
// retrieve facility IE
for (ie_len = 2; ie_len < ie_list.length;)
{
if (ie_list[ie_len] == FACILITY_IE)
// found the facility IE
{
tbct_ie = &ie_list[ie_len]; // process the Facility IE
tbct_ie_len = tbct_id->length;
#define FACILITY_IE 0x1C
#define RETURN_RESULT 0xA2
#define RETURN_ERROR 0xA3
#define REJECT 0xA4
#define INVOKE_IDEN_TAG 0x02
if (tbct_ie->bits.comp_type == RETURN_RESULT)
// network accepted TBCT request{
.
.
// if subscribed to Notification to Controller, check for Invoke component //
if (tbct_ie->bits.comp_data[0] == INVOKE_IDEN_TAG)
{
invoke_iden = tbct_ie->bits.comp_data[2];
// get invoke identifier
}}
else if (tbct_ie->bits.comp_type == RETURN_RESULT)
// network accepted TBCT request
}
else
{
/* if it is not facility IE, go to the next IE */
/* if this is single byte IE */
if (ie_list[ie_len] & 0x80)
/* increment by one byte */
ie_len = ie_len + 1;
else/* otherwise increment by length of the IE */
ie_len = ie_len + ie_list[ie_len + 1];
}
}
break;
.
.