This is a very simple recording application. It answers answers an incoming call and records the entire call into a file. It does not play any prompts and uses the same file for every call (overwriting it). It stops recording when the caller hangs up. The recorded file has no headers or other formatting of any kind - just the data. The test program ansplay can use these files directly.
Go to directory $(TiNG)/test.
You must have the call control driver initialised. This is documented separately in the call control documentation.
You must have downloaded firmware modules as listed below.
Run ansrec
with the appropriate options (the program is
gen-LINUX_V6/ansrec or
gen-WINNT_V6/ansrec
depending on which operating system you are using).
Command line options are:
-e 1
| use silence elimination |
-F <format>
| record in this format. The known formats can
be listed by specifying a question mark
(? ).
|
-P <N>
| The number of channels to allocate per module |
-q <duration>
| stop recording on silence. The duration is specified in milliseconds. |
-t <timeslot>
| timeslot to use (see Test program timeslots) |
-x <serialno>
| A card serial number with no Prosody
module specification in [...] after it.
All Prosody modules on that card are used.
|
<file> | name of file into which data is to be recorded |
For example,
gen-WINNT_V6/ansrec -x 12345678 -F ALawPCM@8000 -t 64:0 rec1.dat
would record A-law encoded speech into rec1.dat
using the
card with serial number 12345678.
Note that this program cannot switch data between a Prosody module on one card and a call answered on another card.
The firmware modules that are required depend on the options you specify. Here are the details:
Module | When needed |
---|---|
datafeed | always on Prosody X |
grunt | If you use '-e 1 ' for silence elimination
|
inchan | always |
sixkin | when the recording format is ACUBLKPCM@6000, ALawPCM@6000, OKIADPCM@6000, ULawPCM@6000 or otherwise sampled at 6000 Hz |
8_to_11 | when the recording format is sampled at 11000 Hz |
recA | when the recording format is ALawPCM@6000 or ALawPCM@8000 |
recima | when the recording format is IMAADPCM |
recmu | when the recording format is ULawPCM@6000 or ULawPCM@8000 |
recoki | when the recording format is OKIADPCM@6000 or OKIADPCM@8000 |
While the program is running it shows status changes in some detail. Layer 1 statistics are printed like this:
0: +nos +los usr=f3
This is about port 0, and the details are as returned by
call_l1_stats()
. Information about a particular call
appears like this:
0.1: CS_WAIT_FOR_INCOMING
This relates to timeslot 1 on port 0, and reports the state from
call_state()
.
While it is recording, it prints the speed at which the data is
arriving. You can use the 'q
' command to stop the
program (this clears all calls and the program exits when the calls
have cleared).
The source code for this program is provided (ansrec.c).
This is one of the Prosody test programs .