PREV TOC HOME INDEX NEXT


gc_CallProgress( )


Termination Events | Cautions | Errors | Example | See Also

Name: int gc_CallProgress(crn, indicator)
Inputs:

CRN crn

  • call reference number
 

int indicator

  • progress indicator
Returns:

0 if successful

<0 if failure

Includes:

gclib.h

gcerr.h

Category:

interface specific

Mode:

synchronous

Platform and Technology:

Springware: ISDN

See the Global Call Technology User's Guides for additional information.

Description

The gc_CallProgress( ) function notifies the network that provides information about the progress of a call. The gc_CallProgress( ) function is an optional ISDN function that is called after a GCEV_OFFERED event occurs (or after the successful completion of the gc_WaitCall( ) function) and before a gc_AcceptCall( ) function is called. Applications may use the gc_CallProgress( ) function and the message on the D channel to indicate either that the downstream connection is not an ISDN terminal or that in-band information is available from the called party.

In the voice terminating mode, this function is not needed. It may be used in a drop and insert configuration where in-band Special Information Tone (SIT) or call progress tone is sent in the network direction.

See also the appropriate Global Call Technology User's Guide for technology-specific information.

Parameter

Description

crn call reference number
indicator call progress indicator:
  • CALL_NOT_END_TO_ END_ISDN
    Call is not end-to-end ISDN. In drop and insert configurations, the application may optionally provide this information to the network.
  • IN_BAND_INFO
    In-band information or appropriate pattern now available. In drop and insert configurations, the application may optionally notify the network that in-band tones are available.

Termination Events

None

Cautions

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...)
 * 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> 
/*
 * the variable indicator can be assigned one of the two following
 * values CALL_NOT_END_TO_END_ISDN or IN_BAND_INFO.
 */ 
int call_progress(CRN crn, int indicator)
{
    LINEDEV  ldev;           /* Line device */
    GC_INFO     gc_error_info;    /* GlobalCall error information data */ 
    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_CallProgress(crn, indicator) != GC_SUCCESS) {
        /* process error return as shown */
        gc_ErrorInfo( &gc_error_info );
        printf ("Error: gc_CallProgress() 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


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2003, Intel Corporation
All rights reserved
This page generated February, 2003