(Page 1 of 1 in this chapter) Version


Appendix C

Event Summary


Introduction

The DPNSS service employs an asynchronous programming model in order to capitalize on the concurrent processing between BX 3000 board processors and the host CPU. In response to commands executed by the application, the DPNSS service generates events which indicate the occurrence of certain conditions or state changes. This appendix is a summary of the events generated by the DPNSS service.

About the Event Data Structure

All events are represented as a CTA_EVENT C data structure as shown below:

typedef struct
{
DWORD id; /* event id (DPNEVN_xxx in 'dpndef.h') */
CTAHD ctahd; /* context handle */
DWORD timestamp; /* timestamp */
DWORD userid; /* user id (defined by ctaCreateContext) */
DWORD size; /* size of buffer if buffer != NULL */
/* otherwise, may contain event */
/* specific data */
void *buffer; /*buffer pointer on DPN_RECEIVED_SIS list*/
DWORD value; /* Event status or event-specific data */
DWORD reserved ; /* must be 0 */
} CTA_EVENT;
This structure, returned by ctaWaitEvent, informs the application which event occurred on which CTA context, and includes additional information specific to the event.

The CTA_EVENT structure contains the following fields:

Field

Description

id

A DPNSS event code defined in the dpndef.h header file. All DPNSS events are prefixed with DPNEVN_ (e.g., DPNEVN_SOMETHING_HAPPENED).

ctahd

A context handle (the same as the one returned from ctaCreateContext).

timestamp

The time when the event was created, in milliseconds since midnight, January 1, 1970, modulo 49 days. The resolution for BX 3000 board events is 10 milliseconds.

userid

The user-supplied value to ctaCreateContext. This field is unaltered by the DPNSS service and facilitates asynchronous programming. Its purpose is to correlate a port with an application object/context when events occur.

size

The size (in bytes) of the area pointed to by buffer. If buffer is NULL, this field may be used to hold an event-specific value.

buffer

A pointer to data returned with the event. The field contains an application process address and the event's size field contains the actual size of the buffer. When using the DPNSS service, buffer is a pointer to a table of DPN_RECEIVED_SIS containing received DPNSS supplementary information strings and associated parameters.

value

An event-specific value.

About DONE Events

A DONE event is a CT Access event informing the application that an asynchronous function has completed processing. DONE event codes are in the form DPN_function_DONE, where function is the completed function. DONE events have no special physical or processing characteristics; they have the same physical structure as all other events and are retrieved in the same way.

It is possible for an asynchronous function to return SUCCESS to the application when invoked, and then later fail on the BX board. If a BX board detects an error when running a function, the DPNSS service delivers a DONE event to the application with an error code in the event value field.

Events Ordered Alphabetically

The following table is an alphabetical listing of DPNSS events and their descriptions. These codes are defined in dpndef.h.

Event Name

Description

DPNEVN_ACCEPTING_CALL

Call control is accepting an inbound call.

DPNEVN_ANSWERING_CALL

Call control is answering an inbound call.

DPNEVN_BOARD_ERROR

Unexpected board error returned.

DPNEVN_CALL_CONNECTED

Call control is in Connected state.

DPNEVN_CALL_DISCONNECTED

Call control is in Disconnected state.

DPNEVN_CALL_RELEASED

Acknowledgment of released call.

DPNEVN_CALLS_BLOCKED

Request to block now active.

DPNEVN_CALLS_UNBLOCKED

Request to unblock is completed.

DPNEVN_IN_SERVICE

Call control has detected the return of service.

DPNEVN_INCOMING_CALL

Call control has presented the application with a call.

DPNEVN_INCOMING_INFO

DPNSS supplementary feature message has been received.

DPNEVN_OUT_OF_SERVICE

Call control detected line out-of-service.

DPNEVN_PLACING_CALL

Acknowledgment of a call placement.

DPNEVN_REJECTING_CALL

Call control is rejecting an inbound call.

DPNEVN_REMOTE_ALERTING

Outbound ring detected. The call has been accepted.

DPNEVN_STARTPROTOCOL_DONE

Acknowledgment of the starting of a protocol.

DPNEVN_STOPPROTOCOL_DONE

Acknowledgment of the stopping of a protocol.

Events Ordered Numerically

The following table is a list of events in numerical order:

Hex

Event Name

0x00142010

DPNEVN_INCOMING_CALL

0x00142011

DPNEVN_ANSWERING_CALL

0x00142012

DPNEVN_REJECTING_CALL

0x00142014

DPNEVN_PLACING_CALL

0x00142016

DPNEVN_REMOTE_ALERTING

0x00142018

DPNEVN_CALL_CONNECTED

0x00142019

DPNEVN_CALL_DISCONNECTED

0x0014201A

DPNEVN_CALL_RELEASED

0x0014201D

DPNEVN_ACCEPTING_CALL

0x0014201F

DPNEVN_INCOMING_INFO

0x00142020

DPNEVN_OUT_OF_SERVICE

0x00142021

DPNEVN_IN_SERVICE

0x00142022

DPNEVN_CALLS_BLOCKED

0x00142023

DPNEVN_CALLS_UNBLOCKED

0x001420FF

DPNEVN_BOARD_ERROR

0x00142111

DPNEVN_STARTPROTOCOL_DONE

0x00142112

DPNEVN_STOPPROTOCOL_DONE

Events Ordered by Category

The following tables summarize all DPNSS events, and briefly describe the contents of the value, size, and buffer fields (where applicable) for each.

The following fields are always assigned regardless of the event:

Each of the remaining fields - value, size, and buffer - vary depending upon the event. A field may be empty if there is no relevant information for that field for the specific event.

The buffer field is only filled if data is presented to the application. As shown in the tables below, any events that yield data have a non-zero size field when the data is presented.

The value field may contain an error code, DPNERR_xxx or CTAERR_xxx if the operation was in error when started or if the function fails.

Administrative Events

ID

Value Field

Size Field

DPNEVN_BOARD_ERROR

DPNEVN_STARTPROTOCOL_DONE

DPNEVN_STOPPROTOCOL_DONE

Call Control Events

ID

Value Field

Size Field

DPNEVN_ANSWERING_CALL

DPNEVN_CALL_CONNECTED

DPN_CON_xxx

DPNEVN_CALL_DISCONNECTED

DPN_DIS_xxx

non zero if SISs received

DPNEVN_ACCEPTING_CALL

DPNEVN_CALLS_BLOCKED

DPNEVN_CALLS_UNBLOCKED

DPNEVN_CALL_RELEASED

non zero if SISs received

DPNEVN_INCOMING_CALL1

non zero if SISs received

DPNEVN_IN_SERVICE

DPNEVN_OUT_OF_SERVICE

DPNEVN_PLACING_CALL

DPNEVN_REJECTING_CALL

DPNEVN_REMOTE_ALERTING

non zero if SISs received

1 dpnGetCallStatus may be invoked to get the called party and the calling party digits.

Miscellaneous Events

ID

Value field

Size field

DPNEVN_INCOMING_INFO

non zero if SISs received



(Page 1 of 1 in this chapter) Version


tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.