PREV TOC HOME INDEX NEXT


3.1.14. gc_MakeCall( )

Call parameters (see Table 2) can be specified when using the gc_MakeCall( ) function. The parameters values specified are only valid for the duration of the current call. At the end of the current call, the default parameter values for the specific line device override these parameter values.

The makecallp parameter of the gc_MakeCall( ) function is a pointer to the GC_MAKECALL_BLK structure. The GC_MAKECALL_BLK structure has a gclib field that points to a GCLIB_MAKECALL_BLK structure. The gclib.ext_datap field in turn points to a GC_PARM_BLK structure with a list of the parameters to be set as call values. Table 2 describes the parameters that can be accessed through the gclib.ext_datap pointer.

Table 2. Call Parameters Configurable using gc_MakeCall( )

Set ID

Parameter IDs

GCSET_CHAN_CAPABILITY
IPSET_CALLINFO
See Section 6.2, "IPSET_CALLINFO Parameter Set" for more information.
  • IPPARM_DISPLAY
    Datatype: String. Null-terminated with a maximum size of 82 characters.
  • IPPARM_USERUSER_INFO
    Datatype: Uint8[ ]. Not null-terminated with a maximum size of 131 characters.
  • IPPARM_PHONELIST
    Datatype: String. Null-terminataed with a maximum size of 31 characters.
IPSET_NONSTANDARDDATA
See Section 6.6, "IPSET_NONSTANDARDDATA Parameter Set" for more information.
  • IPPARM_NONSTANDARDDATA_OBJID
    Datatype: String
  • IPPARM_NONSTANDARDDATA_DATA
    Datatype: String

There are two options for setting the destination address when using the gc_MakeCall( ) function:

Note: When both methods above are used to specify the destination address, the address in the GCLIB_MAKECALL_BLK structure takes precedence.

In asynchronous mode, if the timeout parameter is set to 0, a call can be disconnected if either the underlying stack times out waiting for a response from the peer or, if the peer decides to reject the call. There are three timer parameters in the H.323 stack configuration file, config.val, that can be used to configure the stack timeout behavior:

See the DM3 IPLink User's Guide for Windows for more information about the syntax of the config.val file.

The following code example shows how to:

Note: When using gc_MakeCall( ) to set coder capabilities, only the coder capabilities in the transmit direction (IP_CAP_DIR_LCLTRANSMIT) can be specified. The function fails if attempting to specify the coder capabilities in the receive direction (IP_CAP_DIR_LCLRECEIVE).
/* Make an IP call on line device ldev */
void MakeIpCall(LINEDEV ldev) 
{
    char * IpDisplay = "This is a Display"; /* display data */
    char * IpPhoneList= "003227124311";     /* phone list */
    char * IpDisplay = "This is a UUI";     /* user to user information string */
    char *paddr = "TA:127.0.0.1";           /* destination IP address */
    
    int rc = 0;
    const int MakeCallTimeout = 30;
    CRN crn;
    GC_MAKECALL_BLK gcmkbl;
    
    /* initialize GCLIB_MAKECALL_BLK structure */
    GCLIB_MAKECALL_BLK gclib_mkbl = {0}; 
    /* set to NULL to retrieve new parameter block from utility function */
    GC_PARM_BLK *target_datap = NULL;
    gcmkbl.cclib = NULL;  /* CCLIB pointer unused */
    gcmkbl.gclib = &gclib_mkbl;
    /* initialize IP_CAPABILITY structure */
    IP_CAPABILITY t_Capability = {0};
    
    /* configure a GC_PARM_BLK with four coders, display, phone list 
       and UUI message: */
    /* specify and insert first capability parameter data for G.7231 coder */
    t_Capability.type = GCCAPTYPE_AUDIO;
    t_Capability.direction = IP_CAP_DIR_LCLTRANSMIT;
    t_Capability.extra.audio.VAD = GCPV_DISABLE;
    t_Capability.extra.audio.frames_per_pkt = 1;
    t_Capability.capability = GCCAP_AUDIO_g7231_6_3k;
    
    rc = gc_util_insert_parm_ref(&target_datap, GCSET_CHAN_CAPABILITY,
         IPPARM_LOCAL_CAPABILITY, sizeof(IP_CAPABILITY), &t_Capability);
     
    /* specify and insert second capability parameter data for G.7229AnnexA 
       coder */
    /* changing only frames per pkt and the coder type from first capability: */
    t_Capability.extra.audio.frames_per_pkt = 3;
    t_Capability.capability = GCCAP_AUDIO_g729AnnexA;
    
    rc = gc_util_insert_parm_ref(&target_datap, GCSET_CHAN_CAPABILITY,
         IPPARM_LOCAL_CAPABILITY, sizeof(IP_CAPABILITY), &t_Capability);
    
    /* specify and insert 3rd capability parameter data for G.711Alaw 64kbit
       coder */
    /* changing only frames per pkt and the coder type from first capability: */
    t_Capability.capability = GCCAP_AUDIO_g711Alaw64k;
    t_Capability.extra.audio.frames_per_pkt = 10; 
       /* For G.711 use frame size (ms) here, frames per packet fixed at 1 fpp */

    rc = gc_util_insert_parm_ref(&target_datap, GCSET_CHAN_CAPABILITY,
         IPPARM_LOCAL_CAPABILITY, sizeof(IP_CAPABILITY), &t_Capability);
    
    /* specify and insert fourth capability parameter data for G.711 Ulaw 
       64kbit coder */
    /* changing only the coder type from previous capability */
    t_Capability.capability = GCCAP_AUDIO_g711Ulaw64k;
    
    rc = gc_util_insert_parm_ref(&target_datap, GCSET_CHAN_CAPABILITY,
         IPPARM_LOCAL_CAPABILITY, sizeof(IP_CAPABILITY), &t_Capability);
    
    /* insert display string */
    rc = gc_util_insert_parm_ref(&target_datap, IPSET_CALLINFO, IPPARM_DISPLAY,
         strlen(IpDisplay)+1, IpDisplay);
    
    /* insert phone list */
    rc = gc_util_insert_parm_ref(&target_datap, IPSET_CALLINFO, IPPARM_PHONELIST,
         strlen(IpPhoneList)+1, IpPhoneList);
    
    /* insert user to user information */
    rc = gc_util_insert_parm_ref(&target_datap, IPSET_CALLINFO,
         IPPARM_USERUSER_INFO, strlen(IpUUI)+1, IpUUI);
    
    if (rc == 0) {
        gclib_mkbl.ext_datap = target_datap;
        retcode = gc_MakeCall(ldev, &crn, paddr, &gcmkbl, MakeCallTimeout,
                  EV_ASYNC);
        /* deallocate GC_PARM_BLK pointer */
        gc_util_delete_parm(target_datap);
    }
} 

PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

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