Cross-platform console channel driver. More...
#include "asterisk.h"
#include <sys/signal.h>
#include <portaudio.h>
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/causes.h"
#include "asterisk/cli.h"
#include "asterisk/musiconhold.h"
#include "asterisk/callerid.h"
#include "asterisk/astobj2.h"
Go to the source code of this file.
Data Structures | |
struct | console_pvt |
Console pvt structure. More... | |
Macros | |
#define | console_pvt_lock(pvt) ao2_lock(pvt) |
lock a console_pvt struct More... | |
#define | console_pvt_unlock(pvt) ao2_unlock(pvt) |
unlock a console_pvt struct More... | |
#define | INPUT_CHANNELS 1 |
Mono Input. More... | |
#define | NUM_PVT_BUCKETS 7 |
#define | NUM_SAMPLES 320 |
The number of samples to configure the portaudio stream for. More... | |
#define | OUTPUT_CHANNELS 1 |
Mono Output. More... | |
#define | SAMPLE_RATE 16000 |
The sample rate to request from PortAudio. More... | |
#define | SUPPORTED_FORMATS ( AST_FORMAT_SLINEAR16 ) |
Formats natively supported by this module. More... | |
#define | TEXT_SIZE 256 |
Maximum text message length. More... | |
#define | V_BEGIN " --- <(\"<) --- " |
Dance, Kirby, Dance! More... | |
#define | V_END " --- (>\")> ---\n" |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static char * | ast_ext_ctx (struct console_pvt *pvt, const char *src, char **ext, char **ctx) |
static void | build_device (struct ast_config *cfg, const char *name) |
static char * | cli_console_active (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | cli_console_answer (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
answer command from the console More... | |
static char * | cli_console_autoanswer (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | cli_console_dial (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | cli_console_flash (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | cli_console_hangup (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | cli_console_mute (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | cli_console_sendtext (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
Console send text CLI command. More... | |
static char * | cli_list_available (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | cli_list_devices (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static struct ast_channel * | console_new (struct console_pvt *pvt, const char *ext, const char *ctx, int state, const char *linkedid) |
static void | destroy_pvts (void) |
static struct console_pvt * | find_pvt (const char *name) |
static struct console_pvt * | get_active_pvt (void) |
static int | init_pvt (struct console_pvt *pvt, const char *name) |
static int | load_config (int reload) |
Load the configuration. More... | |
static int | load_module (void) |
static int | open_stream (struct console_pvt *pvt) |
static int | pvt_cmp_cb (void *obj, void *arg, int flags) |
static void | pvt_destructor (void *obj) |
static int | pvt_hash_cb (const void *obj, const int flags) |
static int | pvt_mark_destroy_cb (void *obj, void *arg, int flags) |
static struct console_pvt * | ref_pvt (struct console_pvt *pvt) |
static int | reload (void) |
static void | set_active (struct console_pvt *pvt, const char *value) |
static void | set_pvt_defaults (struct console_pvt *pvt) |
Set default values for a pvt struct. More... | |
static int | start_stream (struct console_pvt *pvt) |
static int | stop_stream (struct console_pvt *pvt) |
static void | stop_streams (void) |
static void | store_callerid (struct console_pvt *pvt, const char *value) |
static void | store_config_core (struct console_pvt *pvt, const char *var, const char *value) |
Store a configuration parameter in a pvt struct. More... | |
static void * | stream_monitor (void *data) |
Stream monitor thread. More... | |
static int | unload_module (void) |
static struct console_pvt * | unref_pvt (struct console_pvt *pvt) |
static struct ast_channel * | console_request (const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause) |
static int | console_digit_begin (struct ast_channel *c, char digit) |
static int | console_digit_end (struct ast_channel *c, char digit, unsigned int duration) |
static int | console_text (struct ast_channel *c, const char *text) |
static int | console_hangup (struct ast_channel *c) |
static int | console_answer (struct ast_channel *c) |
static struct ast_frame * | console_read (struct ast_channel *chan) |
static int | console_call (struct ast_channel *c, char *dest, int timeout) |
static int | console_write (struct ast_channel *chan, struct ast_frame *f) |
static int | console_indicate (struct ast_channel *chan, int cond, const void *data, size_t datalen) |
static int | console_fixup (struct ast_channel *oldchan, struct ast_channel *newchan) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Console Channel Driver" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CHANNEL_DRIVER, } |
static ast_rwlock_t | active_lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, 1 } |
static struct console_pvt * | active_pvt |
static struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_cli_entry | cli_console [] |
static const char | config_file [] = "console.conf" |
static struct ast_channel_tech | console_tech |
static struct ast_jb_conf | default_jbconf |
Global jitterbuffer configuration. More... | |
static struct ast_jb_conf | global_jbconf |
static struct console_pvt | globals |
static ast_mutex_t | globals_lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, 1 } |
static struct ao2_container * | pvts |
Cross-platform console channel driver.
To install portaudio v19 from svn, check it out using the following command:
Definition in file chan_console.c.
#define console_pvt_lock | ( | pvt | ) | ao2_lock(pvt) |
lock a console_pvt struct
Definition at line 226 of file chan_console.c.
Referenced by build_device(), cli_console_active(), cli_console_dial(), cli_list_devices(), console_call(), console_request(), start_stream(), and stop_stream().
#define console_pvt_unlock | ( | pvt | ) | ao2_unlock(pvt) |
unlock a console_pvt struct
Definition at line 229 of file chan_console.c.
Referenced by build_device(), cli_console_active(), cli_console_dial(), cli_list_devices(), console_call(), console_request(), start_stream(), and stop_stream().
#define INPUT_CHANNELS 1 |
#define NUM_PVT_BUCKETS 7 |
Definition at line 167 of file chan_console.c.
Referenced by load_module().
#define NUM_SAMPLES 320 |
The number of samples to configure the portaudio stream for.
320 samples (20 ms) is the most common frame size in Asterisk. So, the code in this module reads 320 sample frames from the portaudio stream and queues them up on the Asterisk channel. Frames of any size can be written to a portaudio stream, but the portaudio documentation does say that for high performance applications, the data should be written to Pa_WriteStream in the same size as what is used to initialize the stream.
Definition at line 90 of file chan_console.c.
Referenced by open_stream(), and stream_monitor().
#define OUTPUT_CHANNELS 1 |
#define SAMPLE_RATE 16000 |
The sample rate to request from PortAudio.
Definition at line 78 of file chan_console.c.
Referenced by open_stream().
#define SUPPORTED_FORMATS ( AST_FORMAT_SLINEAR16 ) |
Formats natively supported by this module.
Definition at line 206 of file chan_console.c.
Referenced by console_request().
#define TEXT_SIZE 256 |
Maximum text message length.
Definition at line 103 of file chan_console.c.
Referenced by cli_console_sendtext().
#define V_BEGIN " --- <(\"<) --- " |
Dance, Kirby, Dance!
Definition at line 106 of file chan_console.c.
Referenced by cli_console_mute(), console_answer(), console_call(), console_digit_begin(), console_digit_end(), console_hangup(), console_indicate(), and console_text().
#define V_END " --- (>\")> ---\n" |
Definition at line 107 of file chan_console.c.
Referenced by cli_console_mute(), console_answer(), console_call(), console_digit_begin(), console_digit_end(), console_hangup(), console_indicate(), and console_text().
|
static |
Definition at line 1532 of file chan_console.c.
|
static |
Definition at line 1532 of file chan_console.c.
|
static |
split a string in extension-context, returns pointers to malloc'ed strings. If we do not have 'overridecontext' then the last @ is considered as a context separator, and the context is overridden. This is usually not very necessary as you can play with the dialplan, and it is nice not to need it because you have '@' in SIP addresses. Return value is the buffer address.
Definition at line 660 of file chan_console.c.
References ast_strdup, ext, and console_pvt::overridecontext.
Referenced by cli_console_dial().
|
static |
Definition at line 1332 of file chan_console.c.
References ao2_alloc, ao2_link, ast_variable_browse(), console_pvt_lock, console_pvt_unlock, console_pvt::destroy, find_pvt(), init_pvt(), ast_variable::name, ast_variable::next, pvt_destructor(), set_pvt_defaults(), store_config_core(), unref_pvt(), and ast_variable::value.
Referenced by load_config().
|
static |
Definition at line 1155 of file chan_console.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_cli_args::argc, ast_cli_entry::args, ast_cli_args::argv, ast_cli(), ast_strdup, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, console_pvt_lock, console_pvt_unlock, ast_cli_args::fd, find_pvt(), get_active_pvt(), ast_cli_args::n, console_pvt::name, ast_cli_args::pos, set_active(), unref_pvt(), ast_cli_entry::usage, and ast_cli_args::word.
|
static |
answer command from the console
Definition at line 1036 of file chan_console.c.
References ast_cli_args::argc, ast_cli_entry::args, ast_cli(), AST_CONTROL_ANSWER, ast_indicate(), ast_queue_control(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, get_active_pvt(), console_pvt::hookstate, console_pvt::owner, unref_pvt(), and ast_cli_entry::usage.
|
static |
Definition at line 694 of file chan_console.c.
References ast_cli_args::argc, ast_cli_entry::args, ast_cli_args::argv, ast_cli(), console_pvt::autoanswer, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, get_active_pvt(), unref_pvt(), and ast_cli_entry::usage.
|
static |
Definition at line 778 of file chan_console.c.
References ast_cli_args::argc, ast_cli_entry::args, ast_cli_args::argv, ast_cli(), ast_debug, ast_exists_extension(), ast_ext_ctx(), AST_FRAME_DTMF, ast_queue_frame(), AST_STATE_RINGING, ast_strlen_zero(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, console_new(), console_pvt_lock, console_pvt_unlock, console_pvt::context, ext, console_pvt::exten, ast_cli_args::fd, free, get_active_pvt(), console_pvt::hookstate, ast_frame_subclass::integer, console_pvt::owner, ast_frame::subclass, unref_pvt(), and ast_cli_entry::usage.
|
static |
Definition at line 742 of file chan_console.c.
References ast_cli_args::argc, ast_cli_entry::args, ast_cli(), AST_CONTROL_FLASH, ast_queue_control(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, get_active_pvt(), console_pvt::hookstate, console_pvt::owner, unref_pvt(), and ast_cli_entry::usage.
|
static |
Definition at line 852 of file chan_console.c.
References ast_cli_args::argc, ast_cli_entry::args, ast_cli(), ast_queue_hangup(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, get_active_pvt(), console_pvt::hookstate, console_pvt::owner, unref_pvt(), and ast_cli_entry::usage.
|
static |
Definition at line 888 of file chan_console.c.
References ast_cli_args::argc, ast_cli_entry::args, ast_cli_args::argv, ast_cli(), ast_verb, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, get_active_pvt(), console_pvt::muted, unref_pvt(), ast_cli_entry::usage, V_BEGIN, and V_END.
|
static |
Console send text CLI command.
Definition at line 1085 of file chan_console.c.
References ast_cli_args::argc, ast_cli_entry::args, ast_cli_args::argv, ast_cli(), AST_FRAME_TEXT, ast_join(), ast_queue_frame(), ast_strlen_zero(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_frame::datalen, ast_cli_args::fd, ast_frame::frametype, get_active_pvt(), len(), console_pvt::owner, TEXT_SIZE, unref_pvt(), and ast_cli_entry::usage.
|
static |
Definition at line 927 of file chan_console.c.
References ast_cli_args::argc, ast_cli_entry::args, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, and ast_cli_entry::usage.
|
static |
Definition at line 975 of file chan_console.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_cli_args::argc, ast_cli_entry::args, ast_cli(), console_pvt::autoanswer, console_pvt::cid_name, console_pvt::cid_num, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, console_pvt_lock, console_pvt_unlock, console_pvt::context, console_pvt::exten, ast_cli_args::fd, console_pvt::input_device, console_pvt::language, console_pvt::mohinterpret, console_pvt::muted, console_pvt::name, console_pvt::output_device, console_pvt::overridecontext, console_pvt::parkinglot, unref_pvt(), and ast_cli_entry::usage.
|
static |
Definition at line 527 of file chan_console.c.
References ast_setstate(), AST_STATE_UP, ast_verb, start_stream(), ast_channel::tech_pvt, V_BEGIN, and V_END.
|
static |
Definition at line 565 of file chan_console.c.
References AST_CONTROL_ANSWER, AST_CONTROL_RINGING, ast_indicate(), ast_queue_control(), ast_verb, console_pvt::autoanswer, ast_channel::caller, console_pvt_lock, console_pvt_unlock, console_pvt::hookstate, ast_party_caller::id, ast_party_id::name, ast_party_id::number, S_COR, start_stream(), ast_party_name::str, ast_party_number::str, ast_channel::tech_pvt, V_BEGIN, V_END, ast_party_name::valid, and ast_party_number::valid.
|
static |
|
static |
|
static |
Definition at line 640 of file chan_console.c.
References console_pvt::owner, and ast_channel::tech_pvt.
|
static |
Definition at line 512 of file chan_console.c.
References ast_verb, console_pvt::hookstate, console_pvt::owner, stop_stream(), ast_channel::tech_pvt, unref_pvt(), V_BEGIN, and V_END.
|
static |
Definition at line 604 of file chan_console.c.
References AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_HOLD, AST_CONTROL_INCOMPLETE, AST_CONTROL_PROCEEDING, AST_CONTROL_PROGRESS, AST_CONTROL_RINGING, AST_CONTROL_SRCUPDATE, AST_CONTROL_UNHOLD, AST_CONTROL_VIDUPDATE, ast_log(), ast_moh_start(), ast_moh_stop(), ast_verb, LOG_WARNING, console_pvt::mohinterpret, ast_channel::name, ast_channel::tech_pvt, V_BEGIN, and V_END.
|
static |
Definition at line 419 of file chan_console.c.
References AST_CAUSE_SWITCH_CONGESTION, ast_channel_alloc(), AST_FORMAT_SLINEAR16, ast_hangup(), ast_jb_configure(), ast_pbx_start(), AST_STATE_DOWN, ast_string_field_set, ast_strlen_zero(), console_pvt::cid_name, console_pvt::cid_num, console_tech, global_jbconf, ast_channel::hangupcause, language, console_pvt::language, console_pvt::name, ast_channel::nativeformats, console_pvt::owner, ast_channel::readformat, ref_pvt(), start_stream(), ast_channel::tech, ast_channel::tech_pvt, and ast_channel::writeformat.
Referenced by cli_console_dial(), and console_request().
|
static |
|
static |
Channel Technology Callbacks
Definition at line 453 of file chan_console.c.
References AST_CAUSE_BUSY, ast_getformatname_multiple(), ast_log(), AST_STATE_DOWN, console_new(), console_pvt_lock, console_pvt_unlock, find_pvt(), format, ast_channel::linkedid, LOG_ERROR, LOG_NOTICE, LOG_WARNING, console_pvt::owner, SUPPORTED_FORMATS, and unref_pvt().
|
static |
|
static |
Definition at line 595 of file chan_console.c.
References ast_frame::data, ast_frame::ptr, ast_frame::samples, console_pvt::stream, and ast_channel::tech_pvt.
|
static |
Definition at line 1368 of file chan_console.c.
References active_lock, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_unlink, ast_rwlock_unlock, ast_rwlock_wrlock, console_pvt::destroy, and unref_pvt().
Referenced by load_config().
|
static |
Definition at line 244 of file chan_console.c.
References ao2_find, name, console_pvt::name, and OBJ_POINTER.
Referenced by build_device(), cli_console_active(), and console_request().
|
static |
Definition at line 683 of file chan_console.c.
References active_lock, ast_rwlock_rdlock, ast_rwlock_unlock, and ref_pvt().
Referenced by cli_console_active(), cli_console_answer(), cli_console_autoanswer(), cli_console_dial(), cli_console_flash(), cli_console_hangup(), cli_console_mute(), and cli_console_sendtext().
|
static |
Definition at line 1320 of file chan_console.c.
References AST_PTHREADT_NULL, ast_string_field_init, ast_string_field_set, S_OR, and console_pvt::thread.
Referenced by build_device(), and load_module().
|
static |
Load the configuration.
reload | if this was called due to a reload |
0 | success |
-1 | failure |
Definition at line 1393 of file chan_console.c.
References ao2_callback, ast_category_browse(), ast_config_destroy(), ast_config_load, ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_variable_browse(), build_device(), CONFIG_STATUS_FILEINVALID, context, destroy_pvts(), global_jbconf, globals, globals_lock, LOG_NOTICE, ast_variable::name, ast_variable::next, OBJ_NODATA, pvt_mark_destroy_cb(), set_pvt_defaults(), store_config_core(), and ast_variable::value.
Referenced by load_module(), and reload().
|
static |
Definition at line 1478 of file chan_console.c.
References ao2_container_alloc, ao2_ref, ARRAY_LEN, ast_channel_register(), ast_channel_unregister(), ast_cli_register_multiple(), ast_cli_unregister_multiple(), ast_log(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, globals, init_pvt(), load_config(), LOG_ERROR, LOG_WARNING, NUM_PVT_BUCKETS, pvt_cmp_cb(), pvt_destructor(), and pvt_hash_cb().
|
static |
Definition at line 293 of file chan_console.c.
References ast_log(), INPUT_CHANNELS, console_pvt::input_device, LOG_ERROR, console_pvt::name, NUM_SAMPLES, OUTPUT_CHANNELS, console_pvt::output_device, SAMPLE_RATE, and console_pvt::stream.
Referenced by start_stream().
|
static |
Definition at line 1440 of file chan_console.c.
References CMP_MATCH, CMP_STOP, and console_pvt::name.
Referenced by load_module().
|
static |
Definition at line 1313 of file chan_console.c.
References ast_string_field_free_memory.
Referenced by build_device(), load_module(), and unload_module().
|
static |
Definition at line 1433 of file chan_console.c.
References ast_str_case_hash(), and console_pvt::name.
Referenced by load_module().
|
static |
Definition at line 1361 of file chan_console.c.
References console_pvt::destroy.
Referenced by load_config().
|
static |
Definition at line 231 of file chan_console.c.
References ao2_ref.
Referenced by console_new(), get_active_pvt(), and set_active().
|
static |
Definition at line 1522 of file chan_console.c.
References load_config().
|
static |
Definition at line 1138 of file chan_console.c.
References active_lock, ast_log(), ast_rwlock_unlock, ast_rwlock_wrlock, ast_true(), globals, LOG_ERROR, ref_pvt(), and unref_pvt().
Referenced by cli_console_active(), and store_config_core().
|
static |
Set default values for a pvt struct.
Definition at line 1238 of file chan_console.c.
References ast_mutex_lock, ast_mutex_unlock, ast_string_field_set, console_pvt::autoanswer, console_pvt::cid_name, cid_name, console_pvt::cid_num, cid_num, context, console_pvt::context, exten, console_pvt::exten, globals, globals_lock, language, console_pvt::language, mohinterpret, console_pvt::mohinterpret, console_pvt::overridecontext, console_pvt::parkinglot, and parkinglot.
Referenced by build_device(), and load_config().
|
static |
Definition at line 354 of file chan_console.c.
References ast_debug, ast_log(), ast_pthread_create_background, console_pvt_lock, console_pvt_unlock, LOG_ERROR, LOG_WARNING, open_stream(), console_pvt::owner, console_pvt::stream, stream_monitor(), console_pvt::streamstate, and console_pvt::thread.
Referenced by console_answer(), console_call(), and console_new().
|
static |
Definition at line 397 of file chan_console.c.
References AST_PTHREADT_NULL, console_pvt_lock, console_pvt_unlock, console_pvt::stream, console_pvt::streamstate, and console_pvt::thread.
Referenced by console_hangup(), and stop_streams().
|
static |
Definition at line 1447 of file chan_console.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, console_pvt::hookstate, stop_stream(), and unref_pvt().
Referenced by unload_module().
|
static |
Definition at line 1269 of file chan_console.c.
References ast_callerid_split(), ast_string_field_set, cid_name, and cid_num.
Referenced by store_config_core().
|
static |
Store a configuration parameter in a pvt struct.
Definition at line 1286 of file chan_console.c.
References ast_jb_read_conf(), ast_log(), console_pvt::autoanswer, context, CV_BOOL, CV_END, CV_F, CV_START, CV_STRFIELD, exten, global_jbconf, globals, language, LOG_WARNING, mohinterpret, console_pvt::overridecontext, parkinglot, set_active(), and store_callerid().
Referenced by build_device(), and load_config().
|
static |
Stream monitor thread.
This function runs in its own thread to monitor data coming in from a portaudio stream. When enough data is available, it is queued up to be read from the Asterisk channel.
Definition at line 263 of file chan_console.c.
References AST_FORMAT_SLINEAR16, AST_FRAME_VOICE, ast_queue_frame(), ast_frame::frametype, NUM_SAMPLES, console_pvt::owner, ast_frame::samples, and console_pvt::stream.
Referenced by start_stream().
|
static |
Definition at line 1461 of file chan_console.c.
References ao2_ref, ARRAY_LEN, ast_channel_unregister(), ast_cli_unregister_multiple(), globals, pvt_destructor(), and stop_streams().
|
static |
Definition at line 238 of file chan_console.c.
References ao2_ref.
Referenced by build_device(), cli_console_active(), cli_console_answer(), cli_console_autoanswer(), cli_console_dial(), cli_console_flash(), cli_console_hangup(), cli_console_mute(), cli_console_sendtext(), cli_list_devices(), console_hangup(), console_request(), destroy_pvts(), set_active(), and stop_streams().
|
static |
Definition at line 1532 of file chan_console.c.
|
static |
Definition at line 170 of file chan_console.c.
Referenced by destroy_pvts(), get_active_pvt(), and set_active().
|
static |
Definition at line 169 of file chan_console.c.
|
static |
Definition at line 1532 of file chan_console.c.
|
static |
Definition at line 1220 of file chan_console.c.
|
static |
Definition at line 110 of file chan_console.c.
|
static |
Definition at line 208 of file chan_console.c.
Referenced by console_new().
|
static |
Global jitterbuffer configuration.
Definition at line 178 of file chan_console.c.
|
static |
Definition at line 185 of file chan_console.c.
Referenced by console_new(), load_config(), and store_config_core().
|
static |
Referenced by load_config(), load_module(), set_active(), set_pvt_defaults(), store_config_core(), and unload_module().
|
static |
Definition at line 164 of file chan_console.c.
Referenced by load_config(), and set_pvt_defaults().
|
static |
Definition at line 166 of file chan_console.c.