Asterisk - The Open Source Telephony Project
21.4.1
|
Bridging unit tests. More...
#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/test.h"
#include "asterisk/channel.h"
#include "asterisk/time.h"
#include "asterisk/bridge.h"
#include "asterisk/bridge_basic.h"
#include "asterisk/features.h"
#include "asterisk/format_cache.h"
Go to the source code of this file.
Data Structures | |
struct | test_bridging_chan_pvt |
A private structure for the test channel. More... | |
Macros | |
#define | CHANNEL_TECH_NAME "BridgingTestChannel" |
#define | HANGUP_CHANNEL(channel) |
Hang up a test channel safely. | |
#define | START_ALICE(channel, pvt) START_CHANNEL(channel, pvt, "Alice", "100") |
Create a test_bridging_chan_tech for Alice. | |
#define | START_BOB(channel, pvt) START_CHANNEL(channel, pvt, "Bob", "200") |
Create a test_bridging_chan_tech for Bob. | |
#define | START_CHANNEL(channel, pvt, name, number) |
#define | TEST_CATEGORY "/main/bridging/" |
#define | TEST_CHANNEL_FORMAT ast_format_slin |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (test_bridging_deferred_queue) | |
static int | load_module (void) |
static void | safe_bridge_destroy (struct ast_bridge *bridge) |
static void | safe_channel_release (struct ast_channel *chan) |
static void | stream_periodic_frames (struct ast_channel *chan, int ms, int interval_ms) |
static int | test_bridging_chan_hangup (struct ast_channel *chan) |
Callback function for when a channel is hung up. | |
static int | test_bridging_chan_indicate (struct ast_channel *chan, int condition, const void *data, size_t datalen) |
Callback function for when a frame is written to a channel. | |
static void | test_nanosleep (int secs, long nanosecs) |
static int | unload_module (void) |
static void | wait_for_bridged (struct ast_channel *channel) |
Wait until a channel is bridged. | |
static void | wait_for_empty_queue (struct ast_channel *channel) |
Wait until a channel has no frames on its read queue. | |
static void | wait_for_unbridged (struct ast_channel *channel) |
Wait until a channel is not bridged. | |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Bridging Unit Tests" , .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 = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_channel_tech | test_bridging_chan_tech |
A channel technology used for the unit tests. | |
Bridging unit tests.
Definition in file test_bridging.c.