Asterisk - The Open Source Telephony Project
21.4.1
|
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 | BUFFER_SIZE 256 |
#define | MF_BETWEEN_MS 50 |
#define | MF_DURATION 55 |
#define | MF_KP_DURATION 120 |
#define | MF_ST_DURATION 65 |
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 buflen, int timeout, int features, int laxkp, int override, int no_kp, int no_st, int maxdigits) |
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 | 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 }, [ 'l' ] = { .flag = OPT_LAX_KP }, [ 'k' ] = { .flag = OPT_NO_KP }, [ 'm' ] = { .flag = OPT_MUTE }, [ 'n' ] = { .flag = OPT_MAXDIGITS , .arg_index = OPT_ARG_MAXDIGITS + 1 }, [ 'o' ] = { .flag = OPT_KP_OVERRIDE }, [ 'p' ] = { .flag = OPT_PROCESS }, [ 'q' ] = { .flag = OPT_QUELCH }, [ 'r' ] = { .flag = OPT_RELAXED }, [ 's' ] = { .flag = OPT_NO_ST }, } |
static const char * | readmf_name = "ReceiveMF" |
static const char | sendmf_name [] = "SendMF" |
MF sender and receiver applications.
Definition in file app_mf.c.
|
static |
Detects MF digits on channel using DSP, terminated by ST, STP, ST2P, or ST3P.
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 |
features | Any additional DSP features to use |
laxkp | Receive digits even if KP not received |
override | Start over if we receive additional KPs |
no_kp | Don't include KP in the output |
no_st | Don't include start digits in the output |
maxdigits | If greater than 0, only read this many digits no matter what |
0 | if successful |
-1 | if unsuccessful (including hangup). |
Definition at line 247 of file app_mf.c.
References ast_debug, ast_dsp_new(), ast_dsp_process(), ast_dsp_set_digitmode(), ast_dsp_set_features(), AST_FRAME_VOICE, ast_read(), ast_remaining_ms(), ast_tvnow(), ast_waitfor(), DSP_DIGITMODE_MF, ast_frame::frametype, ast_frame_subclass::integer, pbx_builtin_setvar_helper(), and ast_frame::subclass.