PREV TOC HOME INDEX NEXT


gc_SetCallingNum( )


Termination Events | Cautions | Errors | Example | See Also

Name: int gc_SetCallingNum(linedev, calling_num)
Inputs:

LINEDEV linedev

  • Global Call line device handle
 

char *calling_num

  • pointer to calling phone number string
Returns:

0 if successful

<0 if failure

Includes:

gclib.h

gcerr.h

Category:

optional call handling

Mode:

synchronous

Platform and Technology:

Springware: T-1/E-1, ISDN

DM3: T-1/E-1, ISDN, Analog

SS7

IP (embedded stack)

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

Description

Note: For technologies that support the gc_SetConfigData( ) function, it is recommended that the gc_SetConfigData( ) function be used instead of the gc_SetCallingNum( ) function to set calling numbers. See the gc_SetConfigData( ) function description for more information.

The gc_SetCallingNum( ) function sets the default calling party number associated with the specific line device. The calling party number ends with "\0". The calling party number may also be set using the gc_SetParm( ) function.

Parameter

Description

linedev Global Call line device handle
calling_num phone number of the calling party (ASCII string format)

Termination Events

None

Cautions

None

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

#include <stdio.h>
#include <srllib.h>
#include <gclib.h>
#include <gcerr.h> 
int set_calling_num(LINEDEV ldev)
{
    GC_INFO        gc_error_info;    /* GlobalCall error information data */ 
    /* Set up the calling party number on the line device */
    if (gc_SetCallingNum(ldev, "2019933000") != GC_SUCCESS) {
        /* process error return as shown */
        gc_ErrorInfo( &gc_error_info );
        printf ("Error: gc_SetCallingNum() 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);
    } 
    /*
     * Application can proceed to make a call, and the calling party
     * number will be as set above.  It may be changed later, if
     * necessary.
     */
    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