gc_SetInfoElem( )
Termination Events | Cautions | Errors | Example | See Also
Name: int gc_SetInfoElem(linedev, iep) Inputs: Returns: Includes: Category: Mode: Platform and Technology: †See the Global Call Technology User's Guides for additional information.
Description
- Note: The gc_SetInfoElem( ) function is deprecated in this software release. The suggested equivalent is gc_SetUserInfo( ).
The gc_SetInfoElem( ) function allows applications to set an additional information element in the next outbound ISDN message on a specific B channel. This and the facility functions are useful tools for users who wish to use ISDN flexibility and capabilities. A typical application for the gc_SetInfoElem( ) function is inserting user-to-user information elements in outbound messages.
See also the appropriate Global Call Technology User's Guide for technology-specific information.
linedev Global Call line device handle iep points to the starting address of the information element data structure; see GC_IE_BLK Termination Events
Cautions
- The gc_SetInfoElem( ) function must be used just prior to calling a function that sends an ISDN message. The information elements specified by the gc_SetInfoElem( ) function are applicable only to the next outbound ISDN message.
- The line device number in the parameter must match the line device number in the function call that sends the ISDN message.
- If this function is invoked for an unsupported technology, the function fails. The error value EGC_UNSUPPORTED will be the Global Call value returned when the gc_ErrorInfo( ) function is used to retrieve the error code.
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
/* * Assume the following has been done: * 1. device has been opened (e.g. :N_dtiB1T1:P_isdn, :N_dtiB1T2:P_isdn, etc...) */ #include <stdio.h> #include <srllib.h> #include <gclib.h> #include <gcerr.h> #include <gcisdn.h> GC_IE_BLK gc_ie_blk; GCLIB_IE_BLK gclib_ie_blk; IE_BLK ie_blk; GC_INFO gc_error_info; /* GlobalCall error information data */ gc_ie_blk.gclib = &gclib_ie_blk; gc_ie_blk.cclib = &ie_blk; ie_blk.length = 6; ie_blk.data[0] = 0x7E; ie_blk.data[1] = 0x4; ie_blk.data[2] = 0x01; ie_blk.data[3] = 0x01; ie_blk.data[4] = 0x02; ie_blk.data[5] = 0x04; if (gc_SetInfoElem (ldev, &gc_ie_blk) < 0) { gc_ErrorInfo( &gc_error_info ); printf ("Error: gc_SetInfoElem() on device handle: 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); }See Also
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation