Sage Command Language 1 - Sage Test Solutions · Sage Command Language 1 The Sage Command Language...

76
7 Sage Command Language 1 The Sage Command Language (SCL) is a command-line interpreter for the Sage 940/945RTS communications test system. It is primarily a scripting language for testing applications. SCL can also be used as an interactive command line tool to perform the functions of the Sage 940/945RTS. Background SCL is based on the general-purpose Tool Control Language (TCL). TCL was designed as a programmable control language for embedding in applications. SCL is a TCL interpreter extended to include commands to control the Sage 940/945RTS. SCL also contains the widely used Expect extension to TCL. Expect provides commands for automating interaction with programs and devices, and is well suited for controlling remote telephony equipment over serial lines or LAN connections. Interactive Usage Interactively, SCL appears similar to the standard UNIX shells (command interpreters). Any SCL command or UNIX command can be typed at the prompt. When SCL is invoked, it displays a prompt, reads a line of input and executes the command. Some commands continue to run until the command is terminated by typing quit or exit. Running SCL To invoke SCL, type SCL at the UNIX command prompt. The release version displays, followed by the SCL command prompt and the number of commands invoked since the start of the SCL session (in this case, 1 command). $ scl scl rel 5.3.1g.121300.0 (c) 2000 Sage Instruments scl<1> Example This example uses the connect command to connect to port rb718. The system connects to port rb718 and then returns the SCL command prompt. scl<1> connect rb718 scl<2> Scripting SCL commands can be collected in a file for execution at a later time. One difference from interactive use is that all Sage commands must be prefixed with scl_ to distinguish them from the general-purpose commands. For more information and examples, visit: http://www.sageinst.com/scl/scl-over.txt

Transcript of Sage Command Language 1 - Sage Test Solutions · Sage Command Language 1 The Sage Command Language...

7

Sage Command Language 1

The Sage Command Language (SCL) is a command-line interpreter for theSage 940/945RTS communications test system. It is primarily a scriptinglanguage for testing applications. SCL can also be used as an interactivecommand line tool to perform the functions of the Sage 940/945RTS.

Background SCL is based on the general-purpose Tool Control Language (TCL). TCL wasdesigned as a programmable control language for embedding in applications.

SCL is a TCL interpreter extended to include commands to control the Sage940/945RTS. SCL also contains the widely used Expect extension to TCL.Expect provides commands for automating interaction with programs anddevices, and is well suited for controlling remote telephony equipment overserial lines or LAN connections.

Interactive Usage

Interactively, SCL appears similar to the standard UNIX shells (commandinterpreters). Any SCL command or UNIX command can be typed at theprompt. When SCL is invoked, it displays a prompt, reads a line of input andexecutes the command. Some commands continue to run until the commandis terminated by typing quit or exit.

Running SCL To invoke SCL, type SCL at the UNIX command prompt. The release versiondisplays, followed by the SCL command prompt and the number ofcommands invoked since the start of the SCL session (in this case, 1command).$ sclscl rel 5.3.1g.121300.0 (c) 2000 Sage Instrumentsscl<1>

ExampleThis example uses the connect command to connect to port rb718. Thesystem connects to port rb718 and then returns the SCL command prompt.scl<1> connect rb718scl<2>

Scripting SCL commands can be collected in a file for execution at a later time. Onedifference from interactive use is that all Sage commands must be prefixedwith scl_ to distinguish them from the general-purpose commands.

• For more information and examples, visit: http://www.sageinst.com/scl/scl-over.txt

Sage Command Language

SCL Functional Overview and Command DescriptionNOTE The information in this section is also available on-line at

http://www.sageinst.com/scl/scl-func.html

Summary This document describes the Sage Command Language (SCL), a commandinterpreter for the Sage 940/945RTS communications test system. SCLprovides two capabilities:

• interactive command-line control of the 940/945RTS testing functions • a scripting language for automating testing applications

The design objectives for SCL were to provide a command-line tool that wasflexible and concise enough for programming use, but simple and "friendly"enough for interactive use. Additional objectives were to base SCL on anon-proprietary language with an existing user community, and to provide asoftware base that was easily extendable by Sage developers. It is expectedthat SCL will grow, as Sage-developed commands and 3rd party extensionsare added.

Background SCL is based on the general-purpose Tool Control Language (TCL)developed at UC Berkeley in the late 1980's. TCL was designed as aprogrammable control language for embedding in applications, and iscurrently in use in a variety of applications areas. The TCL language has beenported to Windows and Macintosh, as well as most Unix platforms, and isunder active development at Sun Microsystems.

SCL is a TCL interpreter which has been extended to include commands thatcontrol the Sage 940/945RTS. TCL provides commands that support standard

• programming tasks• setting and evaluating variables • controlling execution flow • defining procedures • accessing files • handling errors and exceptions.

SCL also contains the widely used expect extension to TCL. Expect providescommands for automating interaction with programs and devices, and is wellsuited for controlling remote telephony equipment over serial lines or LANconnections. At Sage, expect has been used for automating call setup onEricsson switches during automatic trunk routining, and for implementingremote control of the Sage 930 test system, from the 940/945RTS.

TCL BasicsA TCL command consists of the command name, followed by commandarguments. Commands and arguments are separated by white-space, and anewline or semicolon terminates the command. A command can be a built-in

8 ©Sage Instruments 2001

Sage Command Languagecommand implemented within the interpreter, an application-specificcommand implemented in the interpreter, or a TCL procedure implementedexternally as a script. A line beginning with # is a comment line.

Syntax Special syntax constructs used in TCL are:

• " " double quotes group words together • { } curly braces group words together, preventing substitution • [ ] square brackets group words, evaluate as a command, and substitute

the return value • $ dollar substitute value of variable

All TCL commands, arguments, and variables are strings. Arithmeticexpressions are not evaluated in the interpreter, but by the built-in exprcommand. TCL expressions have the same operators and precedence as in C.All TCL commands return a result string and a result code. A non-zero resultcode indicates an error, and will cause the interpreter to exit, unless the catchcommand is used to handle the error. If an error occurs, the result stringcontains the error message. Otherwise, the results string contains the results ofthe command, if any.

Basic Commands

Some of the more basic TCL built-in commands are:

Controlif, for, case, break, continue

Variableset, global, array

Procedureproc, return

Exceptionscatch, error

Stringsformat, scan, string

Filessource, open, close, puts, gets

Processesexec

©Sage Instruments 2001 9

Sage Command Language

Sage Extensions to TCLSCL extends TCL/Expect by adding commands specific to communications testing:

• establishing a test connection • setting test parameters • running and controlling a test • reporting test results • configuring and obtaining status from test resources

To facilitate adding Sage commands to SCL, a SCL C API has been written.This API hides some of the complexity of the TCL C interface, and allowsfuture implementation of non-TCL 940/945RTS command languages.Contact Sage Instruments for information about the SCL programminginterface.

Test Access Commands

Before a test can be initiated, a test connection must be established. The SCLconnect command is used to define the circuit to test and reserve a testresource. Most commonly, the user would specify this information bysupplying a valid test port from the interface database. (The 940/945RTSlistports command shows all defined ports). With no arguments, connectreturns the current connection information.

When testing is complete, the disconnect command is used to release the testresource. The current test connection is automatically disconnected whenSCL exits. The disconnect command is only needed if the user wants toswitch test connections during a single SCL session.

SCL supports a single test connection.

connect NAMEconnect - create a 950 RTS connection

SYNTAX use "man page" connect circuit:

For more information, type "man connect".scl<4> man connectconnect [circuit [-dsp <dsp number> | -qdsp | -q]]

DESCRIPTION

The "connect" command allocates the named circuit, reserves a test resource,and creates a test connection. With no arguments, "connect" returnsinformation about the current test connection.

The "circuit" argument can be specified in the following ways: port 950RTStest port listed in the interface database (IDB). Use "listports" to show allports. span numeric id number from the IDB (DS1 testing); span chan spannumber and channel number (DS0 testing)

10 ©Sage Instruments 2001

Sage Command LanguageOptionally, a specific dsp number or type may be requested. The -dsp flagallows for a specific dsp number to be requested. The -qdsp (or just -q) allowsfor a Quad DSP resource to be requested.

The -dsp and -qdsp flags are mutually exclusive. A test connection is torndown using the "disconnect" command, or automatically when SCL exits.

SCL supports a single test connection at a time. Therefore, a "disconnect"must occur before a new test connection can be made.

When a connection is made with no errors, an empty result string is returned,otherwise a description of the error is returned.

With no arguments, the current connection information is returned as a stringof type/value pairs.

RESULT VALUESetting circuit: None, or error message.Retrieving circuit info: none if no connection exists Orport connected 950RTS test port type type of circuit (ds0rbs, ds0clear, etc.)board board numberintfc interface numberchan channel numberEXAMPLESThe following example shows interactively setting up and tearing down a 950RTS test connection.scl<1> connect r101scl<2> connect port r101 type ds0rbs board 0 intfc 0 chan 1scl<3> disconnectscl<4> connectnonescl<5>

disconnect NAME disconnect - tear down a 950RTS test connection

SYNTAX disconnect

DESCRIPTIONThe "disconnect" command tears down the current test connection,releasing the allocated circuit and test resource. Since SCL does not support multiple test connections, changing test connections requires a "disconnect" followed by a "connect" to the new circuit.

"disconnect" is invoked automatically when SCL exits.

NOTE: the "expect" disconnect command has been renamed "detach" so as not to conflict with the SCL "disconnect" command.RESULT VALUE - None.EXAMPLES - The following example shows interactively setting up and tearing down a 950RTS test connection.

©Sage Instruments 2001 11

Sage Command Language

scl<1> connect r101scl<2> connectport r101 type ds0rbs board 0 intfc 0 chan 1scl<3> disconnectscl<4> connectnonescl<5>...where circuit can be one of: port. Use port listed in the interface database(idb) span chan. Use the named channel and DS1 from the idb (DS0 testing)span. Use the named DS1 from the idb (DS1 testing) dcs digrp chan Usenamed circuit on a digital cross-connect for TAD test dcs ds3 ds1. Use namedcircuit on a digital cross-connect for FAD test.

Parameter Commands

Most SCL tests have test parameters which are set up before running the test.In SCL, these are generally installed as variables which can be retrieved or setusing the setparam command. These variables are set to default values whenSCL begins. The default values can be viewed using defparam. Thiscommand can be used in conjunction with setparam to restore changedparameters to their defaults.

Parameter values can also be specified on the command-line as flags, using the format:

command -param1 val1 -param2 val2 ...

Some SCL commands also recognize a limited number of positionalparameters, so that the parameter flag need not be used. The help message foreach command indicates how to provide parameters.

Parameter values are always checked before setting, and an error message isreturned, describing valid values.

Command Summary

setparam, defparam, showparam• Show current settings of all test parameters

• Show current settings of all parameters for a particular test• Show current value of named parameter• Set named parameter to val

setparam NAMEsetparam - set or return current values of installed parameters

defparam defparam - return default values of installed parameters

showparams showparams - show current or default values of installed parametersSYNTAXsetparam command param [value]defparam command param

12 ©Sage Instruments 2001

Sage Command Languageshowparams [-def] [command]

DESCRIPTIONMost SCL commands have configurable settings which are specified viacommand-line or through "installed parameters". The "setparam" commandmanages these installed parameters. Each installed parameter has an initial,default setting, which can be retrieved using the "defparam" command.If a single parameter is retrieved, its value is returned in the result string.

If a "value" argument is given to "setparam", the parameter value is changed;otherwise the value is returned. NOTE: if a test parameter is changed while atest is running, it will not take effect until the test has been stopped andrestarted.

If a parameter is set successfully, an empty result is returned, otherwise anerror message is returned that indicated why the parameter setting failed.

For interactive use, the "showparams" command produces a formatted displayof current parameter values. With no arguments, "showparams" displays allinstalled SCL parameters. If a "command" argument is specified,"showparam" displays all installed parameters for that command. If the "-def"flag is used, the default parameter values are displayed instead of the currentvalues.

"showparams" send displays to standard output and returns an empty resultstring. The output is also saved in the "show buffer", and can be retrievedusing the "getshow" command.

The installed parameters for each command are listed on its manual page.

RESULT VALUESetting parameters: None, or error messageRetrieving parameters: Parameter valueDisplaying parameters: NoneEXAMPLESThe following example shows setting DS0 BERT test parameters, thenrestoring them to defaults. scl<3> showparams ds0bert echo off format ds0a pattern 511 subrate 56kb scl<2> setparam ds0bert pattern 2047 scl<2> setparam ds0bert echo on scl<3> ds0bert ... scl<4> stop scl<5> defparam ds0bert pattern 511 scl<6> setparam dsobert pattern 511

©Sage Instruments 2001 13

Sage Command Language

scl<7> startSEE ALSO ds0bert(SCL), ds1bert(SCL), mtone(SCL), noise(SCL), rloss(SCL),

setvar NAMEsetvar - set or return current values of SCL installed variables

showvars showvars - show current values of SCL installed variablesSYNTAX setvar var [value] showvarsDESCRIPTION

SCL provides a set of general configuration and status variables that aremanaged using the "setvar" command. Some of these variables are read-only,others can be modified by the user.

If a "value" argument is supplied to "setvar", the variable is

changed. With no "value" argument, the variable value is returned. If a variable is set successfully, an empty result is returned, otherwise an error message is returned describing why the setting failed.

For interactive use, the "showvars" command will display all available SCL variables. "showvars" displays to standard output, saves the output in the "show buffer", and returns an empty result.The currently available variables are: debugflag boolean, turns on debug mode testrunning boolean, read-only, indicates if a test is currently running dacsequip boolean, used by "dcs" commandRESULT VALUE Setting variable: None, or error message Retrieving variable: value of variable: Displaying variables: NoneEXAMPLES The following example shows displaying and setting SCL variables: scl<1> showvars debugflag 0 testrunning 1 dacsequip 0 scl<2> setvar debugflag 1 scl<3> setvar debugflag 1 scl<4>SEE ALSO ds0bert(SCL), ds1bert(SCL), mtone(SCL), noise(SCL), rloss(SCL)

14 ©Sage Instruments 2001

Sage Command LanguageTest Commands A test is started by issuing one of the test commands or by selecting the test

and issuing the start command. A test command will load the current testparameter settings, override with any command-line parameters, set thecurrent test selection, and begin testing. A single test connection can supportonly one test at a time. A running test must be stopped before a new test canbe started.

For convenience during interactive use, an installed flag variable, testrunning,indicates whether a test is currently running. The command setvar (similar toset param in usage), will display the current setting of SCL installed variables.

NOTE See the Parmeters and Result Types for details about parameters andresults.

A test command only returns a result if the test can not be started. If the teststart succeeds, results can be obtained by using the report command,described below.

ds0bert NAMEds0bert - run DS0 bit error rate (BERT) testingSYNTAXds0bert [rate] [pattern] [upattern] [-echo true|false]

DESCRIPTIONThe "ds0bert" command starts a DS0 BERT test on the current testconnection. The current connection must be a DS0 -- either a directconnection, or a DCS TAP.

Test parameters are loaded from the "ds0bert" installed SCL parameters,which are overridden by any command-line parameters. The "pattern"parameter is positional, all others are flag arguments. When the test is startedsuccessfully, an empty result string is returned, otherwise a description of theerror is returned.

Once the test is running, it is controlled using the BERT control commands:"ds0inject", and "ds0loop". The standard SCL test controls and reportingcommands are also available: "stoptest", "starttest", "clrtest", "report", and"showreport".

A running test is stopped using the "stoptest" command, or automaticallywhen SCL exits. SCL supports a single test at a time. Therefore, a "stop"must be issued before a new test can be run.INSTALLED PARAMETERS rate data format or DS0A subrate 64kb, sw56kb, 56kb, 19.2kb, 9.6kb, 4.8kb, 2.4 (default 56kb) pattern test pattern 511, 2047, 2e15, 2e20, 2e23 1:7, user dds1, dds2, dds3, dds3r, dds4, dds5, dds5a (default 511) upattern user pattern

©Sage Instruments 2001 15

Sage Command Language

3 to 8 binary digits echo echo canceller enabled off, on (default off)RESULT VALUEStarting test: None, or error messageFull results report: elapsed test time (seconds) status test status (nosync, sync) errs bit error counter ber bit error rate sls sync loss seconds efs, pctefs error-free seconds, percent EFS es, pctes errored seconds, percent ES ses, pctses severely errored seconds, percent SES fail, pctfail failed seconds, percent failed avail, pctavl available seconds, percent available unavl, pctunvl unavailable seconds, percent unavailable data PCM sample netcode received network code (or second PCM sample)Results subset (showreport):elapsed status netcode errs berEXAMPLE The following example shows starting a DS0 BERT test interactively, stopping, setting parameters, then restarting.scl<1> connect r101scl<2> ds0bert 56kb 2047scl<3> showreportelapsed status netcode errs ber1 sync 89 0 <1.79E-052 sync ac 0 <8.93E-063 sync d9 0 <5.95E-06<DEL>interruptedscl<4> stopscl<5> showparams ds0bertpattern 2047upattern 0echo offrate 56kbscl<8> ds0bert 56kb 511 -echo onThis example shows scripting use of the "ds0bert" command. #!/u/950rts/bin/scl # make DS0 test connection set port c124 puts "DS0 BERT testing on port $port" scl_connect $port # start BERT test scl_ds0bert 64kb 2047 # retrieve results report and extract desired measurements

16 ©Sage Instruments 2001

Sage Command Language array set res [scl_report] if {$res(status) == "nosync"} {puts "NOSYNC condition"} else {puts "BIT ERRS: $res(errs)"}

ds1bert NAMEds1bert - run DS1 bit error rate (BERT) testing

SYNTAXds1bert [<pattern> <upattern> <intfc>]DESCRIPTIONThe "ds1bert" command starts a DS1 BERT test on the current testconnection. The current connection must be a DS1 -- either a directconnection, or a DCS FAD. The test parameters are loaded from the installedparameters, or from the command-line. If the "pattern" is set to "user", thenthe "upattern" parameter must contain a string of 1's and 0's specifying thepattern. If the "intfc" parameter is set to "true", then an interface setup will beperformed, using the current settings of the parameters for the "intfc"command.

When the test is started successfully, an empty result string is returned,otherwise a description of the error is returned. Once the test is running, it iscontrolled using the BERT control commands: "ds1inject", and "ds1loop".The standard SCL test controls and reporting commands are also available:"stoptest", "starttest", "clrtest", "report", and "showreport".

A running test is stopped using the "stoptest" command, or automaticallywhen SCL exits. SCL supports a single test at a time. Therefore, a "stop"must be issued before a new test can be run.INSTALLED PARAMETERSpattern test pattern QRSS, 511, 2047, 2e15, 2e20, 2e23, 1:7, 1:1, 3in24, ones, hex55, long54, 55daly, long72, long96, long120, userupattern user patternupattern user pattern 3 to 24 binary digitsintfc indicates whether an interface setup should be performed true or falseRESULT VALUEStarting test: None, or error messageFull results report: elapsed test time (seconds) status test status (nosync, sync) errs bit error counter ber bit error rate sls sync loss seconds efs, pctefs error-free seconds, percent EFS es, pctes errored seconds, percent ES

©Sage Instruments 2001 17

Sage Command Language

ses, pctses severely errored seconds, percent SES fail, pctfail failed seconds, percent failed avail, pctavl available seconds, percent available unavl, pctunvl unavailable seconds, percent unavailable t1status test status or t1err (if nosync and t1err exists) t1err T1 error typet1ebits summary T1 error bits nopcm boolean no PCM indicator frmloss boolean frame loss indicator frmcrc boolean frame or CRC error indicator bpvdetect boolean BPV detection indictor excess0s boolean excess zeroes indicator alarms boolean alarm indicator b8zs boolean B8ZS detect indicator fslipdetect boolean frame slip indicator bpv BPV counter frm frame error counter crc CRC error counter oof out-of-frame counter bslip bit slip counter fslip frame slip counterResults subset (showreport):elapsed status t1err errs berEXAMPLESThe following example shows setting up a DS1 circuit for testing, thenstarting an interactive DS1 BERT test. scl<1> connect t1 scl<2> intfc setup sf ami scl<3> ds1bert 2047 scl<4> showreport elapsed t1stat t1err errs ber 1 sync noerrs 0 <1.79E-05 2 sync noerrs 0 <8.93E-06 3 sync noerrs 0 <5.95E-06 <DEL> interrupted scl<5>This example shows scripting use of the "ds1bert" command. #!/u/950rts/bin/scl # make DS1 test connection set port t1 puts "DS1 BERT testing on port $port" scl_connect $port# start BERT test scl_ds1bert 2047 # retrieve results report and extract desired measurements array set res [scl_report] if {$res(status) == "nosync"} {puts "NOSYNC condition"} else {puts "BIT ERRS: $res(errs)"}

18 ©Sage Instruments 2001

Sage Command Languagemtone NAME

mtone - run measure tone test

SYNTAXmtoneDESCRIPTIONThe "mtone" command starts tone measurement on the current testconnection. The current connection must be a DS0 -- either a directconnection, or a DCS TAP.

If the test is started successfully, an empty result string is returned, otherwisea description of the error is returned.

Once the test is running, it is controlled using the standard SCL test controlsand reporting commands: "stoptest", "starttest", "clrtest", "report", and"showreport".

A running test is stopped using the "stoptest" command, or automaticallywhen SCL exits. SCL supports a single test at atime. Therefore, a "stoptest"must be issued before a new test can be run.

INSTALLED PARAMETERSNone.RESULT VALUE Starting test: None, or error message.Results report: freq tone frequency (hz) level tone level (dbm)EXAMPLES The following example shows starting a measure tone test interactively, and then stopping the test. scl<1> connect r101 scl<2> mtone scl<3> showreport freq level 1333 -60.0 1333 -60.0 1333 -60.0 <DEL> interrupted scl<4> stop scl<5>

stone NAMEstone - control 950RTS tone senderSYNTAXstone [off | on [freq [level]]DESCRIPTION

©Sage Instruments 2001 19

Sage Command Language

The "stone" command controls and reports status of the 950RTS tone sender.

The "on" option of the "stone" command will turn the tone sender on, setting the frequency and level from installed parameters or from the command-line.

The "off" option will turn off the tone sender.

When the tone sender is succesfully turned on or off, an empty result is returned, otherwise a description of the error is returned.

With no arguments, the "stone" command returns status of the tone sender.

INSTALLED PARAMETERS freq tone frequency (in Hz) level tone level (in dBm)

RESULT VALUE Controlling tone sender:

None, or error message. Retrieving tone sender status: freq frequency of currently sent tone (hz) level level of currently sent tone (dbm) Or off no tone being sentEXAMPLES The following example shows sending a tone, turning it off, and querying the tone sender status: scl<1> connect r101 scl<2> stone off scl<3> showparam stone freq 1004 level -16.0 scl<4> stone on scl<5> stone freq 1004 level -16.0 scl<4> stone on 55 freq 55 level -16.0 scl<6> stone off scl<7>SEE ALSO mtone(SCL), connect(SCL), setparam(SCL)

stone on freq levelStart tone sender

stone offStop tone sender

rloss NAMErloss - run return loss test

20 ©Sage Instruments 2001

Sage Command LanguageSYNTAXrloss [type]DESCRIPTIONThe "rloss" command starts return loss measurement on the current test

connection. The current connection must be a DS0 -- either a directconnection, or a DCS TAP.

The "type" test parameter is loaded from the installed parameters, or from thecommand-line positional parameter.

Once the test is running, it is controlled using the standard SCL test controlsand reporting commands: "stoptest", "starttest", "clrtest", "report", and"showreport".

A running test is stopped using the "stoptest" command, or automaticallywhen SCL exits. SCL supports a single test at a time. Therefore, a "stoptest"must be issued before a new test can be run.

INSTALLED PARAMETERStype return loss type (erl, srl, srh)RESULT VALUEStarting test:None, or error message.Results report:return loss value (db)EXAMPLESThe following example shows starting a return loss test interactively,and then stopping the test. scl<1> connect r101 scl<2> rloss erl scl<3> showreport

noise NAMEnoise - run noise test

SYNTAXnoise [type]

DESCRIPTIONThe "noise" command starts return loss measurement on the current testconnection. The current connection must be a DS0 -- either a directconnection, or a DCS TAP.

The "type" test parameter is loaded from the installed parameters, or from thecommand-line positional parameter.

If the test is started successfully, an empty result string is returned, otherwise a description of the error is returned.

Once the test is running, it is controlled using the standard SCL test controlsand reporting commands: "stoptest", "starttest", "clrtest", "report", and"showreport".

©Sage Instruments 2001 21

Sage Command Language

The reporting commands return a single measurement; the noisemeasurement, in dBrnC (cnotch and cmsg), dB (snr), or dBrn (3kflat).

A running test is stopped using the "stoptest" command, or automaticallywhen SCL exits. SCL supports a single test at a time. Therefore, a "stoptest"must be issued before a new test can be run.

INSTALLED PARAMETERStype noise measurement type (cnotch, cmsg, snr, 3kflat)RESULT VALUEStarting test: None, or error message.Reporting results: noise measurement (dbrnc, db, or dbrn)

EXAMPLESThe following example shows starting a noise test interactively, and then stopping the test. scl<1> connect r101 scl<2> noise cnotch scl<3> showreport 13.0 13.0 13.0 <DEL> interrupted scl<4> stop scl<5>

jitter NAME jitter - run Phase/Amplitude Jitter testingSYNTAX jitter [type] [filter] [-freq <f>] [-level <l>]DESCRIPTION

The "jitter" command starts phase/amplitude jitter testing on the current testconnection. The current connection must be a DS0 --either a directconnection, or a DCS TAP.

Test parameters are loaded from the "jitter" installed SCL parameters, whichare overridden by any command-line parameters.

Both the "type" and "filter" parameters are positional, and can also be invokedas flag arguments.

Once the test is running the standard SCL reporting commands are available.

A running test is stopped using the "stoptest" command, or automaticallywhen SCL exits. SCL supports a single test at a time. Therefore, a "stoptest"

22 ©Sage Instruments 2001

Sage Command Languagemust be issued before a new test can be run. The test can be restarted using"start".INSTALLED PARAMETERS type "send" (send tone) or "meas" (measure only) filter measurement filter ("low" or "high") freq output tone frequency (1002 to 1020 hz) if type is "send" level output tone level (+3.0 to -40 dbm)RESULT VALUE Starting test: None, or error message. Results report: status test status ("ok", "notone", or "spurtone") phase phase jitter (degrees) amp amplitude jitter (%) level receive tone power (dbm) freq receive frequency (hz)EXAMPLES The following example shows starting a jitter test interactively. scl<1> connect r101 scl<2> showparams jitter filter low freq 1004 level -16.0 type send scl<3> jitter -level -18 scl<4> showreport status phase amp freq level ok 0.8 1.6 1004 -16.1 ok 0.8 1.6 1004 -16.1 ok 0.9 1.6 1004 -16.1 ok 0.8 1.6 1004 -16.1 <DEL> interrupted scl<5> stop This example shows scripting use of the "jitter" command. #!/u/950rts/bin/scl # make DS0 test connection set port c124 puts "Phase/Amplitutde jitter testing on port $port" scl_connect $port # start BERT test scl_jitter # display jitter when tone comes on while { 1 } { array set results [scl_report] if {$results(status) == ok} { puts "Phase jitter: $results(phase) degrees" puts "Amplitude jitter: $results(amp) %" return }

©Sage Instruments 2001 23

Sage Command Language

SEE ALSO setparam(SCL), selecttest(SCL), starttest(SCL), stoptest(SCL),

imd (imtone) NAMEimd - run Intermodulation Distortion testingSYNTAX imd [tone] [level] [-tone <t>] [-level <l>] imtone [tone]DESCRIPTION

The "imd" command starts an Intermodulation Distortion test on the currenttest connection. The current connection must be a DS0 -- either a directconnection, or a DCS TAP.

Test parameters are loaded from the "imd" installed SCL parameters, whichare overridden by any command-line parameters.

The "tone" and "level" parameters are positional, and can also be invoked asflag arguments.

When the test is started successfully, an empty result string is returned,otherwise a description of the error is returned.

Once the test is running, it is controlled using "imtone" command.

The "imtone" command with no arguments returns the tone currently

eing sent. The "tone" argument will change the tone being sent.

The standard SCL test controls and reporting commands are also available:"stoptest", "starttest", and "report".

A running test is stopped using the "stoptest" command, or automaticallywhen SCL exits. SCL supports a single test at a time. Therefore, a "stoptest"must be issued before a new test can be run.

INSTALLED PARAMETERS tone test tone (2tone, 4tone, off) level output tone levelRESULT VALUERESULT VALUE Starting test: None, or error message Results report: status test status (ok, notone, spurtone) tone received tone (2tone, 4tone, off) type test phase (snr, corr, uncorr) imd2, imd3 IMD products level received tone levelEXAMPLES The following example shows starting an IMD test interactively. scl<1> connect r101 scl<2> imd

24 ©Sage Instruments 2001

Sage Command Language scl<3> showreport status tone type imd2 imd3 level ok 2tone snr 47.3 50.0 -14.0 ok 2tone snr 47.4 50.1 -14.1 <DEL> interrupted scl<4> showparams imd level -16.0 tone 2tone scl<5> imtone 4tone scl<6> showreport status tone type imd2 imd3 level ok 4tone corr 47.7 51.2 -16.0 ok 4tone corr 46.2 47.5 -16.1 ok 4tone corr 48.3 50.9 -16.1 ok 4tone corr 48.5 50.9 -16.0 <DEL> interrupted scl<7> This example shows scripting use of the "imd" command. #!/u/950rts/bin/scl # make DS0 test connection set port c124 puts "IMD testing on port $port" scl_connect $port # run 2-tone, then 4-tone test scl_imd 2tone array set results [scl_report] puts "2-Tone Test: IMD2 $results(imd2) IMD3 $results(imd3)" scl_imtone 4tone setarray results [scl_report] puts "4-Tone Test: IMD2 $results(imd2) IMD3 $results(imd3)" }SEE ALSO setparam(SCL), selecttest(SCL), starttest(SCL), stoptest(SCL), report(SCL)

par NAMEpar - run Peak/Average Ratio testSYNTAX par [type] [level] par [-type <t>] [-level <l>]DESCRIPTIONThe "par" command starts PAR testing on the current test connection. Thecurrent connection must be a DS0 -- either a direct connection, or a DCS TAP.

Test parameters are loaded from the "par" installed SCL parameters, whichare overridden by any command-line parameters.

©Sage Instruments 2001 25

Sage Command Language

Both the "type" and "level" parameters are positional, and can also beinvoked as flag arguments.Once the test is running the standard SCL reporting commands are available.

A running test is stopped using the "stoptest" command, or automaticallywhen SCL exits. SCL supports a single test at a time. Therefore, a "stoptest"must be issued before a new test can be run. The test can be restarted using"starttest".

INSTALLED PARAMETERS type "send" (send tone) or "meas" (measure only) level output tone level (-13 to -60 dbm), if type is "send"RESULT VALUE Starting test: None, or error message. Results reporting: status test status ("ok", "notone", or "spurtone") units PAR units level signal power (dbm)EXAMPLES The following example shows starting a 23 tones test interactively.: scl<1> connect r101 scl<2> showparams par level -16.0 type send scl<3> par -level -18 scl<4> showreport status units level ok 99 -18.1 ok 99 -18.1 ok 99 -18.1 <DEL> interrupted scl<4> stop This example shows scripting use of the "par" command. #!/u/950rts/bin/scl # make DS0 test connection set port c124 puts "PAR testing on port $port": scl_connect $port # start BERT test scl_par # display PAR units when tone comes on while { 1 } { array set results [scl_report] if {$results(status) == ok} { puts "PAR Units: $results(units)" puts "Signal/Total Distortion: $results(stdr)" return }

26 ©Sage Instruments 2001

Sage Command Language }SEE ALSO

selecttest(SCL), starttest(SCL), stoptest(SCL),

report(SCL), setparam(SSCL)

edd NAMEedd - run Envelope Delay Distortion testingSYNTAX edd [-mode <m>] [-type <t>] [-level <l>] [-freq <f>] [-start <s>] [-end <e>] [-step <S>] [-time <T>] [-skip <ss>]DESCRIPTION

The "edd" command starts an Envelope Delay Distortion test on the currenttest connection. The current connection must be a DS0 -- either a directconnection, or a DCS TAP.

Test parameters are loaded from the "edd" installed SCL parameters, whichare overridden by any command-line parameters.

When the test is started successfully, an empty result string is returned,otherwise a description of the error is returned. Once the test has started, thestandard SCL test controls and reporting commands ("starttest", "stoptest",and "report", and "showreport" are available.

A running test is stopped using the "stoptest" command, or automaticallywhen SCL exits. SCL supports a single test at a time. Therefore, a "stoptest"must be issued before a new test can be run.

INSTALLED PARAMETERS mode test mode (meas, repeat) type test type (fixed, sweep) level output level (-60 to 3 dbm) freq fixed send frequency (20 to 3904 hz) start sweep start frequency (20 to 3904 hz) end sweep end frequency (20 to 3904 hz) step sweep frequency step (hz) sec sweep time per step (sec) skip sweep skip 2600hz (true, false)RESULT VALUE Starting test: None, or error message Results report status test status (noref, ref, fixed, sweep, repeat) state test state (init, run) freq frequency (hz) delay envelope delay (msec)EXAMPLES The following example shows starting an "edd" test interactively. scl<1> connect r101 scl<2> edd scl<3> showreport

©Sage Instruments 2001 27

Sage Command Language

status freq level delay repeat 1803 -16.1 0 repeat 1804 -16.1 0 noref 1803 -16.1 -336 noref 1803 -16.1 -1047 noref 1803 -16.1 -1049 ref 1804 -16.1 -5051 fixed 1804 -16.1 -1 fixed 1804 -16.1 -2 sweep 304 -16.1 0 sweep 404 -16.1 -1 sweep 504 -16.1 -1 <DEL> interrupted scl<4> showparams edd endfreq 3204 fixedfreq 1804 level -16.0 mode repeat sec 5.0 skip false startfreq 304 step 100 type sweep scl<5>SEE ALSO setparam(SCL), selecttest(SCL), starttest(SCL), stoptest(SCL), report(SCL)

echosnd NAMEechosnd - Invoke the Sage Echo Sounder testSYNTAXechosnd [-level <level>] [-disableEC <flag>] [-ecDuration <msec>]

[-ecPhaseDur <msec>] [-ecLevel <level>] [-ecFreq <frequency>] [-ecPhaseReversal <flag>] [<level> [<disableEC> [<ecDuration> [<ecPhaseDur> [<ecLevel> [<ecFreq> [<ecPhaseReversal]]]]]]]DESCRIPTIONThe Sage Echo Sounder sends a complex test signal over the connected lineand detect and measure multiple echoes that may be present during the call.

Measurement results display a maximum of four of the detected echoes, the level of each echo, and the delay of each echo.

Echo Sounder allows you to modify the level of the test, and to disable thenetwork's echo cancelling function. The tone used to disable the echocanceller can be modified.NOTE: Modifications to the echo canceller tone are active only within theEcho Sounder test.

28 ©Sage Instruments 2001

Sage Command LanguageThis test can be used in a stand alone fashion with a terminated line orloopback line, or in conjunction with Sage's Echo Generator (93X and RTSproduct lines) to characterize echo canceller performance.

The test executes repeatedly until either interrupted or stopped using the SCLstop command.This test requires a "QDSP" resource (See "connect(SCL)").

INSTALLED PARAMETERS -level The test signal level, [-30..0] dBm. Default is -10 dBm. -disableEC Indicates whether the test should send an echo canceller disable tone prior to measurement. 0 is without the disable echo canceller tone, default. 1 is send echo canceller tone. -ecDuration Total disabler tone duration in milliseconds, [1..99999] ms. Default is 2200 ms. -ecPhaseDur The time between phase reversals [10..9999] ms. Default is 450 ms. -ecLevel The echo canceller disable tone level, [-60.0..3.0] dBm. Default is -12.0 dBm. -ecFreq The echo canceller disable tone frequency, [20..3904] Hz. Default is 2100 Hz. -ecPhaseReversal Indicates whether the echo canceller tone uses phase reversal. 1 is phase reversal (g.165), default. 0 is without phase reversal.

The defaults noted above apply to the initial invocation of the commandduring a SCL session. Subsequent invocations will use last invokedparameters, if not specified on the command line. Note that 'level','disableEC', 'ecDuration', 'ecPhaseDur', 'ecLevel', 'ecFreq', andecPhaseReversal' may be specified without the flags, but 'level' is alwaysinterpreted as the first argument.RESULT VALUEThe echos are displayed in descending order based on their levels.Users request results with either the 'report' or the 'showreports'commands.

An example of the response to the report command is: level(1)= -5 delay(1)= 194 level(2)= -10 delay(2)= 42 level(3)= -100 delay(3)= -100 level(4)= -100 delay(4)= -100

An example of the response to the showreport command is: level(1)= delay(1)= level(2)= delay(2)= level(3)= delay(3)= level(4)= delay(4)= -5 200 -6 100 -100 -100 -100 -100where four levels and delays are indicated. If an echo / delay is not detected,the value "-100" is indicated.

©Sage Instruments 2001 29

Sage Command Language

EXAMPLEThe following illustrates connecting to a test line to a qdsp resource andexecuting the echosnd test with a test level of -12 dBm, the echo cancellerdisable tone on, and phase reversal off: scl<1> con rb110 scl<2> echosnd -12 1 -ecPhaseReversal 0 scl<3> report level(1) = -6 delay(1) = 199 level(2) = -100 delay(2) = -100 level(3) = -100 delay(3) = -100: level(4) = -100 delay(4) = -100SEE ALSO connect(SCL), disconnect(SCL), setparam(SCL) starttest(SCL), report(SCL), showreport(SCL) stoptest(SCL), egen(SCL):

egen NAMEegen - Invoke the Sage Echo Generator

SYNTAXegen [-echo1Enable <flag>] [-echo1Level <level>] [-echo1Delay <delay>][-echo2Enable <flag>] [-echo2Level <level>] [-echo2Delay <delay>]DESCRIPTIONThe Sage Echo Generator generates one or two echoes with programmableecho delay and level. In conjunction with Sage's Echo Sounder (echosnd), itcan be used to characterize echo canceller performance. This is a "blockingcommmand" that must complete prior to the execution of subsequent SCLcommands.

You can remotely program the echo parameters with DTMF digit commandswhile the test is under way. See the section, "USING DTMF DIGITS" formore information about remotely programming echo parameters.

This test requires that the line under test uses a "QDSP" resource (See"connect(SCL)").

INSTALLED PARAMETERS Set with the "setparam egen" command. -echo1Enable Indicates whether to enable or disable the echo 0 = disable 1 = enable Initial default = 1 -echo1Level Specifies the level of the desired echo in dB. Enter an integer between -60 to 9. Initial default = -3dB -echo1Delay Specifies the delay of the desired echo in milliseconds. Enter an integer between 12 to 600. Initial default = 60ms. -echo2Enable Indicates whether to enable or disable the echo 0 = disable 1 = enable

30 ©Sage Instruments 2001

Sage Command Language Initial default = 1 -echo2Level Specifies the level of the desired echo in dB. Enter an integer between -60 to 9. Initial default = -6dB -echo2Delay Specifies the delay of the desired echo in milliseconds. Enter an integer between 12 to 600. Initial default = 250ms.The defaults noted above apply to the initial invocation of the commandduring a SCL session. Subsequent invocations will use last invokedparameters, if not specified on the command line.USING DTMF DIGITSWhile Echo Generator test is under way, you can remotely program the echoparameters from a telephone touchpad or a Sage 93x unit. Sample DTMFdigit sequences are provided at the end of this section. In all cases describedbelow, begin the sequence with a * key press, and end it with a # key press.

Note that remotely programmed settings do not change the parameter settingsat the SCL level. When the test is invoked, the SCL parameters will alwaysbe used. You can start changing the parameters using DTMF digit commandsonly while the test is underway.

The remotely programmed settings will be valid only during the duration ofthe call.

Minimum on and off requirements:To recognize DTMF digits, Echo Generator requires DTMF digits to remain on for a minimum of 50 milliseconds. Following the * key, the pause between all DTMF digits (the off time) must be at least 50 milliseconds.

The * key initiates remote programming, and is followed by a 480milliseconds prompt tone. The minimum off time following a * key pressmust be at least 530 milliseconds (i.e., 480 plus 50). When using the Sage93x unit Dial/Ring function to send DTMF digits, insert a pause (left arrowkey) after the * key press to allow time for the prompt tone.Correcting DTMF digit mistakes:Incorrect digit sequences produce an alert signal. If you make a mistakeduring remote programming, simply start all over. Each * key press begins anew programming sequence.Using DTMF digits to Disable echoes:You can use these steps while there is a call in progress on the line under test.To remotely disable both echo 1 an echo 2:

1. Press the * key and wait for the prompt tone to cease. The * digit indicates that remote programming follows. Echo generation temporarily suspends.

2. Press the # key and wait for the prompt tone to cease. The # key indicates the conclusion of remote programming.This 2-key sequence disables both echo 1 and echo 2.

Using DTMF digits to set the echo level and delay:You can use these steps after there is a call in progress on the line under test.

©Sage Instruments 2001 31

Sage Command Language

The pattern for DTMF digits to set echo 1 only is, "*-L-L-D-D-D-#" where L is a level digit, and D is a delay digit.The pattern for DTMF digits to set echo 1 and echo 2 is,"*-L-L-D-D-D-L-L-D-D-D-#" where L is a level digit and D is a delay digit.1. Press the * key and wait for the prompt tone to cease.2. Use the number keypad to enter the level and delay digits. Note that inmost cases, the echo level should be set at a decibel value less than zero.However, to set the value at zero or greater than zero, precede the numberwith 9.3. Press the # key and wait for the prompt tone to cease. Sample DTMF digitsequences: 1. To set level and delay of echo 1 only (level less than 0dB):*-L-L-D-D-D-#L is a level digit; LL makes up a negative dB level. D is a delay digit; DDDmakes up the echo delay in milliseconds.2. Set level and delay of echo 1 only (level greater than 0dB):*-9-L-D-D-D-#To set a level between 0dB and 9dB, precede the level with 9.3. Set level and delay of echo 1 and echo 2 (both levels less than 0dB):*-L-L-D-D-D-L-L-D-D-D-#4. Set level and delay of echo 1 and echo 2 (both levels greater than 0dB):*-9-L-D-D-D-9-L-D-D-D-#5. Disable both echoes: *-#RESULT VALUEnoneEXAMPLEThe following example shows how to set one of the test parameters (echo2Enable which disables echo 2) and also how to start and end the "egen" command:scl<18> connect rb102scl<19> selecttest egenscl<20> showparam egenecho1Delay 60echo1Enable 1echo1Level -3echo2Delay 250echo2Enable 1echo2Level -6scl<21> setparam egen echo2Enable 00scl<22> showparams egenecho1Delay 60echo1Enable 1echo1Level -3echo2Delay 250echo2Enable 0echo2Level -6scl<23> startscl<24> stop

32 ©Sage Instruments 2001

Sage Command Languagesmos NAME

smos - Invoke the Sage SMOS Director

SYNTAXsmos [-duration <duration>] [-receiveTLP <level>] [-sendTLP <level>]DESCRIPTIONThe Sage SMOS Director performs the Sage Instruments Mean OpinionScore

(SMOS) test on an SMOS test line. It waits for TPT sent by the SMOSresponder on the far end before starting the test. The test blocks whileexecuting. If the user has issued either of the SCL 'report' or 'showreports'commands, the test displays both near and far end measurement results atcompletion.The SMOS test measures the distortion of a audio signal when transmittedthrough various codecs and transmission media. Unlike other standard audiosignal measurement, the distortion is not measured in the physical (time orfrequency) domain. Instead, the test uses an internal psycho-acoustic domainthat mimics the sound perception of humans so that the distortion can becorrelated with actual experience.

The SMOS test uses a robust algorithm to deliver accurate results in thepresence of jitters, band limitations and dropouts.

The test executes repeatedly until either interrupted or stopped using the SCLstop command.

INSTALLED PARAMETERSduration Duration of SMOS test signal [3..60] seconds. Default is 10.receiveTLP Receive Transmission Level Point [-30.0..10.0] dBm. Default is 0.sendTLP Send Transmission Level Point [-30.0..10.0] dBm.

Default is 0.

RESULT VALUEUsers request results with either the 'report' or the 'showreports'commands.An example of the response to the report command is: NF_MOS= 4.51 FN_MOS= 4.50NF_NOISE(dBrnC)= 7 FN_NOISE(dBrnC)= 0NF_+FS(ms)= 0 FN_+FS(ms)= 0NF_-FS(ms)= 0 FN_-FS(ms)= 0NF_BW(%)= 100.0 FN_BW(%)= 100.0NF_GAIN(dB)= 0 FN_GAIN(dB)= 0NF_CODEC= PCM FN_CODEC= PCMDELAY(ms)= 0An example of the showreport response is:NF_MOS= FN_MOS= NF_NOISE(dBrnC)= FN_NOISE(dBrnC)= NF_+FS(ms)=

©Sage Instruments 2001 33

Sage Command Language

FN_+FS(ms)= NF_-FS(ms)= FN_-FS(ms)= NF_BW(%)= FN_BW(%)= NF_GAIN(dB)=FN_GAIN(dB)= NF_CODEC= FN_CODEC= DELAY(ms)=4.52 4.50 7 0 0 0 00 100.0 100.0 0 0 PCM PCM0

EXAMPLEThe following illustrates connecting to a dry (direct connect) SMOS test line,executing the smos test with the default parameters and requesting scl<1> con rb101scl<2> hook off;smos;reportNF_MOS= 4.51 FN_MOS= 4.50NF_NOISE(dBrnC)= 7 FN_NOISE(dBrnC)= 0NF_+FS(ms)= 0 FN_+FS(ms)= 0NF_-FS(ms)= 0 FN_-FS(ms)= 0NF_BW(%)= 100.0 FN_BW(%)= 100.0NF_GAIN(dB)= 0 FN_GAIN(dB)= 0NF_CODEC= PCM FN_CODEC= PCMDELAY(ms)= 0scl<3>SEE ALSOconnect(SCL), disconnect(SCL), setparam(SCL)starttest(SCL), stoptest(SCL)

smosconnect NAMEsmosconnect - Connect to a SMOS responderSYNTAXsmosconnect [-digits <digits>] [-format <format>] [-timeout <timeout>] [<digits> [<format> [<tpttimeout>] ] ]DESCRIPTIONThis command calls a SMOS responder and waits for the start of its Test Progress Tone, TPT. Before looking for TPT, it outpulses the passed digits.INSTALLED PARAMETERS digits valid digit string (0-9abcks*#) format dtmf or mf tpttimeout seconds to wait for TPT (1 to 300, default 60)RESULT VALUEIf successful, the command returns the time it took to see TPT after outpulsing the last digit; otherwise it returns the error for the call incompletion.EXAMPLES scl<1> smosconnect 1234 dtmf 3.6SEE ALSO hook(SCL), callprogress(SCL), connect(SCL)

pvit NAMEpvit - Invoke the Sage Packet Voice Integrity Test (PVIT)

34 ©Sage Instruments 2001

Sage Command LanguageSYNTAXpvit [-level <level>] [-direction <dir>] [-filterType <type>][ <level> [ <dir> [<type>] ] ]DESCRIPTIONThe Sage PVIT will optionally send a complex test signal over the connectedline and measure any detected PVIT signal. This test can be used in astandalone fashion with a loopback line, or in conjunction with another ofSage's products that are provisioned with the PVIT feature (currentlyavailable on the 935, 94X series, and the 950 products) to characterize packetnetwork impairments. Impairments measured include: Frame Loss duringvoice activity, delay variation (a.k.a. 'frame slip' or 'jitter'), and noise hitsduring silence. The test will execute continously, returning results everysecond, but the results are only displayed upon request via the 'report' and'showreport' commands. The results are in two 'flavors': Updates and Events.Events

represent the discrete impairments measured and their associated values andtimes (e.g. Frame Loss of 32 ms detected at 1:43:22). A complete listing ofevents appears below in the results discussion. The updates representcounters and statistics based on the history of the events during the test. Forexample, the net count of frame loss events and average frame loss duration.A description of the update format is included in the results discussion below.This test requires that the test line be use a "QDSP" resouce (See"connect(SCL)").

INSTALLED PARAMETERSlevel, direction, filterType-level The test signal level, dBm. Integer from -30 to 0. Initial default = -16 dBm.-direction Indicates whether the test should send the PVIT signal, measure a PVIT signal, or both. b = both send and measure(initial default) s = Only send the PVIT signal m = Only measure any detected PVIT signalNote that in send-only mode, results can be requested, but they will be zero.-filterType Allows the selection of the CNG (comfort noise generator) assesment filter: c = C-message (default) for North America p = Psophometric for the rest of the world.The defaults noted above apply to the initial invocation of the commandduring a SCL session. Subsequent invocations will use last invokedparameters, if not specified on the command line. Note that 'level', 'direction',and 'filterType' may be specified without the flags, but 'level' is alwaysinterpreted as the first argument, and direction is second (i.e. the parametersare interpreted based on thier positions).

RESULT VALUEResults are requested via the 'report' and 'showreport' commands.Thefollowing example illustrates the response to a report command:Last_Event: FRAME_LOSS(018ms) AT: 000:05:12

©Sage Instruments 2001 35

Sage Command Language

Elapsed_Time= 000:05:19 Packet_Loss_Count= 242 Packet_Slips_Count= 0Voice_Clips_Count= 13 Noise_Hits_Count= 0 %Packet_Loss= 3.900000Net_Delay_Variation= 0 Avg_Voice_Clip_Duration= 18.000000 Avg_Noise_Level= 17Contracting_Packet_Slips_Duration= 0 Expansive_Packet_Slips_Duration= 0Packet_Loss_Duration= 7536Contracting_Packet_Slips_Count= 0Contracting_Packet_Slips_Pct= 0.000000Expansive_Packet_Slips_Count= 0Expansive_Packet_Slips_Pct= 0.000000Voice_Clip_Duration= 234Sync_Lost= 0

The first line describes the last Event detected. Listed is the event type,duration (or level), if applicable, and the elapsed time at which the eventoccurred.

The second line begins the Update portion of the result: Elapsed Time for thisupdate (hhh:mm:ss). Initial sync with a signal causes the elapsed time tobegin to increment.

Packet_Loss_Count is the total number of packet loss events during the test.Packet_Slips_Count is the total number of both contractive and expansiveslips that occurred during the test. Voice_Clips_Count and Noise_Hits_Countare also totals.

%Packet_Loss is the percentage of time (or packets) that are counted as Lost.Net_Delay_Variation is the sum of Contracting and Expansive slip totals.Avg_Voice_Clip_Duration is the average duration of all the voice clipsAvg_Noise_Level is the average noise level.Contracting_Packet_Slips_Duration is the total duration of all the contractingslips.Expansive_Packet_Slips_Duration is the total duration of all the expansiveslips.Packet_Loss_Duration is the total duration of loss during the test.Contracting_Packet_Slips_Count is the total count of the contracting packetslips.Contracting_Packet_Slips_Pct is the percentage of time / packets that havecontracting slips.Expansive_Packet_Slips_Count is the total count of the expansive packetslips.Expansive_Packet_Slips_Pct is the percentage of time / packets that haveexpansive slips.Voice_Clip_Duration is the total duration of voice clipped signal during thetest. Sync_Lost indicates if the signal is lost during the test after an initialsync with an incoming signal. 1 indicates the signal is lost.

The following illustrates an example response to the 'showreport' command:Last_Event: AT: Elapsed_Time= Packet_Loss_Count= Packet_Slips_Count= Voice_Clips_Count= Noise_Hits_Count= %Packet_Loss= Net_Delay_Variation= Avg_Voice_Clip_Duration=

36 ©Sage Instruments 2001

Sage Command LanguageAvg_Noise_Level= Contracting_Packet_Slips_Duration= Expansive_Packet_Slips_Duration= Packet_Loss_Duration= Contracting_Packet_Slips_Count= Contracting_Packet_Slips_Pct= Expansive_Packet_Slips_Count= Expansive_Packet_Slips_Pct=Voice_Clip_Duration= Sync_Lost=FRAME_LOSS(018ms) 000:13:24 000:13:29 625 0 38 0 3.300000 0 18.000000 17 0 0 16338 0 0.000000 0 0.000000 684 0FRAME_LOSS(018ms) 000:13:25 000:13:29 625 0 38 0 3.300000 0 18.000000 17 0 0 16338 0 0.000000 0 0.000000 684 0FRAME_LOSS(034ms) 000:13:26 000:13:30 626 0 38 0 3.300000 0 18.000000 17 0 0 16356 0 0.000000 0 0.000000 684 0FRAME_LOSS(018ms) 000:13:27 000:13:31 626 0 38 0 3.300000 0 18.000000 17 0 0 16356FRAME_LOSS(018ms) 000:13:29 000:13:32 627 0 38 0 3.300000 0 18.000000 17 0 0 16374 0 0.000000 0 0.000000 684 0FRAME_LOSS(050ms) 000:13:30 000:13:33 628 0 38 0 3.300000 0 18.000000 17 0 0 16424 0 0.000000 0 0.000000 684 0FRAME_LOSS(050ms) 000:13:30 000:13:34 629 0 38 0 3.300000 0 18.000000 17 0 0 16442 0 0.000000 0 0.000000 684 0FRAME_LOSS(018ms) 000:13:31 000:13:35 630 0 38 0 3.300000 0 18.000000 17 0 0 16460 0 0.000000 0 0.000000 684 0FRAME_LOSS(018ms) 000:13:32 000:13:36 631 0 38 0 3.300000 0 18.000000 17 0 0 16494 0 0.000000 0 0.000000 684 0FRAME_LOSS(034ms) 000:13:33 000:13:37 632 0 38 0 3.300000 0 18.000000 17 0 0 16512 0 0.000000 0 0.000000 684 0

Last_Event: AT: Elapsed_Time= Packet_Loss_Count= Packet_Slips_Count= Voice_Clips_Count= Noise_Hits_Count= %Packet_Loss= Net_Delay_Variation= Avg_Voice_Clip_Duration= Avg_Noise_Level= Contracting_Packet_Slips_Duration= Expansive_Packet_Slips_Duration= Packet_Loss_Duration= Contracting_Packet_Slips_Count= Contracting_Packet_Slips_Pct= Expansive_Packet_Slips_Count= Expansive_Packet_Slips_Pct=Voice_Clip_Duration= Sync_Lost=

FRAME_LOSS(018ms) 000:13:34 000:13:38 632 0 38 0 3.300000 0 18.000000 17 0 0 16512 0 0.000000 0 0.000000 684 0FRAME_LOSS(018ms) 000:13:34 000:13:39 633 0 38 0 3.300000 0 18.000000 17 0 0 16530 0 0.000000 0 0.000000 684 0FRAME_LOSS(018ms) 000:13:36 000:13:39 633 0 38 0

©Sage Instruments 2001 37

Sage Command Language

3.300000 0 18.000000 17 0 0 16530 0 0.000000 0 0.000000 684 0FRAME_LOSS(050ms) 000:13:37 000:13:40 634 0 38 0 3.300000 0 18.000000 17 0 0 16580

0 0.000000 0 0.000000 684 0

This format is intended to be parsed by a computer, so it is not easily read by ahuman without practice. It is similar to the 'report' output, but formatteddifferently for a repeating display. Every 10 updates, a header is printed thatcontains the same labels described in the 'report' result above. The results arepolled every 10 seconds and the latest event / updates are printed. Note thatthe output has been wrapped to 80 characters -- the header is actually a singleline each event / update is a single line.

Note also that excessive frame loss values (e.g. 642 ms) indicateexcessivesignal degradation due to frame loss, signal loss, or large jitters during theactive portion of the signal. Since an accurate assesment of the impairment isnot available in real-time, the entire frame is deemed lost -- hence, the 642 ms.

SIGNAL_LOSS The PVIT signal is no longer detected. SIGNAL_RECOVERED The PVIT signal is once again detected. RE-SYNC The signal has drifted too much due to jitte and was re-sync'd. IN-SYNC Initial sync with signal, not typically reported. FRAME_LOSS A portion of the signal was displaced by something else -- noise, another signal, or silence. FRAME_SLIP The delay changed. VOICE_CLIP The leading or trailing edge of the signal had frame loss. NOISE_HIT There was noise during the silent portion of the signal. NO_EVENTS_YET There are no events to report, yet. UNKNOWN_PACKET_EVENT An unanticipated event was recorded,possibly due to an error.

EXAMPLEThe following illustrates connecting to a test line to a qdsp resource andexecuting the pvit test with a test level of -12 dBm and sending, but notmeasuring:scl<1> con rb110 -qscl<2> pvit -12 sSEE ALSOconnect(SCL), disconnect(SCL), setparam(SCL)starttest(SCL), stoptest(SCL), report(SCL), showreport(SCL),"A White Paper on Sage's PVIT", Renshou Dai, December 29, 2000

vfloop NAMEvfloop - control 950RTS vf loopback functionSYNTAXvfloop [off | on [delay [gain]]DESCRIPTION

38 ©Sage Instruments 2001

Sage Command LanguageThe "vfloop" command controls and reports status of the 950RTS vf loopbackfunction.

The "on" option of the "vfloop" command will turn on (enable) the vfloopback function, setting the delay and gain from installed parameters, orfrom the command line. The "off" option will turn off (disable) the vfloopback function.

With no arguments, the "vfloop" command returns status of the tone sender.

INSTALLED PARAMETERS delay loop delay (2 to 1000 msec, default 2): gain loop level adjustment (+5 to -60 dB, default 0)RESULT VALUE

When the vf loopback function is succesfully turned on or off, an empty resultis returned, otherwise a description of the error is returned.

Querying the vf loopback function returns the delay and gain of the currentlyoperating loopback, using the standard SCL reporting format (type-valuepairs).EXAMPLESThe following example shows enabling a vf loopback, turning it off, andquerying the vf loopback status: scl<1> connect r101 scl<2> vfloop off scl<3> vfloop on scl<4> vfloop delay 2 gain 0 scl<5> vfloop on 50 scl<6> vfloop delay 50 gain 0 scl<7> vfloop on 50 -10 scl<8> vfloop delay 50 gain -10 scl<9> vfloop off

SEE ALSOconnect(SCL)

23tones NAME23tones - run 23 Tones testingSYNTAX23tones [type] [level]23tones [-type <t>] [-level <l>]DESCRIPTION

The "23tones" command starts 23 Tones testing on the current testconnection. The current connection must be a DS0 -- either a directconnection, or a DCS TAP.

©Sage Instruments 2001 39

Sage Command Language

Test parameters are loaded from the "23tones" installed SCL parameters,which are overridden by any command-line parameters.

Both the "type" and "level" parameters are positional, and can also be invokedas flag arguments.

When the test is started successfully, an empty result string is returned,otherwise a description of the error is returned.

Once the test is running the standard SCL reporting commands are available.

A running test is stopped using the "stop" command, or automatically whenSCL exits. SCL supports a single test at a time. Therefore, a "stop" must beissued before a new test can be run. The test can be restarted using "start".INSTALLED PARAMETERS type "send" (send tones) or "meas" (measure only) level output tone level (+3 to -60db), if type is "send"RESULT VALUE Starting test: None, or error message Full results report: stdr signal/total distortion (ratio) snr signal/noise (ratio) level signal power (dbm) imd2, imd3 IMD products loss_203 ... loss3641 23 attenuations (dbm) delay_281 ... delay 3563 22 envelope delays (ms) Results subset (showreport): stdr level loss_203 delay_281 loss_1766 delay_1844 loss_3641

EXAMPLES The following example shows starting a 23 tones test interactively. scl<1> connect r101 scl<2> showparams 23tones level -16.0 type send scl<3> 23tones -level -18 scl<4> showreport stdr level loss_203 delay_281 loss_1766 delay_1844 loss_3641 21.4 -18.3 -30.0 0 -30.0 0 -30.0 35.9 -18.1 -29.7 0 -29.7 -1 -29.7 35.9 -18.1 -29.7 0 -29.7 -1 -29.7 35.9 -18.1 -29.7 0 -29.7 -1 -29.7 <DEL> interrupted: scl<4> stop This example shows scripting use of the "23tones" command. #!/u/950rts/bin/scl # make DS0 test connection set port c124 puts "23 Tones testing on port $port" scl_connect $port

40 ©Sage Instruments 2001

Sage Command Language # start BERT test scl_23tones # retrieve results into an array and extract desired measurements array set results [scl_report] puts "Signal/Noise: $results(snr)" puts "Signal/Total Distortion: $results(stdr)" }SEE ALSO setparam(SCL), selecttest(SCL), starttest(SCL), stoptest(SCL), report(SCL)

callprogress NAMEcallprogress - monitor line statusSYNTAXcallprogressDESCRIPTION

The "callprogress" command monitors a switched circuit. The currentconnection must be a DS0 -- either a direct connection, or a DCS TAD.

Once the test is running, it is controlled using the standard SCL test controlsand reporting commands: "stoptest", "starttest", "clrtest", "report", and"showreport".INSTALLED PARAMETERSNone.RESULT VALUEWhen the test is started successfully, an empty result string is returned,otherwise a description of the error is returned.The test results returned by the reporting commands consists of a single value,which represents the current status of the line. The following values may bereturned: unknown unknown signal deadline dead-line (> 4 s of silence) dialtone dial-tone (steady 350/440 2-tone) dialtone400 dial-tone (steady 400 tone) busy busy-line (.5 s on/off 480/620 2-tone reorder reorder (.25 s on/off 480/620 2-tone ringing ringing (440/480 2-tone; 2s on/4 s off TPT 2225 Hz TPT TPT-CDMA 1804 Hz TPT CDMA TPT-TDMA 1404 Hz TPT TDMA TPTend end of TPT chime MCI Chime tone bong AT&T Bong tone singletone steady single tone dualtone steady dual tone speech maybe speech (unrecognized 0-, 3-, or 4-tone) SIT Special Information Tone

EXAMPLES

©Sage Instruments 2001 41

Sage Command Language

The following example shows setting up a call and monitoring the call progress: scl<1> connect r101 scl<2> hook off scl<3> sdigits dtmf 12345 scl<4> callprogress scl<5> showreport deadline deadline <DEL> interrupted scl<6>SEE ALSO sdigits(SCL), hook(SCL) selecttest(SCL), starttest(SCL), stoptest(SCL), clrtest(SCL), report(SCL)

atme NAMEatme - connect to an ATME responder and initiate testingshowatme - connect to an ATME responder, initiate testing, and display results for screen displaySYNTAXatme [-digits <digits>] [-format <format>] <tests>showatme [-digits <digits>] [-format <format>] <tests>DESCRIPTIONThe "atme" command dials using the "digits" and "format" parameters, andwhen the connection to an ATME responder is completed, runs the testsnamed on the command-line. For convenience, some "composite" tests aredefined, which contain sets of the base tests.

The "atme" command returns it's result string only when all of the results havebeen received; This command is intended for use by SCL scripts, as it's resultsare in a form more suitable for interpretation by machines. The "showatme"command runs the ATME tests specified in such a way that results areprovided as each test completes, and are formatted into tabular form.

NOTE: some ATME tests are run in a pre-defined order, not necessarily the order specified on the command-line.The valid tests are: loss0_1 single tone loss (1020) at 0dB loss10_1 single tone loss (1020) at -10dB loss0_3 three tone loss (400, 1020, 2800) at 0dB loss10_3 three tone loss (400, 1020, 2800) at -10dB noise noise test std10 signal to total distortion at -10 dB std25 signal to total distortion at -25 dB fecan far-end echo canceller noise and loss test necan near-end echo canceller noise and loss test ecandisable echo canceller disable test NOTE: ecandisable is only valid if fecan or necan is also selected.

42 ©Sage Instruments 2001

Sage Command Language The composite tests are: TransTests layer 1 transmission tests: noise std10 std25 loss3_0 loss3_10 EchoTests layer 2 All EC tests: necan fecan ecandisable AllTests All Tests: noise std10 std25 loss3_0 loss3_10 necan fecan ecandisable NOTE: loss3 includes the loss1 (1020) test, so the above list really is all tests.INSTALLED PARAMETERS Set with the "setparam atme_test" command. format dtmf, mf (default dtmf) digits valid digit string (0-9a-cks*#) cms CMS locking tone (on (default), off) ecandelays list of delays (0 to 99 msec). The default is {3 35 75}RESULT VALUE near_noise, far_noise noise values (dBrnc0), w/o CMS near_noisenotch, far_noisenotch noise values (dBrnc0), w/ CMS near_std10, far_std10 level values (dB), signal to near_std25, far_std25 total distortion level near_loss0_400 loss, measured dB below sent near_loss0_1020 level; tag identifies the

near_loss0_2800 frequency and sending level. near_loss10_400 near_loss10_1020 near_loss10_2800 far_loss0_1020 far_loss0_400 far_loss0_2800 far_loss10_1020 far_loss10_400 far_loss10_2800 near_far_ecd, far_near_ecd echo can disable test level (dB) measured near to far, far to near near_both_ecd, far_both_ecd echo can disable test level (dB), measured with both ECs disabled, measured by the nearend, farend. respectively near_ecanloss, far_ecanloss echo can loss values (dB) in each direction near_ecannoise, far_eccannoise echo can noise values (dBrnc0) in each direction. near_ecanperf10_XX measured level (dB) of echo can near_ecanperf2_XX test at each level (-10dB or +2dB) far_ecanperf10_XX and each delay value "XX"; There far_ecanperf2_XX will be two results generated for each delay stage specified.

©Sage Instruments 2001 43

Sage Command Language

startime start and end of test sequence: endtime value is DSP timetag (millisec)CALL VERIFICATION OPTIONS If a digit string is specified, the ATME commands will outpulse the digits in an attempt to setup the call. ATME as defined in ITU recommendation O.22 lacks any kind of definite callcompletion "edge" such as the Test Progress Tone sent by type 105 responders when they "answer". The ATME commands provide several call verification options that may be set. There is a SCL global variable ATME_callVerifyOptions which is a list of the desired options. It is set using the TCL "set" command, such as: set ATME_callVerifyOptions { wait_verify do_switch } Options appearing in this list are "enabled"; options omitted are "disabled". The available options are: wait_dialtone wait for dialtone before outpulsing digits; this option has no effect if no digit string has been specified via "-digits" or the "digits" installed parameter. This would be used when dial tone is expected, such as dialing into the PSTN from a subscriber type presentation. wait_verify set to do any call verification; if not set, the entire process is skipped (the following options are ignored); It takes about 5 seconds since there's no positive indication of an ATME testline answering; we look for silence as "no news is good news". The wait time is adjusted with parameter ATME_callWaitTime; don't make it shorter than 5 seconds, ever. If you know the responder will be ATME and you don't want to spend the 5 seconds, you can remove wait_verify from the options. isatme ask the director to do the "verify responder is atme"; this causes the director to issue a command that verifies the farend responds to ATME level 1 commands; Will also attempts to confirm if the farend recognizes "Sage Extensions" to ATME (ATME-SE), if/when ATME extensions are defined (TBD Feature). do_switch Try and figure out what type of test line answered, based on CPR results, and issue commands to switch to ATME; this will will only work if the farend equipment is a Sage 950RTS.NOTES ATME is a "call oriented" testing protocol. Each test sequence specified with the "atme" or "showatme" command is terminated with an ATME "End Programme" command; This command tells the responder that testing is complete; for Sage responders this indicates the end of the call, and no further ATME test commands will be recognized. This implies that to perform further testing, a new call must be established. Note that the order in which the 3-Tone loss (power) tests are

44 ©Sage Instruments 2001

Sage Command Language performed is constrained by the ITU Recommendation O.22 so that the 1020Hz test must be conducted first. Thus the order in which the tests are performed (and the results presented) is not controllable, and might be counter intuitive (i.e. not in the obvious order of ascending frequency). Note that presently PSOPH is the only noise filter weighting implemented in ATME. This option is provided for the future addition of CMSG weighting to the Sage 950RTS ATME implementation.EXAMPLES This example shows scripting use of the "atme" command to run transmission tests: #!/u/950rts/bin/scl # make DS0 test connection set port r124 puts "ATME testing on port $port" connect $port # start ATME test and save results in an array hook off set results [atme -digits 1234 loss1_0] hook on The variable "results" would look something like: starttime 467872545 near_loss0_1020 0.0 far_loss0_1020 -0.1 endtime 467875092 but without the line break (i.e. one big string).The following example shows starting an "atme" test interactively to run allavailable tests. For this test, three delay stages are specified (the default, 3ms,35ms and 75ms). CMS locking was ON. scl> connect rb101 scl> setparam atme_test digits 7612569 scl> hook off scl> showatme AllTests ATME Start Command Sent loss0 1020 near: 0.0 far: -0.1 loss0 400 near: 0.1 far: 0.1 loss0 2800 near: 0.1 far: 0.1 loss10 1020 near: -10.0 far: -10.1 loss10 400 near: -10.0 far: -10.0 loss10 2800 near: -10.0 far: -10.0 noiseNotch near: -49.0 far: -48.6 std10 near: 41.0 far: 41.3 std25 near: 38.0 far: 37.7 ecanloss near: -10.0 far: -10.1 far_ecannoise -99.0 far_ecanperf 3 10: 0.0 2: 0.0 far_ecanperf 35 10: 0.0 2: 0.0 far_ecanperf 75 10: 0.0 2: 0.0 near_ecannoise -99.0 near_ecanperf 3 10: 0.0 2: 0.0 far_ecanperf 35 10: 0.0 2: 0.0

©Sage Instruments 2001 45

Sage Command Language

far_ecanperf 75 10: 0.0 2: 0.0 near_ecannoise -99.0 near_ecanperf 3 10: 0.0 2: 0.0 near_ecanperf 35 10: 0.0 2: 0.0 near_ecanperf 75 10: 0.0 2: 0.0

both ecd near: 0.0 far: 0.0To specify 5 delay stages and perform all EC tests to a responder at 2569633: setparam atme_test ecandelays {15 30 45 60 75} atme -digits 2569633 EchoTestsSEE ALSO rotlconnect(SCL)

Generic Test Control Commands

A set of generic test control commands is available for all SCL tests. Testresults are returned from a running test using the report command, andcumulative counters are cleared using the clr command.

The report command has command-line arguments to specify the type andnumber of test results to return. Results are returned as a string consisting ofresult-type/result value pairs. Supplying a list of desired result types willrestrict the results to only those requested.

The stop command stops a running test. The start command restarts a stopped test, or starts a test that has been chosen with the select command. With no arguments, the select command shows the currently chosen test.

Command Summary

clrtest NAMEclrtest - clear results for the currently running testSYNTAXclrtestDESCRIPTIONThe "clrtest" command clears any accumulated measurements in the currently running 950RTS test. Not all 950RTS tests support the "clrtest" command.

Measurements are cleared automatically when a test is stopped and restarted.

RESULT VALUENone.EXAMPLESThe following example shows clearing DS0 BERT test results in aninteractive session.

report NAMEreport - return results report from a running testSYNTAXreport [type1 type2 ... typeN]DESCRIPTION

46 ©Sage Instruments 2001

Sage Command LanguageThe "report" command requests a results report from the test resource. If no"type" argument is given, all measurement types for the test are returned. Seethe manual page for each test to determine the measurements collected forthat test.For interactive use, the "showreport" command provides a continuous displayof results The "report" command returns a list containing type/value pairs.RESULT VALUETest-specific results report.EXAMPLESThe following example shows use of the "report" commandfrom a DS0 BERT test, while running interactively.scl<1> connect r101scl<2> ds0bertscl<3> report elapsed status netcode errs berelapsed 1 status status netcode e3 errs 0 ber <1.79E-05scl<4>

showreport NAMEshowreport - continuously display results report from a running testSYNTAXshowreport [count] [type1 type2 ... typeN]results [count] [type1 type2 ... typeN]DESCRIPTIONThe "showreport" command continuously displays a formatted results report, useful for interactive testing.

The "showreport" command supports customized display of result reports.

The "count" argument is a number indicating how many result reports todisplay. Result reports are requested from the test resource and displayed atapproximately 1 second intervals. Specifying "all" will continously displayreports until the command is interrupted by striking the interrupt key (usuallyDEL, or CTRL-C). If no "type"argument is given, all measurements aredisplayed, unless thedisplay would exceed the line size. If this is the case, adefaultsubset of measurements is displayed. To select the subset displayed,supply the desired measurement types as arguments to the command.

See the manual page for each test to determine the measurements collected forthat test.

The "showreport" command prints the formatted results to standard output,and returns an empty result. The formatted output is also saved to the"showbuffer", and can be retrieved using the "getshow" commmand.

This command replaces the "results" command, which has been retained forbackwards compatibility.

For scripting use, the "report" command provide more succinct resultsreporting.

RESULT VALUENone.EXAMPLES

©Sage Instruments 2001 47

Sage Command Language

The following example shows reporting standard and custom results from aDS0 BERT test, while running interactively. scl<1> connect r101 scl<2> ds0bert scl<3> results elapsed status netcode errs ber 1 sync e3 0 <1.79E-05 2 sync 83 0 <8.93E-06 3 sync 68 0 <5.95E-06 <DEL> interrupted scl<4> report all efs pctefs es pctes ses pctses efs pctefs es pctes ses pctses 6 100.0 0 0.0 0 0.0 7 100.0 0 0.0 0 0.0 8 100.0 0 0.0 0 0.0 9 100.0 0 0.0 0 0.0 <DEL> interrupted

SEE ALSO

start(SCL)

ds0bert(SCL), ds1bert(SCL), mtone(SCL), noise(SCL), rloss(SCL)

exit, quit NAMEexit, quit - terminateSYNTAX exit quitDESCRIPTION The "exit" command stops any running test, tears down the current test connection, and exits SCL, returning the user to the UNIX shell. The "quit" command is synonymous with "exit".RESULT VALUE None.SEE ALSO connect(SCL), disconnect(SCL)

hook NAMEhook - set or query origination hook switch stateSYNTAX

hook on

hook off hook [on|off]DESCRIPTIONThe "hook" command sets the origination hook switch off or on.

48 ©Sage Instruments 2001

Sage Command LanguageWith no arguments, the command returns the current state.

If an error occurs while setting the hook state, a description of the error is returned.RESULT VALUENone, or error message.EXAMPLESThe following example shows setting off-hook, querying status, then going on-hook:Get hook stateWith no arguments, the command returns the current state.If an error occurs while setting the hook state, a description of the error is returned.RESULT VALUENone, or error message.EXAMPLES

The following example shows setting off-hook, querying status, then going on-hook:

scl<1> connect r101 scl<2> hook on scl<3> hook off scl<4> hook off scl<5> hook on scl<6>SEE ALSO sdigits(SCL), callprogress(SCL), connect(SCL), dcs(SCL)Set hook state on

Set hook state off

farhook NAMEfarhook - query termination hook switch stateSYNTAXfarhookDESCRIPTION The "farhook" command queries the termination hook switch state.RESULT VALUEThe result is either on or off.EXAMPLES scl<1> connect r101 scl<2> farhook onSEE ALSO sdigits(SCL), callprogress(SCL), connect(SCL), dcs(SCL), hook(SCL)

raudio NAME

©Sage Instruments 2001 49

Sage Command Language

raudio - setup remote audio monitorSYNTAX raudio raudio connect <port> raudio dial <digits> <format> raudio confirm raudio disconnectDESCRIPTION

The "raudio" command sets up a remote audio monitor, which allows the user to monitor audio signals from a circuit under test. The user can also hear and talk to a person at the farend of the circuit under test, when tests are not running.

Remote audio is setup by allocating an additional connection, after an initialtest connection is made. A call is placed on the remote audio connection tothe user's phone. When the call is complete, a 2-wayaudio connection ("talkmode") is made. When a test is started, the circuit changes to a monitor ("testmode"), and when testing is stopped, it reverts to 2-way audio. At completionof testing, the call is disconnected and the connection released.

The "connect" option of the "raudio" command allocates a circuit for remoteaudio, and connects it to the test resource of the circuit under test ("dialmode") so that the remote audio call can be placed.

The "dial" option places the call to complete the remote audio circuit.

The "confirm" option notifies the system that the call has completed, andswitches the remote audio circuit to "talk mode".

The "disconnect" option terminates the remote audio call and returns theallocated circuit.

With no option, "raudio" returns the current status of the remote audioconnection: either "none", or the port name and mode.

When a SCL test is started, the remote audio circuit changes to "test mode".When a test is stopped, the remote audio circuit switches back to "talkmode".

To switch test circuits while the remote audio call is up, the SCL "disconnect"and "connect" commands are used.INSTALLED PARAMETERS port remote audio DS0 digits dial digits format dial digits formatRESULT VALUE From status query ("raudio" with no arguments): port currently connected remote audio DS0 mode one of: off port allocated, but raudio inactive dial test resource is setup to dial call talk interfaces are looped test test resource is setup for testing

50 ©Sage Instruments 2001

Sage Command Language Or "none", if no remote audio connection is activeEXAMPLES The following example shows setting up a remote audio connection, and displaying status after each step. <scl> connect r101 <scl> raudio none <scl> raudio connect r301 <scl> raudio port r101 mode off <scl> raudio dial 7617255 dtmf (User waits for remote audio call, picks up) <scl> raudio port r101 mode dial <scl> raudio confirm (User can talk to far end) <scl> raudio port r101 mode talk <scl> noise (User hears audio from test) <scl> showreport .... <scl> raudio port r101 mode test <scl> stoptest <scl> raudio port r101 mode talk <scl> disconnect (User starts testing another circuit) <scl> connect r105 <scl> mtone <scl> showreport .... <scl> raudio disconnectSEE ALSO connect(SCL), disconnect(SCL), setparam(SCL) starttest(SCL), stoptest(SCL)

select Get currently selected testselect -- wait for files to come available or satisfy conditionsSyntax ======

select readfileIds [writefileIds] [exceptfileIds] [timeout]Description ===========This command allows an Extended Tcl program to wait for zero or more filesbeing available for reading, writing, have an exceptional condition pending,or for a timeout period to expire. readFileIds, writeFileIds, exceptFileIds are

©Sage Instruments 2001 51

Sage Command Language

each lists of fileIds, as returned from open, to query. An empty list ({}) maybe specified if a category is not used.

The files specified by the readFileIds list are checked to see if data is availablefor reading. The writeFileIds are checked if the specified files are clear forwriting. The exceptFileIds are checked to see if an exceptional condition hasoccurred (typically, an error). The write and exception checking is most usefulon devices, however, the read checking is very useful when communicatingwith multiple processes through pipes. Select considers data pending in thestudio input buffer for read files as being ready for reading. The files do nothave to be unbuffered.timeout is a floating point timeout value, in seconds. If an empty list issupplied (or the parameter is omitted), then no timeout is set. If the value iszero, then the select command functions as a poll of the files, returningimmediately even if none are ready.If the timeout period expires with none of the files becoming ready, then thecommand returns an empty list. Otherwise the command returns a list of threeelements. Each of those elements is a list of the fileIds that are ready in theread, write and exception classes. If none are ready in a class, then thatelement will be the null list. For example:select {file3 file4 file5} {file6 file7} {} 10.5

could return{file3 file4} {file6} {}or perhapsfile3 {} {}SCO OpenServer Release 5.0.6 -- 1 August

selecttest NAMEselecttest - set the current SCL testSYNTAXselecttest [test]DESCRIPTIONThe "selecttest" command sets the current SCL test selection. A subsequent"starttest" command will begin running the currently selected test. The testselection is set automatically when a test command is invoked. Use "help" tosee the list of available test commands.

If the test is valid, an empty result string is returned, otherwise an errormessage is returned.

With no arguments, the "selecttest" command returns the name of thecurrently selected test, or an empty result if there is no test selection.

RESULT VALUESelecting test:None, or error messageRetrieving test info:None, or name of currently selected testEXAMPLESThe following example shows selecting a DS0 BERT test interactively

52 ©Sage Instruments 2001

Sage Command Languageand then starting the test, and then displaying the test selection. scl<1> connect r101 scl<2> select scl<3> scl<4> select ds0bert scl<5> start scl<6> showreport elapsed status netcode errs ber 1 sync 89 0 <1.79E-05 2 sync ac 0 <8.93E-06 3 sync d9 0 <5.95E-06 <DEL> interrupted scl<7> select ds0bert scl<8>SEE ALSO starttest(SCL), connect(SCL) ds0bert(SCL), ds1bert(SCL), mtone(SCL), noise(SCL), rloss(SCL)

starttest NAMEstarttest - start the currently selected SCL testSYNTAXstarttestDESCRIPTIONThe "starttest" command starts running the currently selected 950RTS test onthe current test connection, using the current settings of the installed testparameters. The test connection is set up using the "connect" command.

Usually, a test is started by invoking it by name. Use the "help" command tolist all available SCL tests. Running the test will make it the currentlyselected test. Once selected, the test can be restarted after a "stoptest" byusing the "starttest" command.

Alternatively, a test can be selected using the "selecttest" command, the testparameters can be set using the "setparam" command, and the test can bestarted using the "starttest" command.A running test is stopped using the "stoptest" command, or automaticallywhen SCL exits. SCL supports a single test at a time. Therefore, a "stop"must be issued before a new test can be run.

The SCL boolean variable "testrunning" indicates whether a test is currentlyrunning. Use the "setvar" command to display this variable. Use the"selecttest" command to determine the currently running test.

RESULT VALUENone, or error message.

EXAMPLESThe following example shows starting a DS0 BERT test interactively, stopping, setting parameters, then restarting.

©Sage Instruments 2001 53

Sage Command Language

scl<1> connect r101 scl<2> select ds0bert scl<3> start scl<4> showreport elapsed status netcode errs ber 1 sync 89 0 <1.79E-05 2 sync ac 0 <8.93E-06 3 sync d9 0 <5.95E-06 <DEL> interrupted scl<4> stop scl<5> showparams ds0bert echo off format ds0a pattern 2047

subrate 56kb scl<6> setparam ds0bert pattern 511 scl<7> setparam ds0bert echo on scl<9> setvar testrunning 0 scl<8> start scl<9> setvar testrunning 1 scl<10>SEE ALSO selecttest(SCL), stoptest(SCL), setparam(SCL), setvar(SCL) ds0bert(SCL), ds1bert(SCL), mtone(SCL), noise(SCL), rloss(SCL)

stoptest NAMEstoptest - stop the currently running SCL testSYNTAXstoptestDESCRIPTIONThe "stoptest" command stops the currently running 950RTS test. A test isstarted using a test command, or using "selecttest" followed by the "starttest"command. Use "help" for a list of available tests.

A running test is stopped automatically when SCL exits. Since SCL supportsa single test at a time, a "stoptest" must be issued before a new test can be run.

The SCL boolean variable "testrunning" indicates whether a test is currentlyrunning. Use the "setvar" command to display this variable. Use the"selecttest" command to determine the currently running test.RESULT VALUE None.EXAMPLES The following example shows starting and stopping a DS0 BERT test interactively. scl<1> connect r101 scl<2> ds0bert

54 ©Sage Instruments 2001

Sage Command Language scl<3> showreport elapsed status netcode errs ber 1 sync 89 0 <1.79E-05 2 sync ac 0 <8.93E-06 3 sync d9 0 <5.95E-06 <DEL> interrupted scl<4> setvar testrunning 1 scl<5> stop scl<6> setvar testrunning 0 scl<7> start scl<8> setvar testrunning 1 scl<9> select ds0bert scl<10>SEE ALSO starttest(SCL), setvar(SCL), connect(SCL)

trace NAMEtrace - print SCL commands to standard outputSYNTAX trace on | offDESCRIPTION The "trace" command provides the ability to turn on SCL command tracing. It is intended use in debugging scripts.RESULT VALUE None.SEE ALSO update(SCL)

update NAMEupdate - respond to 950RTS daemon processesSYNTAXupdateDESCRIPTION

The "update" command responds to queries from the 950RTS managerprocesses. The update occurs automatically whenever a SCL command isinvoked. Explicit invocation is only needed when a script spends more than15 minutes executing non-SCL TCL commands (e.g. lengthy text processing).

If SCL process does not respond to the 950RTS resource managers within thetimeout period (currently 15 minutes), the managers assume the process hasdied, and they will release the test resource and circuit used by the process.INSTALLED PARAMETERSNone.EXAMPLES

©Sage Instruments 2001 55

Sage Command Language

This example demonstrates use of "update" in a script: #!/u/950rts/bin/scl # make test connection scl_connect r101 # long loop processing a text file set file [open "trunkfile" r] while {[eof $file] == 0} { set line [gets $file] puts $line # notify the 950RTS managers of our continued existence scl_update }RESULT VALUE None.SEE ALSOSee also undocumented(M): man M undocumented

BERT Test Control Commands

The following commands are available only while DS-0 BERT and DS-1 BERT tests are running.

Command Summary

ds0inject [type] NAMEds0inject - inject errors during DS0 BERT testingSYNTAXds0inject <type>DESCRIPTIONThe "ds0inject" command injects errors into a running DS0 BERT test. Use the "ds0bert" command to start the test.

The error type is configurable via the installed "injectttype" parameter, or by command-line.

When the command succeeds, an empty result is returned, otherwise a description of the error is returned.

INSTALLED PARAMETERSinjecttype type of error injection bit, 6bit RESULT VALUENone, or error messageEXAMPLESThe following example shows starting a DS0 BERT test and injecting 2 biterrors, followed by 6 bit errors: scl<1> connect r101 scl<2> ds0bert

56 ©Sage Instruments 2001

Sage Command Language scl<3> ds0inject; ds0inject scl<4> showreport elapsed status netcode errs ber 7 sync 2f 2 5.10E-06 8 sync c8 2 4.46E-06 <DEL> interrupted scl<5> ds0inject 6bit scl<6> report elapsed status errs elapsed 12 status sync errs 8 scl<5> showparams ds0inject injecttype 6bit

scl<6>SEE ALSO ds0bert(SCL), ds0loop(SCL) report(SCL), showreport(SCL), showparams(SCL)

ds0code [type]

ds0loop NAMEds0loop - loopback control during DS0 BERT testingSYNTAXds0loop up|down [<type> [-unit #]]DESCRIPTIONThe "ds0loop" command sends loopup or loopdown codes during a "ds0bert" test.

The loop type is configurable via the installed "loopcode"parameter, or by command-line argument. The unit or repeater number can be set using the "unit" installed parameter or command line option.

If the command succeeds, an empty result is returned, otherwise a description of the error is returned.

INSTALLED PARAMETERSloopcode type of loop csualt, dsualt, hl96alt, ocualt, ocun96alt, csulat, ds0dplat, hl222lat, oculat, first56alt, secnd56alt unit number of unit or repeaterRESULT VALUENone, or error message.EXAMPLESThe following example shows starting a DS0 BERT test then initiating a CSUlatching loopback, and then tearing it down: scl<1> connect r101 scl<2> ds0bert scl<3> showreport elapsed status elapsed status 2 nosync

©Sage Instruments 2001 57

Sage Command Language

3 nosync <DEL> interrupted scl<4> ds0loop up csulat scl<5> showreport elapsed status netcode errs ber 10 sync 2f 0 5.10E-06 11 sync c8 0 4.46E-06 <DEL> interrupted scl<6> ds0loop down scl<7> showparams ds0loop loopcode csulat unit 0 scl<8>SEE ALSO ds0bert(SCL), ds0loop(SCL) showreport(SCL), report(SCL), showparams(SCL)

ds0loop on [type]

Send loopup during DS0 BERT

ds0loop off Send loopdown during DS0 BERT

ds1monitor NAMEds1monitor - run DS1 line monitor test

SYNTAXds1monitorDESCRIPTION

The "ds1monitor" command monitors a DS1 circuit, collecting T1 line errors.The current connection must be a DS1 -- either a direct connection, or a DCSFAD.

When the test is started successfully, an empty result string is returned,otherwise a description of the error is returned.

Once the test is running, it is controlled using the standard SCL test controlsand reporting commands: "stoptest", "starttest", "clrtest", "report", and"showreport".

A running test is stopped using the "stoptest" command, or automaticallywhen SCL exits. SCL supports a single test at a time. Therefore, a "stop"must be issued before a new test can be run.INSTALLED PARAMETERS None.RESULT VALUE Starting test:

58 ©Sage Instruments 2001

Sage Command Language None, or error message Full results report: elapsed test time (seconds) t1err T1 error type t1ebits summary T1 error bits nopcm boolean no PCM indicator frmloss boolean frame loss indicator frmcrc boolean frame or CRC error indicator bpvdetect boolean BPV detection indictor excess0s boolean excess zeroes indicator alarms boolean alarm indicator b8zs boolean B8ZS detect indicator fslipdetect boolean frame slip indicator bpv BPV counter frm frame error counter crc CRC error counter oof out-of-frame counter bslip bit slip counter fslip frame slip counter Subset results (showreport): elapsed t1err frm crc bpv excess0s b8zsEXAMPLES The following example shows setting up a DS1 circuit for testing, then starting a DS1 monitor test. scl<1> connect t1 scl<2> intfc setup sf ami scl<3> ds1monitor scl<4> showreport elapsed t1err frm crc bpv excess0s b8zs 1 frmloss 226 67 0 off off 3 frmloss 2478 729 0 off off 4 frmloss 3603 1060 0 off off 5 frmloss 4729 1391 0 off off <DEL> interrupted scl<5>SEE ALSO ds1bert(SCL), intfc(SCL), dcs(SCL) selecttest(SCL), starttest(SCL), stoptest(SCL), clrtest(SCL), report(SCL)

ds1inject [type] NAMEds1inject - inject errors during DS1 BERT testingSYNTAXds1inject [type [count]]DESCRIPTIONThe "ds1inject" command injects errors into a running DS1 BERT test. Usethe "ds1bert" command to start the test.

©Sage Instruments 2001 59

Sage Command Language

The error type and count are configurable via the installed parameters or bycommand-line.

When the command succeeds, an empty result is returned, otherwise adescription of the error is returned.

INSTALLED PARAMETERS injecttype type of error injection bit, bpv, frame, crc injcount number of errors to injectRESULT VALUENone, or error message.EXAMPLES The following example shows starting a DS1 BERT test and injecting 2 bit errors, followed by 10 frame errors: scl<1> connect r101 scl<2> intfc setup sf ami scl<3> ds1bert scl<4> ds1inject; ds1inject scl<5> showreport elapsed status netcode errs ber 7 sync 2f 2 5.10E-06 8 sync c8 2 4.46E-06 <DEL> interrupted scl<6> ds1inject frame 5 scl<7> report elapsed status errs frm elapsed status errs frm elapsed status errs frm 12 sync 2 5 scl<8> showparams ds1inject injecttype frm injcount 5 scl<9> ds1inject scl<10> !report elapsed status errs frm 12 sync 2 10 scl<11>SEE ALSO ds1bert(SCL), ds1loop(SCL), ds1monitor(SCL) showreport(SCL), report(SCL), showparams(SCL)

ds1loop [type] NAMEds1loop - loopback control during DS1 BERT testingSYNTAXds1loop up|down [<type> [<user-code>]]DESCRIPTION

60 ©Sage Instruments 2001

Sage Command LanguageThe "ds1loop" command sends loopup or loopdown codes during a "ds1bert"test. If the command succeeds, an empty result is returned, otherwise adescription of the error is returned.

The loop type is configurable via installed parameter, or by command-lineargument. A user-defined loopback code can be used by setting the loop typeto "user", and setting the code in the "uloop" installed parameter or on thecommand-line.INSTALLED PARAMETERS t1loop type of loop (csu, fac1, fac2, user) uloop user loop code (3 to 7 binary digits)RESULT VALUE None, or error code.EXAMPLES The following example shows starting a DS1 BERT test then initiating a CSU loopback, and then tearing it down: scl<1> connect t1 scl<2> ds1bert scl<3> showreport elapsed status elapsed status 2 nosync 3 nosync <DEL> interrupted scl<4> ds1loop up csu scl<5> showreport elapsed status netcode errs ber 10 sync 2f 0 5.10E-06 11 sync c8 0 4.46E-06 <DEL> interrupted scl<6> ds1loop down scl<7> showparams ds1loop t1loop csu uloop 0 scl<8>SEE ALSO ds1bert(SCL), ds1inject(SCL) report(SCL), showreport(SCL), showparams(SCL)

ds1loop on [type]

Send loopup during DS1 BERT

ds1loop off Send loopdown during DS1 BERT

©Sage Instruments 2001 61

Sage Command Language

BERT Test Control Commands Parameters

The loop, netcode, and error inject types are installed parameters, which may be overriden by either a positional or flag parameter. The parameters used with the BERT test control commands are:

The BERT test parameter names used by SCL are the same set used in berttest, both for command-line options, and in the .bertconfigs file.

GR-822 Test Line CommandsThis section provides details about using SCL commands for testing on GR-822 test lines, including test line types:

• Type 100 Quiet Termination• Type 102 Milliwatt Tone• Type 105 Responder• Type 108 DS-0 Loop Back

NOTE Commands used for type 105E (extended 105) test lines are listed separately in the GR-822 Test Line Commands for 105E Test Lines section.

NOTE More information about using the Sage Command Language (SCL) is avaialable on-line at http://www.sageinst.com/scl/index.html

rotlconnect Use the rotlconnect command with 100, 102, 105, and 108 test lines.

rotlconnect - connect to a responder

SYNTAX: rotlconnect <digits> <format>

DESCRIPTION: This command will call a responder and wait for its Test Progress Tone, TPT. Before looking for TPT, the passed digits will be outpulsed.

INSTALLED PARAMETERS:

digits: valid digit string (0-9a-cks*#)

format: dtmf or mf

Command Parameter Default Description

ds0inject injecttype 1bit Type of error injection

ds0loop loopcode csualt Loopback code

ds0code netcode cmi Transmitted network code

ds1inject injecttype 1bit Type of error injection

ds1loop loopcode csu Loopback code

62 ©Sage Instruments 2001

Sage Command LanguageRESULT VALUE: If successful, the command will return the time it took to see TPT after outpulsing the last digit; otherwise it will return the error for the call incompletion.

EXAMPLES:

scl<1> rotlconnect 1234 dtmf 8.6

SEE ALSO:

hook, callprogress, connect

rotlloss Use the rotlloss command with 102 and 105 test lines.

rotlloss - perform a loss test

SYNTAX: rotlloss

DESCRIPTION: This command performs a loss test.

RESULT VALUE: The command will return tags and values for both near and far loss measurements. The results are expressed as dBm where a positive value represents loss, and a negative value represents gain.

EXAMPLES: scl<1> rotlloss near_1004 -1.1 far_1004 -6.9

rotlnoise Use the rotlnoise command with 100, 102, and 105 test lines.

rotlnoise - perform a 105 noise test.

SYNTAX: rotlnoise <type>

DESCRIPTION: This command performs a 105 noise test of the specified type.

INSTALLED PARAMETERS: type, cmsg, cnotch, snr, or 3kflat

RESULT VALUE: The command will return tags and values for both near and far noise measurements.

EXAMPLES: scl<1> rotlnoise cmsg near 23 far 20 scl<2> rotlnoise cnotch near 33 far 41 scl<3> rotlnoise snr near 31 far 30 scl<4> rotlnoise 3kflat near 29 far 24

rotlgain rotlgain - perform an extended 105 gain slope test.

©Sage Instruments 2001 63

Sage Command Language

SYNTAX: rotlgain

DESCRIPTION: This command performs 105 gain slope test, which is a set of three loss tests at three frequencies: 404, 1004, and 2804 Hz.

RESULT VALUE: The command will return tags and values for both near and far loss measurements at the three frequencies.

EXAMPLE: scl<1> rotlgain near_404 1.7 far_404 -4.0 near_1004 -1.1 far_1004 -6.9 near_2804 -3.4 far_2804 5.1

rotlrloss Use the rotlrloss command with type 105 test lines.

rotlrloss - perform a 105 return loss test.

SYNTAX: rotlrloss type

DESCRIPTION: This command performs a 105 return loss test of the specified type. The supported types are erl, srl, and srh for echo return loss, singing return loss low, and singing return loss high, respectively.

INSTALLED PARAMETERS: type, erl, srl, srh

RESULT VALUE: The command will return tags and values for both near and far return loss measurements.

EXAMPLES: scl<1> rotlrloss erl near 7 far 14 scl<1> rotlrloss srl near 7 far 19 scl<1> rotlrloss srh near 7 far 25

tl108connect NAMEtl108connect - connect to a type 108 (loopback) test lineSYNTAXtl108connect <digits> <format>DESCRIPTION

This command is used to connect to a type 108 (loopback) testline.Afterdigits, if any specified, are output, a tone at 2225hz (TPT) isgenerated; whenthe call completes and connects to a 108 testline, the generated tone loopedback is detected and the command returns call completion time; If thegenerated tone is not detected an appropriate error message is returned.

INSTALLED PARAMETERS digits valid digit string (0-9abcks*#) format dtmf or mf: timeout seconds to wait for tone detection (1 to 300, default 60)

64 ©Sage Instruments 2001

Sage Command LanguageRESULT VALUE If successful, the command will return the time from when the last digit was outpulsed and the the generated 2225hz tone was detected. If the tone (TPT) is not detected an error is returned indicating the the cause for failure. See Examples.EXAMPLES Call Completes: scl<1> tl108connect 2345678 dtmf 8.6 Call Fails: scl<1> tl108connect 2345678 dtmf Call failed: TPT NOT DETECTED Line Stat: Dead LineIn the second example, "TPT" refers to the 2225hz tone generated that weexpect to detect looped back. The call failed to connect to a loopback testline.As with the rotlconnect (SCL) command,The call failure message indicate indicate what was detected.For example if the call fails for BUSY you would see: scl<1> tl108connect 2345678 dtmf Call failed: TPT NOT DETECTED Line Stat: BusySEE ALSO hook(SCL), callprogress(SCL), connect(SCL), rotlconnect(SCL)

GR-822 Test Line Commands for 105E Test LinesThe commands in this section are used only with the extended type 105 test line, type 105E.

rotlatd rotlatd - perform an extended 105 attenuation-distortion test.

SYNTAX: rotlatd

DESCRIPTION: This command performs an extended 105 attenuation-distortion test (e.g. frequency sweep), which is a set of 16 tests at the following frequencies:

RESULT VALUE: The command will return tags and values for both near and far loss measurements at the 16 frequencies.

EXAMPLES:scl<1> rotlatdnear_304 14.6 far_304 7.3 near_404 12.3 far_404 6.4 near_504 11.1 far_504 5.7 near_604 10.5 far_604 5.6 near_804 10.0 far_804 5.4

• 304 • 404 • 504 • 604 • 804

• 1004 • 1404 • 1804

• 2204 • 2404 • 2504 • 2604 • 2704

• 2804 • 3004 • 3204

©Sage Instruments 2001 65

Sage Command Language

near_1004 10.6 far_1004 4.3 near_1404 11.1 far_1404 6.1 near_1804 12.4 far_1804 6.7 near_2204 12.8 far_2204 8.2 near_2404 13.1 far_2404 8.8 near_2505 13.1 far_2504 9.4 near_2604 13.0 far_2604 10.1 near_2704 13.3 far_2704 10.8 near_2804 13.5 far_2804 11.4 near_3004 13.2 far_3004 12.5 near_3204 13.3 far_3204 14.2

rotlimd rotlimd - perform an extended 105 intermodulation distortion test

SYNTAX: rotlimd

DESCRIPTION: This command performs an extended 105 intermodulation distortion test.

RESULT VALUE: The command will return tags and values for both near and far measurements.

EXAMPLES: scl<1> rotlimd near_2nd 70 near_3rd 70 far_2nd 44 far_3rd 54

rotlimp rotlimp - perform an extended 105 impulse noise test

SYNTAX: rotlimp

DESCRIPTION: This command performs an extended 105 impulse noise test.

RESULT VALUE: The command will return tags and values for both near and far measurements.

EXAMPLES: scl<1> rotlimpnear_low 0.0 near_mid 0.0 near_high 0.0 near_phs 0 near_gain 0 far_drop 0far_low 0.0 far_mid 0.0 far_high 0.0 far_phs 0 far_gain 0 far_drop 0

rotljit rotljit - perform an extended 105 jitter test

SYNTAX: rotljit [type]

DESCRIPTION: This command performs an extended 105 jitter test. The supported types are hi and lo.

RESULT VALUE: The command will return tags and values for both near and far measurements phase and amplitude jitter.

EXAMPLES: scl<1> rotljit hi near_phas 5.0 near_amp 7.3 far_phas 4.3 far_amp 4.9

scl<1> rotljit lo near_phas 5.0 near_amp 7.3 far_phas 4.3 far_amp 4.9

66 ©Sage Instruments 2001

Sage Command Languagerotlpar rotlpar - perform an extended 105 Peak-to-Average Ratio test.

SYNTAX: rotlpar

DESCRIPTION: This command performs an extended 105 Peak-to-Average Ration test.

RESULT VALUE: The command will return tags and values for both near and far measurements.

EXAMPLES: scl<1> rotlpar near 90 far 57

Miscellaneous Control Commands

Control commands are available to manage switched circuit dialing, control digital-cross connects, configure T1 interfaces, and handle other telephony functions.

DCS Control Commands

NAMEdcs - control digital cross-connect

Command Summary

SYNTAXdcsdcs connect [name]dcs disconnectdcs monitor <ds3> <ds1> <ds0> [tap]dcs [split|release|tapstat [tap]]dcs side [equip|facility]

DESCRIPTION

The "dcs" command provides the ability to connect to a digital cross-connectsystem (DCS), to monitor, split, or release the cross-connected circuit, and toswitch testing between equipment and facility directions. The DCS must beconfigured in the 950RTS DCS map file, and the DCS test ports must berepresented as TAPs or FADs in the 950RTS interface database.

With no arguments, the "dcs" command returns the status of the currentDCSconnection, or "none" if no connection hasbeen made.

The "connect" option is used to establish a connection to the 950RTS DCSmanager process for the desired DCS. The DCS name is determined from theinterface database, based on the DCS TAP or FAD selected with the "connect"command. The "disconnect" option will close the connection to the DCSmanager.

When a "connect" is performed on a DCS test port, the 950RTS interfacemanager assigns a test access path (TAP). The TAP identifier is usedinternally for subsequent commands.

It is also possible to override the TAP on the command line.

©Sage Instruments 2001 67

Sage Command Language

The "monitor", "split", and "release" options manage the currently allocated(or explicitly specified) TAP. The cross-connected circuit to test is specifiedto the "monitor" command as three circuit identifiers, representing the DS3,DS1, and DS0. Zero is substituted for any unused parameter; for example, theDS0 value would be 0 for DS1 testing, and the DS3 value would be zero on a1/1 or 1/0 DCS. DCS's with unusual circuit representations may requiredifferent conventions for specifying the circuit to test.

The current status of the circuit under test is obtained using the "tapstat"option.

The "side" option allows setting the direction of testing --to the forward("equip"), or reverse ("facility") directions. With no arguments, this optionreturns the current test direction.RESULT VALUE Retrieving dcs info: name configured name of DCS type configured type of DCS Retrieving tap status: status of circuit under test (monitor, split, release) Retrieving dcs side info: direction of testing (equip, facility) Control options: None, or error messageEXAMPLES The following example shows connecting to a DCS circuit, setting test direction, and running a DS0 BERT test. scl<1> connect dcsClearTap scl<2> dcs connect scl<3> dcs name dcs1 type hadax scl<4> dcs tapstat name 1-16-1 status release scl<5> dcs monitor 1 1 1 scl<6> ds0bert scl<7> showreport elapsed status netcode errs ber 1 sync 89 0 <1.79E-05 2 sync ac 0 <8.93E-06 3 sync d9 0 <5.95E-06 <DEL> interrupted scl<5> dcs split scl<6> ds0bert scl<7> showreport elapsed status netcode errs ber 1 sync 89 0 <1.79E-05 2 sync ac 0 <8.93E-06 <DEL> interrupted scl<8> dcs side

68 ©Sage Instruments 2001

Sage Command Language equip scl<9> dcs side facility scl<10> ds0bert scl<11> showreport elapsed status netcode errs ber 1 sync 89 0 <1.79E-05 2 sync ac 0 <8.93E-06 <DEL> interrupted scl<12> stop scl<13> dcs release scl<14> dcs disconnect scl<15>SEE ALSO connect(SCL), ds0bert(SCL), showreport(SCL), stoptest(SCL)

dcs splitSplit DCS circuit

dcs monitorMonitor DCS circuit

dcs releaseRelease DCS circuit

nap msec NAMEnap - suspend execution for short intervalSYNTAXnap <msec>DESCRIPTION

The "nap" command suspends the SCL process for approximately the number of milliseconds specified on the command line.

This command is intended for scripting usage.

INSTALLED PARAMETERSNone.

RESULT VALUE None.SEE ALSO sleep command in expect(1), update(SCL)

intfc NAMEintfc - configure and show status of DS1 interfaceSYNTAXintfc [setup <framing> <coding> <clock>]intfc [setup [-framing <f> -coding <c> -clock <cl>]]

©Sage Instruments 2001 69

Sage Command Language

DESCRIPTION

The "intfc" command will setup the framing and coding on the currentlyconnected circuit. The current connection must be a DS1 -- either a directconnection, or a DCS FAD.

The "framing" and "coding" parameters are loaded from the installed parameters, or from command-line positional parameters.

With no arguments, the "intfc" command will return the current T1 configuration. as type/value pairs.

If the setup is successful, an empty result is returned, otherwise a description of the error is returned.

NOTE: This command is invoked implicitly by the "ds1bert" command, if the ds1bert "intfc" parameter is set to "true".INSTALLED PARAMETERS framing line framing (none, esf, sf) coding line coding (ami, b8zs, b7stuff) clock clock source (internal, looptime)RESULT VALUE Setup: None, or error message. Status query: framing coding monitor length imped clock idlecodeEXAMPLES The following example shows setting up a DS1 circuit for testing, then starting an interactive DS1 BERT test. scl<1> connect t1 scl<2> intfc setup sf ami scl<3> intfc framing sf coding ami monitor none length 0-133 imped 100ohm clock looptime autob8 off idlecode 7f scl<4>SEE ALSO ds1bert(SCL), dcs(SCL) setparam(SCL)

intfc framing codingSet T1 interface config (DTI only)

sdigits digits NAMEsdigits - send DTMF or MF digitsSYNTAXsdigits <digits> <format>DESCRIPTION

The "sdigits" command outpulses DTMF or MF digits over a test connection.The current connection must be a DS0 -- either a direct connection, or a DCSTAP.

70 ©Sage Instruments 2001

Sage Command LanguageThe digit format and digits are set via command-line.

The required arguments are: format dtmf, mf digits valid digit string (0-9a-cks*#)

When the digits are succesfully sent, an empty result is returned, otherwise adescription of the error is returned.RESULT VALUE None, or error message.EXAMPLES The following example shows sending a tone, turning it off, and querying the tone sender status: scl<1> connect r101 scl<2> hook off scl<3> sdigits 12354 dtmf scl<5>SEE ALSO hook(SCL), callprogress(SCL), connect(SCL), dcs(SCL)

Test Resources SCL provides commands to obtain status from and provide some independent control of test resources. There are currently two test resource commands: dsp and dti.

Command Summary

dspIdentify currently allocated DSP

dsp versionShow DSP software version

dsp history brd dspShow DSP command/results log

dtiIdentify currently allocated DTI

dti versionShow DTI software version

dti history brd vdpShow DTI command/results log

dti debugDump the DTI board putc buffer

Other dti commands, for development use only, are described in the help message.

©Sage Instruments 2001 71

Sage Command Language

Interactive UsageSCL appears similar in function to the standard UNIX command interpreters -the "shells." When SCL is invoked interactively, it displays a prompt, reads aline of input and executes the command. Typing the quit (or exit) commandwill terminate SCL and return the user to the UNIX prompt.

SCL will interpret any TCL, Expect, or SCL command. SCL also caninterpret UNIX commands -- TCL provides a mechanism for executing aUNIX program in a subprocess, using the exec command, and this isperformed automatically during interactive use. Additionally, duringinteractive use, commands can be abbreviated -- the shortest unique stringmatching the command may be used.

Like the UNIX shells, a "command history" feature is available. The historycommand will show previous commands.Typing !! will repeat the previouscommand, and typing !5 will repeat the 5th command in the history. Thishistory feature is standard in TCL and is similar in style to the UNIX cshell.

The help command lists available commands with a brief description.Individual help messages for each command show the options that aresupported and how to invoke them.

Command Summary

helpShow summary help message

help [command] help -- provide lists of all available help subjects and pagesSyntaxhelp help subject help subject/helppage help help | ?DESCRIPTION

Help, without arguments, lists all of the help subjects and pages under thecurrent help subject.

With the subject argument, help displays all of the help pages and lower levelsubjects (if any exist) under the specified subject.

With the subject/helpppage argument, help displays the specified help page.The help output is passed through a simple pager if output exceeds 23 lines,pausing while waiting for a return to be entered. If any other character isentered, the output is terminated.

The help help syntax displays help on the help facility at any directory level.

quit

Shutdown test session and exit SCL

Example A sample session of using the 940/945RTS tone sender interactively using SCL: % scl scl<1> help

72 ©Sage Instruments 2001

Sage Command Language

(full help text here -- see attached command summary)

scl<2> help stone

stone Return sender status stone on <freq> <level> Turn on tone sender stone off Turn off tone sender

scl<3> connect rb101 scl<4> stone on 400 -16

(other activity here)

scl<5> stone off scl<6> stone on 200 -16 scl<7> !5 scl<8> quit

Scripting UsageSCL commands can be collected in a file for execution at a later time. One difference from interactive use is that all Sage commands must be prefixed with scl_, to distinguish them from the general-purpose commands.

A sample SCL script file, which prints out the version numbers of the 940/945RTS test resources is: # resversion.scl - example of using SCL to print out # software versions of test resource embedded code

scl_dsp version scl_dti version

After this script is saved in the file, resversion.scl, it is executed by typing: scl resversion.scl

As with other UNIX scripts, SCL will be invoked implicitly by the UNIX shell, if the pathname of the SCL interpreter is included as the first line of the script file (follwing the characters #! ).

Alternatively, an SCL file can be executed from an interactive SCL session using the TCL source command: % scl scl<1> source resversion.scl

A more elaborate version of this script could format the output, and perhaps check the versions for compatibility: #!/u/940/945RTS/bin/scl ############################################################### # resversion.scl - example of using SCL to print out # software versions of test resource embedded code ###############################################################

# obtain versions from the test resources

©Sage Instruments 2001 73

Sage Command Language

set dspver [scl_dsp version] set dtiver [scl_dti version]

# test for correct version of DTI embedded code

if {$dtiver < 4} { puts "DTI version mismatch: $dtiver" exit }

# format and print

puts "940/945RTS Test Resources:" puts " DSP version $dspver" puts " DTI version $dtiver"

Formatting Test Results for ReportsThis section provides an example of formatting test output using SCL commands. Test results can be formatted for easy viewing on screen or paper, or output to a file.

You can use SCL commands to format test results in a variety of ways, for example:

• display data and field names• display far data only• write results to a file• combine resutlts from multiple tests

Examples #An example of formatted output from scl.

#Here is a basic example of a rotlnoise test.

scl_connect rb101; #Connect to my DS0 resource

scl_hook off; #Go offhook.

scl_rotlconnect 7616338 dtmf; #Dial responder at 7616338 as DTMF# digits.

set result [scl_rotlnoise]; #Execute rotl noise. Put result in result# variable.

puts $result; #Output results of noise test to screen.Output resembles the# following:

0 1 2 3near 34.9 far 35.0

Displaying Data Only

There are several ways to output just the data as comma-delimited text, and not including field names. (CSU)

In SCL, all strings are lists which are space-delimited by default.

74 ©Sage Instruments 2001

Sage Command Language#A simple "for loop." set output ""; #Create a blank output string.

set ItemCount [llength $result]; #get the number of items in our list.

#Scl begins counting with 0 so 'near' is the 0th element in the list, and 34.9 is# the 1st element. The example skips the labels by incrementing the counter# by 2 each time. for {set i 1} {$i < $ItemCount } {inr i 2} {

append output [lindex $result $i]

if {$i < $ItemCount} { #If there are items left, add a comma. append output ",";

}

}

puts $output

Now output is the following: 34.9,35.0

Formatting the Number of Digits

To format the number of digits, modify the append line.append output [format "%06.2f" [lindex $result $i]]

Result look like the following: 034.90, 035.00

Combine Results From Multiple Tests

To output the results from several rotl tests all in one big line, a simple method is appending the results from all of the rotl tests together, then running the "for loop" to generate output.

Another method with more flexibility is to take advantage of assosciative arrays. An assosciative array indexes your array by names rather than numbers. For the purposes of SCL, all arrays are really associative arrays and are created dynamically. Here is a short program that takes advantage of them.

connect rb101; #Connect to DS0 resource.

hook off; #Go offhook.

rotlconnect 7616338 dtmf; #Dial responder and connect.

set testlist "rloss gain noise atd"; #List of tests to run.

for {set i 0} {$i < [llength $testlist]} {incr i} { #Go through# tests.

set test [lindex $testlist $i]; #Name of test.

set cmd "scl_rotl$test"; #Generate command name.

set cmd "set result \[$cmd\]"; #Make a command set result.

eval $cmd; #Run string as a command.

©Sage Instruments 2001 75

Sage Command Language

#Now the result of the test is in the variable 'result'. Next, build the# assosciative array.

for {set j 0} {$j < [llength $result]} {incr j 2} { #Go through

results. set k [expr j + 1]; #K=J+1

set fieldname [lindex $result $i]; #Get field name from result.

#Now we generate an assosciative array item. For the first field in rloss, 'near',# the value is 40. Create a variable named Output(rloss.near) and set its value. set Output($test.$fieldname) [lindex $result $k];

}

}

The result allows you to format data any way you want without having to line up positional data between tests and results. You can test in any order and output the results as desired.

Specifying Far or Near Results Only

This example displays only farend data.puts "$Output(rloss.far),$Output(gain.far),$Output(noise.far)"

If you were running tests to a series of lines, by using assosciative arrays, you can also very easily create minimum, maximum, and mean variations for each measurement.

Outputting to a File

This example shows outputting to a file.

if [catch {open "myfile.dat" "w"} myfile] {

puts "My file failed to open for reason: $myfile"

}

Catch is a wrapper around commands activates if the command fails for any reason. If the command fails, the reason is written to the variable 'myfile'. If the command is successful, the result of the command (in this case, the file handle) is put in the variable. Now you can output to the file with the puts statement.puts $myfile "I'm writing to my file."

When you're done with a file, close it as follows:

close $myfile

76 ©Sage Instruments 2001

Sage Command Language

Test Parameters and Result Types

ds0bert

Parameter Default Description

pattern 511 BERT pattern

format ds0a data format

subrate 56kb DS0A data subrate

blkcorrect off DS0A block correction enabled

echo off echo canceller state

Result Description

elapsed duration of test, in seconds

status test status

errs bit error count

ber bit error rate

sls sync loss seconds

efs error free seconds

pctefs percent error free seconds

es errored seconds

pctes percent errored seconds

ses severely errored seconds

pctses percent ses

fail failed seconds

pctfail percent failed seconds

avail available seconds

pctavl percent available seconds

unavl unavailable seconds

pctunvl percent unavailable seconds

data PCM sample

©Sage Instruments 2001 77

Sage Command Language

ds1bert

netcode received network code, or PCM sample

Result Description

Parameter Default Description

pattern 511 BERT pattern

Result Description

elapsed duration of test, in seconds

status test status

errs bit error count

ber bit error rate

sls sync loss seconds

efs error free seconds

pctefs percent error free seconds

es errored seconds

pctes percent errored seconds

ses severely errored seconds

pctses percent ses

fail failed seconds

pctfail percent failed seconds

avail available seconds

pctavl percent available seconds

unavl unavailable seconds

pctunvl percent unavailable seconds

bpv bipolar violations

frm frame errors

crc CRC errors

oof out-of-frame

bslip bit slips

fslip frame slips

78 ©Sage Instruments 2001

Sage Command Languagemtone

noise

Returns noise measurement in dB

rloss

SCL Commands List by CategoryThis section lists the available Sage Command Language commands grouped in categories. Within each category, commands are listed alphabetically.

NOTE For more information about Sage Command Language (SCL), including "man pages," visit http://www.sageinst.com/scl/index.html

Connection Setup

• connect • dcs • disconnect • exit • farhook • hook • intfc

Result Description

freq frequency, in Hz

level level, in dBm

Parameter Default Description

type C-notch Noise measurement type

Parameter Default Description

type erl Return loss measurement type

Result Description

erl Echo return loss, in dBrnC

srl Singing return loss, in dBrnC

snr Signal/noise ratio, in dB

3kflat 3 kHz flat noise, in dBrn

©Sage Instruments 2001 79

Sage Command Language

• raudio • sdigits • vfloop

VF and Data Tests

• 23tones • absdelay • callprogress • echocan • edd • imd • impnoise • imtont • jitter • mtone • noise • par • rloss • stone • atme• smos• pvit• echosnd

BERT and DS1 Tests

• ds0bert • ds0inject • ds0loop • ds1bert • ds1inject • ds1loop • ds1monitor

Test Control and Reporting

• clrtest • report • selecttest • showreport • starttest • stoptest

Responder Testing

• atme • rotlconnect • rotlatd

80 ©Sage Instruments 2001

Sage Command Language• rotlgain • rotlimd • rotlimp • rotljit • rotlloss • rotlnoise • rotlpar • rotlrloss

Parameter and Variable Handling

• defparam • setparam • setvar • showparams • showvar

Scripting • nap • trace • update • sleep

References

BooksTcl and the Tk Toolkit, John Ousterhout, Addison-Wesley, 1994

This is the definitive book describing TCL and the Tk graphical extension, written by the developer.

Exploring Expect, Don Libes, O'Reilly & Associates, 1995

This is the definitive book that fully describes the expect extension to TCL, written by the developer.

World-Wide Web and Internet ResourcesTCL World-Wide Web Information

http://www.sco.com/Technology/tcl/

The World-Wide Web Virtual Library: Tcl and Tk

http://cuiwww.unige.ch/eao/www/TclTk.html

The Expect Home Page

http://expect.nist.gov/

Sage Command Language (SCL)For more information about Sage Command Language (SCL):

©Sage Instruments 2001 81

Sage Command Language

• http://www.sageinst.com/scl/index.html

82 ©Sage Instruments 2001