Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Native RTP bridging technology module. More...
#include "asterisk.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/bridge.h"
#include "asterisk/bridge_technology.h"
#include "asterisk/frame.h"
#include "asterisk/rtp_engine.h"
#include "asterisk/stream.h"
Go to the source code of this file.
Data Structures | |
struct | native_rtp_bridge_channel_data |
Internal structure which contains instance information about bridged RTP channels. More... | |
struct | native_rtp_framehook_data |
Internal structure which contains bridged RTP channel hook data. More... | |
struct | rtp_glue_data |
struct | rtp_glue_stream |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Native RTP bridging module" , .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_bridge_technology | native_rtp_bridge |
Native RTP bridging technology module.
Definition in file bridge_native_rtp.c.
|
static |
Definition at line 1113 of file bridge_native_rtp.c.
|
static |
Definition at line 1113 of file bridge_native_rtp.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 1113 of file bridge_native_rtp.c.
|
static |
Definition at line 1104 of file bridge_native_rtp.c.
References ast_bridge_technology_register, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, native_rtp_bridge, and unload_module().
|
static |
Definition at line 622 of file bridge_native_rtp.c.
References ast_channel_has_hook_requiring_audio(), and AST_STATE_UP.
Referenced by native_rtp_bridge_compatible_check().
|
static |
Definition at line 150 of file bridge_native_rtp.c.
References ast_calloc, native_rtp_bridge_channel_data::glue, and rtp_glue_data_init().
Referenced by native_rtp_bridge_join().
|
static |
Definition at line 136 of file bridge_native_rtp.c.
References ao2_cleanup, ast_debug, ast_free, native_rtp_bridge_channel_data::glue, native_rtp_bridge_channel_data::hook_data, and rtp_glue_data_reset().
Referenced by native_rtp_bridge_join(), and native_rtp_bridge_leave().
|
static |
Definition at line 765 of file bridge_native_rtp.c.
References ast_channel_lock_both, ast_channel_unlock, ast_debug, AST_LIST_FIRST, AST_LIST_LAST, ast_bridge_channel::bridge, ast_bridge_channel::chan, ast_bridge::channels, native_rtp_bridge_compatible_check(), ast_bridge::num_channels, and ast_bridge::uniqueid.
|
static |
Definition at line 632 of file bridge_native_rtp.c.
References ao2_cleanup, ao2_container_count(), ast_channel_name(), ast_channel_rawreadformat(), ast_channel_rawwriteformat(), ast_debug, ast_format_cap_alloc, ast_format_cap_count(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_format_framing(), ast_format_cap_get_names(), ast_format_cap_iscompatible(), AST_FORMAT_CAP_NAMES_LEN, ast_rtp_codecs_get_framing(), AST_RTP_GLUE_RESULT_FORBID, AST_RTP_GLUE_RESULT_LOCAL, ast_rtp_instance_dtmf_mode_get(), ast_rtp_instance_get_codecs(), ast_rtp_instance_get_engine(), ast_str_alloca, ast_bridge_channel::chan, ast_rtp_engine::dtmf_compatible, ast_bridge_features::dtmf_hooks, ast_bridge_channel::features, ast_rtp_engine::local_bridge, native_rtp_bridge_capable(), NULL, RAII_VAR, rtp_glue_data_destroy(), rtp_glue_data_get(), rtp_glue_data_init(), and ast_bridge::uniqueid.
Referenced by native_rtp_bridge_compatible().
|
static |
Definition at line 793 of file bridge_native_rtp.c.
References __ao2_cleanup(), AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_alloc_options, ao2_bump, ao2_ref, ast_assert, ast_channel_lock, ast_channel_name(), ast_channel_unlock, ast_debug, ast_framehook_attach(), AST_FRAMEHOOK_INTERFACE_VERSION, ast_bridge_channel::bridge, ast_bridge_channel::chan, ast_framehook_interface::data, native_rtp_framehook(), native_rtp_framehook_consume(), NULL, ast_bridge_channel::tech_pvt, ast_bridge::uniqueid, and ast_framehook_interface::version.
Referenced by native_rtp_bridge_join().
|
static |
Definition at line 838 of file bridge_native_rtp.c.
References ao2_cleanup, ast_channel_lock, ast_channel_name(), ast_channel_unlock, ast_debug, ast_framehook_detach(), ast_bridge_channel::bridge, ast_bridge_channel::chan, native_rtp_framehook_data::detached, native_rtp_bridge_channel_data::hook_data, native_rtp_framehook_data::id, NULL, ast_bridge_channel::tech_pvt, and ast_bridge::uniqueid.
Referenced by native_rtp_bridge_leave().
|
static |
Forward declarations.
Definition at line 967 of file bridge_native_rtp.c.
References ast_assert, ast_channel_get_stream_topology(), ast_channel_lock_both, ast_channel_name(), ast_channel_request_stream_topology_change(), ast_channel_unlock, ast_debug, AST_LIST_FIRST, AST_LIST_LAST, ast_stream_topology_free(), ast_stream_topology_get_count(), ast_channel::bridge, ast_channel::bridge_channel, ast_bridge_channel::chan, ast_bridge::channels, native_rtp_bridge, native_rtp_bridge_channel_data_alloc(), native_rtp_bridge_channel_data_free(), native_rtp_bridge_framehook_attach(), native_rtp_bridge_start(), native_rtp_request_stream_topology_update(), NULL, ast_bridge_channel::suspended, SWAP, ast_bridge_channel::tech_pvt, and ast_bridge::uniqueid.
Referenced by native_rtp_bridge_unsuspend().
|
static |
Definition at line 1036 of file bridge_native_rtp.c.
References ast_channel_name(), ast_debug, ast_channel::bridge, ast_channel::bridge_channel, ast_bridge_channel::chan, native_rtp_bridge_channel_data_free(), native_rtp_bridge_framehook_detach(), native_rtp_bridge_stop(), NULL, ast_bridge_channel::tech_pvt, and ast_bridge::uniqueid.
Referenced by native_rtp_bridge_suspend().
|
static |
Definition at line 289 of file bridge_native_rtp.c.
References ao2_cleanup, ast_assert, ast_channel_lock_both, ast_channel_name(), ast_channel_unlock, ast_debug, ast_format_cap_alloc, AST_FORMAT_CAP_FLAG_DEFAULT, AST_LIST_FIRST, AST_LIST_LAST, AST_RTP_GLUE_RESULT_FORBID, AST_RTP_GLUE_RESULT_LOCAL, AST_RTP_GLUE_RESULT_REMOTE, ast_rtp_instance_get_engine(), ast_rtp_instance_set_bridged(), ast_verb, rtp_glue_data::audio, ast_bridge_channel::bridge, rtp_glue_data::cb, ast_bridge_channel::chan, ast_bridge::channels, done, ast_rtp_glue::get_codec, native_rtp_bridge_channel_data::glue, rtp_glue_stream::instance, ast_rtp_engine::local_bridge, NULL, native_rtp_bridge_channel_data::remote_cb, rtp_glue_data::result, rtp_glue_data_get(), ast_bridge_channel::tech_pvt, ast_bridge::uniqueid, ast_rtp_glue::update_peer, and rtp_glue_data::video.
Referenced by native_rtp_bridge_join(), and native_rtp_framehook().
|
static |
Definition at line 435 of file bridge_native_rtp.c.
References ast_assert, ast_channel_lock, ast_channel_lock_both, ast_channel_name(), ast_channel_unlock, ast_debug, AST_LIST_FIRST, AST_LIST_LAST, AST_RTP_GLUE_RESULT_FORBID, AST_RTP_GLUE_RESULT_LOCAL, AST_RTP_GLUE_RESULT_REMOTE, ast_rtp_instance_get_engine(), ast_rtp_instance_set_bridged(), rtp_glue_data::audio, ast_bridge_channel::bridge, rtp_glue_data::cb, ast_bridge_channel::chan, ast_bridge::channels, native_rtp_bridge_channel_data::glue, rtp_glue_stream::instance, ast_rtp_engine::local_bridge, NULL, native_rtp_bridge_channel_data::remote_cb, rtp_glue_data::result, rtp_glue_data_reset(), rtp_glue_get_current_combined_result(), ast_bridge_channel::tech_pvt, ast_bridge::uniqueid, and ast_rtp_glue::update_peer.
Referenced by native_rtp_bridge_leave(), and native_rtp_framehook().
|
static |
Definition at line 1056 of file bridge_native_rtp.c.
References ast_channel_name(), ast_debug, ast_channel::bridge, ast_channel::bridge_channel, ast_bridge_channel::chan, native_rtp_bridge_leave(), and ast_bridge::uniqueid.
|
static |
Definition at line 1025 of file bridge_native_rtp.c.
References ast_channel_name(), ast_debug, ast_channel::bridge, ast_channel::bridge_channel, ast_bridge_channel::chan, native_rtp_bridge_join(), and ast_bridge::uniqueid.
|
static |
Definition at line 1063 of file bridge_native_rtp.c.
References ast_bridge_queue_everyone_else(), AST_CONTROL_T38_PARAMETERS, AST_FRAME_CONTROL, AST_T38_REQUEST_NEGOTIATE, ast_frame::data, ast_frame::frametype, ast_frame_subclass::integer, ast_frame::ptr, ast_control_t38_parameters::request_response, and ast_frame::subclass.
|
static |
Definition at line 562 of file bridge_native_rtp.c.
References ao2_ref, ast_bridge_lock, ast_bridge_unlock, ast_channel_get_bridge(), ast_channel_lock, ast_channel_unlock, AST_CONTROL_HOLD, AST_CONTROL_UNHOLD, AST_CONTROL_UPDATE_RTP_PEER, AST_FRAME_CONTROL, AST_FRAMEHOOK_EVENT_WRITE, native_rtp_framehook_data::detached, ast_frame::frametype, ast_frame_subclass::integer, native_rtp_bridge_start(), native_rtp_bridge_stop(), and ast_frame::subclass.
Referenced by native_rtp_bridge_framehook_attach().
|
static |
Definition at line 613 of file bridge_native_rtp.c.
References AST_FRAME_CONTROL, and type.
Referenced by native_rtp_bridge_framehook_attach().
|
static |
Definition at line 857 of file bridge_native_rtp.c.
References AST_MEDIA_TYPE_AUDIO, ast_stream_get_formats(), ast_stream_get_state(), ast_stream_get_type(), ast_stream_set_formats(), ast_stream_set_state(), AST_STREAM_STATE_RECVONLY, AST_STREAM_STATE_REMOVED, AST_STREAM_STATE_SENDONLY, ast_stream_topology_clone(), ast_stream_topology_get_count(), ast_stream_topology_get_stream(), and NULL.
Referenced by native_rtp_bridge_join(), and native_rtp_stream_topology_changed().
|
static |
Definition at line 920 of file bridge_native_rtp.c.
References ast_bridge_channel_stream_map(), ast_channel_get_stream_topology(), ast_channel_get_stream_topology_change_source(), ast_channel_lock_both, ast_channel_request_stream_topology_change(), ast_channel_unlock, AST_LIST_FIRST, AST_LIST_LAST, ast_stream_topology_free(), ast_channel::bridge, ast_channel::bridge_channel, ast_bridge_channel::chan, ast_bridge::channels, native_rtp_bridge, and native_rtp_request_stream_topology_update().
|
static |
Definition at line 121 of file bridge_native_rtp.c.
References ao2_cleanup, rtp_glue_data::audio, rtp_glue_stream::instance, and rtp_glue_data::video.
Referenced by native_rtp_bridge_compatible_check(), rtp_glue_data_reset(), and rtp_glue_get_current_combined_result().
|
static |
Definition at line 168 of file bridge_native_rtp.c.
References ast_rtp_glue::allow_rtp_remote, ast_rtp_glue::allow_vrtp_remote, ast_channel_tech(), AST_RTP_GLUE_RESULT_FORBID, AST_RTP_GLUE_RESULT_LOCAL, AST_RTP_GLUE_RESULT_REMOTE, ast_rtp_instance_get_glue(), rtp_glue_data::audio, rtp_glue_data::cb, ast_rtp_glue::get_rtp_info, ast_rtp_glue::get_vrtp_info, rtp_glue_stream::instance, rtp_glue_stream::result, rtp_glue_data::result, type, and rtp_glue_data::video.
Referenced by native_rtp_bridge_compatible_check(), native_rtp_bridge_start(), and rtp_glue_get_current_combined_result().
|
static |
Definition at line 111 of file bridge_native_rtp.c.
References AST_RTP_GLUE_RESULT_FORBID, rtp_glue_data::audio, rtp_glue_data::cb, rtp_glue_stream::instance, NULL, rtp_glue_stream::result, rtp_glue_data::result, and rtp_glue_data::video.
Referenced by native_rtp_bridge_channel_data_alloc(), native_rtp_bridge_compatible_check(), rtp_glue_data_reset(), and rtp_glue_get_current_combined_result().
|
static |
Definition at line 130 of file bridge_native_rtp.c.
References rtp_glue_data_destroy(), and rtp_glue_data_init().
Referenced by native_rtp_bridge_channel_data_free(), and native_rtp_bridge_stop().
|
static |
Definition at line 257 of file bridge_native_rtp.c.
References AST_RTP_GLUE_RESULT_FORBID, rtp_glue_data::result, rtp_glue_data_destroy(), rtp_glue_data_get(), and rtp_glue_data_init().
Referenced by native_rtp_bridge_stop().
|
static |
Definition at line 1098 of file bridge_native_rtp.c.
References ast_bridge_technology_unregister(), and native_rtp_bridge.
Referenced by load_module().
|
static |
Definition at line 1113 of file bridge_native_rtp.c.
|
static |
Definition at line 1113 of file bridge_native_rtp.c.
|
static |
Definition at line 98 of file bridge_native_rtp.c.
Referenced by load_module(), native_rtp_bridge_join(), native_rtp_stream_topology_changed(), and unload_module().