mpf_dtmf_detector.h File Reference
DTMF detector.
More...
#include "apr.h"
#include "apr_pools.h"
#include "apt.h"
#include "mpf_frame.h"
#include "mpf_stream.h"
Go to the source code of this file.
Detailed Description
DTMF detector.
Detector of DTMF tones sent both out-of-band (RFC4733) and in-band (audio).
Typedef Documentation
Opaque MPF DTMF detector structure definition
Enumeration Type Documentation
DTMF detector band
- Enumerator:
MPF_DTMF_DETECTOR_INBAND |
Detect tones in-band
|
MPF_DTMF_DETECTOR_OUTBAND |
Detect named events out-of-band
|
MPF_DTMF_DETECTOR_BOTH |
Detect both in-band and out-of-band digits
|
Function Documentation
Create MPF DTMF detector (advanced).
- Parameters:
-
| stream | A stream to get digits from. |
| band | One of:
- MPF_DTMF_DETECTOR_INBAND: detect audible tones only
- MPF_DTMF_DETECTOR_OUTBAND: detect out-of-band named-events only
- MPF_DTMF_DETECTOR_BOTH: detect digits in both bands if supported by stream. When out-of-band digit arrives, in-band detection is turned off.
|
| pool | Memory pool to allocate DTMF detector from. |
- Returns:
- The object or NULL on error.
- See also:
- mpf_dtmf_detector_create
Free all resources associated with the detector.
- Parameters:
-
Get DTMF digit from buffer of digits detected so far and remove it.
- Parameters:
-
- Returns:
- DTMF character [0-9*A-D] or NUL if the buffer is empty.
Retrieve how many digits was lost due to full buffer.
- Parameters:
-
- Returns:
- Number of lost digits.
Detect DTMF digits in the frame.
- Parameters:
-
| detector | The detector. |
| frame | Frame object passed in stream_write(). |
Empty the buffer and reset detection states.
- Parameters:
-