gc_SetParm( )
Termination Events | Cautions | Errors | Example | See Also
Description
The gc_SetParm( ) function sets the default parameters and all channel information associated with the specific line device.
See also the appropriate Global Call Technology User's Guide for technology-specific information.
linedev Global Call line device handle parm_id parameter ID of the parameter to be set. The parameter ID definitions for parameters that are common across all technologies are listed in Table 16. The "Level" column indicates whether the parameter is a channel level parameter or a trunk level parameter. To set a trunk level parameter, the linedev parameter must be the device ID associated with a network interface trunk. See GC_PARM for data structure details. See the appropriate Global Call Technology User's Guide for additional parameter IDs. value value selected for parameter being set
Table 16. Parameter Descriptions, gc_GetParm( ) and gc_SetParm( )
Calling party number (pointer to null-terminated ASCII string) (possible values are the existing GTD identification numbers).
Use paddress field of GC_PARM.
See the appropriate Global Call Technology User's Guide for additional parameters. Termination Events
Cautions
The gc_SetParm( ) function can be called only once in the application to set the RECEIVE_INFO_BUF buffer size.
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> int set_parm(LINEDEV ldev) { GC_INFO gc_error_info; /* GlobalCall error information data */ GC_PARM gc_parm; /* parm values */ /* * Disable downloading tones to firmware. This is to prevent GlobalCall * from overwriting tones which the application has set up */ gc_parm.shortvalue = GCPV_DISABLE; if ( gc_SetParm(ldev, GCPR_LOADTONES, gc_parm) != GC_SUCCESS) { /* process error return as shown */ gc_ErrorInfo( &gc_error_info ); printf ("Error: gc_SetParm() 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); } return (0); }See Also
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation