gc_GetParm( )
Termination Events | Cautions | Errors | Example | See Also
Description
The gc_GetParm( ) function retrieves the value of the specified parameter from the parm_id parameter for a line device. The application can retrieve only one parameter value at a time.
See also the appropriate Global Call Technology User's Guide for technology-specific information.
linedev Global Call line device handle parm_id parameter ID definitions are listed in Table 16, "Parameter Descriptions, gc_GetParm( ) and gc_SetParm( )" in the gc_SetParm( ) function description. The "Level" column lists whether the parameter is a channel level parameter or a trunk level parameter. To get a trunk level parameter, the linedev parameter must be the device ID associated with a network interface trunk. valuep points to the buffer where the requested information will be stored. See GC_PARM for data structure 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> int get_calling_party(LINEDEV ldev, char *callerp) { GC_PARM parm_val; /* value of parameter returned */ GC_INFO gc_error_info; /* GlobalCall error information data */ /* * Retrieve calling party number for E-1 CAS line device and print it. */ if (gc_GetParm(ldev, GCPR_CALLINGPARTY, &parm_val) == GC_SUCCESS) { strcpy(callerp, parm_val.paddress); printf ("Calling party No. is %s\n", parm_val.paddress); } else { /* process error return as shown */ gc_ErrorInfo( &gc_error_info ); printf ("Error: gc_GetParm() 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); } return (0); }See Also
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation