Asterisk - The Open Source Telephony Project
21.4.1
|
SF sender and receiver applications. More...
#include "asterisk.h"
#include "asterisk/file.h"
#include "asterisk/pbx.h"
#include "asterisk/channel.h"
#include "asterisk/dsp.h"
#include "asterisk/app.h"
#include "asterisk/module.h"
#include "asterisk/indications.h"
#include "asterisk/conversions.h"
Go to the source code of this file.
Macros | |
#define | BUFFER_SIZE 256 |
#define | SF_BETWEEN 600 |
#define | SF_MIN_DETECT 50 |
#define | SF_MIN_OFF 25 |
#define | SF_ON 67 |
Functions | |
AST_MODULE_INFO_STANDARD_EXTENDED (ASTERISK_GPL_KEY,"SF Sender and Receiver Applications") | |
static int | load_module (void) |
static int | read_sf_digits (struct ast_channel *chan, char *buf, int buflen, int timeout, int maxdigits, int freq, int features, int extrapulses) |
Detects SF digits on channel using DSP. More... | |
static int | read_sf_exec (struct ast_channel *chan, const char *data) |
static int | sendsf_exec (struct ast_channel *chan, const char *vdata) |
static int | unload_module (void) |
Variables | |
static const struct ast_app_option | read_app_options [128] = { [ 'd' ] = { .flag = OPT_DELAY }, [ 'e' ] = { .flag = OPT_EXTRAPULSES }, [ 'm' ] = { .flag = OPT_MUTE }, [ 'q' ] = { .flag = OPT_QUELCH }, [ 'r' ] = { .flag = OPT_RELAXED }, } |
static const char * | readsf_name = "ReceiveSF" |
static const char | sendsf_name [] = "SendSF" |
SF sender and receiver applications.
Definition in file app_sf.c.
|
static |
Detects SF digits on channel using DSP.
chan | channel on which to read digits |
buf | Buffer in which to store digits |
buflen | Size of buffer |
timeout | ms to wait for all digits before giving up |
maxdigits | Maximum number of digits |
freq | Frequency to use |
features | DSP features |
extrapulses | Whether to recognize extra pulses |
0 | if successful |
-1 | if unsuccessful (including hangup). |
Definition at line 183 of file app_sf.c.
References ast_debug, ast_dsp_new(), ast_dsp_process(), ast_dsp_set_features(), ast_dsp_set_freqmode(), AST_FRAME_VOICE, ast_read(), ast_remaining_ms(), ast_tvnow(), ast_waitfor(), DSP_FEATURE_FREQ_DETECT, ast_frame::frametype, ast_frame_subclass::integer, pbx_builtin_setvar_helper(), and ast_frame::subclass.