Previous PageTable Of Contents../index.htmlIndexNext Page

d42_getnewmessage( )

Description | Cautions | Example | Errors | See Also

Name:

int d42_getnewmessage(channel, bufferp)

Inputs:

unsigned int channel

  channel number

 

unsigned char *bufferp

  pointer to buffer containing message data

Returns:

0
-1

  if success

Includes:

D42LIB.H

Mode:

immediate

Top Of PageDescription

The d42_getnewmessage( ) function allows messages to be returned to a board from a Norstar PBX. The function retrieves the next message for the specified channel and places it in the user buffer. This feature has to be turned on by setting the parameter D4CH_MESG_Q with the dx_setparm( ) function

Parameter

Description

channel

specifies the channel number.

bufferp

points to the buffer where messages are placed

Top Of PageCautions

This function is valid only with the Nortel Norstar PBX.

The pointer to the user buffer is assumed to be large enough to hold the entire string plus a NULL, which is a total of 49 characters. The associated buffer must be 49 bytes. An application which passes anything smaller will not be backward compatible.

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.

ED42_UNSUPPORTED

Function not supported on this board

ED42_SYSTEM

System level error

ED42_INVALARG

Invalid argument passed to function

ERR_NOBOARD

No board present

ERR_NODBFW

No firmware loaded

ERR_BADCH

Invalid channel number

ERR_NULLPTR

Null pointer passed to function

ERR_QEMPTY

Message queue is empty

ERR_QOVRFLOW

Message queue is full

The final two messages listed are returned when the host computer PBX message queue is full or empty, respectively. This queue is 8K, so up to 96 messages may be stored before the overflow state occurs. When the queue is full, incoming messages are lost until the application clears the queue.

Top Of PageSee Also


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