Prosody installation guide: test programs: tonegen

This program allows the Prosody tone generation API to be exercised.

Go to directory $(TiNG)/test.

You must have downloaded the firmware module tonegen. On Prosody X you must also have downloaded datafeed.

Run tonegen with the appropriate options (the program is gen-LINUX_V6/tonegen or gen-WINNT_V6/tonegen depending on which operating system you are using).

Command line options are:

Option formatMeaning
-t <timeslot> timeslot to use for output (see Test program timeslots).
-x <modspec> Use these Prosody processor modules, specified as described in Test programs: Specifying Prosody Processor modules

For example:

	tonegen -x x:1.2.3.4/mykey -t64:0

starts the program using the timeslot 64:0 for output.

While it is running, it reads commands and exectues them. It prints a prompt, which consists of m and the current module number, reads a line of input and interprets it as a command, which consists of one character followed by any parameters. The commands are:

CharacterMeaning
?Print summary of possible commands
c DUR o/r/c (=ID ON OFF)* Play a tone sequence (i.e. a call progress tone). The duration is specified in milliseconds. See sm_play_cptone(). The type field used by that function is indicated by the letter o, r or c, and the cadences field is filled in from the list of IDs. For example, the command: "c 10000 r =17 400 208 =17 400 2000" generates ten seconds of U.K. ring tone.
d DUR IDD "DIGITS" Play DTMF digits. The duration of each digit and the inter-digit delay are given in milliseconds. See sm_play_digits().
f FREQ AMPL Add a new tone component with specified frequency (in Hz) and amplitude (in dBm0). The tone ID is printed. See sm_add_output_freq().
m MOD Select module for future commands.
p DUR CODE Play a tone. The duration is specified in milliseconds. The tone is specified as a tone ID which can either be one printed by the t command or one in the range defined by the built-in tones. See sm_play_tone().
qquit
t TONE1 TONE2 Add a new tone consisting of the two specified components. The components are specified by tone IDs which can refer to a built-in tone, a tone added by the f command, or silence (specified by the value 0). The tone ID is printed. See sm_add_output_tone().
# anythingdo nothing - used for comments
' text...print text - used when input is a file so that you can monitor its progress

The source code for this program is provided (tonegen.c).


This is one of the Prosody test programs .