Prosody installation guide: test programs: detect

This is a simple detection application. It answers answers an incoming call and listens for tones, DTMF digits, or other signals as you specified. It does not play any prompts. It stops detecting when the caller hangs up. It can only use the default tone tables. To test detection with new tone tables use tonedet.

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 these firmware modules loaded:

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

Command line options are:

-a 1 map tones to digits. This is only useful for detecting DTMF tones, in which case it shows the DTMF digit as digits rather than as codes
-C <alg> enable signal categorisation with specified algorithm
-c 1 enable detection of call progress tones
-T <type> the type of tone detection to use. One of these values:
valuemeaning
etone end detection
ltone length detection
stone start detection
-g <duration> enable grunt detection with specified duration
-M <tonemode> enable tone detection with specified mode for minimum tone duration (one of "1", "40", "64")
-P <N> The number of channels to allocate per module
-s <toneset> select tone set to use for tone detection
-t <timeslot> timeslot to use (see Test program timeslots).
-x <serialno> A serial number with no Prosody module specification in [...] after it. All Prosody modules on that card are used.

For example,

	gen-WINNT_V6/detect -x12345678 -t 64:0 -M 1 -a 1

would listen for DTMF digits using the card with serial number 12345678.

Note that this program cannot switch data from a call answered on one card to a Prosody module on another card.

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().

When it detects anything, it prints a description of what was detected. For example:

	Digit: 42 (*) 0

means that it detected the DTMF digit *.

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


This is one of the Prosody test programs .