Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Channel audio broadcasting. More...
#include "asterisk.h"
#include <ctype.h>
#include <errno.h>
#include "asterisk/channel.h"
#include "asterisk/audiohook.h"
#include "asterisk/app.h"
#include "asterisk/utils.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/lock.h"
#include "asterisk/options.h"
#include "asterisk/autochan.h"
#include "asterisk/format_cache.h"
#include "asterisk/cli.h"
Go to the source code of this file.
Data Structures | |
struct | multi_autochan |
struct | multi_autochan_list |
struct | multi_spy |
Enumerations | |
enum | { OPTION_READONLY = (1 << 0) , OPTION_BARGE = (1 << 1) , OPTION_LONG_QUEUE = (1 << 2) , OPTION_WHISPER = (1 << 3) , OPTION_SPY = (1 << 4) , OPTION_REVERSE_FEED = (1 << 5) , OPTION_ANSWER_WARN = (1 << 6) } |
Functions | |
AST_MODULE_INFO_STANDARD_EXTENDED (ASTERISK_GPL_KEY, "Channel Audio Broadcasting") | |
static int | attach_barge (struct ast_autochan *spyee_autochan, struct ast_autochan **spyee_bridge_autochan, struct ast_audiohook *bridge_whisper_audiohook, const char *spyer_name, const char *name, struct ast_flags *flags) |
static int | broadcast_exec (struct ast_channel *chan, const char *data) |
static int | do_broadcast (struct ast_channel *chan, struct ast_flags *flags, const char *channels) |
static int | load_module (void) |
static void | multi_autochan_free (struct multi_autochan *mac) |
static void * | spy_alloc (struct ast_channel *chan, void *data) |
static int | spy_generate (struct ast_channel *chan, void *data, int len, int samples) |
static void | spy_release (struct ast_channel *chan, void *data) |
static int | start_spying (struct ast_autochan *autochan, const char *spychan_name, struct ast_audiohook *audiohook, struct ast_flags *flags) |
static int | start_whispering (struct ast_autochan *autochan, const char *spychan_name, struct ast_audiohook *audiohook, struct ast_flags *flags) |
static int | unload_module (void) |
Variables | |
static const char | app_broadcast [] = "Broadcast" |
static const struct ast_app_option | spy_opts [128] = { [ 'b' ] = { .flag = OPTION_BARGE }, [ 'l' ] = { .flag = OPTION_LONG_QUEUE }, [ 'o' ] = { .flag = OPTION_READONLY }, [ 'r' ] = { .flag = OPTION_REVERSE_FEED }, [ 's' ] = { .flag = OPTION_SPY }, [ 'w' ] = { .flag = OPTION_WHISPER }, } |
static struct ast_generator | spygen |
Channel audio broadcasting.
Definition in file app_broadcast.c.
anonymous enum |
Enumerator | |
---|---|
OPTION_READONLY | |
OPTION_BARGE | |
OPTION_LONG_QUEUE | |
OPTION_WHISPER | |
OPTION_SPY | |
OPTION_REVERSE_FEED | |
OPTION_ANSWER_WARN |
Definition at line 131 of file app_broadcast.c.
AST_MODULE_INFO_STANDARD_EXTENDED | ( | ASTERISK_GPL_KEY | , |
"Channel Audio Broadcasting" | |||
) |
|
static |
Definition at line 286 of file app_broadcast.c.
References ast_audiohook_init(), AST_AUDIOHOOK_TYPE_WHISPER, ast_autochan_channel_lock, ast_autochan_channel_unlock, ast_autochan_setup(), ast_channel_bridge_peer(), ast_channel_cleanup, ast_channel_is_bridged(), ast_channel_name(), ast_channel_ref, ast_channel_unref, ast_clear_flag, ast_debug, ast_log, ast_test_flag, ast_autochan::chan, ast_channel::flags, LOG_WARNING, name, NULL, OPTION_ANSWER_WARN, RAII_VAR, retval, and start_whispering().
Referenced by do_broadcast().
|
static |
Definition at line 577 of file app_broadcast.c.
References ao2_bump, ao2_ref, args, AST_APP_ARG, ast_app_parse_options(), ast_channel_name(), ast_channel_writeformat(), ast_clear_flag, AST_DECLARE_APP_ARGS, AST_FLAGS_ALL, ast_format_slin, ast_log, ast_set_write_format(), AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), ast_test_flag, channels, cleanup(), do_broadcast(), ast_flags::flags, LOG_ERROR, LOG_WARNING, NULL, OPTION_BARGE, OPTION_SPY, OPTION_WHISPER, options, and spy_opts.
Referenced by load_module().
|
static |
Definition at line 369 of file app_broadcast.c.
References ast_activate_generator(), AST_AUDIOHOOK_DIRECTION_READ, AST_AUDIOHOOK_DIRECTION_WRITE, ast_audiohook_init(), ast_audiohook_lock, AST_AUDIOHOOK_STATUS_RUNNING, AST_AUDIOHOOK_TYPE_SPY, AST_AUDIOHOOK_TYPE_WHISPER, ast_audiohook_unlock, ast_audiohook_write_frame(), ast_autochan_setup(), ast_calloc, ast_channel_clear_flag(), ast_channel_get_by_name(), ast_channel_name(), ast_channel_set_flag(), ast_channel_start_silence_generator(), ast_channel_stop_silence_generator(), ast_channel_unref, ast_deactivate_generator(), ast_debug, AST_FLAG_SPYING, AST_FRAME_VOICE, ast_frfree, ast_log, ast_read(), AST_RWLIST_HEAD_INIT, AST_RWLIST_INSERT_TAIL, AST_RWLIST_REMOVE_CURRENT, AST_RWLIST_TRAVERSE_SAFE_BEGIN, AST_RWLIST_TRAVERSE_SAFE_END, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_set_flag, ast_strdup, ast_strdupa, ast_strlen_zero(), ast_test_flag, ast_verb, ast_waitfor(), attach_barge(), multi_autochan::autochan, multi_autochan::bridge_autochan, multi_autochan::bridge_connected, multi_autochan::bridge_whisper_audiohook, multi_spy::chanlist, channels, multi_autochan::connected, ESS, ast_channel::flags, ast_frame::frametype, LOG_WARNING, multi_autochan_free(), multi_autochan::name, multi_autochan::next, NULL, OPTION_ANSWER_WARN, OPTION_BARGE, OPTION_READONLY, OPTION_REVERSE_FEED, OPTION_SPY, OPTION_WHISPER, multi_spy::readonly, multi_autochan::spy_audiohook, spygen, multi_autochan::spying, start_spying(), start_whispering(), ast_audiohook::status, strsep(), and multi_autochan::whisper_audiohook.
Referenced by broadcast_exec().
|
static |
Definition at line 634 of file app_broadcast.c.
References app_broadcast, ast_register_application_xml, and broadcast_exec().
|
static |
Definition at line 326 of file app_broadcast.c.
References ast_audiohook_destroy(), ast_audiohook_detach(), ast_audiohook_lock, AST_AUDIOHOOK_STATUS_RUNNING, ast_audiohook_unlock, ast_autochan_destroy(), ast_debug, ast_free, multi_autochan::autochan, multi_autochan::bridge_autochan, multi_autochan::bridge_connected, multi_autochan::bridge_whisper_audiohook, multi_autochan::connected, ESS, multi_autochan::name, multi_autochan::spy_audiohook, multi_autochan::spying, ast_audiohook::status, total, and multi_autochan::whisper_audiohook.
Referenced by do_broadcast().
|
static |
Definition at line 170 of file app_broadcast.c.
|
static |
Definition at line 180 of file app_broadcast.c.
References AST_AUDIOHOOK_DIRECTION_BOTH, AST_AUDIOHOOK_DIRECTION_READ, ast_audiohook_lock, ast_audiohook_read_frame(), AST_AUDIOHOOK_STATUS_RUNNING, ast_audiohook_unlock, ast_format_slin, AST_FRAME_VOICE, ast_frfree, AST_RWLIST_TRAVERSE_SAFE_BEGIN, AST_RWLIST_TRAVERSE_SAFE_END, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_slinear_saturated_add(), ast_write(), multi_spy::chanlist, ast_frame::data, ast_frame::frametype, ast_frame::ptr, multi_spy::readonly, ast_frame::samples, multi_autochan::spy_audiohook, and ast_audiohook::status.
|
static |
Definition at line 175 of file app_broadcast.c.
|
static |
Definition at line 244 of file app_broadcast.c.
References ast_audiohook_attach(), AST_AUDIOHOOK_DIRECTION_READ, AST_AUDIOHOOK_MUTE_WRITE, ast_audiohook_set_frame_feed_direction(), AST_AUDIOHOOK_SMALL_QUEUE, AST_AUDIOHOOK_TRIGGER_SYNC, ast_autochan_channel_lock, ast_autochan_channel_unlock, ast_channel_name(), ast_debug, ast_set_flag, ast_test_flag, ast_autochan::chan, OPTION_LONG_QUEUE, and OPTION_READONLY.
Referenced by do_broadcast().
|
static |
Definition at line 267 of file app_broadcast.c.
References ast_audiohook_attach(), AST_AUDIOHOOK_SMALL_QUEUE, AST_AUDIOHOOK_TRIGGER_SYNC, ast_autochan_channel_lock, ast_autochan_channel_unlock, ast_channel_name(), ast_debug, ast_set_flag, ast_test_flag, ast_verb, ast_autochan::chan, and OPTION_LONG_QUEUE.
Referenced by attach_barge(), and do_broadcast().
|
static |
Definition at line 629 of file app_broadcast.c.
References app_broadcast, and ast_unregister_application().
|
static |
Definition at line 129 of file app_broadcast.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 148 of file app_broadcast.c.
Referenced by broadcast_exec().
|
static |
Definition at line 238 of file app_broadcast.c.
Referenced by do_broadcast().