Asterisk - The Open Source Telephony Project
18.5.0
|
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"
#include "asterisk/format_cache.h"
Go to the source code of this file.
Data Structures | |
struct | nbs_pvt |
Functions | |
AST_MODULE_INFO_STANDARD_DEPRECATED (ASTERISK_GPL_KEY, "Network Broadcast Sound Support") | |
static int | load_module (void) |
static struct nbs_pvt * | nbs_alloc (const char *data) |
static int | nbs_call (struct ast_channel *ast, const 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 struct ast_assigned_ids *assignedids, const struct ast_channel *requestor) |
static struct ast_channel * | nbs_request (const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *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 char | context [AST_MAX_EXTENSION] = "default" |
static struct ast_channel_tech | nbs_tech |
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.
AST_MODULE_INFO_STANDARD_DEPRECATED | ( | ASTERISK_GPL_KEY | , |
"Network Broadcast Sound Support" | |||
) |
Referenced by load_module().
|
static |
Definition at line 257 of file chan_nbs.c.
References ao2_ref, ast_channel_register(), ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_slin, ast_log, AST_MODULE_INFO_STANDARD_DEPRECATED(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ASTERISK_GPL_KEY, ast_channel_tech::capabilities, LOG_ERROR, NULL, and type.
|
static |
Definition at line 115 of file chan_nbs.c.
References ast_calloc, ast_copy_string(), ast_free, ast_log, ast_strlen_zero, LOG_WARNING, nbs_pvt::nbs, NULL, and nbs_pvt::stream.
Referenced by nbs_request().
|
static |
Definition at line 81 of file chan_nbs.c.
References ast_channel_name(), ast_channel_tech_pvt(), 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, and nbs_pvt::nbs.
|
static |
Definition at line 107 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 159 of file chan_nbs.c.
References ast_channel_name(), ast_channel_tech_pvt(), ast_channel_tech_pvt_set(), ast_debug, ast_log, ast_setstate(), AST_STATE_DOWN, LOG_WARNING, nbs_destroy(), and NULL.
|
static |
Definition at line 193 of file chan_nbs.c.
References ast_channel_alloc, ast_channel_context_set(), ast_channel_exten_set(), ast_channel_name(), ast_channel_nativeformats_set(), ast_channel_rings_set(), ast_channel_set_fd(), ast_channel_set_rawreadformat(), ast_channel_set_rawwriteformat(), ast_channel_set_readformat(), ast_channel_set_writeformat(), ast_channel_tech_pvt_set(), ast_channel_tech_set(), ast_channel_unlock, ast_format_slin, ast_hangup(), ast_log, ast_module_user_add, ast_pbx_start(), AST_STATE_DOWN, AST_STATE_RING, ast_channel_tech::capabilities, context, LOG_WARNING, nbs_pvt::nbs, nbs_pvt::owner, nbs_pvt::stream, tmp(), and nbs_pvt::u.
Referenced by nbs_request().
|
static |
Definition at line 227 of file chan_nbs.c.
References ast_format_cap_get_names(), ast_format_cap_iscompatible_format(), AST_FORMAT_CAP_NAMES_LEN, AST_FORMAT_CMP_NOT_EQUAL, ast_format_slin, ast_log, AST_STATE_DOWN, ast_str_alloca, LOG_NOTICE, nbs_alloc(), nbs_destroy(), nbs_new(), NULL, and tmp().
|
static |
Definition at line 174 of file chan_nbs.c.
References ast_channel_name(), ast_debug, and ast_null_frame.
|
static |
Definition at line 181 of file chan_nbs.c.
References ast_channel_tech_pvt(), AST_STATE_UP, ast_frame::data, ast_frame::datalen, nbs_pvt::nbs, and ast_frame::ptr.
|
static |
Definition at line 248 of file chan_nbs.c.
References ao2_ref, ast_channel_unregister(), ast_channel_tech::capabilities, and NULL.
|
static |
Definition at line 52 of file chan_nbs.c.
Referenced by nbs_new().
|
static |
Definition at line 71 of file chan_nbs.c.
|
static |
Definition at line 50 of file chan_nbs.c.
|
static |
Definition at line 53 of file chan_nbs.c.
Referenced by load_module().