[asterisk-commits] mmichelson: branch mmichelson/transfer r387136 - in /team/mmichelson/transfer...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 1 13:46:52 CDT 2013
Author: mmichelson
Date: Wed May 1 13:46:51 2013
New Revision: 387136
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=387136
Log:
Remove the framehook parameter from ast_bridge_transfer_blind()
Since there's now a callback called on the channel, having a
framehook is redundant since a framehook could just be added
to the channel by the callback.
Modified:
team/mmichelson/transfer/include/asterisk/bridging.h
team/mmichelson/transfer/main/bridging.c
team/mmichelson/transfer/main/manager.c
Modified: team/mmichelson/transfer/include/asterisk/bridging.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/include/asterisk/bridging.h?view=diff&rev=387136&r1=387135&r2=387136
==============================================================================
--- team/mmichelson/transfer/include/asterisk/bridging.h (original)
+++ team/mmichelson/transfer/include/asterisk/bridging.h Wed May 1 13:46:51 2013
@@ -1280,11 +1280,6 @@
* the bridge and the number of participants, the entire bridge could be
* transferred to the given destination, or a single channel may be redirected.
*
- * Callers may provide a frame hook to attach to the new outgoing call. This
- * can be useful if progress of the resulting blind transfer call is wanted
- * by the caller of ast_bridge_blind_transfer(). If the transfer fails, then
- * the hook will not be attached to any call.
- *
* Callers may also provide a callback to be called on the channel that will
* be running dialplan. The user data passed into ast_bridge_transfer_blind
* will be given as the argument to the callback to be interpreted as desired.
@@ -1294,11 +1289,13 @@
* \param transferer The channel performing the blind transfer
* \param exten The dialplan extension to send the call to
* \param context The dialplan context to send the call to
- * \param hook A frame hook to attach to the new call
+ * \param new_channel_cb A callback to be called on the channel that will
+ * be executing dialplan
+ * \param user_data Argument for new_channel_cb
* \return The success or failure result of the blind transfer
*/
enum ast_transfer_result ast_bridge_transfer_blind(struct ast_channel *transferer,
- const char *exten, const char *context, struct ast_framehook_interface *hook,
+ const char *exten, const char *context,
void (*new_channel_cb)(struct ast_channel *chan, void *user_data),
void *user_data);
Modified: team/mmichelson/transfer/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/main/bridging.c?view=diff&rev=387136&r1=387135&r2=387136
==============================================================================
--- team/mmichelson/transfer/main/bridging.c (original)
+++ team/mmichelson/transfer/main/bridging.c Wed May 1 13:46:51 2013
@@ -4729,7 +4729,6 @@
*/
static enum ast_transfer_result blind_transfer_bridge(struct ast_channel *transferer,
struct ast_bridge *bridge, const char *exten, const char *context,
- struct ast_framehook_interface *hook,
void (*new_channel_cb)(struct ast_channel *chan, void *user_data),
void *user_data)
{
@@ -4741,10 +4740,6 @@
local = ast_request("Local", ast_channel_nativeformats(transferer), transferer,
chan_name, &cause);
if (!local) {
- return AST_BRIDGE_TRANSFER_FAIL;
- }
- if (hook && ast_framehook_attach(local, hook) < 0) {
- ast_hangup(local);
return AST_BRIDGE_TRANSFER_FAIL;
}
@@ -4811,7 +4806,7 @@
* \retval non-zero Failed to queue the action
*/
static int bridge_channel_queue_blind_transfer(struct ast_channel *transferee,
- const char *exten, const char *context, struct ast_framehook_interface *hook,
+ const char *exten, const char *context,
void (*new_channel_cb)(struct ast_channel *chan, void *user_data),
void *user_data)
{
@@ -4825,10 +4820,6 @@
return -1;
}
ao2_ref(transferee_bridge_channel, +1);
-
- if (hook && ast_framehook_attach(transferee, hook) < 0) {
- return -1;
- }
}
if (new_channel_cb) {
@@ -4920,7 +4911,7 @@
}
enum ast_transfer_result ast_bridge_transfer_blind(struct ast_channel *transferer,
- const char *exten, const char *context, struct ast_framehook_interface *hook,
+ const char *exten, const char *context,
void (*new_channel_cb)(struct ast_channel *chan, void *user_data),
void *user_data)
{
@@ -4973,7 +4964,7 @@
set_blind_transfer_variables(transferer, channels);
if (do_bridge_transfer) {
- return blind_transfer_bridge(transferer, bridge, exten, context, hook,
+ return blind_transfer_bridge(transferer, bridge, exten, context,
new_channel_cb, user_data);
}
@@ -4984,7 +4975,7 @@
return AST_BRIDGE_TRANSFER_FAIL;
}
- if (bridge_channel_queue_blind_transfer(transferee, exten, context, hook,
+ if (bridge_channel_queue_blind_transfer(transferee, exten, context,
new_channel_cb, user_data)) {
return AST_BRIDGE_TRANSFER_FAIL;
}
Modified: team/mmichelson/transfer/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/main/manager.c?view=diff&rev=387136&r1=387135&r2=387136
==============================================================================
--- team/mmichelson/transfer/main/manager.c (original)
+++ team/mmichelson/transfer/main/manager.c Wed May 1 13:46:51 2013
@@ -3919,7 +3919,7 @@
context = ast_channel_context(chan);
}
- switch (ast_bridge_transfer_blind(chan, exten, context, NULL, NULL, NULL)) {
+ switch (ast_bridge_transfer_blind(chan, exten, context, NULL, NULL)) {
case AST_BRIDGE_TRANSFER_NOT_PERMITTED:
astman_send_error(s, m, "Transfer not permitted");
break;
More information about the asterisk-commits
mailing list