gc_GetNetCRV( )
Termination Events | Cautions | Errors | Example | See Also
Name: int gc_GetNetCRV(crn, netcrvp) Inputs: Returns: Includes: Category: Mode: Platform and Technology: †See the Global Call Technology User's Guides for additional information.
Description
- Note: The gc_GetNetCRV( ) function is deprecated in this software release. The suggested equivalent is gc_Extension( ).
The gc_GetNetCRV( ) function retrieves the network call reference value (CRV) for a specified call reference number (CRN). The CRN is assigned during a gc_MakeCall( ) or gc_WaitCall( ) function call. If an invalid host CRN value is passed, for example, the CRN of an inactive call, the gc_GetNetCRV( ) function will return a value < 0 indicating failure.
crn call reference number netcrvp points to memory location where the network call reference value (CRV) is to be stored 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
/* * Assume the following has been done: * 1. device has been opened (e.g. :N_dtiB1T1:P_isdn, * :N_dtiB1T2:P_isdn, etc...) * 2. gc_WaitCall() has been issued to wait for a call. * 3. gc_GetMetaEvent() or gc_GetMetaEventEx() (Windows) has been * called to convert the event into metaevent. * 4. a GCEV_OFFERED event has been detected. */ #include <stdio.h> #include <srllib.h> #include <gclib.h> #include <gcerr.h> #include <gcisdn.h> METAEVENT metaevent; int get_net_crv() { LINEDEV ldev; /* Line device */ CRN crn; /* call reference number */ int netcrv; /* Network Call Reference Value */ GC_INFO gc_error_info; /* GlobalCall error information data */ /* * Do the following: * 1. Get the CRN from the metaevent * 2. Get the corresponding line device * 3. Proceed to retrieve the Call Reference Value as shown below */ 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); } if(gc_GetNetCRV(crn, &netcrv) != GC_SUCCESS) { /* process error return as shown */ gc_ErrorInfo( &gc_error_info ); printf ("Error: gc_GetNetCRV() 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