summaryrefslogtreecommitdiff
path: root/res/res_stasis_bridge_add.c
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-08-13 15:27:32 +0000
committerDavid M. Lee <dlee@digium.com>2013-08-13 15:27:32 +0000
commit987fdfb444aef3eb60041887db60b54e4e382293 (patch)
tree944be36f63794903977a210f530845d230a23f05 /res/res_stasis_bridge_add.c
parent94ee8f2e33f6d6e80c3fc6d64d04883fec9496f1 (diff)
ARI: allow other operations to happen while bridged
This patch changes ARI bridging to allow other channel operations to happen while the channel is bridged. ARI channel operations are designed to queue up and execute sequentially. This meant, though, that while a channel was bridged, any other channel operations would queue up and execute only after the channel left the bridge. This patch changes ARI bridging so that channel commands can execute while the channel is bridged. For most operations, things simply work as expected. The one thing that ended up being a bit odd is recording. The current recording implementation will fail when one attempts to record a channel that's in a bridge. Note that the bridge itself may be recording; it's recording a specific channel in the bridge that fails. While this is an annoying limitation, channel recording is still very useful for use cases such as voice mail, and bridge recording makes up much of the difference for other use cases. (closes issue ASTERISK-22084) Review: https://reviewboard.asterisk.org/r/2726/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_stasis_bridge_add.c')
-rw-r--r--res/res_stasis_bridge_add.c72
1 files changed, 0 insertions, 72 deletions
diff --git a/res/res_stasis_bridge_add.c b/res/res_stasis_bridge_add.c
deleted file mode 100644
index ce1315560..000000000
--- a/res/res_stasis_bridge_add.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Asterisk -- An open source telephony toolkit.
- *
- * Copyright (C) 2013, Digium, Inc.
- *
- * Kinsey Moore <kmoore@digium.com>
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
- */
-
-/*! \file
- *
- * \brief res_stasis bridge add channel support.
- *
- * \author Kinsey Moore <kmoore@digium.com>
- */
-
-/*** MODULEINFO
- <depend type="module">res_stasis</depend>
- <support_level>core</support_level>
- ***/
-
-#include "asterisk.h"
-
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
-#include "asterisk/module.h"
-#include "asterisk/stasis_app_impl.h"
-#include "asterisk/bridge.h"
-
-static void *app_control_join_bridge(struct stasis_app_control *control,
- struct ast_channel *chan, void *data)
-{
- struct ast_bridge_features features;
- struct ast_bridge *bridge = data;
- ast_bridge_features_init(&features);
- ast_bridge_join(bridge, chan, NULL, &features, NULL, 0);
- ast_bridge_features_cleanup(&features);
-
- return NULL;
-}
-
-void stasis_app_control_add_channel_to_bridge(struct stasis_app_control *control, struct ast_bridge *bridge)
-{
- ast_debug(3, "%s: Sending channel add_to_bridge command\n",
- stasis_app_control_get_channel_id(control));
-
- stasis_app_send_command_async(control, app_control_join_bridge, bridge);
-}
-
-static int load_module(void)
-{
- return AST_MODULE_LOAD_SUCCESS;
-}
-
-static int unload_module(void)
-{
- return 0;
-}
-
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Stasis application bridge add channel support",
- .load = load_module,
- .unload = unload_module,
- .nonoptreq = "res_stasis");