gc_GetInfoElem( )
Termination Events | Cautions | Errors | Example | See Also
Name: int gc_GetInfoElem(linedev, iep) Inputs: Returns: Includes: Category: Mode: Platform and Technology: Description
- Note: The gc_GetInfoElem( ) function is deprecated in this software release. The suggested equivalent is gc_GetUserInfo( ). For DM3 boards, gc_GetSigInfo( ) can be used as an alternative.
The gc_GetInfoElem( ) function retrieves information elements (IEs) associated with a line device for an incoming message. The gc_GetInfoElem( ) function must be used immediately after the message is received if the application requires the call information. The call control library will not queue the call information; subsequent messages on the same line device will be discarded if the previous messages are not retrieved.
linedev B channel board line device handle iep points to the starting address of the IE block that is stored in the GC_IE_BLK structure. Also, see the Example code for details. Termination Events
Cautions
Errors
If this function returns <0 to indicate failure, use the gc_ErrorInfo( ) function to retrieve the reason for the error. See the "Error Handling" section in the Global Call API Programming Guide. All Global Call error codes are defined in the gcerr.h file. If the error returned is technology specific, see the technology-specific error header file(s) for the error definition (for example, ccerr.h or isdnerr.h file for the ISDN call control library).
Example
#include <stdio.h> #include <srllib.h> #include <gclib.h> #include <gcerr.h> #include <gcisdn.h> #define MAX_QUEUE_SIZE 20 METAEVENT metaevent; int evt_hdlr() { LINEDEV ldev; /* Line device */ CRN crn; /* Call Reference Number */ GC_IE_BLK ie_blk; /* Information Element */ GC_INFO gc_error_info; /* GlobalCall error information data */ int retcode; /* Return Code */ retcode = gc_GetMetaEvent(&metaevent); if (retcode <0 ) { /* Get and process the error */ } else { /* Continue with normal processing */ } crn = metaevent.crn; if(gc_CRN2LineDev(crn, &ldev) != GC_SUCCESS) { /* process error return as shown */ gc_ErrorInfo( &gc_error_info ); printf ("Error: gc_CRN2LineDev() on crn: 0x%lx, GC ErrorValue: 0x%hx - %s, CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n", crn, gc_error_info.gcValue, gc_error_info.gcMsg, gc_error_info.ccLibId, gc_error_info.ccLibName, gc_error_info.ccValue, gc_error_info.ccMsg); return (gc_error_info.gcValue); } switch(metaevent.evttype) { case GCEV_NOTIFY: /* retrieve signaling information from queue */ if (gc_GetInfoElem(ldev, &ie_blk) != GC_SUCCESS) { /* Process the error as shown in the Example * code of the gc_ErrorInfo() function description */ gc_ErrorInfo( &gc_error_info ); printf ("Error: gc_GetInfoElem() on linedev: 0x%lx, GC ErrorValue: 0x%hx - %s, CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n", ldev, gc_error_info.gcValue, gc_error_info.gcMsg, gc_error_info.ccLibId, gc_error_info.ccLibName, gc_error_info.ccValue, gc_error_info.ccMsg); return (gc_error_info.gcValue); } else { /* succeeded, process signaling information */ } break; } return 0; }See Also
- gc_GetCallInfo( )
- gc_SetUserInfo( )
- gc_SetInfoElem( ) (deprecated)
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation