D-channel Trace and Health Monitoring Utility

The divactrl package contains a D-channel trace tool that allows you to capture D-channel messages and monitor the layer 1 and layer 2 states of the ISDN interface on the selected Diva Media Board. It operates in two modes: trace mode and monitor mode. In trace mode, the D-channel monitor serves as ISDN diagnostic or trace tool. Its output can be traced for different events allowing you to create your own monitoring tools.

D-channel trace mode

To start the D-channel monitoring tool in trace mode, execute: divactrl dchannel -c <x> [<parameters>], where: <x> is the logical Dialogic® Diva® Media Board number to be traced.

Started without optional parameters, the D-channel monitoring tool captures the messages received or sent over the D-channel (including the layer 2 header) and writes a hex dump of these messages as ASCII characters to the standard output.

DTRC: 02 01 01 01 DTRC: 00 01 00 02 08 01 82 0D 18 01 89

The following optional parameters can be used to change the destination type of the output:

Parameter

Description

-xlog

Use the Dialogic "xlog" format to output D-channel messages. This format uses the header D-[R,X](<Y>), where "R" is used for received messages, "X" is used for sent messages and "Y" is the message length including the layer 2 header. (Example: D-R(004) 02 01 01 01).

-syslog

Redirect the output to the system log file. Every record in the system log receives a header that contains the logical Dialogic® Diva® Media Board number, the Diva Media Board name, and the Diva Media Board's serial number.

-dmonitor

This option allows you to output additional trace information containing layer 3 messages as seen by the internal state machine (as hex dump, without layer 2 header) and layer 3, layer 2, and layer 1 state events in decoded plain text. See the example for a D-channel trace output for details.

-Silent

Do not print messages to standard output or standard error log. Exit silently in case of an error and report the error by return code only.

 

The following example shows D-channel trace output:

SIG-X(004) 08 01 82 01
             Q.931 CR82 ALERT
SIG-X(007) 08 01 82 0D 18 01 89
             Q.931 CR82 SETUP_ACK
             Channel Id 89
SIG-R(004) 08 01 02 0F
             Q.931 CR02 CONN_ACK
SIG-R(008) 08 01 81 5A 08 02 80 D8
             Q.931 CR81 REL_COM
             Cause 80 d8 "Incompatible destination"
EVENT: Call failed in State "Call initiated"
             Q.931 CR81 REL_COM
             Cause 80 d8 "Incompatible destination"
L1_DOWN
SIG-EVENT FFFF 08
ACTIVATION_REQ
L1_DOWN
SIG-EVENT FFFF 08
ACTIVATION_REQ
L1_UP SIG-EVENT FFFA 00

D-channel monitor mode

In monitor mode, the D-channel monitor runs in the background as daemon and reports status changes of layer 1 and (or) layer 2 to the user applications that are executed if the status changes.

To start the D-channel monitoring tool in monitor mode, execute:divactrl dchannel -c <x> -monitor <y> [<parameters>]

D-channel monitor mandatory parameters

The following table shows the D-channel monitor mandatory parameters:

Parameter

Description

x

The logical board number to be traced.

y

The user application [a] to be executed if the state of layer 1 or layer 2 changes. [b] This application is called with three parameters: 1 - Logical board number, 2 - Layer that changes its state (1 for layer 1, and 2 for layer 2), 3 - State after change (1 - UP, 0 - DOWN). The included dchannel_monitor sample application (shell script) can be used to notify the system administrator via email.

Notes:
[a] The dchannel_monitor shell script is provided as example and can be used to notify the system administrator (root account) about the link state via email.
[b] If the D-channel monitor fails to start the application or the application exits with an error, the D-channel monitor will report the failure to the system log.

D-channel monitor optional parameters

Parameter

Description

-l1off

Does not monitor changes of the layer 1 status

-l2off

Does not monitor changes of the layer 2 status. This might be necessary for BRI interfaces if layer 2 is controlled by the NT side or is established "on Demand"

-syslog

Redirects output to the system log file. Every record in system log will receive a header that contains the logical board number, board name, and the board's serial number

-dmonitor

This option allows you to output additional trace information to the system log. See the example in D-channel trace mode.