Table of Contents Index NMS Glossary Previous Page Next Page Version


Chapter 9

Demonstration Programs and Utilities


9.1 Introduction
9.2 Port to Port Program: prt2prt
9.3 H.110 Clocking Demonstration Program: clockdemo
9.4 Control MVIP Switches: swish
9.5 Show Switch Connections: showcx95

9.1 IntroductionTop of Page

This chapter describes the following demonstration programs and utilities shipped with the CT Access Switching service:
Program/Utility

Description

prt2prt

Demonstrates call transfer from an incoming line to an outgoing line and uses the Switching service to make connections, send patterns, etc.

clockdemo

Demonstrates clock management.

swish

Allows interactive or text-file-driven control of MVIP switches. It provides a convenient way to manually test connections during development to verify the commands that will be given to switches from within CT Access applications that use the Switching service.

showcx95

Displays switch connections for all boards that have MVIP switches.

cfbm

Manages clock fallback through the use of a daemon.

CT Access is shipped with source code for all demonstration programs. Each demonstration program is shipped as an executable program and includes its source and makefiles.

Before you start the demonstration programs, verify that:

9.2 Port to Port Program: prt2prtTop of Page

Name

prt2prt

Purpose

Demonstrates:

Usage

prt2prt [options]

where options are:
Option

Description

-b n

Specifies the board number n. Default = 0

-d driver_name

Specifies the name of the driver dynamic link library.
Default = agsw

-s i,o

Specifies the incoming call timeslot and the outgoing call timeslot. Default: 0,2

-i protocol

Specifies the protocol to run on the incoming call side.
Default = lps0

-o protocol

Specifies the protocol to run on the outgoing call side.
Default = lps0

Description

prt2prt performs call transfer of an incoming call to an outgoing line. It uses the Switching service to connect the voice streams of two calls so that a conversation can be carried out.

Because prt2prt is an actual demonstration of the Switching service, it uses MVIP-95 stream values.

Procedure

The following procedure assumes that you:

To run prt2prt:

  1. Start OAM. For more information about OAM, refer to the OAM System User's Manual.

    
    
  2. Start prt2prt by entering the following prompt:

    
    prt2prt -b 0 -s 4,0 -i wnk0 -o lps0
    This command uses board 0 and the DID hybrid in slot 4 for the incoming calls and the loopstart hybrid in slot 0 for the outgoing call. It also uses the winkstart protocol on the incoming call and the loopstart protocol on the outgoing call.
    prt2prt starts and the following information is displayed:
      CT Access Port to Port Calling Demo V.4 (Nov 4 1996)
    Board = 1
    InSlot,OutSlot = 4,0
    Incoming Protocol = wnk0
    Outgoing Protocol = lps0
    NPorts = 1
    Initializing and opening the CTA context...
    Tracing disabled. Check that the daemon is running.
    Event: CTAEVN_OPEN_SERVICES_DONE, Finished
    Event: CTAEVN_OPEN_SERVICES_DONE, Finished
    Event: ADIEVN_STARTPROTOCOL_DONE, Finished
    --------
    Waiting for incoming call...
    prt2prt waits for an incoming call.
  3. Put the telephone on stream/timeslot local:0:4 off-hook.

    
    You should hear a relay click.
  4. Dial a three-digit telephone number.

    
    prt2prt plays a message prompting you to dial an extension.
    The following information is displayed:
      Event: ADIEVN_INCOMING_CALL
    Incoming Call...
    Answering call...
    Event: ADIEVN_ANSWERING_CALL
    Event: ADIEVN_CALL_CONNECTED, Answered
    Call connected.
    Playing file 'ctademo', msg #12...
    Playing 1 messages from 'ctademo'...
    Event: VCEEVN_PLAY_DONE, Finished ,nbytes=1240
    Getting extension...
    Playing file 'ctademo', msg #16...
    Playing 1 messages from 'ctademo'...
  5. Dial an extension.

    
    prt2prt informs you that it will dial that extension and then places the call on the outgoing timeslot.
    The following information is displayed:
      Collecting digits to dial...
    Event: ADIEVN_DIGIT_BEGIN, '5'
    Event: ADIEVN_DIGIT_END
    Event: ADIEVN_COLLECTION_DONE, Timeout
    digit string = '5'
    Got extension: 5
    Playing file 'ctademo', msg #17...
    Playing 1 messages from 'ctademo'...
    Event: VCEEVN_PLAY_DONE, Finished ,nbytes=2700
    Event: ADIEVN_STARTPROTOCOL_DONE, Finished
    --------
    Placing a call to '5'...
    Event: ADIEVN_PLACING_CALL
  6. Answer the call on the other phone that is connected to the outgoing line through the central office simulator.

      Event: ADIEVN_CALL_CONNECTED, Voice Begin
    Connected.
    prt2prt connects the two voice streams so that a conversation can take place between the two telephones.
  7. Confirm that the two voice streams are connected by knocking on one mouthpiece. You should be able to hear the knocking on the other.

    
    
  8. Hang up the incoming side. prt2prt tears down the call and goes back into a Waiting for Call state.

    
    The following information is displayed:
      Hanging up...
    Event: ADIEVN_CALL_RELEASED
    Call done.
    Hanging up...
    Event: ADIEVN_CALL_RELEASED
    Call done.
    Event: ADIEVN_STOPPROTOCOL_DONE, Finished
    Event: ADIEVN_STOPPROTOCOL_DONE, Finished
    Event: ADIEVN_STARTPROTOCOL_DONE, Finished
    --------
    Waiting for incoming call...

9.3 H.110 Clocking Demonstration Program: clockdemoTop of Page

Name

clockdemo

Purpose

Demonstrates using the H.110 clocks in a CompactPCI system.

Usage

clockdemo -m (where -m is monitoring)

Description

Programs and monitors CompactPCI AG or CG boards to use the H.110 bus. Board 0 is set to be the primary master (drive the A clocks) off the first available network reference. If none are available, the internal oscillator is used. The next board (Board 1) is programmed to be the secondary master (drive the B clocks). All other boards will slave off the A clocks.

The current status of the clocks on each board will be displayed on the screen.

Procedure

clockdemo is available on CompactPCI AG and CompactPCI CG boards. To run clockdemo for CompactPCI AG and CG boards, enter the following:

clockdemo -m

Example

The following output is displayed:

Board No  Clock Mode  Clock Source A Clock B Clock NetRef 1 NetRef 2 Fallback
-------- ------------ ------------ ------- ------- -------- -------- --------
   0     MASTER_A     INTERNAL OSC GOOD    GOOD     Unknown  Unknown     NO
   1     MASTER_B     H100_A       GOOD    GOOD     Unknown  Unknown     NO
   2     SLAVE        H100_A       GOOD    GOOD     Unknown  Unknown     NO
-------- ------------ ------------ ------- ------- -------- -------- --------
(Press 'q' to exit; ENTER -- refresh.)
Note: Running the demo in configuration mode without -m can conflict with the initial clock configuration or result in dropped calls.

9.4 Control MVIP Switches: swishTop of Page

Name

swish

Purpose

Provides interactive or text-file-driven control of MVIP switches through the Switching service, Point-to-Point Switching service or directly using the device drivers.

Usage

swish [-i] [filename]

Options

-i specifies that the default initialization file, swish.ini, will be ignored.

filename specifies an ASCII file which contains swish commands to be executed before any interactive commands are executed.

Description

swish is a tool for interactive or text-file-driven control of MVIP switches. It provides a convenient way to manually try out connections during development to verify the commands that will be given to switches from within CT Access applications that use the Switching service.

Procedure

Use swish in interactive mode, text-file-driven mode, or in a combination of the two.

In interactive mode, the user enters swish commands at the swish command prompt to control the MVIP switches on the underlying hardware.

In text-file-driven mode, the user provides swish with the name of the file to read for the commands to run. If the text file does not have the exit command at the end, swish goes into interactive mode after executing the commands in the text file. Use the filename.swi naming convention for the input text file.

Scripts that demonstrate swish command syntax for various MVIP and Quad-T/E related commands can be found in these directories:

Windows NT: drive:\nms\ctaccess\demos\swish

UNIX: /opt/nms/ctaccess/demos/swish

To run swish interactively:

To run swish using input from a text file:

In interactive mode, the command prompt swish: is displayed. Type help to get a list of commands and arguments that swish supports. You may also enter the name of a command without any arguments to get more information about the command.

In text-file-driven mode, swish executes the commands from the specified filename. The syntax of the commands in the file is the same as the syntax of the commands in interactive mode.

swish supports four kinds of commands:

The Switching service commands are commands that interface to the Switching service. The names of the commands are the same as the functions provided by the Switching service, and the arguments to the commands are also similar. Refer to Chapter 8 for more information about the Switching service functions.

The driver commands are commands that allow the user to access the underlying driver directly by bypassing the Switching service. Some of the Switching service commands and the driver commands have the same names. swish defaults to using the Switching service command.

To distinguish among the swish commands, refer to the following table:
Use this prefix...

To indicate...

ppx

Point-to-Point Switching service commands

swi

Switching service commands.

drv

MVIP-90 driver commands (retained for legacy systems).

d95

MVIP-95 driver commands.

The Switching service commands provided by swish take a switch handle as an argument. This switch handle is opened by the OpenSwitch command. The driver commands take a driver handle as an argument and it is opened by the LoadDriver (Windows NT), or the OpenDevice (UNIX) command. The driver handle and the switch handle are not interchangeable. A switch handle can not be used in a driver command and a driver handle can not be used in a Switching service command.

The commands presented in the following table are supported by swish.

If you need help on these commands, type the name of the command and press Enter. The syntax and the options for the command are displayed.
Command

Arguments

Description

swi.OpenSwitch

<SwiHd> = <DLLname> <SwNo> [RESTORE=...] [STD=...]

Opens a switch.

swi.CloseSwitch

<SwiHd>

Closes a switch.

swi.DisableOutput

<SwiHd> <ToList>

Disables outputs of switch.

swi.GetOutputState

<SwiHd> <ToList>

Displays connections.

swi.Caps

<SwiHd>

Displays switch capabilities.

swi.GetSwitchCaps

<SwiHd>

Displays switch capabilities.

swi.MakeConnection

<SwiHd> <TiList> TO <ToList> [SIMPLEX|DUPLEX|QUAD]

swi.MakeFramedConnection

<SwiHd> <TiList> TO <ToList> [SIMPLEX|DUPLEX|QUAD]

swi.ResetSwitch

<SwiHd>

Resets a switching block.

swi.SendPattern

<SwiHd> <pattrn> TO <ToList>

Sends a pattern.

swi.SampleInput

<SwiHd> <TiList>

Displays data memory.

swi.ConfigBoardClock

<SwiHd> <TYPE=STD...> <SOURCE=MVIP...>

Establishes the clock source for an MVIP board.

swi.ConfigBoardH100Clock

<SwiHd> <TYPE=H100...> <SOURCE=INTERNAL...> <H100MODE=SLAVE...> <FALLBACK=ENABLE...> <NETREFSPEED=8KHZ...> <FALLBACKSOURCE=INTERNAL...>

Establishes the clock source for an H.100/H.110 board.

swi.ConfigNetrefClock

<SwiHd> <SOURCE=INTERNAL...> <NETREFMODE=NETREF_1...> <NETREFSPEED=8KHZ...>

Defines the source of the NETREF clocks (H.100/H.110).

swi.QueryBoardClock

<SwiHd> <TYPE=H100...>

Gets board clocking configuration and clock status information.

swi.QueryTimingReference

<SwiHd> <SOURCE=INTERNAL...>

Gets status of potential TDM bus clock timing reference.

swi.EnableSwitch

<SwiHd>

Enables switch block.

swi.DisableSwitch

<SwiHd>

Disables switch block.

swi.SetVerify

<SwiHd> <0=off/1=on>

swi.ConfigStreamSpeed

<SwiHd> <SPEED=...> <Streams>

Configures stream speed.

swiGetStreamsBySpeed

<SwiHd> <SPEED=...>

Gets streams by speed.

swi.ConfigLocalStream

<SwiHd>

Configures device on a local stream.

swi.ConfigLocalStream

<SwiHd>

Configures device on a local stream.

swi.ConfigLocalTimeslot

<SwiHd>

Configures device on a local stream and timeslot.

swi.GetBoardInfo

<SwiHd>

Gets board information.

swi.GetDriverInfo

<SwiHd>

Gets driver information.

swi.GetLocalStreamInfo

<SwiHd>

Gets information about a device on a local stream.

swi.GetLocalTimeslotInfo

<SwiHd>

Gets information about a device on a local stream and timeslot.

swi.CallDriver

<SwiHd> <command> [<arg1> ... <argN>]

swi.GetLastError

<SwiHd>

Gets the last MVIP device error.

swi.ConfigCarrier

<SwiHd> <TrkNo> [frame=D4...] [code=ZCS...]

swi.CarrierStatus

<SwiHd> <TrkNo>

Displays carrier status.

swi.QueryHybridIds

<SwiHd> <STList>

Retrieves the hybrid IDs.

d95.MakeConnection

<DevHd> <TiList> TO <ToList> [SIMPLEX|DUPLEX|QUAD]

d95.MakeFramedConnection

<DevHd> <TiList> TO <ToList>

d95.ResetSwitch

<DevHd>

Resets a switching block.

d95.SendPattern

<DevHd> <pattrn> TO <SToList>

Sends a pattern.

d95.DisableOutput

<DevHd> <SToLst>

Disables outputs of switches.

d95.SampleInput

<DevHd> <STiLst>

Displays data memory.

d95.VerifyConnection

<DevHd> <STiLst> TO <SToList>; GOTO <error_hd>

d95.VerifyDisableOutput

<DevHd> <SToLst>; GOTO <error_hd>

d95.VerifyPattern

<DevHd> <pattern> TO <SToList>; GOTO <error_hd>

d95.VerifyInput

<DevHd> <STiLst> IS <pattern>; GOTO <error_hd>

d95.WatchInput

<DevHd> <STiLst>

Monitors SToLst continuously.

d95.WatchOutputl

<DevHd> <SToLst>

Monitors SToLst continuously.

ppx.CreateConnection

<PpxHd> = <CxName> <DefaultPattern>

Creates an empty connection.

ppx.OpenConnection

<PpxHd> = <CxName>

Opens a previously created connection.

ppx.CloseConnection

<PpxHd>

Closes a connection.

ppx.CloseX

<Switch Number>

Closes handle to opened switch.

ppx.DestroyNamed
Connection

<PpxHd>

Destroys a named connection.

ppx.SetTalker

<PpxHd> <Talker>

Sets the talker for a connection.

ppx.AddListeners

<PpxHd> <ListenerList>

Adds listeners to a connection.

ppx.RemoveListeners

<PpxHd> <ListenerList>

Removes listeners from a connection.

ppx.SetDefaultPattern

<PpxHd> <pattern>

Sets the default pattern for a connection.

ppx.Connect

<TiList> TO <ToList> [SIMPLEX | DUPLEX | QUAD]

Makes a connection.

ppx.Disconnect

<ToList> FROM <TiList> [SIMPLEX | DUPLEX | QUAD]

Disconnects a connection.

ppx.Begin

Starts collecting commands.

ppx.BeginCancel

Cancels a begin command.

ppx.Submit

Sends commands to server.

ppx.ShowDB

Sends the contents of the database to a file.

Note: The d95 commands are only applicable to MVIP-95 drivers. All stream and timeslot values should be specified in MVIP-95 syntax.
For more information about the...

Refer to the...

swi functions

Specific function in Chapter 8.

d95 commands

MVIP-95 Device Driver Standard Manual

ppx functions

Point-to-Point Switching Service Developer's Reference Manual

Example


# This SWISH script connects the DSPs to the Line-interfaces on
# a fully populated AG 2000 board.

# Open the switch in MVIP-95 mode with switch state restoration disabled.
swi.OpenSwitch ag2000 = agsw 0 STD=MVIP95 RESTORE=DISABLE

# Reset the switch
swi.ResetSwitch ag2000

# Connect the DSPs to the Line-interfaces,
swi.MakeConnection ag2000 LOCAL:0:0..7 to LOCAL:5:0..7 QUAD

# The same command can be accomplished by typing the following set of commands:
swi.MakeConnection ag2000 LOCAL:0:0..7 to LOCAL:5:0..7
swi.MakeConnection ag2000 LOCAL:4:0..7 to LOCAL:1:0..7
swi.MakeConnection ag2000 LOCAL:2:0..7 to LOCAL:7:0..7
swi.MakeConnection ag2000 LOCAL:6:0..7 to LOCAL:3:0..7

# Close the switch. The connections remain because we opened the switch in restoration disabled.
swi.CloseSwitch ag2000
quit

9.5 Show Switch Connections: showcx95Top of Page

Name

showcx95

Purpose

Displays switch connections.

Usage

showcx95 [-b<board number>][<driver name>...]

Where driver name is the name of the switching driver for the board you are querying on. The following table lists several options for using this command:
Command

Description

showcx95

Queries all of the boards in the system and displays the switch connections.

showcx95 [driver name]

Queries the boards with the given switching driver and displays the switch connections.

showcx95 -b0

Queries the indicated board or boards and displays the switch connections.

Description

Displays the switch connections for all boards that have MVIP switches. If a pattern is being sent on a timeslot, the pattern value is displayed.

Example

If you have an AG board configured as board 0 with trunk channel 1 connected to local DSP resources (both voice and signaling) and you run these commands in swish:

 SWISH: openswitch ag = agsw 0
SWISH: resetswitch ag
SWISH: makeconnection ag local:0:4..7 to local:5:0..3
SWISH: makeconnection ag mvip:0:0 to local:1:0 duplex
The output will display as:

 SHOWCX95 Version 1.1       Jan 15 1998

AGSW 0
M{00/01}:00 <-> L{01/00}:00
L-01:02 <- 0x7f
L-01:04..07 <- 0x7f
L-03:00 <- 0x00
L-03:02 <- 0x00
L-03:04..07 <- 0x00
L-05:00..03 <- L-00:00..04
L-05:04..07 <- 0x7f
L-07:00..07 <- 0x00
In this output example, M means MVIP bus and L means Local bus.

This output example shows these types of connections:

  L-01:02       <-  0x7f
Pattern 0x7f is sent to timeslot Local:01:02.

  L-05:00..03       <- L-00:00..04
Timeslots Local:00:00..04 are writing to timeslots Local:05:00..03.

  M{00/01}:00       <-> L{01/00}:00
Timeslot MVIP:00:00 is writing to timeslot Local:01:00.
Timeslot Local:00:00 is writing to timeslot MVIP:01:00 (a duplex connection).

The syntax of showcx95 v 1.1 for duplex connections is:

 L|M{fwd slot1/rev slot1}  <->  L|M{fwd slot2/rev slot2}
which represents fwd slot1 -> fwd slot2 and rev slot1 <- rev slot2.



Table of Contents Index NMS Glossary Previous Page Next Page Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.