# Components of ACU messages

To send a message to the NMS ISDN protocol stack, the application builds two main structures and then calls isdnSendMessage in the NMS ISDN Messaging library. The structures specified in the function call are:

- ISDN_MESSAGE. In this structure, the application specifies the message to be sent using one of the message primitives documented in the NMS ISDN Messaging API Developer's Reference Manual. Also specified is information identifying the context of the message, such as the connection ID, the NAI
  , and the SAPI.

- A data buffer for messages that require additional data. The data (if any) differs for each message type. If supplementary service information is sent, it is included in this data.

The application assigns values to the fields in the ACU message structure using macros. These macros are defined in isdnacu.h. See the NMS ISDN Messaging API Developer's Reference Manual for more information about message primitives and macros.

The following illustration shows the content and meaning of each of the arguments sent in an isdnSendMessage function call:

isdnSendMessage data structures

When the ACU data structures reach the ISDN protocol stack, the stack rearranges the data into several Q.931 information elements (IEs), builds a complete Q.931 message with the IEs, and sends it to the network.

When an NMS ISDN protocol stack message is received, an ISDNEVN_RCV_MESSAGE event occurs, using the standard Natural Access event handling mechanism. buffer in the Natural Access event structure is a pointer to an ISDN_PACKET structure. This structure contains:

- An ISDN_MESSAGE structure containing the message and other data.

- A buffer containing the message. If supplementary service information is received, it is included in this data.

The following illustration shows the structure of this message packet:

Receiving protocol stack messages

## Components of the ACU data buffer

The ACU data buffer sent or received from the stack is made up of several blocks of information including:

Information block | Description
Fixed argument area | This is a C structure that is specific to the message primitive. It contains fixed length information required to process the primitive. It also contains offsets to fields in the variable length argument area. All information in this area is specified using macros specific to the primitive. (See the NMS ISDN Messaging API Developer's Reference Manual for more information.)
Variable length argument area | This area contains variable length fields referenced by offsets in the fixed length structure. Data such as the called digit string are stored here. (See the NMS ISDN Messaging API Developer's Reference Manual for more information.)
Extended data area | This area can be used for a variety of purposes. This manual describes how this area is used to send and receive supplementary service information.

The following illustration shows the components of an ACU data buffer:

ACU data buffer components

## Components of the extended data area

Within the extended data area, one or more supplementary service structures appear, one after the other. Each structure contains:

- An extended data structure header, identifying the structure as a service structure.

- A header identifying the type of service, and whether it is an invocation, rejection, or positive or negative acknowledgement.

- (Optional) A fixed length structure containing data specific to the supplementary service type and operation. The structures for each supplementary service can be found in isdnacu.h. Each structure is a standard C structure that can be accessed through a pointer cast to the appropriate type.

- (Optional) Variable length information pointed to in the fixed length structure.

In some cases, there is no additional data, so there is no fixed structure or variable length information beyond the header.

The following illustration shows the extended data area of an ACU message buffer:

Supplementary service data structures