gc_CRN2LineDev( )
Termination Events | Cautions | Errors | Example | See Also
Name: int gc_CRN2LineDev (crn, linedevp) Inputs: Returns: Includes: Category: Mode: Platform and Technology: Description
The gc_CRN2LineDev( ) function is a utility function that maps a call reference number (CRN) to its line device ID. This function returns the line device identification associated with the specified CRN.
crn call reference number linedevp points to the location where the output LINEDEV identification code will be stored. The line device is created when the function gc_OpenEx( ) is called. Termination Events
Cautions
A CRN is no longer valid once a gc_ReleaseCallEx( ) or gc_ResetLineDev( ) function has been issued.
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 crn_to_linedev(CRN crn, LINEDEV *ldevp) { GC_INFO gc_error_info; /* GlobalCall error information data */ if (gc_CRN2LineDev(crn, ldevp) != 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); } return(0); }See Also
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation