lapddemo configuration file

lapddemo reads a configuration file to determine what Q.931 messages to send and how to respond to incoming messages. A sample configuration file, lapddemo.cfg, is supplied with the demonstration. Specify the configuration file to use with the -f filename option.

Note: Specifications for outgoing calls are not given in the default configuration file. You must make additions to this file for the demonstration program to achieve the CONNECTED state for outbound calls.

Two types of information appear in the file:

Parameters and associated values

Each parameter appears on a separate line, followed by a space and then the assigned value. The following parameters can be set in the configuration file:

Parameter

Meaning

Allowed values

Default

!D

Called number (applies to the SETUP message).

One or more digits

12345

!A

Calling number (applies to the SETUP message).

One or more digits

678

!B

B channel (applies to the SETUP message).

Decimal value

12

!E

Encoding (applies to the SETUP message).

2: mu-law

3: A-law

3

!C

Cause (applies to the DISCONNECT message).

Decimal value

16


Message exchange rules

Each rule specifies a command for lapddemo to send or a task for lapddemo to perform when certain events happen (such as when a message is received or a timer expires). Each rule appears on a separate line. A rule is formatted as follows:

cause direction command

where cause is a message or event code from the following table:

Code

Message or event

S

SETUP

A

ALERTING

K

CALL PROCEEDING

P

PROGRESS

C

CONNECT

c

CONNECT ACK

D

DISCONNECT

R

RELEASE

r

RELEASE COMP

T

TIMER T (2 s)

t

TIMER T (1 s)


direction specifies whether lapddemo performs the response when a message is received, a message is sent, or a timer expires:

Indicator

Meaning

i

Incoming message or an expiring timer. lapddemo takes the action if message cause is received or timer cause expires.

o

Outgoing message. lapddemo takes the action when it sends message cause.


command is the message for lapddemo to send or the timer for lapddemo to set when cause happens according to direction. command can be any value from the Code column on the previous table.

The following syntax rules apply in the file:

The following code sample shows the lapddemo.cfg file included with lapddemo:

# File: lapddemo.cfg
# Configuration file for lapddemo

##################################################################
# Parameters                              
#
# !D = Called number                        (Applies to the SETUP msg)
# !A = Calling number                       (Applies to the SETUP msg)
# !B = B channel (decimal value)            (Applies to the SETUP msg)
# !E = Encoding ( 2 = mu Law, 3 = A Law)    (Applies to the SETUP msg)
# !C = Cause (decimal value)                (Applies to the DISCONNECT msg)
#
##################################################################
# Parameter      value

    !D         12345
    !A         678
    !B         12
    !C         16
    !E         3
##################################################################
# Command list
#
# S = SETUP
# A = ALERTING
# K = CALL PROCEEDING
# P = PROGRESS
# C = CONNECT
# c = CONNECT ACK
# D = DISCONNECT
# R = RELEASE
# r = RELEASE COMP
# T = TIMER T (2 s)
# t = TIMER T (1 s)
#
##################################################################

# Cause   Dir   Command

    S      i      K      # Send CALL PROCEEDING after receiving a SETUP
    K      o      C      # Send CONNECT after sending CALL PROCEEDING
    C      o      T      # Start timer T after receiving a CONNECT
    T      i      D      # Send a DISCONNECT when timer T expires
    D      i      R      # Send a RELEASE after receiving DISCONNECT
    R      i      r      # Send a RELEASE COMP after receiving RELEASE