Previous PageTable Of Contents../index.htmlIndexNext Page

d42_gtcallid( )

Description | Cautions | Example | Errors

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:

ED42_NOERROR
-1

  if success

Includes:

D42LIB.H

Mode:

synchronous

Supports:

D/42-SL, D/42-SX, D/42-NS, D/42-NE2

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 D/42 Series User's Guide for more information specific to your PBX. Examples showing the contents of the application buffer for each supported switch are as follows:

MITEL PBX (D/42D-SX)

    text
    bb  2  2  1  _  C  A  L  L  I  N  G 
 
    data
    20 32 32 31 5F 43 41 4C 4C 49 4E 47 00 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
    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

Northern Telecom SL-1 (D/42D-SL)

    text
    bb bb bb bb bb bb bb bb bb bb bb bb bb  2  2  1  
 
    data
    20 20 20 20 20 20 20 20 20 20 20 20 20 32 32 31
    00 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

Northern Telecom Norstar (D/42-NS)

    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

NEC KTS/PBX (D/42-NE2)

    text
    bb  2  0  0  _  2  0  3 
 
    data
    20 32 30 30 5F 32 30 33 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:
During testing of the D/42D-SX, it was determined that called/calling number ID data was not always sent by the PBX prior to the ring event. To ensure that the correct called/calling ID data is obtained, the application should be set up to answer a call only after the second ring.

Top Of PageExample

Top Of PageErrors

If this function returns -1 to indicate a failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following (most common) errors. For a complete list of error codes and definitions, refer to Appendix C.

ED42_FWREQFAILURE

Firmware error

ED42_UNKNOWNBOARD

Unknown D/42 board type

ED42_BADDEVICE

Invalid or wrong device handle

ED42_UNSUPPORTED

Function not supported on this board

ED42_INVALARG

Invalid argument passed to function

DXLIB_INVNRB

Internal voice library error


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2000, Dialogic Corporation
All rights reserved
This page generated January, 2002