# Interactive test program: ctatest

ctatest is a menu-driven interactive program. Enter one- and two-letter commands to execute Natural Access and ADI service functions. Some commands prompt the user for additional input. For example, running a tone generator requires the user to specify frequencies and amplitudes. For more information about ctatest, refer to the Natural Access Developer's Reference Manual.

ctatest can execute more than one asynchronous function concurrently. For example, you can run a tone detector (ET) and record voice (RF) simultaneously. You can abort any function by entering the respective stop command (DT and RS for tone and record).

If Clocking.HBus.ClockMode = STANDALONE, then default local connections between the DSP resources and the line interfaces are nailed up as described in Default connections.

Keep in mind that there are two naming conventions for the streams on the MVIP bus: the MVIP-90 switch model, and the MVIP-95 switch model. You can only use the MVIP-95 switch model for AG 2000 boards.

To experiment with output and input functions simultaneously, execute two instances of ctatest. Use the swish MakeConnection command to make quad connections between two ports, one bound to each ctatest instance. Refer to the Switching Service Developer's Reference Manual for information about swish.

For example, to interactively experiment with tone generation and detection, start a tone detector in the first ctatest instance and a tone generator in the second ctatest instance.

This topic describes using ctatest with AG 2000 DID boards, AG 2000 subscriber loop boards, and AG 2000 loop start boards.

## Using swish for a standalone board

No default connections are made for a standalone board if CT bus connectivity is enabled in the board keyword file. Use swish to connect the local network interface to the local DSP resource. You can use swish interactively, or create a script in a flat text file.

The following example of swish commands nails up the voice and signaling streams for all 8 line interfaces of an AG 2000 board that has been configured as board 0. The swish commands are expressed in MVIP-95 terms.

openswitch ag2000 = agsw 0
resetswitch ag2000
# make voice and signaling connections
makeconnection ag2000 local:0:0..7 to local:5:0..7 QUAD
closeswitch ag2000
exit

## Using ctatest with an AG 2000 DID board

For testing purposes, you can connect a 2500-type telephone to a DID line interface signaling module on an AG 2000 board. This provides a direct audio connection to the AG 2000 board. Use the telephone hook switch to simulate signaling from the network. Ensure that the external power connector is connected to a -48 VDC power supply. For more information, refer to Using two wire interfaces.

To use ctatest:

Step | Description
1 | Make sure that the board keyword file includes the following statement for the board that you will be using: TCPFiles[x] = wnk0.tcp where x = the next available index. If necessary, edit the board keyword file.
2 | Start ctatest. The initial ctatest menu appears.
3 | Enter OP to create a context and open the ADI service. CTAEVN_OPEN_SERVICES_DONE is displayed on your screen.
4 | Start a protocol by entering SP. The following message appears: Enter protocol name ['nocc']:
5 | Enter the wink start protocol: wnko The following message appears: Event: ADIEVN_STARTPROTOCOL_DONE, Finished
6 | Lift the receiver and dial 123. The following message appears: Event: ADIEVN_INCOMING_CALL Called number = '123'
7 | Initiate answering the call by entering AC. The following message appears: Number of rings [1]:
8 | Press Enter. You should hear a single ring tone. The following messages appear: Event: ADIEVN_ANSWERING_CALL Event: ADIEVN_CALL_CONNECTED, Answered
9 | Begin recording to memory by entering RM. You should hear a beep on the handset.
10 | Say "Hello World," and wait. The following message appears on the screen (you may see a different number of bytes): Event: ADIEVN_RECORD_DONE, Voice End, nbytes=15624.
11 | Play back your voice by entering PM. You should hear "Hello World," and ctatest displays: Event: ADIEVN_PLAY_DONE, Finished, nbytes=15624.
12 | Quit the test program by entering Q.

## Using ctatest with an AG 2000 subscriber loop board

If the AG 2000 board has a subscriber loop line interface signaling module, connect a 2500 set so you can make a call.

To use ctatest:

Step | Action
1 | Make sure that the board keyword file includes the following statement for the board that you will be using: TCPFiles[x] = sta0.tcp where x = the next available index. If necessary, edit the board keyword file.
2 | Start ctatest. The initial ctatest menu appears.
3 | Enter OP to create a context and open the ADI service. CTAEVN_OPEN_SERVICES_DONE is displayed on your screen.
4 | Start a protocol by entering SP. The following message appears: Enter protocol name ['nocc']:
5 | Enter the subscriber loop protocol: sta0. The following message appears: Event: ADIEVN_STARTPROTOCOL_DONE, Finished
6 | Lift the receiver (you should get a dial tone) and dial 123. The following message appears: Event: ADIEVN_INCOMING_CALL Called number = '123'
7 | Initiate answering the call by entering AC. The following message appears: Number of rings [1]:
8 | Press Enter. You should hear a single ring tone. The following messages appear: Event: ADIEVN_ANSWERING_CALL Event: ADIEVN_CALL_CONNECTED, Answered
9 | Begin recording to memory by entering RM. You should hear a beep on the handset.
10 | Say "Hello World," and wait. The following message appears on the screen (you may see a different number of bytes): Event: ADIEVN_RECORD_DONE, Voice End, nbytes=15624.
11 | Play back your voice by entering PM. You should hear "Hello World," and ctatest displays: Event: ADIEVN_PLAY_DONE, Finished, nbytes=15624.
12 | Quit the test program by entering Q.

## Using ctatest with an AG 2000 loop start board

If the AG 2000 board has a loop start line interface signaling module, connect a loop start line from a PBX or the public network as a test line to your system so you can call the test line from a telephone connected to another line.

To use ctatest:

Step | Action
1 | Make sure that the board keyword file includes the following statement for the board that you will be using: TCPFiles[x] = lps0.tcp where x = the next available index. If necessary, edit the board keyword file.
2 | Start ctatest. The initial ctatest menu appears.
3 | Enter OP to create a context and open the ADI service. CTAEVN_OPEN_SERVICES_DONE is displayed on your screen.
4 | Start a protocol by entering SP. The following message appears: Enter protocol name ['nocc']:
5 | Enter the loop start protocol: lps0. The following message appears: Event: NCCEVN_START_PROTOCOL_DONE, CTA_REASON_FINISHED
6 | Place a call to the line connected to the AG 2000 board. The following message appears: Event: NCCEVN_INCOMING_CALL
7 | Initiate answering the call by entering AC. The following message appears: Number of rings [1]:
8 | Press Enter. You should hear a single ring tone. The following messages appear: Event: NCCEVN_ANSWERING_CALL Event: NCCEVN_CALL_CONNECTED, NCC_CON_ANSWERED
9 | Begin recording to memory by entering RM. You should hear a beep on the handset.
10 | Say "Hello World," and wait. The following message appears on the screen (you may see a different number of bytes): Event: VCEEVN_RECORD_DONE, Voice End, msec=3820.
11 | Play back your voice by entering PM. You should hear "Hello World," and ctatest displays: Event: VCEEVN_PLAY_DONE, Finished, msec=3820.
12 | Quit the test program by entering Q.