|
Asterisk - The Open Source Telephony Project GIT-master-9647a4f
|
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 | DEFAULT_POST_DIGIT_TIMER 0.8 |
| #define | SF_BETWEEN 600 |
| #define | SF_MIN_DETECT 50 |
| #define | SF_MIN_OFF 25 |
| #define | SF_ON 67 |
Enumerations | |
| enum | { OPT_ARG_DIGIT_TIMEOUT , OPT_ARG_ARRAY_SIZE } |
| enum | read_option_flags { OPT_DELAY = (1 << 0) , OPT_MUTE = (1 << 1) , OPT_QUELCH = (1 << 2) , OPT_RELAXED = (1 << 3) , OPT_EXTRAPULSES = (1 << 4) , OPT_DIGIT_TIMEOUT = (1 << 5) } |
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 digit_timeout, int maxdigits, int freq, int features, int extrapulses) |
| Detects SF digits on channel using DSP. | |
| 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 }, [ 't' ] = { .flag = OPT_DIGIT_TIMEOUT , .arg_index = OPT_ARG_DIGIT_TIMEOUT + 1 }, [ '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.
| #define BUFFER_SIZE 256 |
| anonymous enum |
| Enumerator | |
|---|---|
| OPT_ARG_DIGIT_TIMEOUT | |
| OPT_ARG_ARRAY_SIZE | |
| enum read_option_flags |
| Enumerator | |
|---|---|
| OPT_DELAY | |
| OPT_MUTE | |
| OPT_QUELCH | |
| OPT_RELAXED | |
| OPT_EXTRAPULSES | |
| OPT_DIGIT_TIMEOUT | |
Definition at line 172 of file app_sf.c.
| AST_MODULE_INFO_STANDARD_EXTENDED | ( | ASTERISK_GPL_KEY | , |
| "SF Sender and Receiver Applications" | |||
| ) |
|
static |
Definition at line 514 of file app_sf.c.
References ast_register_application_xml, read_sf_exec(), readsf_name, sendsf_exec(), and sendsf_name.
|
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 |
| digit_timeout | ms to wait for the next digit 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 215 of file app_sf.c.
References ast_channel_name(), ast_debug, ast_dsp_free(), ast_dsp_new(), ast_dsp_process(), ast_dsp_set_features(), ast_dsp_set_freqmode(), AST_FRAME_DTMF, AST_FRAME_VOICE, ast_frfree, ast_log, ast_read(), ast_remaining_ms(), ast_tvnow(), ast_waitfor(), buf, DSP_FEATURE_FREQ_DETECT, ast_frame::frametype, ast_frame_subclass::integer, LOG_WARNING, NULL, pbx_builtin_setvar_helper(), result, SF_BETWEEN, SF_MIN_DETECT, SF_MIN_OFF, str, and ast_frame::subclass.
Referenced by read_sf_exec().
|
static |
Definition at line 364 of file app_sf.c.
References AST_APP_ARG, ast_app_parse_options(), AST_DECLARE_APP_ARGS, ast_log, AST_STANDARD_APP_ARGS, ast_str_to_int(), ast_strdupa, ast_strlen_zero(), ast_test_flag, ast_verb, BUFFER_SIZE, DEFAULT_POST_DIGIT_TIMER, DSP_DIGITMODE_MUTECONF, DSP_DIGITMODE_MUTEMAX, DSP_DIGITMODE_NOQUELCH, DSP_DIGITMODE_RELAXDTMF, ast_flags::flags, LOG_WARNING, NULL, OPT_ARG_ARRAY_SIZE, OPT_ARG_DIGIT_TIMEOUT, OPT_DELAY, OPT_DIGIT_TIMEOUT, OPT_EXTRAPULSES, OPT_MUTE, OPT_QUELCH, OPT_RELAXED, options, pbx_builtin_setvar_helper(), read_app_options, read_sf_digits(), and SF_BETWEEN.
Referenced by load_module().
|
static |
Definition at line 457 of file app_sf.c.
References args, AST_APP_ARG, ast_channel_cleanup, ast_channel_get_by_name(), AST_DECLARE_APP_ARGS, ast_log, ast_sf_stream(), AST_STANDARD_APP_ARGS, ast_str_to_int(), ast_strdupa, ast_strlen_zero(), ast_channel::data, LOG_WARNING, and NULL.
Referenced by load_module().
|
static |
Definition at line 504 of file app_sf.c.
References ast_unregister_application(), readsf_name, and sendsf_name.
|
static |
Definition at line 194 of file app_sf.c.
Referenced by read_sf_exec().
|
static |
Definition at line 196 of file app_sf.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 197 of file app_sf.c.
Referenced by load_module(), and unload_module().