(Page 1 of 1 in this chapter)
|
Program
|
Description
|
|---|---|
|
isdndemo
|
Uses AG ISDN Messaging API to place and receive calls on an ISDN trunk.
|
|
lapddemo
|
Establishes a data link and sends and receives Q.931 messages.
|
isdndemo [options]
| 1
Use for the following countries: Austria, Denmark, Finland, Greece, Iceland, Ireland, Italy, Liechtenstein, Luxembourg, Netherlands, Norway, Portugal, and Spain. Also use for China and Singapore.
|
isdndemo -b 1 -p 20 -o 10
|
Board Type
|
Default protocol
|
|---|---|
|
T1
|
AT&T 5ESS10
|
|
E1
|
EuroISDN
|
-n (lowercase) option to configure one instance as the NT side. For example:
isdndemo -b 0 -n
isdndemo -b 1 -p 20 -o 10
Each instance displays actions and events as it runs. In the display, commands from isdndemo to the protocol stack are preceded by:CALL CONTROL <= APPLICATION Events from the protocol stack are preceded by:
CALL CONTROL => APPLICATION The arrow indicates the direction of information flow.
Following is the text of a log trace of isdndemo receiving an inbound call:
Wed Nov 13 16:45:30 CALL CONTROL => APPLICATION
msg = ACU_CONN_IN
Calling Phone Number = 5086501340
Called Phone Number = 1234567
Connection on physical channel 10
Got a SENDING COMPLETE.
service = VOICE
CRN 39
Wed Nov 13 16:45:30 CALL CONTROL <= APPLICATION
msg = ACU_CONN_RS
CRN 39
Wed Nov 13 16:45:30 CALL CONTROL => APPLICATION
msg = ACU_ALERT_IN
CRN 39
state = WAIT_INCOMING
Wed Nov 13 16:45:30 CALL CONTROL => APPLICATION
msg = ACU_CONN_CO
CRN 39
state = WAIT_INCOMING
Wed Nov 13 16:45:51 CALL CONTROL => APPLICATION
msg = ACU_CLEAR_IN
(network cause = 10)
CRN 39
state = ACTIVE
Wed Nov 13 16:45:51 CALL CONTROL <= APPLICATION
msg = ACU_CLEAR_RS
CRN 39
Wed Nov 13 16:45:51 CALL CONTROL => APPLICATION
msg = ACU_CLEAR_CO
(cause = hang up)
(network cause = 10)
CRN 39
state = WAIT_CLEARANCEFollowing is the log trace of isdndemo placing an outbound call:
Wed Nov 13 16:40:44 CALL CONTROL <= APPLICATION
msg = ACU_CONN_RQ
CRN 1
Wed Nov 13 16:40:44 CALL CONTROL => APPLICATION
msg = ACU_PROGRESS_IN
CRN 1
state = NULL
Wed Nov 13 16:40:44 CALL CONTROL => APPLICATION
msg = ACU_ALERT_IN
CRN 1
state = WAIT_OUTGOING
Wed Nov 13 16:40:44 CALL CONTROL => APPLICATION
msg = ACU_CONN_CO
CRN 1
state = WAIT_OUTGOING
Wed Nov 13 16:41:00 CALL CONTROL <= APPLICATION
msg = ACU_CLEAR_RQ
CRN 1
Wed Nov 13 16:41:00 CALL CONTROL => APPLICATION
msg = ACU_CLEAR_CO
(cause = hang up)
(network cause = 10)
CRN 1
state = ACTIVENote: You may receive the error
ctaCreateQueue failure 2a while running isdndemo on a Unix system. This is due to a default limitation on the number of file descriptors that one user process can open. If you receive this error, enter ulimit -n 120 and launch isdndemo again.
|
Under this OS...
|
Go to this directory...
|
Enter...
|
|---|---|---|
|
Windows NT
|
c:\nms\ctaccess\demos\isdndemo\
|
nmake
|
|
UNIX
|
/opt/nms/ctaccess/demos/isdndemo/
|
make
|
Define each NFAS group in your AG configuration file. (For more information, see your AG ISDN Installation Manual. (One of the sample AG configuration file listings in this manual matches the above configuration.)
2. Start agmon to configure your boards as described in your AG configuration file.
3. Invoke one instance of isdndemo for each NFAS group, using the
-N option. Set up one to place calls, and the other to receive calls. (This option overrides the -b option.)In addition to the
-N (uppercase) option, make sure to include the -n (lowercase) option to configure one instance as the NT side. For example:
isdndemo -N NFAS_1 -n
isdndemo -N NFAS_2 -p 20 -o 10
struct NFAS_trunk NFAS_1[] = /* Option NFAS = 1 */
{
{ 1, 1, 0, 0, 1}, /* group, board, trunk, nai, D-Ch flag, etc. */
{ 1, 2, 0, 1, 0}
};
struct NFAS_trunk NFAS_2[] = /* Option NFAS = 2 */
{
{ 2, 0, 0, 0, 1},
{ 2, 0, 1, 1, 0}
};
Each structure specifies the NFAS group to be controlled by one instance of isdndemo. Each line in the structure specifies the configuration of a trunk in the group. Each line is formatted as follows:nfasgroup
, board, trunk, nai, dchannel... where:
· nfasgroup is the NFAS group the trunk belongs to,
· board is the board number (as specified in the AG configuration file),
· trunk is the number of the trunk that the structure line specifies,
· nai is the NAI number of the trunk, and
· dchannel specifies whether the trunk carries the D channel for the group (1 for yes; 0 for no).
2. If you require more than two data structures to describe your NFAS configuration, change the NumberOfNFASTrunks value in isdndemo.c to a value greater than 2. Number your structures NFAS_3, NFAS_4, and so on.
3. Re-compile isdndemo as described under "Compilation" above.
4. Make sure your AG configuration file matches the configuration you described in the code.

Figure 36. Single-Threaded Demonstration Program Structure
-o command-line option. For example, if isdndemo is run with the command:
isdndemo -o 10
Note that a debugging routine called LogReceivedMessage is called in process_isdn_message. This function shows how to decode numerous ISDN message buffers in a single routine.
The connection id assigned to an incoming call by the protocol stack is the highest available unused value. For example, if 60 connection ids are available for a group, and connection ids 59 and 58 are already allocated to calls, the protocol stack assigns id 57 to the next call.
To avoid any chance of collision, when placing outgoing calls, the demonstration program assigns connection ids beginning with 0. It keeps track of which connection ids are in use and which are available.

Figure 37. Multi-Threaded Demonstration Program Structure

Figure 38. isdndemo State Machine
lapddemo [options]
lapddemo [options]... where options is one or more of the command line options described above.
lapddemo sends a SABME message on the trunk to establish the data link.
Called number: 12345
Calling number: 678
B channel: 12
Encoding: A law
If the data link is established, the program exchanges Q.931 messages with the remote party, as described in the configuration file. By default, the following exchanges are made:
|
Under this OS...
|
Go to this directory...
|
Enter...
|
|---|---|---|
|
Windows NT
|
c:\nms\ctaccess\demos\lapddemo\
|
nmake
|
|
UNIX
|
/opt/nms/ctaccess/demos/lapddemo/
|
make
|
-f option.
...where:
· cause is a message or event code, from the following table:
|
Code
|
Message/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)
|
#) and the end of a line is ignored by the
application.
! indicates that the following symbol is a parameter.
# or ! is a message exchange rule, formatted
as described above.
# 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 A # send ALERTING after receiving a SETUP
A o C # send CONNECT after sending ALERTING
c i T # start timer T after receiving a CONNECT ACK
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
(Page 1 of 1 in this chapter)ENABLEMVIP in the file ag.cfg is set to NO. For details, see Section 3.3.tech_support@nmss.com Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.