PREV TOC HOME INDEX NEXT


gc_BlindTransfer( )


Termination Events | Cautions | Errors | Example | See Also

Name: int gc_BlindTransfer(activecall, numberstr, makecallp, timeout, mode)
Inputs:

CRN activecall

  • call reference number for active call
 

char *numberstr

  • consultation phone number
 

GC_MAKECALL_BLK *makecallp

  • pointer to outbound (consultation) call information
 

int timeout

  • time-out value
 

unsigned long mode

  • async or sync
Returns:

0 if successful

<0 if failure

Includes:

gclib.h

gcerr.h

Category:

advanced call model

Mode:

asynchronous or synchronous

Platform and Technology:

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

DM3: T-1/E-1

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

Description

The gc_BlindTransfer( ) function is used to initiate and complete a one-step transfer, that is, an unsupervised transfer.

For more information about unsupervised call transfers, see the Global Call API Programming Guide. See also the appropriate Global Call Technology User's Guide for technology-specific information.

Parameter

Description

activecall call reference number for the original (active) call
numberstr called party's (consultation call) telephone number. The number must be terminated with "\0". The maximum length is 32 digits.
makecallp specifies the pointer to the GC_MAKECALL_BLK structure. The structure lists the parameters used to make the outbound call. See GC_MAKECALL_BLK for more information.
timeout time interval, in seconds, during which the call must be established or the function will return with a time-out error. This parameter is ignored when set to 0. Not all call control libraries support this argument in asynchronous mode; currently, timeout is supported only for the PDKRT library.
mode set to EV_ASYNC for asynchronous execution or to EV_SYNC for synchronous execution

Termination Events

GCEV_BLINDTRANSFER
indicates that the call transfer was successfully initiated by the gc_BlindTransfer( ) function.
GCEV_TASKFAIL
indicates that the function failed. For more information, see the "Error Handling" section in the Global Call API Programming Guide.

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

#include <stdio.h>
#include <srllib.h>
#include <gclib.h>
#include <gcerr.h> 
#define MAX_CHAN 30              /* max. number of channels in system */
/*
* Data structure which stores all information for each line
*/
static struct linebag {
    LINEDEV    ldev;               /* GlobalCall API line device handle */
    CRN        original_crn;       /* GlobalCall API call handle */
    CRN        consultation_crn;   /* GlobalCall API call handle */
    int        blocked;            /* channel blocked/unblocked */
    int        networkh;           /* network handle */
} port[MAX_CHAN+1];
struct linebag *pline;               /* pointer to access line device */
/*
 * Assume the following has been done:
 *    1. Opened line devices for each time slot on DTIB1.
 *    2. Each line device is stored in linebag structure "port".
 *    3. A call has been established (original_crn) and is in connected state.
 */
int call_blindtransfer(int port_num)
{
    GC_INFO        gc_error_info;    /* GlobalCall error information data */
    /* Find info for this time slot, specified by 'port_num' */
    /* (assumes port_num is valid) */
    pline = port + port_num; 
    /* Transfer the original call to the consultation call at 993-3000 */
    if (gc_BlindTransfer(pline->original_crn, "9933000", NULL, 0, EV_ASYNC) == -1)
    {
        /* process error return as shown */
        gc_ErrorInfo( &gc_error_info );
        printf ("Error: gc_BlindTransfer() on device handle: 0x%lx, GC ErrorValue: 0x%hx - %s, CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n",
               pline-> 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);
    } 
    /* The gc_ReleaseCallEx() function must be called next on both the 
    /* consultation_crn and the original_crn to return the local 
    /* channels to the NULL state. */
    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