Asterisk - The Open Source Telephony Project
18.5.0
|
MF 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 | MF_BETWEEN_MS 50 |
#define | MF_DURATION 55 |
#define | MF_KP_DURATION 120 |
#define | MF_ST_DURATION 65 |
Enumerations | |
enum | read_option_flags { OPT_DELAY = (1 << 0), OPT_MUTE = (1 << 1), OPT_QUELCH = (1 << 2), OPT_RELAXED = (1 << 3), OPT_LAX_KP = (1 << 4), OPT_PROCESS = (1 << 5), OPT_NO_KP = (1 << 6), OPT_NO_ST = (1 << 7), OPT_KP_OVERRIDE = (1 << 8), OPT_EXTRAPULSES = (1 << 9), OPT_SKIP = (1 << 0), OPT_INDICATION = (1 << 1), OPT_NOANSWER = (1 << 2) } |
Functions | |
AST_MODULE_INFO_STANDARD_EXTENDED (ASTERISK_GPL_KEY, "MF Sender and Receiver Applications") | |
static int | load_module (void) |
static int | manager_play_mf (struct mansession *s, const struct message *m) |
static int | read_mf_digits (struct ast_channel *chan, char *buf, int timeout, int features, int laxkp, int override, int no_kp, int no_st) |
Detects MF digits on channel using DSP, terminated by ST, STP, ST2P, or ST3P. More... | |
static int | read_mf_exec (struct ast_channel *chan, const char *data) |
static int | read_sf_digits (struct ast_channel *chan, char *buf, int timeout, int maxdigits, int freq, int features, int extrapulses) |
static int | read_sf_exec (struct ast_channel *chan, const char *data) |
static int | sendmf_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 }, [ 'l' ] = { .flag = OPT_LAX_KP }, [ 'k' ] = { .flag = OPT_NO_KP }, [ 'm' ] = { .flag = OPT_MUTE }, [ 'o' ] = { .flag = OPT_KP_OVERRIDE }, [ 'p' ] = { .flag = OPT_PROCESS }, [ 'q' ] = { .flag = OPT_QUELCH }, [ 'r' ] = { .flag = OPT_RELAXED }, [ 's' ] = { .flag = OPT_NO_ST }, } |
static char * | readmf_name = "ReceiveMF" |
static char * | readsf_name = "ReceiveSF" |
static const char | sendmf_name [] = "SendMF" |
MF sender and receiver applications.
Definition in file app_mf.c.
#define MF_BETWEEN_MS 50 |
Definition at line 262 of file app_mf.c.
Referenced by sendmf_exec().
#define MF_DURATION 55 |
Definition at line 263 of file app_mf.c.
Referenced by manager_play_mf(), and sendmf_exec().
#define MF_KP_DURATION 120 |
Definition at line 264 of file app_mf.c.
Referenced by manager_play_mf(), and sendmf_exec().
#define MF_ST_DURATION 65 |
Definition at line 265 of file app_mf.c.
Referenced by manager_play_mf(), and sendmf_exec().
enum read_option_flags |
Enumerator | |
---|---|
OPT_DELAY | |
OPT_MUTE | |
OPT_QUELCH | |
OPT_RELAXED | |
OPT_LAX_KP | |
OPT_PROCESS | |
OPT_NO_KP | |
OPT_NO_ST | |
OPT_KP_OVERRIDE | |
OPT_EXTRAPULSES | |
OPT_SKIP | |
OPT_INDICATION | |
OPT_NOANSWER |
Definition at line 232 of file app_mf.c.
AST_MODULE_INFO_STANDARD_EXTENDED | ( | ASTERISK_GPL_KEY | , |
"MF Sender and Receiver Applications" | |||
) |
Referenced by load_module().
|
static |
Definition at line 735 of file app_mf.c.
References ast_manager_register_xml, AST_MODULE_INFO_STANDARD_EXTENDED(), ast_register_application_xml, ASTERISK_GPL_KEY, EVENT_FLAG_CALL, manager_play_mf(), read_mf_exec(), read_sf_exec(), and sendmf_exec().
|
static |
Definition at line 682 of file app_mf.c.
References ast_channel_get_by_name(), ast_channel_unref, ast_mf_stream(), ast_strlen_zero, astman_get_header(), astman_send_ack(), astman_send_error(), digit, MF_DURATION, MF_KP_DURATION, MF_ST_DURATION, and NULL.
Referenced by load_module().
|
static |
Detects MF digits on channel using DSP, terminated by ST, STP, ST2P, or ST3P.
chan | channel on which to read digits |
str | buffer in which to store digits |
timeout | ms to wait for all digits before giving up |
Definition at line 274 of file app_mf.c.
References ast_channel_name(), ast_debug, ast_dsp_free(), ast_dsp_new(), ast_dsp_process(), ast_dsp_set_digitmode(), ast_dsp_set_features(), AST_FRAME_DTMF, AST_FRAME_VOICE, ast_log, ast_read(), ast_remaining_ms(), ast_tvnow(), ast_waitfor(), buf, DSP_DIGITMODE_MF, DSP_FEATURE_DIGIT_DETECT, ast_frame::frametype, ast_frame_subclass::integer, LOG_WARNING, NULL, pbx_builtin_setvar_helper(), result, str, ast_frame::subclass, and timeout.
Referenced by read_mf_exec().
|
static |
Definition at line 551 of file app_mf.c.
References AST_APP_ARG, ast_app_parse_options(), AST_DECLARE_APP_ARGS, ast_log, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero, ast_test_flag, ast_verb, DSP_DIGITMODE_MUTECONF, DSP_DIGITMODE_MUTEMAX, DSP_DIGITMODE_NOQUELCH, DSP_DIGITMODE_RELAXDTMF, LOG_WARNING, NULL, OPT_DELAY, OPT_KP_OVERRIDE, OPT_LAX_KP, OPT_MUTE, OPT_NO_KP, OPT_NO_ST, OPT_QUELCH, OPT_RELAXED, options, pbx_builtin_setvar_helper(), read_app_options, read_mf_digits(), timeout, and tmp().
Referenced by load_module().
|
static |
Definition at line 358 of file app_mf.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_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, str, ast_frame::subclass, and timeout.
Referenced by read_sf_exec().
|
static |
Definition at line 472 of file app_mf.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, DSP_DIGITMODE_MUTECONF, DSP_DIGITMODE_MUTEMAX, DSP_DIGITMODE_NOQUELCH, DSP_DIGITMODE_RELAXDTMF, LOG_WARNING, NULL, OPT_DELAY, OPT_EXTRAPULSES, OPT_MUTE, OPT_QUELCH, OPT_RELAXED, options, pbx_builtin_setvar_helper(), read_app_options, read_sf_digits(), timeout, and tmp().
Referenced by load_module().
|
static |
Definition at line 620 of file app_mf.c.
References args, AST_APP_ARG, ast_app_parse_timelen(), ast_channel_get_by_name(), ast_channel_unref, AST_DECLARE_APP_ARGS, ast_log, ast_mf_stream(), AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero, LOG_WARNING, MF_BETWEEN_MS, MF_DURATION, MF_KP_DURATION, MF_ST_DURATION, NULL, and TIMELEN_MILLISECONDS.
Referenced by load_module().
|
static |
Definition at line 723 of file app_mf.c.
References ast_manager_unregister(), and ast_unregister_application().
|
static |
Definition at line 256 of file app_mf.c.
Referenced by read_mf_exec(), and read_sf_exec().