PREV TOC HOME INDEX NEXT


gc_SendMoreInfo( )


Termination Events | Cautions | Errors | Example | See Also

Name: int gc_SendMoreInfo(crn, info_id, info_ptr, mode)
Inputs:

CRN crn

  • call reference number
 

int info_id

  • ID of the type of information requested
 

GC_PARM *info_ptr

  • pointer to information to be sent
 

unsigned long mode

  • async or sync
Returns:

0 if successful

<0 if failure

Includes:

gclib.h

gcerr.h

Category:

optional call handling functions

Mode:

asynchronous or synchronous

Platform and Technology:

Springware: T-1/E-1 (PDKRT only), ISDN

DM3: ISDN

SS7

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

Description

The gc_SendMoreInfo( ) function sends more information to the remote side (such as digits). This function allows the application to initiate the sending of information such as in overlap sending (for example, a gateway application).

The gc_SendMoreInfo( ) function can be called in the Dialing state after gc_MakeCall( ) is issued or after receiving a GCEV_REQMOREINFO event. This event is received if the outgoing call does not contain sufficient information and the technology call control layer or the remote side requests more information. The result value of this event indicates what type of information was requested (either destination or origination address). The gc_SendMoreInfo( ) function can be called multiple times to send more information regardless of whether or not the GCEV_REQMOREINFO event was received. If information is requested and there is no more information left to send, the gc_SendMoreInfo( ) can be called again with the info_ptr pointer set to NULL. When sufficient information has been sent, a GCEV_PROCEEDING, GCEV_ALERTING, or GCEV_CONNECTED event should be received.

Although gc_SendMoreInfo( ) can also be called prior to receiving a GCEV_REQMOREINFO event (for example, in the Dialing state), there is a possibility of a glare condition where the gc_SendMoreInfo( ) function is called and then a GCEV_REQMOREINFO event is received.

For more information about the gc_SendMoreInfo( ) function, see the discussion of overlap sending in the Global Call API Programming Guide.

Parameter

Description

crn call reference number for the call
info_id ID of the type of information to be sent. The valid values are:
  • DESTINATION_ADDRESS
    send the called party number (DNIS)
  • ORIGINATION_ADDRESS
    send the calling party number (ANI)
info_ptr points to information to be sent. If no information is to be sent, this parameter must be set to NULL.
mode set to EV_ASYNC for asynchronous execution or to EV_SYNC for synchronous execution

Termination Events

GCEV_SENDMOREINFO
indicates that all the digits are successfully sent
GCEV_TASKFAIL
indicates that the function failed and that the request/message was rejected by the protocol or firmware

Cautions

Errors

If this function returns <0 to indicate failure, use the gc_ErrorInfo( ) function for error information. If the GCEV_TASKFAIL event is received, use the gc_ResultInfo( ) function to retrieve information about the event. 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. Opened line devices for each time slot on DTIB1.
 * 2. Make a call using gc_MakeCall()
 * 3. The call is in Dialing state.
 * 3. An event has arrived and has been converted to a metaevent
 *    using gc_GetMetaEvent() or gc_GetMetaEventEx() (Windows NT)
 * 4. The event is determined to be a GCEV_REQMOREINFO event
 *
 */
int send_moreinfo(CRN crn, char *infop)
{
    GC_INFO  gc_error_info;   /* GlobalCall error information data */ 
    /*
     * Setup the GC_PARM structure
     */
    GC_PARM info;
    info.paddress = infop; 
    if (gc_SendMoreInfo(crn, DESTINATION_ADDRESS, &info, EV_ASYNC) 
        != GC_SUCCESS) 
    {
        /* process error return as shown */
         gc_ErrorInfo( &gc_error_info );
         printf ("Error: gc_SendMoreInfo() on device handle: 0x%lx, GC ErrorValue: 0x%hx - %s, 
               CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n",
               metaevent.evtdev, 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);
} 
/*
 * The application may get the GCEV_SENDMOREINFO termination event.
 *
 * The remote side will then answer, accept, or terminate the call at this
 * point.
 */ 

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