Dialogic® NaturalAccess™ MTP2 Layer Developer's Reference Manual

Dialogic® NaturalAccess™ MTP2 Layer Developer's Reference Manual

Dialogic® NaturalAccess™

MTP2 Layer Developer’s

Reference Manual

July 2009 64-0464-01

www.dialogic.com

MTP2 Layer Developer's Reference Manual

Copyright and legal notices

Copyright © 1998-2009 Dialogic Corporation. All Rights Reserved. You may not reproduce this document in whole or in part without permission in writing from Dialogic Corporation at the address provided below.

All contents of this document are furnished for informational use only and are subject to change without notice and do not represent a commitment on the part of Dialogic Corporation or its subsidiaries (“Dialogic”).

Reasonable effort is made to ensure the accuracy of the information contained in the document. However,

Dialogic does not warrant the accuracy of this information and cannot accept responsibility for errors, inaccuracies or omissions that may be contained in this document.

INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH DIALOGIC

®

PRODUCTS. NO LICENSE,

EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY

THIS DOCUMENT. EXCEPT AS PROVIDED IN A SIGNED AGREEMENT BETWEEN YOU AND DIALOGIC, DIALOGIC

ASSUMES NO LIABILITY WHATSOEVER, AND DIALOGIC DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY,

RELATING TO SALE AND/OR USE OF DIALOGIC PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING

TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY INTELLECTUAL

PROPERTY RIGHT OF A THIRD PARTY.

Dialogic products are not intended for use in medical, life saving, life sustaining, critical control or safety systems, or in nuclear facility applications.

Due to differing national regulations and approval requirements, certain Dialogic products may be suitable for use only in specific countries, and thus may not function properly in other countries. You are responsible for ensuring that your use of such products occurs only in the countries where such use is suitable. For information on specific products, contact Dialogic Corporation at the address indicated below or on the web at www.dialogic.com.

It is possible that the use or implementation of any one of the concepts, applications, or ideas described in this document, in marketing collateral produced by or on web pages maintained by Dialogic may infringe one or more patents or other intellectual property rights owned by third parties. Dialogic does not provide any intellectual property licenses with the sale of Dialogic products other than a license to use such product in accordance with intellectual property owned or validly licensed by Dialogic and no such licenses are provided except pursuant to a signed agreement with Dialogic. More detailed information about such intellectual property is available from

Dialogic’s legal department at 9800 Cavendish Blvd., 5th Floor, Montreal, Quebec, Canada H4M 2V9. Dialogic encourages all users of its products to procure all necessary intellectual property licenses required to implement any concepts or applications and does not condone or encourage any intellectual property infringement and disclaims any responsibility related thereto. These intellectual property licenses may differ from country to country and it is the responsibility of those who develop the concepts or applications to be aware of and comply with different national license requirements.

Any use case(s) shown and/or described herein represent one or more examples of the various ways, scenarios or environments in which Dialogic® products can be used. Such use case(s) are non-limiting and do not represent recommendations of Dialogic as to whether or how to use Dialogic products.

Dialogic, Dialogic Pro, Brooktrout, Diva, Cantata, SnowShore, Eicon, Eicon Networks, NMS Communications, NMS

(stylized), Eiconcard, SIPcontrol, Diva ISDN, TruFax, Exnet, EXS, SwitchKit, N20, Making Innovation Thrive,

Connecting to Growth, Video is the New Voice, Fusion, Vision, PacketMedia, NaturalAccess, NaturalCallControl,

NaturalConference, NaturalFax and Shiva, among others as well as related logos, are either registered trademarks or trademarks of Dialogic Corporation or its subsidiaries. Dialogic's trademarks may be used publicly only with permission from Dialogic. Such permission may only be granted by Dialogic’s legal department at 9800

Cavendish Blvd., 5th Floor, Montreal, Quebec, Canada H4M 2V9. Any authorized use of Dialogic's trademarks will be subject to full respect of the trademark guidelines published by Dialogic from time to time and any use of

Dialogic’s trademarks requires proper acknowledgement.

Windows is a registered trademark of Microsoft Corporation in the United States and/or other countries. The names of actual companies and product mentioned herein are the trademarks of their respective owners.

This document discusses one or more open source products, systems and/or releases. Dialogic is not responsible for your decision to use open source in connection with Dialogic products (including without limitation those referred to herein), nor is Dialogic responsible for any present or future effects such usage might have, including without limitation effects on your products, your business, or your intellectual property rights.

Revision history

Revision

B.1.0

9000-6477-11

9000-6477-12

9000-6477-14

Release date

July, 1998

September, 1998

March, 1999

November, 2000

Notes

GJG

GJG

GJG

GJG; SS7 3.6

9000-6477-15

9000-6477-16

9000-6477-17

9000-6477-18

June, 2001

August, 2001

February, 2002

November, 2003

GJG, SS7 3.61

GJG; SS7 3.8 Beta

MVH; SS7 3.8

MCM; SS7 4.0

9000-6477-19

64-0464-01

July 2006

July 2009

LBZ, SS7 4.3

LBG, SS7 5.1

Last modified: June 23, 2009

Refer to www.dialogic.com for product updates and for information about support policies, warranty information, and service offerings.

Table Of Contents

Chapter 1: Introduction .................................................................................7

Chapter 2: NMS MTP 2 overview ....................................................................9

NMS MTP 2 components ............................................................................... 9

MTP 2 service users ....................................................................................11

MTP 2 interface ..........................................................................................12

Binding ..................................................................................................12

Establishing a connection..........................................................................12

Transferring data.....................................................................................13

Status and control ...................................................................................14

Clearing a connection...............................................................................15

CPI library interface....................................................................................15

TX driver message format.........................................................................16

Byte ordering considerations........................................................................17

Configuring MTP 2 ......................................................................................18

Configuring TDM ports..............................................................................18

Configuring MTP 2 links ............................................................................18

Downloading to the board.........................................................................18

Running txalarm......................................................................................22

Running a demonstration program .............................................................23

Chapter 3: MTP 2 function reference............................................................25

MTP 2 function summary .............................................................................25

Using the MTP 2 function reference ...............................................................25

Mtp2GetLinkCfg .........................................................................................26

Mtp2InitLinkCfg .........................................................................................27

Mtp2LinkStats............................................................................................33

Mtp2LinkStatus ..........................................................................................35

Mtp2MgmtInit ............................................................................................37

Mtp2MgmtTerm .........................................................................................38

Mtp2SetLinkCfg..........................................................................................39

Chapter 4: Demonstration programs and utilities ........................................41

Summary of the demonstration programs and utilities .....................................41

MTP 2 configuration: mtp2cfg ......................................................................42

MTP 2 manager: mtp2mgr...........................................................................47

Using the MTP 2 standalone task: mtp2app and mtp2itu ..................................52

Chapter 5: MTP 2 message reference...........................................................55

MTP 2 message summary ............................................................................55

Using the MTP 2 message reference ..............................................................56

Bind request..............................................................................................56

Connect confirmation ..................................................................................57

Connect request.........................................................................................57

Data confirmation.......................................................................................58

Data indication...........................................................................................58

Data request .............................................................................................59

Disconnect confirmation ..............................................................................59

Disconnect indication ..................................................................................60

Disconnect request .....................................................................................60

Dialogic Corporation 5

Table of Contents MTP2 Layer Developer's Reference Manual

Disconnect response ...................................................................................61

Flow control indication ................................................................................61

Flow control request ...................................................................................62

Flow control response .................................................................................62

Status confirmation ....................................................................................63

Status indication ........................................................................................64

Status request ...........................................................................................65

Status response .........................................................................................66

1

Introduction

The NMS MTP 2 Developer's Reference Manual explains how to implement the SS7

MTP 2 layer using NMS MTP 2. This manual explains how to create applications using

NMS MTP 2 and presents a detailed specification of its signaling procedures and functions.

Dialogic Corporation 7

2

NMS MTP 2 overview

NMS MTP 2 components

A typical NMS MTP 2 implementation consists of the following components:

• MTP 2 task that provides the signaling link functions defined by the ITU-T

(Q.703), ANSI (T1.111), and TTC standards:

• Signal unit delimitation and alignment

• Error detection and correction

• Link alignment

• Link error monitoring

• Flow control

• High speed links (HSL) meet the ANSI T1.111-1996 and Q.703/Annex A standards. Each HSL occupies a full (unchannelized) T1/E1 and transfers data at the rate of 2.0 (1.544) Mbps. For information about configuring high speed

links, refer to Mtp2InitLinkCfg on page 27.

• The TX alarms manager task that collects unsolicited alarms (status changes) generated by the SS7 tasks and forwards them to the host for applicationspecific alarm processing.

• The txalarm utility for displaying and optionally saving alarms from the MTP 2 task to disk.

• A TX driver for the host operating system that provides low level access to the TX boards from the host.

• The MTP 2 interface consisting of a set of messages passed between the application and the MTP 2 task on the TX communications processor. These messages enable the application to initialize, transfer data, and exchange status information with MTP 2, and implement the link and traffic management procedures defined in the relevant standards for MTP 3.

• The mtp2cfg utility for downloading text file configurations to the MTP 2 task.

mtp2cfg is provided in source and executable form.

• The mtp2mgr utility for managing the MTP 2 task. mtp2mgr is provided in source and executable form.

• The mtp2app and mtp2itu demonstration programs, also provided in source and executable form. These programs accept user commands and send messages to the MTP 2 task.

• MTP 2 functions that manage the MTP 2 task. mtp2cfg and mtp2mgr use these functions.

Dialogic Corporation 9

NMS MTP 2 overview MTP2 Layer Developer's Reference Manual

The following illustration shows a typical MTP 2 implementation:

Host

txalarm utility Log file

Application

MTP data functions

Configuration utility

MTP management functions

Host TX driver

Alarms manager task

TX communications processor

MTP 2 task

SS7 layer 1 driver

MTP2 Layer Developer's Reference Manual NMS MTP 2 overview

MTP 2 service users

A TX board can support as many as 32 SS7 links numbered 0 through 31, depending on the board model and board configuration. Additional TX boards can be added for more links.

MTP 2 uses SAPs (service access points) to support one or more applications. Each

SAP corresponds to a single SS7 link controlled by the MTP 2 task. An application binds to a particular SAP at initialization time, specifying the link number (0 through

31). An application implementing MTP 3 repeats the bind process for all SS7 links on a TX board. Only one application is allowed to bind to each MTP 2 SAP (link). The following illustration shows MTP2 SAPs:

Application

MTP 3

SAP 0

MTP 2

Bind

SAP 1

...

SAPs

SAP n

MTP 2 layer

Link 0 Link 1

...

Link n

Dialogic Corporation 11

NMS MTP 2 overview MTP2 Layer Developer's Reference Manual

MTP 2 interface

The MTP 2 interface consists of messages that govern communications between an application on the host and the MTP 2 task on the TX board.

MTP 2 messages perform the following tasks:

• Binding

• Establishing a connection

• Transferring data

• Status and control

• Clearing a connection

Binding

The binding phase establishes the host application (MTP 3) as the user of the MTP 2 interface. The application sends a single bind request message to MTP 2, for which there is a bind confirmation response. The application must send separate bind request messages to MTP 2 for each link on each TX board that it wants to use.

Establishing a connection

The application establishes a connection by sending a connect request message and attempting to bring up the link and initiate link alignment procedures with the far exchange. MTP 2 sends a connect confirmation message back to the application when link alignment is successfully established. The application requests connections separately for each SS7 link.

No data packets are transferred until the application receives the connect confirmation message. The following illustration shows the message flow for establishing a connection:

Application

(MTP 3)

MTP 2 task Far exchange

Connect request

Begin link alignment

SIO

SIN or SIE

FISUs

Connect confirmation

Alignment complete

MTP2 Layer Developer's Reference Manual NMS MTP 2 overview

Transferring data

After the MTP 2 task returns a connect confirmation message to the application, the application can begin transferring data.

The application sends a data request message to MTP 2 to request transmission of an

SS7 packet on a particular link. When a message or messages are acknowledged by the far exchange there is no corresponding notification sent to the application. The following illustration shows the message flow for an outgoing data transfer:

Application

(MTP 3)

MTP 2 task Far exchange

Data request

MSU

FSN (1)

Data request

MSU

FSN (2)

FISU

BSN (2)

MTP 2 sends a data indication message to notify the application of an incoming data packet. The application does not respond to MTP 2. The following illustrates an incoming data packet notification:

Application

(MTP 3)

MTP 2 task Far exchange

MSU

Data indication

During data transfer, the application can send a flow control request to apply flow control to a link (or to stop flow control). MTP 2 does not respond to the application.

MTP 2 can also send an unsolicited flow control indication message to the application to indicate that congestion started or ended on a link.

Dialogic Corporation 13

NMS MTP 2 overview MTP2 Layer Developer's Reference Manual

Status and control

The MTP 2 status request provides the following functions that help MTP 3 implement link and traffic management procedures:

• Retrieves the current BSN (last acknowledged sequence number) for a link.

This function is useful in implementing changeover procedures.

• Retrieves all MSUs (message signal units) transmitted on a link but not yet acknowledged. This function is useful in implementing changeover procedures.

• Requests MTP 2 to drop all queued messages.

• Notifies MTP 2 of an emergency on or off condition on a link.

• Notifies MTP 2 of a local processor up or down condition (passed on to the far exchange).

MTP 2 returns a status confirmation message containing the current BSN for a link to the application in response to a retrieve BSN status request. MTP 2 can also return a status confirmation message in response to a retrieve messages status request, but only if there are no unacknowledged messages to be retrieved. If there are unacknowledged messages to be retrieved, a data confirmation message indicating a status of unacknowledged [more|last] is sent to the application for each message.

The last message indicates that it is the last. In this case, no status confirmation message is returned to the application. The following illustration shows how to use retrieve status requests to implement link changeover:

Application

(MTP 3)

MTP 2 SAP

(failed link)

MTP 2 SAP

(good link)

Far exchange

Disconnect indication

Status request

(retrieve BSN)

Status confirmation

(BSN)

Data request

(changeover order)

Data indication

(changeover acknowledged)

Status request

(retrieve messages)

Data confirmation

(unacknowledged/more)

Data confirmation

(unacknowledged/last)

Data request

(resend)

. . .

COO

COA

MSU

MTP2 Layer Developer's Reference Manual NMS MTP 2 overview

Clearing a connection

The application can send a disconnect request message to MTP 2 to disable the link.

MTP 2 does not respond to a disconnect request message. MTP 2 can send an unsolicited disconnect indication message to the application to notify it that a link disconnected and the reason for the disconnect.

MTP 2 sends unsolicited status indication messages to the application to notify it of changes in the link status (up or down).

Refer to the MTP 2 message summary on page 55 for additional information

CPI library interface

TX device drivers implement the message-passing interface between the host and the TX processor (CP). The physical interface between the host and the CP (shared dual-port RAM or DPR) is subdivided into a set of virtual channels to support communication between processes on the host and on the TX board. The channel concept enables multiple processes on the host and the CP to exchange messages without interfering with each other. The TX board currently supports 256 channels numbered 0 through 255. To minimize conflicts, NMS recommends the following channel usage:

Channel

0 through 31

32 through 127

Usage

Reserved

Available for use by applications

128 through 255 Reserved

A process on either the host or the CP wanting to receive messages registers with the driver for a specific channel number. For a host-resident process, the channel registration can be implicit with the device open request, or it can be a separate operation. Channel numbers are assigned statically at compile time. There is no built-in facility to dynamically learn the channel assigned to a particular function.

Only one process can receive messages for a particular channel. Each message contains a header supplied by the sender of the message that identifies the destination board and channel, the source board and channel, and the length of the message.

Each application must have a unique entity and instance ID to route messages between the processes in the system. Entity IDs are single byte values in the range of 0x00 through 0xFF. Allocate entity IDs as follows:

Range Usage

0x00 through 0x1F

0x80 through 0xFF

Reserved for system utilities, configuration utilities, and management utilities.

0x20 through 0x7F Reserved for applications.

Instance IDs identify the processor on which the entity executes. The host is always processor 0 (zero). All host-resident MTP 2 applications must be coded to zero. All tasks on TX board 1 receive an instance ID of 1, all tasks on TX board 2 receive an instance ID of 2, and so on.

Dialogic Corporation 15

NMS MTP 2 overview MTP2 Layer Developer's Reference Manual

Each process on the CP and on the host in an SS7 implementation registers for the channel that corresponds to that layer's (or application's) entity ID. MTP 2 registers for channel 0x16. To send a message to the MTP 2 task on board n, the destination channel is set to 0x16, the destination board is set to n, and the source channel and board are set to the sender's entity ID and board number.

Call the TX driver through the CPI library. Call cpi_init before issuing any other CPI calls. Issue a call to cpia_open for each board with which the application wants to communicate. Then call cpi_send (synchronous interface) or cpia_send

(asynchronous interface) and cpi_get_data (synchronous interface) or

cpia_get_data (asynchronous interface) to send and retrieve data packets to and from the board. See the CPI Library Developer's Reference Manual for more details.

TX driver message format

The following table describes the format of messages passed between the MTP 3 task on the host and the MTP 2 task on the CP through the TX driver:

2

3

Octet Message format

0 Source channel (source entity ID)

1 Source board (source instance ID). The source entity and instance IDs define the sender of the message.

Destination channel (destination entity ID)

Destination board (destination instance ID). The destination entity and instance IDs define the intended recipient of the message.

4 and

5

6 and

7

Message length (2 octets). Contains the byte length of the entire message, including headers, filler, and parameters.

Message start offset (2 octets). Contains the number of octets of filler included following the message end offset before the message type parameter. Include at least four bytes of filler on messages sent to MTP 2 to guarantee MTP 2 has room to prepend its header to the actual data portion of a message without having to copy the data to a new buffer. On messages received from MTP 2, the layer 3 application must use this parameter to determine where in the buffer the actual message content (the message type field) begins.

Message end offset (2 octets) 8 and

9

10..i Filler i + 1 Message type i + 2 ...

... MTP 2 message parameters n ...

The MTP 2 demonstration programs mtp2app and mtp2itu provide include files containing structures for message formats. For further details on the MTP 2

messages, see MTP 2 message summary on page 55.

MTP2 Layer Developer's Reference Manual NMS MTP 2 overview

Byte ordering considerations

The following byte ordering conventions are used for 16-bit and 32-bit parameters in the messages to and from MTP 2. The host application is responsible for converting byte order between network and host, if necessary, in both the send and receive directions. The message start and end offsets are part of the interface between the host application and the MTP 2 task, and must be passed in the network byte order as shown in this illustration.

Note: This is not the same byte order used for short and long integers on Intel

80x86 machines. The message length field is part of the DPR header interface between the host application and the host device driver, and must be passed in host native byte order, not in the byte order shown in this topic.

16-bit fields

Address

Low

High order byte (MSB)

High Low order byte (LSB)

32-bit fields

Address

Low

High order word (MSB)

High order word (LSB)

Low order word (MSB)

High

Low order word (LSB)

The following nomenclature is used for data types:

Data type Description

U8 Unsigned 8-bit quantity

U32 Unsigned 32-bit quantity

Dialogic Corporation 17

NMS MTP 2 overview MTP2 Layer Developer's Reference Manual

Configuring MTP 2

After installing the TX board and the software, configure MTP 2 as follows:

1. Configure TDM ports.

2. Configure MTP 2 links.

3. Download to the board.

4. Run txalarm.

5. Run a demonstration program.

Configuring TDM ports

If the TX board running the MTP 2 task sends and receives on a T1 or E1 timeslot, configure the TDM ports that the MTP 2 task uses. NMS SS7 provides sample TDM configuration files for ANSI standalone and redundant configurations and ITU standalone and redundant configurations. On a Windows operating system, the files are tdmcp1and tdmcp2, located in \nms\tx\config\. On a UNIX system, the files are

TDMcp1 and TDMcp2, and are located in /opt/nmstx/etc/. You can modify these files for your specifications.

For more information on configuring TDM ports, see the NMS SS7 Configuration

Manual.

Configuring MTP 2 links

MTP 2 allows applications to configure the number of links and the parameters associated with those links. NMS SS7 provides sample link configuration files for

ANSI standalone and redundant configurations and ITU standalone and redundant configurations. These files support back-to-back configurations. They contain a definition for one TDM port and a commented-out V.35 port. If the installation uses

V.35 ports, comment in the example serial port definition in the file and comment out the TDM port.

On a Windows operating system, the files are mtp3cp1 and mtp3cp2, located in

\nms\tx\config\. On a UNIX system, the files are MTP3cp1 and MTP3cp2, and are located in /opt/nmstx/etc/.

For more information on configuring MTP 2 links, see the NMS SS7 Configuration

Manual.

Downloading to the board

After you configure the TDM ports and links, download the configuration to the TX board using mtp2load. mtp2load accepts one parameter, the board number to load.

mtp2load downloads the following software to the TX board:

• The proper kernel

• Support tasks for alarms and debugging

• A console program

• The T1/E1 managers

• The MTP 2 task

• The MTP 2 configuration

MTP2 Layer Developer's Reference Manual NMS MTP 2 overview

mtp2load is located in \nms\tx\bin on the Windows operating system and in

/opt/nmstx/bin on the UNIX operating systems.

Windows version of mtp2load

@echo off

REM ***************************************************************************

REM TX Series COMMUNICATIONS PROCESSOR BOOT FILE (MTP2)

REM

REM Execute this file to perform the following:

REM - Reset the TX board

REM - Synchronize the on-board flash image with the installed software

REM - Download TDM configuration

REM - Download all TX-based tasks

REM - Configure MTP

REM ***************************************************************************

REM ***************************************************************************

REM Define all script parameters

REM set TXUTIL=\nms\tx\bin set TXCP=\nms\tx\cp set TXCONFIG=\nms\tx\config\ansi

REM ***************************************************************************

REM Process arguments - Get the board number

REM set BRD=1 if not "%1"=="" set BRD=%1

REM ***************************************************************************

REM Clear driver statistics

REM

%TXUTIL%\txstats -b %BRD% -z -q

REM ***************************************************************************

REM Get the model number (TX board type)

REM

%TXUTIL%\cpmodel -b %BRD% if errorlevel 4000 goto boot4000 if errorlevel 3220 goto boot3220 echo ERROR! TX board number %BRD% not available. goto end

REM ***************************************************************************

REM Perform board type-specific boot for TX 3220 or TX 3220C

REM

:boot3220 set TASKTYPE=lot

REM Reset TX board (and verify TX flash image in sync with installed software)

%TXUTIL%\txflash -s %TXCP%\cpk3220.bin -b %BRD% if errorlevel 1 goto failedreset

REM load the diagnostic operator console task

%TXUTIL%\cplot -c %BRD% -f %TXCP%\diag3220.lot -n diag -p 2 -a

REM load TDM configuration

%TXUTIL%\cplot -c %BRD% -f %TXCONFIG%\TDMcp%BRD%.bin -g tdm

REM load ARP and INF (alarm forwarding task)

%TXUTIL%\cplot -c %BRD% -f %TXCP%\arp.lot -n arp -p 17 -a

%TXUTIL%\cplot -c %BRD% -f %TXCP%\inf.lot -n inf -p 16 -a

REM load the MVIP and T1/E1 manager tasks to enable use

REM of the MVIP and T1/E1 host APIs; NOTE: if you do not

REM use either of these APIs, remove the following 2 lines.

%TXUTIL%\cplot -c %BRD% -f %TXCP%\mvip.lot -n mvip -p 4 -a

%TXUTIL%\cplot -c %BRD% -f %TXCP%\t1e1mgr.lot -n t1e1mgr -p 15 -a

REM To enable packet tracing in the ISUP or TUP layer, make the following

Dialogic Corporation 19

NMS MTP 2 overview MTP2 Layer Developer's Reference Manual

REM command active to download the ETP trace collector on the board.

REM %TXUTIL%\cplot -c %BRD% -f %TXCP%\etp.lot -n etp -p 14 -a goto loadcommon

REM ***************************************************************************

REM Perform board type-specific boot for TX 4000

REM

:boot4000 set TASKTYPE=elf

REM Reset TX board (and verify TX flash image in sync with installed software)

%TXUTIL%\txflash -s %TXCP%\cpk4000.fls -b %BRD% if errorlevel 1 goto failedreset

REM load TDM configuration

%TXUTIL%\txconfig -b %BRD% -f %TXCONFIG%\txcfg%BRD%.txt goto loadcommon

REM ***************************************************************************

REM Load all TX-based tasks that are common to all board types

REM

:loadcommon

REM To use txdbg,

REM you should uncomment the following line to load the debug task

REM %TXUTIL%\cplot -c %BRD% -f %TXCP%\debug.%TASKTYPE% -n debug -p 11 -a

REM Load MTP12 task

REM

%TXUTIL%\cplot -c %BRD% -f %TXCP%\mtp12.%TASKTYPE% -n mtp -p 20 -a -s 12000

REM ***************************************************************************

REM Configure SS7 MTP2

REM

%TXUTIL%\mtp2cfg -b %BRD% -f %TXCONFIG%\MTP2cp%BRD%.cfg goto end

REM ***************************************************************************

REM Report reset error

REM

:failedreset echo ERROR! Unable to reset TX board number %BRD%. goto end

REM ***************************************************************************

REM Exit load script

:end set TXMODE= set TXUTIL= set TXCP= set TXCONFIG= set BRD= set TASKTYPE=

UNIX version of mtp2load

#!/bin/ksh

#******************************************************************************

# TX Series COMMUNICATIONS PROCESSOR BOOT FILE (MTP2)

#

# Execute this file to perform the following:

# - Reset the TX board

# - Synchronize the on-board flash image with the installed software

# - Download TDM configuration

# - Download all TX-based tasks

# - Configure MTP

#******************************************************************************

#******************************************************************************

MTP2 Layer Developer's Reference Manual NMS MTP 2 overview

# Define all script parameters

# if [ -z "$TXUTIL" ] then

TXUTIL=/opt/nmstx/bin fi if [ -z "$TXBASE" ] then

TXBASE=/opt/nmstx/cp fi if [ -z "$TXCONFIG" ] then

TXCONFIG=/opt/nmstx/etc/ansi fi

#******************************************************************************

# Process arguments - Get the board number

# case $# in

0)

BRD=1

;;

1)

BRD=$1

;;

*)

echo "Usage: mtp2load <board#>"

exit 1 esac

#******************************************************************************

# Clear driver statistics

#

$TXUTIL/txstats -b $BRD -z -q

#******************************************************************************

# Get the model number (TX board type)

#

BOARDTYPE=`$TXUTIL/cpmodel -b$BRD | tail -1 | cut -d' ' -f5` case $BOARDTYPE in

TX4000)

FLASH="cpk4000.fls"

;;

TX3220)

FLASH="cpk3220.bin"

;;

*)

echo "ERROR! Board number $BRD not available"

exit 1

;; esac

#*****************************************************************************

# Reset TX board (and verify TX flash image in sync with installed software)

#

$TXUTIL/txflash -s $TXBASE/$FLASH -b$BRD

#*****************************************************************************

# Perform TX board type-specific load

# if [ $BOARDTYPE = "TX3220" ] then

# Perform board type-specific boot for TX 3220 or TX 3220C

TASKTYPE=lot

# load the diagnostic operator console task

$TXUTIL/cplot -c $BRD -f $TXBASE/diag3220.lot -n diag -p 2 -a

# load TDM configuration

Dialogic Corporation 21

NMS MTP 2 overview MTP2 Layer Developer's Reference Manual

$TXUTIL/cplot -c $BRD -f $TXCONFIG/TDMcp${BRD}.bin -g tdm

# load ARP and INF (alarm forwarding task)

$TXUTIL/cplot -c $BRD -f $TXBASE/arp.lot -n arp -p 17 -a

$TXUTIL/cplot -c $BRD -f $TXBASE/inf.lot -n inf -p 16 -a

# load the MVIP and T1/E1 manager tasks to enable use

# of the MVIP and T1/E1 host APIs. Note: if you do not

# use either of these APIs, remove the following two lines

$TXUTIL/cplot -c $BRD -f $TXBASE/mvip.lot -n mvip -p 4 -a

$TXUTIL/cplot -c $BRD -f $TXBASE/t1e1mgr.lot -n t1e1mgr -p 15 -a

# To enable packet tracing in the ISUP or TUP layer, make the following

# command active to download the ETP trace collector on the board.

# $TXUTIL/cplot -c $BRD -f $TXBASE/etp.lot -n etp -p 14 -a else

# Perform board type-specific boot for TX 4000

TASKTYPE=elf

# load TDM configuration

$TXUTIL/txconfig -b $BRD -f $TXCONFIG/txcfg$BRD.txt fi

#*****************************************************************************

# Load all TX-based tasks that are common to all board types

#

# To use txdbg,

# you should uncomment the following line to load the debug task

#$TXUTIL/cplot -c $BRD -f $TXBASE/debug.$TASKTYPE -n debug -p 11 -a

# Load MTP task

#

$TXUTIL/cplot -c $BRD -f $TXBASE/mtp12.$TASKTYPE -n mtp -p 20 -a -s 12000

#******************************************************************************

# Configure SS7 MTP2

#

$TXUTIL/mtp2cfg -b $BRD -f $TXCONFIG/MTP2cp${BRD}.cfg

#******************************************************************************

# Exit load script exit 0

Running txalarm

The txalarm utility captures messages from the boards, displays them on the screen, and optionally saves them to a disk file. txalarm is the primary tool for monitoring what is happening on the link as you download the board and bring links up.

Run txalarm from a separate window according to the following syntax: txalarm [-f filename] where -f filename specifies the file to which messages are copied.

The following example shows txalarm messages when the board is downloaded without sending a new MTP 2 configuration. This shows only the first four links for brevity. There can be alarms for up to 32 links.

MTP2 Layer Developer's Reference Manual NMS MTP 2 overview

<07/25/06 14:52:25> mtp 1 16387 Registering MTP Layer 2

<07/25/06 14:52:25> mtp 1 16387 Configuring MTP Layer 1

<07/25/06 14:52:25> mtp 1 16387 MTP1 Initializing.

<07/25/06 14:52:25> mtp 1 16387 MTP1 General Configuration

<07/25/06 14:52:25> mtp 1 16387 MTP1 Configuring link 0: TDM, External

<07/25/06 14:52:25> mtp 1 16387 MTP1 Configuring link 1: TDM, External

<07/25/06 14:52:25> mtp 1 16387 MTP1 Configuring link 2: TDM, External

<07/25/06 14:52:25> mtp 1 16387 MTP1 Configuring link 3: TDM, External

<07/25/06 14:52:25> mtp 1 16387 Configuring MTP Layer 2

<07/25/06 14:52:25> mtp 1 16387 MTP2: General Configuration

<07/25/06 14:52:25> mtp 1 16387 MTP2: Link 0 Configuration

<07/25/06 14:52:25> mtp 1 16387 MTP2: Link 1 Configuration

<07/25/06 14:52:25> mtp 1 16387 MTP2: Link 2 Configuration

<07/25/06 14:52:25> mtp 1 16387 MTP2: Link 3 Configuration

Running a demonstration program

After the board is loaded, start the demonstration program. mtp2app is an ANSI version and mtp2itu is an ITU-T (formerly CCITT) version of the demonstration

program. See Using the MTP 2 standalone task: mtp2app and mtp2itu on page 52 for

more details.

If you are using the TX board with test equipment, run an application then press

Enter to display a command prompt. Enter connect 0 to start the connect procedure on link 0. The txalarm messages look like the following sample if the link aligns properly:

<07/25/06 15:30:08> mtp 1 16387 Flushing Buffers (OutPktCnt=0) (Lnk 0)

<07/25/06 15:30:08> mtp 1 16387 Sent SIOS (Lnk 0) (Start in PowerOff)

<07/25/06 15:30:08> mtp 1 16387 Flushing Buffers (OutPktCnt=0) (Lnk 0)

<07/25/06 15:30:08> mtp 1 16387 Starting Alignment (Lnk 0)

<07/25/06 15:30:08> mtp 1 16387 Sent SIO (Lnk 0)

<07/25/06 15:30:08> mtp 1 16387 Rcvd SIO (Lnk 0)

<07/25/06 15:30:08> mtp 1 16387 Sent SIN (Lnk 0)

<07/25/06 15:30:08> mtp 1 16387 Rcvd SIO (Lnk 0)

<07/25/06 15:30:08> mtp 1 16387 Rcvd SIN (Lnk 0)

<07/25/06 15:30:11> mtp 1 16387 Timer 4 Expired (LINK 0 ALIGNED at layer 2)

If you are using two TX boards back-to-back, after downloading each board separately, start an application on each board (for example, mtp2app -b 2 to run on board 2), and enter connect 0 on each board. The txalarm messages look like the following sample if the link aligns properly:

<07/25/06 15:30:08> mtp 1 16387 Flushing Buffers (OutPktCnt=0) (Lnk 0)

<07/25/06 15:30:08> mtp 1 16387 Sent SIOS (Lnk 0) (Start in PowerOff)

<07/25/06 15:30:08> mtp 1 16387 Flushing Buffers (OutPktCnt=0) (Lnk 0)

<07/25/06 15:30:08> mtp 1 16387 Starting Alignment (Lnk 0)

<07/25/06 15:30:08> mtp 1 16387 Sent SIO (Lnk 0)

<07/25/06 15:30:08> mtp 1 16387 Rcvd SIO (Lnk 0)

<07/25/06 15:30:08> mtp 1 16387 Sent SIN (Lnk 0)

<07/25/06 15:30:08> mtp 1 16387 Rcvd SIO (Lnk 0)

<07/25/06 15:30:08> mtp 1 16387 Rcvd SIN (Lnk 0)

<07/25/06 15:30:08> mtp 2 16387 Flushing Buffers (OutPktCnt=0) (Lnk 0)

<07/25/06 15:30:08> mtp 2 16387 Sent SIOS (Lnk 0) (Start in PowerOff)

<07/25/06 15:30:08> mtp 2 16387 Flushing Buffers (OutPktCnt=0) (Lnk 0)

<07/25/06 15:30:08> mtp 2 16387 Starting Alignment (Lnk 0)

<07/25/06 15:30:08> mtp 2 16387 Sent SIO (Lnk 0)

<07/25/06 15:30:09> mtp 2 16387 Rcvd SIOS (Lnk 0)

<07/25/06 15:30:09> mtp 2 16387 Rcvd SIO (Lnk 0)

<07/25/06 15:30:09> mtp 2 16387 Sent SIN (Lnk 0)

<07/25/06 15:30:09> mtp 2 16387 Rcvd SIO (Lnk 0)

<07/25/06 15:30:09> mtp 2 16387 Rcvd SIN (Lnk 0)

<07/25/06 15:30:11> mtp 2 16387 Timer 4 Expired (LINK 0 ALIGNED at layer 2)

<07/25/06 15:30:11> mtp 1 16387 Timer 4 Expired (LINK 0 ALIGNED at layer 2)

The middle column containing 1s and 2s identifies the board generating the alarm.

Dialogic Corporation 23

3

MTP 2 function reference

MTP 2 function summary

MTP 2 consists of the following synchronous functions:

Function Description

Mtp2GetLinkCfg Obtains the current configuration values of the specified link number.

Mtp2InitLinkCfg Initializes the provided data link configuration structure with default values and the specified link number and link type.

Mtp2LinkStats

Obtains and potentially resets statistical information about the specified link number.

Mtp2LinkStatus Obtains status information about the specified link number.

Mtp2MgmtInit

Initializes internal structures and opens communication with the MTP 2 process on the TX board.

Mtp2MgmtTerm Terminates the dual port RAM channel binding specified in Mtp2MgmtInit for this application.

Mtp2SetLinkCfg Configures the MTP 2 task with the data link configuration values contained in the provided MTP2LinkCfg structure.

Using the MTP 2 function reference

This section provides an alphabetical reference to the MTP 2 functions. A typical function includes:

Prototype

Return values

The prototype is shown followed by a list of the function arguments. NMS

Communications data types include:

U8 (8-bit unsigned)

S16 (16-bit signed)

U32 (32-bit unsigned)

Bool (8-bit unsigned)

If a function argument is a data structure, the complete data structure is defined.

The return value for a function is either MTP2_SUCCESS or an error code.

25 Dialogic Corporation

MTP 2 function reference MTP2 Layer Developer's Reference Manual

Mtp2GetLinkCfg

Obtains the current configuration values of the specified link number.

Prototype

MTP2_STATUS Mtp2GetLinkCfg (U8 board, MTP2LinkCfg *pLinkCfg, S16 linkNo)

Argument

board pLinkCfg linkNo

Description

TX board number on which the desired MTP 2 task resides.

Pointer to an MTP2LinkCfg structure where the data link configuration values are filled.

Link number for which to obtain configuration information (0 through maximum number of links minus1).

Return values

Return value

MTP2_SUCCESS

Description

MTP2_BOARD

MTP2_HANDLE

MTP2_TIMEOUT

Invalid board number.

Mtp2MgmtInit never called for specified board.

No response from board.

Details

This function obtains the current data link configuration parameters of the specified link on the specified board. An application must provide a pointer to a buffer large enough for the MTP2LinkCfg structure. This function can be called any time after

Mtp2MgmtInit.

Refer to Mtp2InitLinkCfg on page 27 for more information on the MTP2LinkCfg

structure.

See also

Mtp2InitLinkCfg, Mtp2MgmtInit

MTP2 Layer Developer's Reference Manual MTP 2 function reference

Mtp2InitLinkCfg

Initializes the provided data link configuration structure with default values and the specified link number and link type.

Prototype

MTP2_STATUS Mtp2InitLinkCfg (U8 board, MTP2LinkCfg *pLinkCfg, S16 linkNo,

U8 linkType)

Argument

board pLinkCfg

Description

TX board number on which the desired MTP 2 task resides.

Pointer to the MTP2LinkCfg structure to be initialized: typedef struct _MTP2LinkCfg /* MTP level 2 data link SAP configuration */

{

MemoryId mem; /* memory region and pool id */

MemoryId memMac; /* memory region and pool id for MAC */

S16 swtch; /* protocol type */

U8 priorDl; /* priority for data link layer */

U8 routeDl; /* route for data link layer */

U8 selectorDl; /* upper interface selector */

U8 entMac; /* entity for MAC */

U8 instMac; /* instance for MAC */

U8 priorMac; /* priority for MAC layer */

U8 routeMac; /* route for MAC layer */

U8 selectorMac; /* lower interface selector */

U8 maxOutsFrms; /* maximum outstanding frames */

Bool errType; /* cyclical or normal error checking */

TimerCfg t1; /* timer 1 configuration structure */

TimerCfg t2; /* timer 2 configuration structure */

TimerCfg t3; /* timer 3 configuration structure */

TimerCfg t5; /* timer 5 configuration structure */

TimerCfg t6; /* timer 6 configuration structure */

TimerCfg t7; /* timer 7 configuration structure */

TimerCfg t10; /* timer 10 configuration structure */

TimerCfg t11; /* timer 11 configuration structure */

TimerCfg t12; /* timer 12 configuration structure */

TimerCfg t13; /* timer 13 configuration structure */

TimerCfg congTmr; /* congestion timer configuration structure */

U16 provEmrgcy; /* emergency proving period */

U16 provNormal; /* normal proving period */

U8 lssuLen; /* one or two byte LSSU length */

U8 hsBits; /* High speed link bits defined above */

U16 maxFrmLen; /* max frame length for MSU */

U8 cfmType; /* when to send connect confirm */

Bool congDisc; /* congestion discard TRUE or FALSE */

U16 sdD; /* Error count decrement rate <JMP> */

U8 sdT; /* SUERM error rate threshold */

U8 sdTie; /* AERM emergency error rate threshold */

U8 sdTin; /* AERM normal error rate threshold */

U8 sdN1; /* maximum number of MSUs for retransmission */

U16 sdN2; /* maximum number of MSU octets for retrans */

U8 sdCp; /* maximum number of alignment attempts */

U8 align2; /* alignment byte */

S16 spIdSE; /* service provider id */

U16 dstProcId; /* processor id */

U16 isoThresh; /* Number of packets to queue before sending */

/* SIPOs */

U16 txqThresh1; /* Threshold level one on MTP2's Tx Queue */

U16 txqThresh1Abate;/* Abatement threshold for level two on */

/* MTP2's Tx Queue */

U16 txqThresh2; /* Threshold level two on MTP2's Tx Queue */

U16 txqThresh2Abate;/* Abatement threshold for level two on */

/* MTP2's Tx Queue */

Dialogic Corporation 27

MTP 2 function reference MTP2 Layer Developer's Reference Manual

Argument

linkNo linkType

Description

U16 sapThresh; /* Threshold level on MTP2's upward bound */

/* SAP queue */

U16 sapThreshAbate; /* Abatement threshold level for MTP2's */

/* SAP Queue */

/* MTP level 1 parameters <JMP> */

S16 baud; /* baud rate (4.8, 9.6, 19.2, 28.8, 38.4, */

/* 56, 64) */

U8 portNum; /* port number */

U8 portType; /* port type */

S16 physIntType; /* Physical interface type (DCE/DTE) */

U8 dataEncoding; /* Data encoding (NRZ/NRZI) */

U8 flgShare; /* Share flags ? */

U8 flgIdle; /* Use idles (True) or flags (False) */

U8 numFlg; /* Number of additional flag chars */

/* between frames */

U32 idleFreq; /* Transmit frequency of FISU's when done by */

/* software (in ms). Done at config */

U32 rtFreq; /* Retransmit frequency of other SU's when */

/* done by software (in ms). Done at transmit*/

} MTP2LinkCfg;

See the Details section for field descriptions.

Link number to assign to this data link. Valid range is 0 through the maximum number of links minus 1, depending on hardware configuration and whether high speed links are defined.

Type of link. Valid values are:

MTP2LNK_ANSI

MTP2LNK_ANSI88

MTP2LNK_CCITT

Return values

Return value

MTP2_SUCCESS

Description

MTP2_LNKTYPE Invalid link type.

Details

This function enables an application to initialize an MTP2LinkCfg structure before calling Mtp2SetLinkCfg to set the data link configuration parameters.

Mtp2InitLinkCfg sets the link number and link type as specified and initializes all other fields in the Mtp2SetLinkCfg structure to their defaults.

A pointer to an MTP2LinkCfg structure is passed to Mtp2InitLinkCfg where default values are set. After initialization, an application can override zero to all of these values and then pass the pointer to Mtp2SetLinkCfg, which sets the configuration.

The default values provided by Mtp2InitLinkCfg are adequate for most applications.

The following table lists the MTP2LinkCfg fields that can be modified. Unless otherwise specified, the timer names correspond to the CCITT specification.

MTP2 Layer Developer's Reference Manual MTP 2 function reference

Note: All timer values are specified in tenths of a second.

Field

swtch maxOutsFrm errType t1 t2 t3 t5 t6 t7 t10 t11 t12 t13 provNormal provEmrgcy lssuLen

Description

Protocol type. Default is the linkType parameter. Valid values:

MTP2LNK_ANSI

MTP2LNK_ANSI88

MTP2LNK_CCITT

Maximum outstanding frames to layer MTP 1. NMS recommends leaving the default at 2.

Normal or cyclical (for PCR) error checking. Valid values:

ERR_NRM (default)

ERR_CYC

Timer aligned and ready. Valid range is 1 through 65535. Default is 130 (ANSI) and

400 (ITU).

Timer not aligned. Valid range is 1 through 65535. Default is 115 (ANSI) and 100

(ITU).

Timer aligned. Valid range is 1 through 65535. Default is 115 (ANSI) and 15 (ITU).

Timer sending SIBs (busy indications). Valid range is 1 through 65535. Default is 1.

Timer remote congestion. Valid range is 1 through 65535. Default is 60.

Timer excessive delay of acknowledgement. Valid range is 1 through 65535. Default is 20.

Amount of time MTP 2 can be isolated from a remote MTP 3 before SIPO (sending processor outage). Valid range is 1 through 65535. Default is 30.

Time to wait for a flow control acknowledgement from MTP 3 before sending another flow control indication. Valid range is 1 through 65535. Default is 20.

Time to wait for a status confirmation from MTP 3 before sending another status indication. Valid range is 1 through 65535. Default is 20.

Time to wait for a disconnect confirmation from MTP 3 before sending another disconnect indication. Valid range is 1 through 65535. Default is 20.

Normal proving period. Valid range is 1 through 65535. Default is 23 (ANSI) and 82

(ITU).

Emergency proving period. Valid range is 1 through 65535. Default is 6 (ANSI) and 5

(ITU).

One or two byte LSSU length. Valid values:

1

2 (default)

Dialogic Corporation 29

MTP 2 function reference MTP2 Layer Developer's Reference Manual

Field Description

sdT sdD sdTie sdTin sdN1 sdN2 sdCp maxFrmLen

Bit

HS_LINK

Value

0x01

Description

High speed link is in effect.

HS_EXT_SEQ 0x02 Extended sequence numbers are in effect.

The following table describes these high speed link bits:

HSL bit

HS_LINK

Description

Setting this bit to TRUE, notifies MTP that high speed links are in effect and automatically sets HS_EXT_SEQ to TRUE.

Set HS_EXT_SEQ to FALSE for high speed links with normal sequence numbers.

HS_EXT_SEQ Setting this bit to TRUE, notifies MTP that extended sequence numbers are in effect and changes the size of:

FSN, BSN, and LI fields in MTP 2 packets

The last FSN field of COO and COA messages at layer 3

Sequence numbers increase from 7 to 12 bits and the length indicator increases from 6 to 8 bits.

Setting HS_EXT_SEQ to TRUE automatically sets HS_LINK to

TRUE. Normal speed links with extended sequence numbers are not supported.

A combination of high and normal speed links is not supported.

Maximum frame length for MSU. Valid range is 64 through 1024. NMS recommends leaving the default at 272.

TRUE

FALSE (default)

SUERM error rate threshold. Valid range is 1 through 255. Default is 64.

SUERM decrement rate. Valid range is 1 through 65535. Default is 256.

AERM emergency error rate threshold. Valid range is 1 (default) through 255.

AERM normal error rate threshold. Valid range is 1 through 255. Default is 4.

Maximum number of MSUs for retransmission (when using PCR). Valid range is 1 through 255. Default is 30.

Maximum number of MSUs octets for retransmission (when using PCR). Valid range is

1 through 65535. Default is 220.

Maximum number of proving failures. Valid range is 1 through 255. Default is 5.

MTP2 Layer Developer's Reference Manual MTP 2 function reference

Field

baud physIntType

Description

Baud rate. Valid values:

BD_4800

BD_9600

BD_19200

BD_28800

BD_38400

BD_48000

BD_56000 (default)

BD_64000

Physical interface type (DCE/DTE) with or without modem signal detection. Modem signal usage is the only way to assure detection of connection loss and reestablishment. Valid values:

INT_DTE (default)

INT_DCE

INT_DTE_MODEM

INT_DCE_MODEM

Note: Modem signal detection requires an additional pod jumper on the DCE side connecting DSR and CD. flgShare

FlgIdle numFlg isoThresh

DAT_NRZ (default)

DAT_NRZ1

Share flags between frames. Valid values:

FLAG_SHARE (default)

NO_FLAG_SHARE

Use idles (TRUE) or flags (FALSE). Default is FALSE.

Number of additional flag characters between frames. Valid range is 0 (default) through 15.

Number of messages queued to MTP 3 while isolated that causes MTP 2 to begin

SIPOs (processor outages). Valid range is 1 through 65535. Default is 1000. txqThresh1 txqThresh1Abate Transmission queue length at which the outbound flow control level is lowered to zero. Valid range is 1 through 65535. Default is 20. txqThresh2

Transmission queue length at which the outbound flow control level is raised to one.

Valid range is 1 through 65535. Default is 50.

Transmission queue length at which the outbound flow control level is raised to two.

The subsequent indication causes MTP 3 to cease all transmission to MTP 2 until the flow control level returns to one or zero. Valid range is 1 through 65535. Default is

200. txqThresh2Abate Transmission queue length at which the outbound flow control level is lowered to one. Valid range is 1 through 65535. Default is 100. sapThresh Number of messages queued to MTP 3 while inbound flow control is in effect that causes MTP 2 to send SIBs (busy indications). Valid range is 1 through 65535.

Default is 500. sapThreshAbate Number of messages queued to MTP 3 while inbound flow control is in effect that causes MTP 2 to stop sending SIBs (busy indications). Valid range is 1 through

65535. Default is 100.

Dialogic Corporation 31

MTP 2 function reference MTP2 Layer Developer's Reference Manual

Field

idleFreq rtFreq

See also

Mtp2SetLinkCfg

Description

Frequency at which FISUs are sent by the software (in ms). 0 (default) indicates that hardware constantly retransmits duplicate FISUs.

Non-zero frequencies can be used by switches that process all FISUs (including duplicate FISUs) in the software. Valid range is 1 through 65535.

Frequency at which other retransmitted SUs (LSSUs) are sent by the software (in ms). 0 (default) indicates that hardware constantly retransmits duplicate LSSUs.

Non zero frequencies can be used by switches that process all LSSUs (including duplicate LSSUs) in the software. Valid range is 1 through 65535.

MTP2 Layer Developer's Reference Manual MTP 2 function reference

Mtp2LinkStats

Obtains and potentially resets statistical information about the specified link number.

Prototype

MTP2_STATUS Mtp2LinkStats (U8 board, S16 linkNo, MTP2LinkStats *pStats,

BOOL bReset)

Argument

board linkNo pStats bReset

Description

TX board number on which the desired MTP 2 task resides.

Link number for which to obtain statistical information. Must have been previously defined through Mtp2SetLinkCfg.

Pointer to a buffer provided by the application where the requested statistical information is returned: typedef struct _Mtp2LinkStats /* MTP Level 2 link statistics */

{

U32 inService; /* start of in-service */

U32 lclBusy; /* duration of local-busy */

U32 slFailAll; /* all reasons for a signaling link

* failure */

U32 slFailAb; /* Abnormal FIBR/BSNR link failure */

U32 slFailAck; /* delay of acknowledgment link

* failure */

U32 slFailErr; /* excessive error rate link failure */

U32 slFailCong; /* excessive congestion link failure */

U32 slFailAlign; /* alignment link failure */

U32 slNSUErr; /* number of signal units in error */

U32 slNegAck; /* number of negative acknowledgments */

U32 nSifSioTx; /* number of SIF/SIO packets

* transmitted */

U32 nRetrans; /* number of octets transmitted */

U32 mTx; /* information frames transmitted */

U32 lTx; /* receive ready frames transmitted */

U32 fTx; /* receive not ready frames

* transmitted */

U32 nSifSioRx; /* number of SIF/SIO packets received */

U32 mRx; /* information frames received */

U32 lRx; /* receive ready frames received */

U32 fRx; /* receive not ready frames received */

U16 txCnt; /* Number of messages on the transmit */

/* queue */

U16 hiTxCnt; /* Hiqh water number of messages on */

/* the transmit queue */

U16 rtbCnt; /* Number of messages on the */

/* retransmit queue */

U16 hiRtbCnt; /* Hiqh water number of messages on */

/* the retransmit queue */

U16 ltxCnt; /* Number of messages on the lower */

/* transmit queue */

U16 hiLtxCnt; /* Hiqh water number of messages on */

/* the lower transmit queue */

U16 sapCnt; /* Number of messages on the inbound */

/* sap queue */

U16 hiSapCnt; /* Hiqh water number of messages on */

/* the inbound sap queue */

} MTP2LinkStats;

If true (non-zero), statistics are reset (set to zero) after returning the current values. If false (zero), no reset is performed.

Dialogic Corporation 33

MTP 2 function reference MTP2 Layer Developer's Reference Manual

Return values

Return value

MTP2_SUCCESS

Description

MTP2_BOARD

MTP2_HANDLE

Invalid board number.

Mtp2MgmtInit not called for specified board.

Details

Statistics include counts for:

• Various message types and their acknowledgments, both transmitted and received.

• Various failure counts.

• Queue levels and high water marks.

See also

Mtp2MgmtInit, Mtp2SetLinkCfg

MTP2 Layer Developer's Reference Manual MTP 2 function reference

Mtp2LinkStatus

Obtains status information about the specified link number.

Prototype

MTP2_STATUS Mtp2LinkStatus (U8 board, S16 linkNo, MTP2LinkStatus

*pStatus)

Argument

board linkNo pStatus

Description

TX board number on which the desired MTP 2 task resides.

Link number for which to obtain status information. Must have been previously defined through Mtp2SetLinkCfg.

Pointer to a buffer provided by the application where the requested status information is returned: typedef struct _Mtp2LinkStatus /* MTP Level 2 - signaling link status */

{

DateTime DT; /* Date / time stamp */

U8 hlSt; /* sap state */

U8 psOutsFrm; /* outstanding frames to MAC */

S16 cntMaDrop; /* frames dropped by MAC */

U8 llSt; /* link level matrix state */

U8 lclBsy; /* local busy */

Bool remBsy; /* remote busy */

U8 fsn; /* forward sequence number */

U8 bsn; /* backward sequence number */

U8 flcSt; /* flow control state */

} MTP2LinkStatus;

See the Details section for field descriptions.

Return values

Return value

MTP2_SUCCESS

Description

MTP2_BOARD

MTP2_HANDLE

Invalid board number.

Mtp2MgmtInit not called for specified board.

Dialogic Corporation 35

MTP 2 function reference MTP2 Layer Developer's Reference Manual

Details

This function obtains status information about the specified link number, including the link state, flow control state, and busy states.

The following table describes the MTP2LinkStatus fields:

Field

hlSt

Description

SAP state. Valid values:

ST_UNBOUND

ST_CONFIGURED

ST_BND_DISABLED

ST_BND_ENABLED psOutsFrm Outstanding frames to MAC. Valid range is 0 through 0xFF. cntMaDrop Frames dropped by MAC. Valid range is 0 through 0xFF. llSt lclBsy remBsy

Link level matrix state. Valid values:

ST_UNUSED

ST_OUT_OF_SERVICE

ST_INITIAL_ALIGNMENT

ST_ALIGNED_READY

ST_ALIGNED_NOT_READY

ST_PROC_OUT

ST_IN_SERVICE

ST_IDLE

ST_NOT_ALIGNED

ST_IS_ALIGNED

ST_PROVING

ST_LOCAL_PROC_OUT

ST_REMOTE_PROC_OUT

ST_BOTH_PROC_OUT

ST_MONITORING

ST_CONGESTION

ST_POWER_OFF

Whether the local MTP 2 is sending SIBs. Valid values:

TRUE

FALSE

Whether the remote MTP 2 is sending SIBs. Valid values:

TRUE

FALSE fsn bsn flcSt

Last forward sequence number sent. Valid range is 0 through 127.

Backward sequence number to send next. Valid range is 0 through 127.

Outbound flow control level. Valid range is 0 through 2. 2 = congested.

See also

Mtp2MgmtInit, Mtp2SetLinkCfg

MTP2 Layer Developer's Reference Manual MTP 2 function reference

Mtp2MgmtInit

Initializes internal structures and opens communication with the MTP 2 task on the

TX board.

Prototype

MTP2_STATUS Mtp2MgmtInit (U8 board, U8 srcEnt, U8 srcInst)

Argument

board srcEnt srcInst

Description

TX board number.

Source entity ID.

Source instance ID.

Return values

Return value

MTP2_SUCCESS

Description

MTP2_BOARD

MTP2_DRIVER

Invalid board number.

Low-level driver returned an error trying to open the specified dual port RAM channel. srcEnt should be from 0x20 through 0x31 and cannot be in use by another application.

Details

Call this function before any other management function. Source entity must be unique for each application accessing the MTP 2 (or other) task.

An application that opens both the management and data functions must use different entity IDs for the Mtp2MgmtInit and data bind request calls.

Dialogic Corporation 37

MTP 2 function reference MTP2 Layer Developer's Reference Manual

Mtp2MgmtTerm

Terminates the communication with the MTP 2 task for this application.

Prototype

MTP2_STATUS Mtp2MgmtTerm (U8 board)

Argument

board

Description

TX board number with which to terminate communication.

Return values

Return value

MTP2_SUCCESS

Description

MTP2_BOARD

MTP2_HANDLE

Invalid board number.

Mtp2MgmtInit not called for specified board.

Details

Call this function to free up resources when an application terminates or finishes communication with the MTP 2 task.

See also

Mtp2MgmtInit

MTP2 Layer Developer's Reference Manual MTP 2 function reference

Mtp2SetLinkCfg

Configures the MTP 2 task with the data link configuration values contained in the provided MTP2LinkCfg structure.

Prototype

MTP2_STATUS Mtp2SetLinkCfg (U8 board, MTP2LinkCfg *pLinkCfg)

Argument

board pLinkCfg

Description

TX board number on which the desired MTP 2 task resides.

Pointer to the MTP2LinkCfg structure containing the data link configuration values. Refer

to Mtp2InitLinkCfg on page 27 for more information.

Return values

Return value

MTP2_SUCCESS

Description

MTP2_BOARD

MTP2_HANDLE

MTP2_TIMEOUT

Invalid board number.

Mtp2MgmtInit not called for specified board.

No response from the board.

Details

This function sets the data link configuration parameters of the MTP 2 task on the specified board. Before calling this function, an application must set the field values in the MTP2LinkCfg structure in one of the following ways:

• Call Mtp2InitLinkCfg.

• Set each field from within the application.

• Use a combination of the two, such as calling Mtp2InitLinkCfg and then overriding specific fields before passing the MTP2LinkCfg structure to this function.

This function is typically called once for each configured link.

See also

Mtp2InitLinkCfg, Mtp2MgmtInit

Dialogic Corporation 39

4

Demonstration programs and utilities

Summary of the demonstration programs and utilities

NMS MTP 2 provides the following demonstration programs and utilities:

Program

mtp2cfg mtp2mgr mtp2app mtp2itu

Description

Scans the MTP 2 configuration text file and downloads the configuration to the MTP task on the TX board.

Monitors and manages the status of the MTP 2 layer.

Demonstrates the use of the MTP 2 standalone task. For ANSI links.

Demonstrates the use of the MTP 2 standalone task. For ITU-T links.

Dialogic Corporation 41

Demonstration programs and utilities MTP2 Layer Developer's Reference Manual

MTP 2 configuration: mtp2cfg

Name

mtp2cfg

Purpose

Scans the MTP 2 configuration text file and downloads the configuration to the MTP task on the TX board. mtp2cfg is run as part of mtp2load when the board is initially downloaded. You can run mtp2cfg after initial configuration to dynamically update some configuration parameters.

Usage

mtp2cfg options

Prerequisites

Requires a single computer with a TX board installed and the following software:

• Windows or UNIX

• Natural Access

Procedure

To run mtp2cfg, enter the following command from the command line prompt: mtp2cfg options where options include:

Option

-b board

Description

Board number to which the MTP 2 configuration is downloaded. Default = 1.

-f filename Name and location of the MTP 2 configuration file to be downloaded.

mtp2cfg scans the information in the MTP 2 configuration file specified with the

-f option and downloads the information to the task on the TX board.

Notes

The following table shows the default assignment of ports to SS7 links for TX board configurations. There can be up to 32 links. The following nomenclature is used:

S1, S2, ..., Sn refer to ports 1, 2, ..., n on the serial port adapter pod (V.35 or V.24/RS232).

T1, T2, ..., T16 refer to the Port1, Port2, ..., Port16 entries defined in the

TDM configuration file for T1/E1/H.100/H.110 channel timeslots assigned as

SS7 links.

Link (SAP

Serial port adaptor

No serial port adaptor

S1

T1

S2 S3

T2 T3

S4

T4

T1

T5

T2 T3

T6 T7

T4

T8

T5

T9

...

...

T11 T12

T15 T16

MTP2 Layer Developer's Reference Manual Demonstration programs and utilities

MTP 2 link configuration parameters

The following table lists the MTP 2 link configuration parameters. All parameters are optional except LINK and the terminating END statement. If the default port assignments and link attributes are correct for your application, you do not need to run mtp2cfg at load time. If the default attributes are not correct for your application, create a text configuration file and run mtp2cfg to override these defaults.

All layer 2 times are specified in tenths of seconds (60 = 6 seconds).

Parameter

LINK

LINK_TYPE

ERR_TYPE

L2_T1

L2_T2

L2_T3

L2_T4_N

L2_T4_E

L2_T5

L2_T6

L2_T7

L2_T10

L2_T11

L2_T12

L2_T13

Description

Starts link definition and assigns port to link. Valid values:

S1 through S4

T1 through T32

Default is none.

Protocol variant. Valid values:

ANSI (default)

ANSI88

CCITT

Error correction method. Valid values:

NORMAL = normal (default)

PCR = preventive cyclic retransmission

Timer aligned and ready. Valid range is 1 through 65535. Default is 130 (ANSI) and 400 (ITU-T).

Timer not aligned. Valid range is 1 through 65535. Default is 115 (ANSI) and

100 (ITU-T).

Timer aligned. Valid range is 1 through 65535. Default is 115 (ANSI) and 15

(ITU-T).

Normal proving period. Valid range is 1 through 65535. Default is 23 (ANSI) and

82 (ITU-T).

Emergency proving period. Valid range is 1 through 65535. Default is 6 (ANSI) and 5 (ITU-T).

Timer sending SIB (busy indication). Valid range is 1 (default) through 65535.

Timer remote congestion. Valid range is 1 through 65535. Default is 60.

Timer excessive delay of acknowledgement. Valid range is 1 through 65535.

Default is 20.

Amount of time MTP 2 can be isolated from a remote MTP 3 before sending SIPO

(processor outage). Valid range is 1 through 65535. Default is 30.

Time to wait for a flow control acknowledgement from MTP 3 before sending another flow control indication. Valid range is 1 through 65535. Default is 20.

Time to wait for a status confirmation from MTP 3 before sending another status indication. Valid range is 1 through 65535. Default is 20.

Time to wait for a disconnect confirmation from MTP 3 before sending another disconnect indication. Valid range is 1 through 65535. Default is 20.

Dialogic Corporation 43

Demonstration programs and utilities MTP2 Layer Developer's Reference Manual

Parameter

LSSU_LEN

MAX_FRAME

SUERM_THRESH

SUERM_D_RATE

AERM_THRESH_E

AERM_THRESH_N

MAX_RTB_MSGS

MAX_RTB_OCTETS

MAX_PROV_ABORT

BAUD

INT_TYPE

DATA_ENC

SHARE_FLAGS

Description

LSSU length. Valid values:

1

2 (default)

Maximum frame length for MSU. Valid range is 64 through 1024. Default is 272.

Signal unit error rate monitor threshold (bad frames). Valid range is 1 through

255. Default is 64.

Signal unit error rate monitor decrement rate (frames). Valid range is 1 through

65535. Default is 256.

Alignment error rate monitor error rate threshold (emergency alignment). Valid range is 1 (default) through 255.

Alignment error rate monitor error rate threshold (normal alignment). Valid range is 1 through 255. Default is 4.

Maximum number of MSUs for retransmission (only when using PCR error correction). Valid range is 1 through 255. Default is 127.

Maximum number of MSU octets for retransmission (only when using PCR error correction). Valid range is 1 through 65535. Default is 34544.

Maximum number of proving failures. Valid range is 1 through 255. Default is 5.

Baud rate for serial ports only (in bits per second). Valid values:

4800

9600

19200

28800

38400

48000

56000 (default)

64000

Interface type for serial ports only. Valid values:

DTE (default)

DCE

Data encoding. Valid values:

NRZ (default)

NRZI

Allow single flag to be shared between frames. Valid values:

TRUE (default)

FALSE

USE_FLAGS

MIN_FLAGS

ISO_THRESH

L2_TXQ_THRESH1

Use flags (TRUE) or idles (FALSE) between frames. Default is TRUE.

Minimum number of additional flags between frames (in addition to shared flag).

Valid range is 0 (default) through 15.

Number of messages queued to MTP 3 while isolated that cause MTP 2 to begin

SIPOs (processor outage). Valid range is 1 through 65535. Default is 1000.

Transmission queue length at which the outbound flow control level is raised to one. Valid range is 1 through 65535. Default is 50.

L2_TXQ_THRESH1_A Transmission queue length at which the outbound flow control level is lowered to zero. Valid range is 1 through 65535. Default is 20.

MTP2 Layer Developer's Reference Manual Demonstration programs and utilities

Parameter

L2_TXQ_THRESH2

Description

Transmission queue length at which the outbound flow control level is raised to two. The subsequent indication causes MTP 3 to cease all transmission to MTP 2 until the flow control level returns to one or zero.

Valid range is 1 through 65535. Default is 200.

L2_TXQ_THRESH2_A Transmission queue length at which the outbound flow control level is lowered to one. Valid range is 1 through 65535. Default is 100.

L2_SAP_THRESH Number of messages queued to MTP 3 while inbound flow control is in effect that cause MTP 2 to send SIBs (busy indications).

Valid range is 1 through 65535. Default is 500.

L2_SAP_THRESH_A Number of messages queued to MTP 3 while inbound flow control is in effect that cause MTP 2 to stop sending SIBs (busy indications).

Valid range is 1 through 65535. Default is 100.

IDLE_FREQ Frequency at which FISUs are sent by the software (in ms). 0 (default) indicates that hardware constantly retransmits duplicate FISUs.

Non-zero frequencies can be used by switches that process all FISUs (including duplicate FISUs) in the software. Valid range is 1 through 65535.

RT_FREQ Frequency at which other retransmitted SUs (LSSUs) are sent by the software (in ms). 0 (default) indicates that hardware constantly retransmits duplicate LSSUs.

Non-zero frequencies can be used by switches that process all LSSUs (including duplicate LSSUs) in the software. Valid range is 1 through 65535.

Dialogic Corporation 45

Demonstration programs and utilities MTP2 Layer Developer's Reference Manual

Sample configuration file

The following sample is an ANSI configuration file for a two-link configuration. The sample configuration file shows all relevant parameters, even those for which the default values are not changed. A more typical configuration file would list only those parameters with values that are being changed from the defaults.

#

#--- MTP 2 link parameters

#===========================

# Link 0 - serial (v.35)

#===========================

LINK S1 # V.35 Serial Port 1

LINK_TYPE ANSI

ERR_TYPE NORMAL

L2_T1 130

L2_T2 115

L2_T3 115

L2_T4_N 23

L2_T4_E 6

L2_T5 1

L2_T6 60

L2_T7 20

LSSU_LEN 2

MAX_FRAME 272

SUERM_D_RATE 256

SUERM_THRESH 64

AERM_THRESH_N 4

AERM_THRESH_E 1

MAX_PROV_ABORT 5

#--- MTP 1 link parameters

BAUD 64000

INT_TYPE DCE

DATA_ENC NRZ

USE_FLAGS TRUE

MIN_FLAGS 0

SHARE_FLAGS TRUE

END

#========================================

# Link 1 - TDM (from T1/E1 daughter card

#========================================

LINK T1 # Port1 from TDM cfg file

LINK_TYPE ANSI

ERR_TYPE NORMAL

L2_T1 130

L2_T2 115

L2_T3 115

L2_T4_N 23

L2_T4_E 6

L2_T5 1

L2_T6 60

L2_T7 20

LSSU_LEN 2

MAX_FRAME 272

SUERM_D_RATE 256

SUERM_THRESH 64

AERM_THRESH_N 4

AERM_THRESH_E 1

MAX_PROV_ABORT 5

#--- MTP1 link parameters

USE_FLAGS TRUE

MIN_FLAGS 0

SHARE_FLAGS TRUE

END

MTP2 Layer Developer's Reference Manual Demonstration programs and utilities

MTP 2 manager: mtp2mgr

Name

mtp2mgr

Purpose

After downloading the MTP 2 configuration to the TX board with mtp2cfg, run

mtp2mgr to monitor the status of the MTP 2 layer. mtp2mgr provides a command line interface from which statistics can be viewed.

Usage

mtp2mgr -b board

Prerequisites

Requires a single computer with a TX board installed and the following software:

• Windows or UNIX

• Natural Access

Procedure

To run mtp2mgr, enter the following command at the command line prompt: mtp2mgr -b board where board is the TX board number to open.

mtp2mgr supports the following commands:

Command

STATS link

Description

Retrieves the statistics for the specified link.

STATUS link Retrieves status information for the specified link.

MTP2FLOW ON | OFF Deprecated.

BOARD board

Q

? command

Switches to a new target board.

Quits the application.

Lists available commands or parameters of a specified command.

Dialogic Corporation 47

Demonstration programs and utilities MTP2 Layer Developer's Reference Manual

The following sample shows output from mtp2mgr with the STATS command:

mtp2mgr[1]>stats link 0

Board 1, Link 0 MTP2 Stats: inService = 1037 lclBusy = 0 slFailAll = 1 slFailAb = 0 slFailAck = 0 slFailErr = 1 slFailCong = 0 slFailAlign = 0 slNSUErr = 0 slNegAck = 0 nRetrans = 0

Msg: Rx Tx Msg: Rx Tx

--- -- -- ----- ----- -----

SIF/SIO 3 2 MSU 417 413

LSSU* 12 12 FISU* 37984 37497

* LSSU & FISU counts do not include those filtered by the firmware

Current High

------- ----

Tx Queue: 0 270

Rtb Queue: 0 4 lTx Queue: 0 125

Sap Queue: 0 0

MTP2 Layer Developer's Reference Manual Demonstration programs and utilities

The following table describes the mtp2mgr statistics:

Statistic Description

inService Amount of time (in 1/10 of a second) that the link has been in service (aligned). lclBusy slFailAb

Amount of time (in 1/10 of a second) that the link has been in congestion.

Number of bad sequence numbers in received frames. slFailAck slFailErr

Number of times an acknowledgment was not received within the T7 timeout.

Number of link failures due to the SUERM threshold being reached. slFailCong Number of link failures due to the T5 congestion timer expiring. slFailAlign Number of alignment failures due to T2 expiration. slFailAll Total number of link failures due to the link failure reasons. slNegAck Number of negative acknowledgments received. nRetrans Number of retransmissions performed.

SIF/SIO

Tx

Number of SIO frames sent during alignment (normal error checking).

Number of SIO frames received during alignment (both normal and PCR error checking). SIF/SIO

Rx

MSU

Tx/Rx

Number of message signal units transmitted and received.

LSSU

Tx/Rx

FISU

Tx/Rx

Number of LSSUs transmitted and received. Counts do not include frames filtered by the firmware.

Number of FISUs transmitted and received. Counts do not include frames filtered by the firmware.

Tx Queue Current count and high water mark of the number of messages queued on the transmit queue waiting to be sent out to the network.

RtbQueue Current count and high water mark of the number of messages queued on the retransmission queue. These are messages that have been transmitted but not yet acknowledged by the remote side. lTx Queue Current count and high water mark of the number of messages queued on the lower transmit queue. These are messages that were taken off the Tx Queue to be sent but could not be because layer 1 was busy at the time.

Sap

Queue

Current count and high water mark of the number of messages queued on the inbound sap queue waiting to be sent to MTP 3.

Dialogic Corporation 49

Demonstration programs and utilities MTP2 Layer Developer's Reference Manual

The following sample shows output from mtp2mgr with the STATUS command: mtp2mgr[1]>status link 0

Board 1, Link 0 MTP2 Status:

High lvl state = ENABLED Frames out = 1 Frames dropped = 0

Low lvl state = IN_SERVICE

---- Current Link (0) Layer 2 configuration ----

Link Name = T1 maxFrmLen = 272 congDisc = FALSE errType = NORMAL lssuLen = 2 SUERMD rate = 256

SUERM Thrsh= 64 AERM Thrsh N= 4 AERM Thrsh E= 1

Max RTB Msg= 127 Max RTB Oct = 34544 Max Prov Abt= 5

IsoThresh = 1000 TxqThresh1 = 50 TxqThresh1A = 20

TxqThresh2 = 200 TxqThresh2A = 100 SapThresh = 500

SapThreshA = 100

----- Layer 2 Timers (in tenths/sec) -----

L2 t1 = 400 L2 t2 = 100 L2 t3 = 15

L2 t4 norm = 82 L2 t4 emrg = 5 L2 t5 = 1

L2 t6 = 60 L2 t7 = 20 L2 t10 = 30

L2 t11 = 20 L2 t12 = 20 L2 t13 = 20

The following table describes the mtp2mgr status information:

Status

High lvl state

Low lvl state

Frames out

Frames dropped

Description

Valid values are:

UNBOUND = Initial state

CONFIGURED = Link has been configured. Still unbound

DISABLED = Upper layer (MTP 3) has bound but not connected

ENABLED = Upper layer (MTP 3) has bound and connected successfully to a peer

MTP 2

See Low-level state values.

Number of frames outstanding to layer 1 (transmission not yet complete by layer 1).

Number of transmitted frames dropped due to level 1 transmit errors.

MTP2 Layer Developer's Reference Manual

Low-level state values

Value

UNUSED

OUT_OF_SERVICE

INITIAL_ALIGNMENT

Description

Default to unused.

Link out of service.

Link in initial alignment.

ALIGNED_READY Link aligned and ready.

ALIGNED_NOT_READY Link aligning and not ready.

PROC_OUT

IN_SERVICE

Processor outage detected.

Link in service - data state.

IDLE

NOT_ALIGNED

Link idling - data state.

Link not yet aligned.

Demonstration programs and utilities

PROVING

LOCAL_PROC_OUT

Link is in initial proving phase.

Local processor outage - level 3.

BOTH_PROC_OUT Both processors outage - level 3.

CONGESTION Link congested - level 2.

POWER_OFF Power off state.

Refer to Mtp2InitLinkCfg on page 27 for a description of all configuration parameters.

Dialogic Corporation 51

Demonstration programs and utilities MTP2 Layer Developer's Reference Manual

Using the MTP 2 standalone task: mtp2app and mtp2itu

Name

mtp2app (for ANSI links)

mtp2itu (for ITU-T links)

Purpose

Demonstrate the use of the MTP 2 standalone task. Both programs exercise the MTP

2 task on the TX board.

Usage

mtp2app options mtp2itu options where options are:

Option

-s sio

-o opc

Description

Service information octet for sent SLTMs (signaling link test messages).

Default

ITU

Default

ANSI

0xb1 0xb2

Local point code

1

1

2

1

1.1.1

1.1.2

Prerequisites

Requires a single computer with a TX board installed and the following software:

• Windows or UNIX

• Natural Access

Procedure

To run the demonstration programs:

Step Action

1 Enter one of the following commands from the command line prompt: mtp2app -b board mtp2itu -b board where board is the TX board number to open.

At startup, the demonstration programs attempt to bind to links 0 through 3. If some of these links fail, the programs still properly execute on the available links. The programs start in monitor mode, printing out to the screen whenever an MTP 2 event is received. In monitor mode, if an SLTM (signaling link test message) is received, an SLTA (signaling link test acknowledgement) is automatically transmitted. If links 0 and 1 are connected and a disconnect indication is received for one of those links, a changeover is automatically performed to the other link.

MTP2 Layer Developer's Reference Manual Demonstration programs and utilities

Step Action

2 To enter command mode, press Enter to display the following prompt:

Command?>

mtp2app and mtp2itu support the following commands:

3

Command Description

connect link Connects normal mode: levels 1 and 2. econn link Connects emergency mode: levels 1 and 2. powconn link Places link in power-on state. disconn link Disconnects the link. send link Sends an SLTM on the link. status link Sets status conditions on the specified link. Options include:

Start = Start emergency state

End = End emergency state

Up = Local processor up

Down = Local processor down flow link q

Deprecated.

Quits the MTP 2 demonstration program.

? Lists the supported commands.

The following sample shows output from the MTP 2 demonstration program:

Command?>connect 0

Link 0:Connecting

Link 0:Disconnect Indication received - reason 2

Command?>connect 0

Link 0:Connecting

Link 0:Connect Confirmation received

Link 0:Received SLTM, sending SLTA in response

Link 0:Data Confirmation received acking 1 messages

Command?>send 0

Link 0:Sending a SLTM

Link 0:Data Confirmation received acking 1 messages

Link 0:Received a correct SLTA

Command?>q

The demonstration programs attempt to bind with four links. If you defined less than four links, the programs still execute properly on the existing links. However, the following alarm is visible in txalarm output:

<10/05/2003 15:51:58> mtp 1 13191 Internal Error [4]

Press Enter again to exit command mode and return to monitor mode.

Dialogic Corporation 53

5

MTP 2 message reference

MTP 2 message summary

The following table lists the MTP 2 task messages. Messages also contain a message type and a link ID.

Message

Bind request

Connect request

Connect confirmation

Data request

Data confirmation

Direction Parameters

MTP3 ->

MTP2

Service Provider ID

Service User ID

Source Entity ID

Source Instance ID

MTP3 ->

MTP2

Service Provider ID

Status

Description

Binds user application as sole user of MTP 2 link.

MTP2 ->

MTP3

MTP3 ->

MTP2

MTP2 ->

MTP3

Data indication MTP2 ->

MTP3

Disconnect request

MTP3 ->

MTP2

Disconnect confirmation

Disconnect indication

MTP2 ->

MTP3

MTP2 ->

MTP3

Disconnect response

Flow control request

Flow control indication

MTP3 ->

MTP2

MTP3 ->

MTP2

MTP2 ->

MTP3

Flow control response

Status request

MTP3 ->

MTP2

MTP3 ->

MTP2

Service User ID

Service Provider ID

Data

Service User ID

Status

Data

Service User ID

Data

Service Provider ID

Reason

Service User ID

Service User ID

Reason

Service User ID

Service Provider ID

Action

Service User ID

Action

FlcLevel

Service User ID

Action

FlcLevel

Service Provider ID

Action

Status

Requests MTP 2 to bring up a physical link. Use the status parameter to specify status to bring link up in (for example, normal, emergency, or power on only).

Notifies application that link connection successfully completed (link is aligned).

Requests MTP 2 to transmit an MSU (message signal unit) on a particular link.

Sends transmitted messages that have not been acknowledged by the far exchange when the application is performing a changeover.

Notifies the application of an incoming data packet.

Requests MTP 2 to disconnect a link.

Notifies the application that the disconnect request was received.

Notifies the application that a link disconnected.

Notifies MTP 2 that the application received the disconnect indication.

Deprecated.

Deprecated.

Deprecated.

Requests a special status or control function.

Dialogic Corporation 55

MTP 2 message reference MTP2 Layer Developer's Reference Manual

Message

Status confirmation

Status indication

Status response

Direction Parameters

MTP2 ->

MTP3

Service User ID

Action

Status

MTP2 ->

MTP3

MTP3 ->

MTP2

Service User ID

Status

Value

Service User ID

Status

Description

Notifies the application that the status request was received.

Notifies the application that a link has gone up or come down or that level 1 buffer depletion occurred.

Confirms that MTP 3 received a status indication.

Using the MTP 2 message reference

This section provides an alphabetical reference to the MTP 2 messages. A typical message includes message direction, message description, and message parameters.

NMS MTP 3 uses the following conventions for data types:

• U8 (8-bit unsigned)

• S16 (16-bit signed)

• U32 (32-bit unsigned)

• Bool (8-bit unsigned)

Bind request

Direction

MTP 3 -> MTP 2

Description

Establishes the sender as the user of an SS7 data link. Bind request is the first message sent from the layer 3 application to MTP 2 and is sent once for each link on a TX board that the application uses.

The following table lists the message parameters:

Type

U8

S16

S16

U8

Field

Message

Type

Service

Provider ID

Service User

ID

Description

0x04

MTP 2 reference number for the link on the TX board. Valid values are 0 through 15.

Application reference number for this link (typically a link number is global to all links known by layer 3). MTP 2 passes this number in all messages to the application associated with this link.

Application entity ID.

U8

Source

Entity ID

Source

Instance ID

Application instance ID.

MTP2 Layer Developer's Reference Manual MTP 2 message reference

Connect confirmation

Direction

MTP 2 -> MTP 3

Description

Notifies the MTP 3 application that the specified link is aligned and is ready to transfer data. After sending a connect request, the application must wait for this confirmation before data can be sent over the link.

The following table lists the message parameters:

Type

U8

S16

Field

Message Type

Service User ID

Description

0x0D

Application reference number for the link from Bind request.

Connect request

Direction

MTP 3 -> MTP 2

Description

Requests MTP 2 to bring up the associated link and start alignment procedures. The application must send a connect request and wait for a connect confirmation for each link from MTP 2 before data can be sent over the link.

The following table lists the message parameters:

Type

U8

S16

U8

Field

Message Type

Service Provider

ID

Status

Description

0x0C

MTP 2 reference number for the link on this TX board. Valid values are 0 through 15.

The requested connection mode. Possible values are:

0 = Connect level 1 only

1 = Connect level 2 with emergency status

2 = Connect level 2 with normal status

3 = Connect levels 1 and 2 with emergency status

4 = Connect levels 1 and 2 with normal status

5 = Power on start only

6 = Send a start after a power on

Dialogic Corporation 57

MTP 2 message reference MTP2 Layer Developer's Reference Manual

Data confirmation

Direction

MTP 2 -> MTP 3

Description

Data confirmation is also sent in response to an application status request to retrieve unacknowledged messages. The status field indicates that this message is unacknowledged. It also indicates whether more unacknowledged messages are coming or whether this is the last. One data confirmation is returned for each unacknowledged message.

The following table lists the message parameters:

Type

U8

S16

U8

Variable

Field

Message Type

Service User ID

Status

Data

Description

0x15

Application reference number for the link from Bind request.

Status of the confirmation. Valid values are:

0 = Unacknowledged message, more to follow.

1 = Unacknowledged message, last one.

The contents of the unacknowledged message.

Data indication

Direction

MTP 2 -> MTP 3

Description

Notifies the layer 3 application of an MSU (message signal unit) received on the specified data link.

The following table lists the message parameters:

Type

U8

S16

Variable

Field

Message

Type

Service

User ID

Data

Description

0x16

Application reference number for the link from Bind request.

Contents of the received MSU. The first byte of data is typically the SIO

(service information octet), followed by the routing label, and protocol dependent data. Layer 2 strips the flags, sequence number, length indicator, and frame check sequence. The maximum length of the data field is 274 octets including the SIO. There is no field to specify the length of the data field. The application derives the length of the data from the message start and end offsets in the message.

MTP2 Layer Developer's Reference Manual MTP 2 message reference

Data request

Direction

MTP 3 -> MTP 2

Description

Asks MTP 2 to transmit an MSU (message signal unit) on the specified data link.

The following table lists the message parameters:

Type

U8

S16

Variable

Field

Message

Type

Service

Provider

ID

Data

Description

0x14

MTP 2 reference number for the link on the TX board. Valid values are 0 through 15.

The contents of the MSU to transmit. The first byte of data is typically the SIO

(service information octet), followed by the routing label, and protocol dependent data. Layer 2 inserts the flags, sequence number, length indicator, and frame check sequence. The maximum length of the data field is 274 octets including the SIO. There is no field to specify the length of the data field. MTP 2 derives the length of the data from the message start and end offsets in the message.

Disconnect confirmation

Direction

MTP 2 -> MTP 3

Description

Notifies MTP 3 that the disconnect request was received.

The following table lists the message parameters:

Type

U8

S16

Field

Message Type

Service User ID

Description

0x11

Application reference number for the link from Bind request.

Dialogic Corporation 59

MTP 2 message reference MTP2 Layer Developer's Reference Manual

Disconnect indication

Direction

MTP 2 -> MTP 3

Description

Notifies the user application that a link was disconnected.

The following table lists the message parameters:

Type

U8

S16

S16

Field

Message Type

Service User ID

Reason

Disconnect request

Description

0x12

Application reference number for the link from Bind request.

An explanation of the disconnect. Possible values are:

0 = Layer manager request

Direction

MTP 3 -> MTP 2

Description

Requests MTP 2 to bring down the associated link, which results in the loss of data.

The following table lists the message parameters:

Type

U8

S16

S16

Field

Message Type

Service Provider

ID

Reason

Description

0x10

MTP 2 reference number for the link on the TX board. Valid values are 0 through 15.

An explanation of the disconnect. Possible values are:

0 = Management request (drop layer 2 only)

10 = Disconnect level 1 also

(may drop modem signals, reset transmitter and receiver)

MTP2 Layer Developer's Reference Manual MTP 2 message reference

Disconnect response

Direction

MTP 3 -> MTP 2

Description

Notifies MTP 2 that the disconnect indication was received. Timer T13 is stopped.

The following table lists the message parameters:

Type

U8

S16

Field

Message Type

Service User ID

Description

0x13

Application reference number for the link from Bind request.

Flow control indication

Direction

MTP 2 -> MTP 3

Description

This message has been deprecated. Do not use.

The following table lists the message parameters:

Type

U8

S16

S16

U8

Field

Message

Type

Service

User ID

Action

FlcLevel

Description

0x2A

Application reference number for the link from Bind request.

Always DL_FLC_SETLVL.

Expected values are 0, 1, or 2, where 2 indicates severe congestion and 0 indicates no congestion. NMS Communications advises applications to send normally at 0, reduce traffic at 1, and cease traffic at 2.

Dialogic Corporation 61

MTP 2 message reference MTP2 Layer Developer's Reference Manual

Flow control request

Direction

MTP 3 -> MTP 2

Description

This message has been deprecated. Do not use.

The following table lists the message parameters:

Type

U8

S16

S16

Field

Message Type

Service Provider

ID

Action

Description

0x28

MTP 2 reference number for the link on the TX board. Valid values are 0 through 15.

The action to take. Possible values are:

0 = Start flow control

1 = Stop flow control

Flow control response

Direction

MTP 3 -> MTP 2

Description

This message has been deprecated. Do not use.

The following table lists the message parameters:

Type

U8

S16

S16

U8

Field

Message Type

Service User ID

Action

FlcLevel

Description

0x2B

Application reference number for the link from Bind request.

Always DL_FLC_SETLVL.

0, 1, or 2, matching the flcLevel in flow control indication.

MTP2 Layer Developer's Reference Manual MTP 2 message reference

Status confirmation

Direction

MTP 2 -> MTP 3

Description

Sent to the application in response to a retrieve BSN status request. If there are no unacknowledged messages to be retrieved, MTP 2 also returns a status confirmation message in response to a retrieve messages status request. If there are unacknowledged messages to be retrieved, one or more data confirmation messages are returned to the application.

All other status requests are unconfirmed.

The following table lists the message parameters:

Type

U8

S16

S16

Field

Message Type

Service User

ID

Action

Description

0x79

Application reference number for the link from Bind request.

U32 Status

Action being reported in this confirmation. Possible values are:

1 = Response to retrieve backwards sequence number status request; status field contains BSN.

3 = Response to retrieve messages status request; no unacknowledged messages to retrieve.

Current value of the backwards sequence number for the link when action =

1.

Dialogic Corporation 63

MTP 2 message reference MTP2 Layer Developer's Reference Manual

Status indication

Direction

MTP 2 -> MTP 3

Description

Notifies the application that a processor up or down event occurred, or that level 1 buffer depletion occurred. Level 1 buffer depletion indicates that incoming traffic exceeded the layer 3 ability to read it. The application may or may not be able to do anything to slow the incoming traffic, such as requesting the other side's layer 3 to slow down. A status response is not required for the buffer depletion indication.

The following table lists the message parameters:

Type

U8

S16

U8

U8

Field

Message Type

Service User ID

Status

Value

Description

0x7A

Application reference number for the link from Bind request.

The condition being reported. Possible values are:

0 = Remote processor down

1 = Remote processor up

2 = Level 1 buffer depletion

Buffer depletion level. Unused for processor status notifications.

MTP2 Layer Developer's Reference Manual MTP 2 message reference

Status request

Direction

MTP 3 -> MTP 2

Description

Requests a special function supported by the MTP 2 layer.

The following table lists the message parameters:

Type

U8

S16

S16

Field

Message

Type

Service

Provider ID

Action

Description

0x78

U32 Status

MTP 2 reference number for the link on the TX board. Valid values are 0 through 15.

Action to take. Possible values are:

0 = No action; indicate change in status to MTP 2 as specified in Status field

1 = Retrieve backward sequence number

2 = Retrieve unacknowledged messages

3 = Drop all queued transmit messages

Status change being indicated to MTP 2; relevant if action is 0 or 2.

When action = 0, possible values are:

0 = Local processor is down

1 = Local processor is up

2 = Emergency condition

3 = Emergency ceases

When action = 2, the only possible value is the starting sequence number, usually retrieved from an MTP3 COO or COA, which retrieves unacknowledged messages from the board.

Details

The MTP 2 layer supports the following special functions:

• Retrieves the current BSN (last acknowledged sequence number) for a link.

This information is used for implementing changeover procedures.

• Retrieves all MSUs transmitted on a link but not yet acknowledged, starting from a particular sequence number. This information is used for implementing changeover procedures.

• Requests MTP 2 to drop all queued messages.

• Notifies MTP 2 of an emergency on or off condition on a link.

• Notifies MTP 2 of a local processor up or down condition. This information is passed on to the far exchange.

Dialogic Corporation 65

MTP 2 message reference MTP2 Layer Developer's Reference Manual

MTP 2 returns a status confirmation message containing the current BSN (last acknowledged sequence number) for a link to the application in response to a retrieve BSN status request. MTP 2 also returns a status confirmation message in response to a retrieve messages status request, but only if there are no unacknowledged messages to be retrieved. If there are unacknowledged messages to be retrieved, a data confirmation message indicating a status of unacknowledged

[more | last] is sent to the application for each message. The last message indicates that it is the last. No status confirmation message is returned to the application.

Status response

Direction

MTP 3 -> MTP 2

Description

Confirms that the application received a status indication message. Timer T12 is stopped if this contains the same action and FlcLevel as the flow control indication.

Layer 3 is not required to send a status response message for a buffer depletion status indication.

The following table describes the message parameters:

Type

U8

S16

U8

Field

Message Type

Service User ID

Status

Description

0x7B

Application reference number for the link from Bind request.

The condition being reported. Possible values are:

0 = Remote processor down

1 = Remote processor up

A

alarms 22

B

Bind request 56 binding 12, 56

byte order 17

C

channel usage 15

clearing a connection 15, 59, 60, 60,

61

configuration 18 downloading to the board 18

link parameters 43

MTP 2 links 18

Index

Disconnect response 61

disconnecting 15, 59, 60, 60, 61

downloading to the board 18

E

entity IDs 15

F

flow control 61, 62, 62

Flow control indication 61

Flow control request 62

Flow control response 62

freeing resources 38

function summary 25

mtp2cfg utility 42

TDM ports 18

Connect confirmation 57

Connect request 57

connecting 12, 57, 57

CPI library 15 cpi_get_data 15 cpi_init 15 cpi_open 15 cpi_send 15

I

initialization 27, 37

instance IDs 15

L

link configuration 26, 27, 39, 43, 46

link statistics 33

link status 14, 35, 63, 64, 65, 66

M

message format 16

messages 12

cpia_get_data 15 cpia_send 15

D

Data confirmation 58

Data indication 58

Data request 59

demonstration programs 41, 52

Disconnect confirmation 59

Disconnect indication 60

Disconnect request 60

Bind request 56

Connect confirmation 57

Connect request 57

Data confirmation 58

Data indication 58

Data request 59

Disconnect confirmation 59

Disconnect indication 60

Disconnect request 60

Disconnect response 61

Flow control indication 61

Flow control request 62

Dialogic Corporation 67

Index

Flow control response 62

Status confirmation 63

Status indication 64

Status request 65

Status response 66

summary 55

MTP 2 components 9

MTP 2 link configuration 18

MTP 2 status 47

MTP 2 utilities 41, 42, 47

MTP2_SUCCESS 25

mtp2cfg utility 42

Mtp2GetLinkCfg 26

Mtp2InitLinkCfg 27

mtp2itu demonstration program 52

MTP2LinkCfg structure 27

Mtp2LinkStats 33

MTP2LinkStats structure 33

Mtp2LinkStatus 35

MTP2LinkStatus structure 35

mtp2load utility 18

Mtp2MgmtInit 37

NMS MTP 2 Developer's Reference Manual

Mtp2MgmtTerm 38

mtp2mgr utility 47

Mtp2SetLinkCfg 39

mtp3cp 1 configuration file 18 mtp3cp2 configuration file 18

S

SAPs 11 service access points 11

statistics 33, 47

status 35, 47, 63, 64, 65, 66

Status confirmation 63

Status indication 64

Status request 65

Status response 66

T

TDM configuration 18 tdmcp1 configuration file 18 tdmcp2 configuration file 18

termination 38

transferring data 13, 58, 58, 59

TX driver 15

txalarm utility 22

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project