PREV TOC HOME INDEX NEXT


5.3. GC_MAKECALL_BLK

The GC_MAKECALL_BLK structure contains information used by the gc_MakeCall( ) function when setting up a call. The structure is defined as follows:

 typedef struct 
 {
    GCLIB_MAKECALL_BLK  *gclib;
    void			                *cclib;
 } GC_MAKECALL_BLK, *GC_MAKECALL_BLKP; 

The gclib pointer points to information used by the gc_MakeCall( ) function that is common across technologies. The GCLIB_MAKECALL_BLK structure supports generic call related parameters. The following GCLIB_MAKECALL_BLK structure shows the fields that are common across most protocols. In cases where a protocol does not require changing any one of the fields, a default value will be assigned.

typedef struct 
{
   GCLIB_ADDRESS_BLK destination;  /* Called party information */
   GCLIB_ADDRESS_BLK origination;  /* Calling party information*/
   GCLIB_CHAN_BLKP	   chan_info;    /* Pointer to channel information */
   GCLIB_CALL_BLK    call_info;    /* Call information */
   GC_PARM_BLK       ext_datap;    /* Pointer to extended parameters */
} GCLIB_MAKECALL_BLK, *GCLIB_MAKECALL_BLKP; 

For description of the fields in the GCLIB_MAKECALL_BLK structure, refer to the Global Call API Library Reference.

There are certain parameters, which are defined for ISDN only. These parameters can be defined in the ext_datap GC_PARM_BLK. Table 38 list the parameters that can be included.

Table 38. ISDN Parameters

set ID

Parameter ID

Description

Supported Values

GCIS_SET_BEARERCHNL(for Springware boards) ISDN_SET_BEARER_CHNL(for DM3 boards) GCIS_PARM_TRANSFERMODE(for Springware boards) ISDN_TRANSFER_MODE(for DM3 boards) Bearer Channel information transfer mode ISDN_ITM_CIRCUIT - circuit switch mode
GCIS_SET_BEARERCHNL(for Springware boards) ISDN_SET_BEARER_CHNL(for DM3 boards) GCIS_PARM_TRANSFER_RATE(for Springware boards) ISDN_TRANSFER_RATE(for DM3 boards) Bearer Channel information transfer rate BEARER_RATE_64KBPS - 64 K bps transfer rate
ISDN_SET_CALL_INFO ISDN_INFO_ELEMENTS User Information element value_buf field of GC_PARM_DATA contains a pointer to IE_BLK (refer to section 5.1. IE_BLK for description of IE_BLK) and contains the information element to be sent to the network.
GCIS_SET_FACILITY (for Springware boards) ISDN_SET_FACILITY(for DM3 boards) GCIS_PARM_FACILITY_FEATURESERVICE(for Springware boards) ISDN_FACILITY_FEATURE_SERVICE(for DM3 boards) Identifies facility request as a feature or a service (See Note, below) ISDN_FEATURE - request is a facility feature. Features are normally used in the facility message after a call is initiated. Features can also be used in the setup message. ISDN_SERVICE - requested facility is a service. Services can be used at any time in the NSF IE. Service is often used in the setup message to select a specific network service.
GCIS_SET_FACILITY (for Springware boards) ISDN_SET_FACILITY(for DM3 boards) GCIS_PARM_FACILITY_CODINGVALUE(for DM3 boards) ISDN_FACILITY_CODING_VALUE(for DM3 boards) Facility coding value; identifies the specific feature or service provided (See Note, below) ISDN_CPN_PREF - calling party number preferred ISDN_SDN - AT&T Software Defined Network ISDN_BN_PREF - Billing Number preferred
Note: The facility_feature_service and facility_coding_value data elements must be paired to support the specific feature or service requested from the network. You need to know what specific feature or service is being used before entering a value for facility_feature_service.

When using Springware boards, a sample MAKECALL_BLK initialization is shown below:

#include "gclib.h"
#include "gcerr.h"
#include "gcisdn.h" 
void makecall(LINEDEV linedev)
{
   CRN crn;
   int cclibid;          /* cclib id for gc_ErrorValue() */
   int gc_error;         /* Global Call error code */
   long cc_error;        /* Call Control Library error code */ 
   char *msg;            /* points to the error message string */
   int timeout = 30;
   char dnis[] = "6343703"; 
   GC_PARM_BLKP t_pParmBlk=NULL;
   GC_MAKECALL_BLK gc_makecall; 
   gc_util_insert_parm_val(&t_pParmBlk, GCSET_CHAN_CAPABILITY, \
        GCPARM_TYPE, sizeof(unsigned char), GCCAPTYPE_AUDIO);
   gc_util_insert_parm_val(&t_pParmBlk, GCSET_CHAN_CAPABILITY, \
        GCPARM_CAPABILITY, sizeof(unsigned char), 0xFF);
   gc_util_insert_parm_val(&t_pParmBlk, GCSET_CHAN_CAPABILITY, \
        GCPARM_RATE, sizeof(unsigned char), 0xFF); 
   gc_util_insert_parm_val(&t_pParmBlk, GCIS_SET_BEARER_CHNL,  \
          GCIS_PARM_TRANSFER_MODE, sizeof(unsigned char), ISDN_ITM_CIRCUIT);
     gc_util_insert_parm_val(&t_pParmBlk, GCIS_SET_BEARER_CHNL, \
          GCIS_PARM_TRANSFER_RATE, sizeof(unsigned char), BEAR_RATE_64KBPS); 
     gc_util_insert_parm_val(&t_pParmBlk, GCIS_SET_FACILITY, \
          GCIS_PARM_FACILITY_FEATURESERVICE, sizeof(unsigned char),
             ISDN_SERVICE);
     gc_util_insert_parm_val(&t_pParmBlk, GCIS_SET_FACILITY, \
          GCIS_PARM_FACILITY_CODINGVALUE, sizeof(unsigned char), ISDN_MEGACOM); 
     if ((gc_makecall.gclib =
         (GCLIB_MAKECALL_BLKP)malloc(sizeof(GCLIB_MAKECALL_BLK)+
                         t_pParmBlk->parm_data_size))==NULL)
   {
        /* print_error("could not malloc GCLIB_MAKECALL_BLK!\n"); */
        exit(1);
} 
   gc_makecall.gclib->ext_data.parm_data_size = t_pParmBlk->parm_data_size;
   memcpy(gc_makecall.gclib->ext_data.parm_data_buf, t_pParmBlk->parm_data_buf, \
                         t_pParmBlk->parm_data_size);
   gc_makecall.cclib = NULL;
   gc_util_delete_parm_blk(t_pParmBlk); 
   gc_makecall.gclib->destination.address_type       = GCADDRTYPE_NAT;
   gc_makecall.gclib->destination.address_plan       = GCADDRPLAN_ISDN;
   gc_makecall.gclib->destination.sub_address_type   = GCSUBADDR_USER;
     gc_makecall.gclib->destination.sub_address_plan = 0;
     strcpy(gc_makecall.gclib->destination.sub_address, "456"); 
     gc_makecall.gclib->origination.address_type     = GCADDRTYPE_NAT;
     gc_makecall.gclib->origination.address_plan     = GCADDRPLAN_ISDN;
     gc_makecall.gclib->origination.sub_address_type = GCSUBADDR_USER;
     gc_makecall.gclib->origination.sub_address_plan = 0;
     strcpy(gc_makecall.gclib->origination.address, "6346666");
     strcpy(gc_makecall.gclib->origination.sub_address, "456"); 
     gc_makecall.gclib->call_info.address_info = GCADDRINFO_ENBLOC; 
     if(gc_MakeCall(linedev, &crn, dnis, &gc_makecall, timeout, \
               EV_ASYNC) !=  GC_SUCCESS) {
          /* process error return as shown */
          gc_ErrorValue( &gc_error, &cclibid, &cc_error);
          gc_ResultMsg( LIBID_GC, (long) gc_error, &msg);
     }
} 

PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

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