Previous PageTable Of Contents../index.htmlIndexNext Page

d42_gtcallid( )

Description | Cautions | Example | Errors

ED42_BADDEVICE

Invalid or wrong device handle

ED42_UNSUPPORTED

Function not supported on this board

ED42_SYSTEM

System level error

ED42_RDFWVER

Error reading firmware version

ED42_INVALARG

Invalid argument passed to function

Name:

int d42_gtcallid(devh, bufferp)

Inputs:

int devh

  channel descriptor

 

char *bufferp

  pointer to an application buffer containing called/calling number ID data

Returns:

0

  if success

 

-1

  if error; see Errors below

Includes:

D42LIB.H

Mode:

synchronous

Top Of PageDescription

The d42_gtcallid( ) function retrieves the called/calling number ID of the incoming call and places it in an application buffer. The application buffer must be 49 bytes, and will hold the entire data string (see below) plus a null. The length of the data string is variable. Refer to the PBX Integration User's Guide for more information specific to your PBX. An example showing the contents of the application buffer for any supported switch is as follows:

    text
    bb  2  2  1  _  2  2  4
 
    data
    20 32 32 31 5F 32 32 34 00 xx xx xx xx xx xx xx
    xx xx xx xx xx xx xx xx
    byte
     0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
    16 17 18 19 20 21 22 23
    text
   
    data
    xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
    xx xx xx xx xx xx xx xx
    byte
    24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
    40 41 42 43 44 45 46 47
   

Parameter

Description

devh:

specifies the valid channel device descriptor obtained by a call to dx_open( )

bufferp:

pointer to the application buffer. The called/calling number ID is placed here

Top Of PageCautions

The application buffer must be 49 bytes. The length of the called/calling number ID data is variable (not exceeding 48 bytes), and is stored as a null-terminated ASCII string (total length--49 bytes).

NOTE:
Since the called/calling number ID data is not always sent by the PBX prior to the ring event, the application should be set up to answer a call only after the second ring to ensure that the correct called/calling ID data is obtained.

Top Of PageExample

Top Of PageErrors

If this function returns -1 to indicate a failure, one of the following (most common) codes will be contained in dx_errno. For a complete list of error codes and definitions, refer to Appendix C.


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated November, 2001