Network broadcast sound support channel driver. More...
#include "asterisk.h"
#include <sys/socket.h>
#include <sys/time.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <nbs.h>
#include "asterisk/lock.h"
#include "asterisk/channel.h"
#include "asterisk/config.h"
#include "asterisk/module.h"
#include "asterisk/pbx.h"
#include "asterisk/utils.h"
Go to the source code of this file.
Data Structures | |
struct | nbs_pvt |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | load_module (void) |
static struct nbs_pvt * | nbs_alloc (void *data) |
static int | nbs_call (struct ast_channel *ast, char *dest, int timeout) |
static void | nbs_destroy (struct nbs_pvt *p) |
static int | nbs_hangup (struct ast_channel *ast) |
static struct ast_channel * | nbs_new (struct nbs_pvt *i, int state, const char *linkedid) |
static struct ast_channel * | nbs_request (const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause) |
static struct ast_frame * | nbs_xread (struct ast_channel *ast) |
static int | nbs_xwrite (struct ast_channel *ast, struct ast_frame *frame) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Network Broadcast Sound Support" , .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, .load_pri = AST_MODPRI_DEFAULT, } |
static struct ast_module_info * | ast_module_info = &__mod_info |
static char | context [AST_MAX_EXTENSION] = "default" |
static struct ast_channel_tech | nbs_tech |
static format_t | prefformat = AST_FORMAT_SLINEAR |
static const char | tdesc [] = "Network Broadcast Sound Driver" |
static const char | type [] = "NBS" |
Network broadcast sound support channel driver.
Definition in file chan_nbs.c.
|
static |
Definition at line 293 of file chan_nbs.c.
|
static |
Definition at line 293 of file chan_nbs.c.
|
static |
Definition at line 283 of file chan_nbs.c.
References ast_channel_register(), ast_log(), and LOG_ERROR.
|
static |
Definition at line 121 of file chan_nbs.c.
References ast_calloc, ast_copy_string(), ast_free, ast_log(), ast_strlen_zero(), LOG_WARNING, nbs_pvt::nbs, and nbs_pvt::stream.
Referenced by nbs_request().
|
static |
Definition at line 87 of file chan_nbs.c.
References ast_channel::_state, AST_CONTROL_ANSWER, AST_CONTROL_CONGESTION, ast_debug, ast_log(), ast_queue_control(), ast_setstate(), AST_STATE_DOWN, AST_STATE_RESERVED, AST_STATE_RINGING, LOG_WARNING, ast_channel::name, nbs_pvt::nbs, and ast_channel::tech_pvt.
|
static |
Definition at line 113 of file chan_nbs.c.
References ast_free, ast_module_user_remove, nbs_pvt::nbs, and nbs_pvt::u.
Referenced by nbs_hangup(), and nbs_request().
|
static |
Definition at line 165 of file chan_nbs.c.
References ast_debug, ast_log(), ast_setstate(), AST_STATE_DOWN, LOG_WARNING, ast_channel::name, nbs_destroy(), and ast_channel::tech_pvt.
|
static |
Definition at line 223 of file chan_nbs.c.
References ast_channel_alloc(), ast_channel_set_fd(), ast_copy_string(), ast_hangup(), ast_log(), ast_module_user_add, ast_pbx_start(), AST_STATE_DOWN, AST_STATE_RING, ast_string_field_set, ast_channel::context, ast_channel::exten, language, LOG_WARNING, ast_channel::name, ast_channel::nativeformats, nbs_pvt::nbs, nbs_tech, nbs_pvt::owner, prefformat, ast_channel::rawreadformat, ast_channel::rawwriteformat, ast_channel::readformat, ast_channel::rings, nbs_pvt::stream, ast_channel::tech, ast_channel::tech_pvt, nbs_pvt::u, and ast_channel::writeformat.
Referenced by nbs_request().
|
static |
Definition at line 255 of file chan_nbs.c.
References AST_FORMAT_SLINEAR, ast_getformatname(), ast_log(), AST_STATE_DOWN, format, ast_channel::linkedid, LOG_NOTICE, nbs_alloc(), nbs_destroy(), and nbs_new().
|
static |
Definition at line 180 of file chan_nbs.c.
References ast_debug, ast_frame::data, ast_frame::datalen, ast_frame::delivery, nbs_pvt::fr, ast_frame::mallocd, ast_channel::name, ast_frame::offset, ast_frame::ptr, ast_frame::samples, ast_frame::src, ast_channel::tech_pvt, and type.
|
static |
Definition at line 200 of file chan_nbs.c.
References ast_channel::_state, AST_FORMAT_SLINEAR, AST_FRAME_IMAGE, AST_FRAME_VOICE, ast_getformatname(), ast_log(), AST_STATE_UP, ast_frame_subclass::codec, ast_frame::data, ast_frame::datalen, ast_frame::frametype, LOG_WARNING, nbs_pvt::nbs, ast_frame::ptr, ast_frame::subclass, and ast_channel::tech_pvt.
|
static |
Definition at line 276 of file chan_nbs.c.
References ast_channel_unregister().
|
static |
Definition at line 293 of file chan_nbs.c.
|
static |
Definition at line 293 of file chan_nbs.c.
|
static |
Definition at line 56 of file chan_nbs.c.
|
static |
Definition at line 76 of file chan_nbs.c.
Referenced by nbs_new().
|
static |
Definition at line 54 of file chan_nbs.c.
Referenced by nbs_new().
|
static |
Definition at line 51 of file chan_nbs.c.
|
static |
Definition at line 57 of file chan_nbs.c.
Referenced by __ast_data_add(), __ast_data_add_structure(), __ast_data_search_cmp_structure(), __send_command(), _build_port_config(), _fill_defaults(), _free_port_cfg(), aji_handle_presence(), ast_aoc_add_unit_entry(), ast_aoc_set_total_type(), ast_audiohook_init(), ast_call_forward(), ast_cc_monitor_count(), ast_format_str_reduce(), ast_set_lock_type(), ast_writestream(), check_header(), create_dtmf_frame(), eventhandler(), find_agent_callbacks(), find_subscription_type(), g723_len(), get_sdp_line(), h264_decap(), handle_cli_iax2_show_threads(), misdn_cfg_get(), misdn_cfg_get_config_string(), msg_timestamp(), multicast_rtp_new(), nbs_xread(), npval(), originate_exec(), osp_check_destination(), osp_lookup(), osp_next(), osplookup_exec(), ospnext_exec(), parse_connect(), parse_facility(), parse_information(), parse_notify(), parse_setup(), process_sdp(), pvalCreateNode(), queue_put(), require_curl(), require_odbc(), require_pgsql(), schedule_delivery(), sig_pri_aoc_d_from_pri(), sig_pri_aoc_e_from_pri(), sip_acf_channel_read(), sla_load_config(), sla_queue_event_full(), subscription_type2str(), and switch().