Demonstrates Natural Access functions, executing in asynchronous mode. Use ctatest to:
Verify proper installation and operation of the NCC service and the ADI service.
Experiment with Natural Access.
Expose working examples of Natural Access and NCC service or ADI service functions.
ctatest [options]
where options are:
|
Option |
Use this option to... |
|---|---|
|
-A xxxmgr |
Specify the Natural Access service manager. Default: ADIMGR |
|
-b n |
Specify the board number n. Default: 0 |
|
-C |
Notify the application through an event whenever Natural Access changes its list of internal wait objects. Default: 0 |
|
-f filename |
Specify the file name to retrieve service names. Default: None |
|
-F filename |
Specify the name of the Natural Access configuration file. Default: cta.cfg |
|
-i filename |
Specify the name of the input file. This option allows you to use a file listing Natural Access test commands and data line by line, instead of entering the commands interactively. |
|
-l |
Show low-level events. |
|
-p protocol |
Specify the protocol to run. Default: nocc |
|
-s [stream:]slot |
Specify the port (DSP) address. Default: 0:0 |
|
-t d/r |
Set the tracing option. Default: r d = disable tracing r = enable tracing |
|
-v |
Set the Natural Access compatibility level to 0. |
|
-w |
Wait before exit. |
|
-? |
Access Help. |
Natural Access system functions, Voice Message service functions, and many ADI service functions are featured.
ctatest is a menu-driven interactive program. Enter one- and two-letter commands to execute Natural Access and NCC service, ADI service, or VCE service commands. Some commands prompt for additional information, such as frequencies and amplitudes for tone generators. For more information about the service commands, refer to the service-specific reference manuals.
The following table describes the available commands:
|
Function |
Command |
Description |
|---|---|---|
|
Help |
H |
Displays a table of available commands. |
|
Quit |
Q |
Exits from the ctatest program. |
|
Repeat command |
! |
Repeats the previous command. |
|
Abort dial |
AD |
Calls adiStopDial. |
|
Abort timer |
AT |
Calls adiStopTimer. |
|
Accept call |
CC |
Calls nccAcceptCall. |
|
Answer call |
AC |
Calls nccAnswerCall. |
|
Assert signal |
AS |
Calls adiAssertSignal. |
|
Attach context |
AX |
Calls ctaAttachContext. |
|
Attach object |
AO |
Calls ctaAttachObject. |
|
Block calls |
BC |
Calls nccBlockCalls. |
|
Call progress begin |
CB |
Calls adiStartCallProgress. |
|
Call progress stop |
CS |
Calls adiStopCallProgress. |
|
Call status |
C? |
Calls nccGetCallStatus. |
|
Change context |
CH |
Switches between different contexts created by ctatest with the CX or PX commands. |
|
Close services (new) |
CV |
Calls ctaCloseServices. |
|
Close services (old) |
CP |
Calls ctaDestroyContext. |
|
Collect digits |
CD |
Calls adiCollectDigits. |
|
Collect stop |
SC |
Calls adiStopCollection. |
|
Get context information |
CN |
Calls ctaGetContextInfoEx. |
|
Continuous event fetch |
CE |
Enables fetching of events. |
|
Create context |
CX |
Calls ctaCreateContextEx. |
|
Create persistent context |
PX |
Calls ctaCreateContextEx with the CTA_CONTEXT_PERSISTENT flag set. |
|
Create void context |
VX |
Calls ctaCreateContext with ctaqueuehd set to NULL_CTAQUEUEHD. |
|
Destroy context |
DX |
Calls ctaDestroyContext. |
|
Digit flush |
DF |
Calls adiFlushDigitQueue. |
|
Digit get |
DG |
Calls adiGetDigit. |
|
Digit peek |
DP |
Calls adiPeekDigit. |
|
Disable bit detector |
DB |
Calls adiStopSignalDetector. |
|
Disable DTMF detector |
DD |
Calls adiStopDTMFDetector. |
|
Disable energy detector |
DE |
Calls adiStopEnergyDetector. |
|
Disable MF detector |
DM |
Calls adiStopMFDetector. |
|
Disable tone detector |
DT |
Calls adiStopToneDetector. |
|
Disconnect call |
DC |
Calls nccDisconnectCall. |
|
Detach object |
DO |
Calls ctaDetachObject. |
|
Enable bit detector |
EB |
Calls adiStartSignalDetector. |
|
Encoding information |
EI |
Calls vceGetEncodingInfo. |
|
Enable DTMF detector |
ED |
Calls adiStartDTMF Detector. |
|
Enable energy detector |
EE |
Calls adiStartEnergyDetector. |
|
Enable MF detector |
EM |
Calls adiStartMFDetector. |
|
Enable tone detector |
ET |
Calls adiStartToneDetector. |
|
Enumerate contexts |
EC |
Lists contexts created by ctatest with the CX, PX, or VX commands. |
|
Find file |
FF |
Calls ctaFindFile. |
|
Format event |
FE |
Calls ctaFormatEventEx. |
|
FSK abort receive |
FA |
Calls adiStopReceivingFSK. |
|
FSK receive |
FR |
Calls adiStartReceivingFSK. |
|
FSK send |
FS |
Calls adiStartSendingFSK. |
|
Generate DTMFs |
GD |
Calls adiStartDTMF. |
|
Generate net tone |
GN |
Calls adiStartTones. |
|
Generate wink |
GW |
Calls adiStartPulse. |
|
Generation stop |
GS |
Calls adiStopTones. |
|
Generate user tone |
GT |
Calls adiStartTones. |
|
Get call status |
L? |
Calls nccGetLineStatus. |
|
Get context list |
CL |
Calls ctaQueryServerContexts. |
|
Get event source |
GM |
Calls ctaGetEventSources. |
|
Get object descriptor |
DH |
Calls ctaGetObjDescriptor. |
|
Get one event |
GE |
Enables fetching of one event. |
|
Get parameter ID |
PI |
Calls ctaGetParmID. |
|
Get server version |
RV |
Calls ctaGetVersionEx. |
|
Get service version |
SV |
Calls ctaGetServiceVersionEx. |
|
Hold call |
OC |
Calls nccHoldCall. |
|
Loopback event |
LE |
Calls ctaQueueEvent. |
|
Modify play gain |
MG |
Calls vceSetPlayGain. |
|
Modify play speed |
MS |
Calls vceSetPlaySpeed. |
|
Open services (new) |
OV |
Calls ctaOpenServices. |
|
Open services (old) |
OP |
Calls ctaCreateContext and ctaOpenServices. |
|
Place call |
PC |
Calls nccPlaceCall. |
|
Play file |
PF |
Calls vceOpenFile and vcePlayMessage. |
|
Play memory |
PM |
Calls vcePlayMessage. |
|
Play/receive status |
P? |
Call vceGetContextInfo. |
|
Play/receive stop |
PS |
Calls vceStop. |
|
Play/record status |
R? |
Calls vceGetContextInfo. |
|
Play/record stop |
RS |
Calls vceStop. |
|
Query capability |
CQ |
Calls nccQueryCapability. |
|
Query services |
ES |
Calls ctaQueryServices. |
|
Record file |
RF |
Calls vceCreateFile and vceRecordMessage. |
|
Record memory |
RM |
Calls vceCreateMemory, vceEraseMessage, and vceRecordMessage. |
|
Refresh parameters |
RP |
Calls ctaRefreshParms. |
|
Reject call |
JC |
Calls nccRejectCall. |
|
Release call |
RC |
Calls nccReleaseCall. |
|
Retrieve call |
RR |
Calls nccRetrieveCall. |
|
Send digits |
ND |
Calls nccSendDigits. |
|
Server shutdown |
SH |
Calls ctaShutdown. |
|
Set call handle |
IH |
Specifies active and held call handles. |
|
Set default server |
SS |
Calls ctaSetDefaultServer. |
|
Set event handler |
EH |
Calls ctaSetErrorHandler. |
|
Set event source |
SM |
Calls ctaSetEventSources. |
|
Set parameters |
PD |
Calls ctaGetParmByName and ctaGetParmInfo. |
|
Set server trace |
TR |
Calls ctaSetGlobalTraceMask. |
|
Set time slot |
TS |
Specifies an MVIP timeslot to open the NCC service. |
|
Show state |
X |
Calls adiGetContextInfo and nccGetLineStatus. |
|
Signal bit query |
SQ |
Calls adiQuerySignalState. |
|
Start dial |
SD |
Calls adiStartDial. |
|
Start protocol |
SP |
Calls nccStartProtocol or adiStartProtocol. |
|
Start timer |
ST |
Calls adiStartTimer. |
|
Stop event fetch |
SE |
Disables continuous fetch of events. |
|
Stop protocol |
UP |
Calls nccStopProtocol or adiStopProtocol. |
|
Supervised transfer |
VT |
Calls nccTransferCall. |
|
Toggle pattern |
TP |
Calls adiAssertSignal. |
|
Trace |
W |
Calls ctaSetTraceLevel. |
|
Unblock calls |
UC |
Calls nccUnblockCalls. |
|
View parameters |
VD |
Calls ctaGetParmID and ctaGetParmInfoEx. |
You can enter commands while asynchronous functions execute, allowing you to execute multiple asynchronous functions concurrently or to stop functions. For example, you can run a tone detector (ET) and record voice (RF) simultaneously. Abort any of these functions by entering the respective stop command (DT and RS for tone and record).
To experiment with output and input functions simultaneously, execute two instances of ctatest. 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. Use the swish MakeConnection command to make the QUAD connections to connect the two ADI service ports back-to-back. Refer to the Switching Service Developer's Reference Manual for more information about swish.
Natural Access parameters can be viewed or modified (VD, PD). If the ctdaemon is running, shared system global defaults are copied to the context. Otherwise, the local compiled defaults are copied. The commands prompt you to view or modify context parameters or global defaults.
ctatest writes trace messages to ctdaemon if ctdaemon is running. Use ctdaemon or ctaSetTraceLevel (W command) to set the global or local trace mask. To loop back an application event, use ctaQueueEvent (LE command).
The following procedure assumes you are testing on an AG 2000 board that has a 2500-type telephone connected to one of the lines.
Complete the following steps to run ctatest:
|
Step |
Action | ||||||||||||
|
1 |
Start ctatest by entering the following command at the prompt: ctatest -b n -s [stream:]slot [-p protocol] [-l] where n is the board number, [stream:]slot is the DSP stream and timeslot, and protocol is the name of the protocol appropriate for the functions that you want to test. A menu of one- and two-letter commands displays. | ||||||||||||
|
2 |
Enter CX to create a context. Specify a context name and service sharing mode. | ||||||||||||
|
3 |
Enter OV to open the service. Select a service from the list of available services. CTAEVN_OPEN_SERVICES_DONE displays on your screen. | ||||||||||||
|
4 |
Enter SP to start a protocol. Select a protocol appropriate for the functions you want to test. NCCEVN_STARTPROTOCOL_DONE displays on your screen. The port is now ready to accept functions. | ||||||||||||
|
5 |
Enter the commands you want to experiment with. The stop event fetch (SE), get one event (GE), and continue event fetch (CE) commands allow you to single step when issuing commands and retrieving events. These commands can be used to answer questions about state and event combinations. To select a new protocol, stop the active protocol (UP command), and enter the SP command again. All functions that are active when you stop the protocol terminate. NCCEVN_function_DONE or ADIEVN_function_DONE displays for each active function. | ||||||||||||
|
6 |
Enter DX to destroy the context. ctatest includes functions for retrieving commands from the keyboard and executing them. These functions include:
|