[asterisk-commits] irroot: branch irroot/distrotech-customers r318995 - /team/irroot/distrotech-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat May 14 11:47:02 CDT 2011


Author: irroot
Date: Sat May 14 11:46:58 2011
New Revision: 318995

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=318995
Log:

Allow running a macro on a Picked up call 

RB:1118
#18830


Modified:
    team/irroot/distrotech-customers/main/channel.c

Modified: team/irroot/distrotech-customers/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers/main/channel.c?view=diff&rev=318995&r1=318994&r2=318995
==============================================================================
--- team/irroot/distrotech-customers/main/channel.c (original)
+++ team/irroot/distrotech-customers/main/channel.c Sat May 14 11:46:58 2011
@@ -7066,6 +7066,7 @@
 	long time_left_ms=0;
 	char caller_warning = 0;
 	char callee_warning = 0;
+	const char *bridge_macro,*bridge_macro_args;
 
 	if (c0->_bridge) {
 		ast_log(LOG_WARNING, "%s is already in a bridge with %s\n",
@@ -7138,6 +7139,17 @@
 	/* Before we enter in and bridge these two together tell them both the source of audio has changed */
 	ast_indicate(c0, AST_CONTROL_SRCUPDATE);
 	ast_indicate(c1, AST_CONTROL_SRCUPDATE);
+
+	bridge_macro=pbx_builtin_getvar_helper(c0, "PICKUP_BRIDGE_MACRO");
+	if (!ast_strlen_zero(bridge_macro)) {
+		bridge_macro_args=pbx_builtin_getvar_helper(c0, "PICKUP_BRIDGE_MACRO_ARGS");
+		ast_app_run_macro(NULL, c1, bridge_macro, bridge_macro_args);
+	}
+	bridge_macro=pbx_builtin_getvar_helper(c1, "PICKUP_BRIDGE_MACRO");
+	if (!ast_strlen_zero(bridge_macro)) {
+		bridge_macro_args=pbx_builtin_getvar_helper(c1, "PICKUP_BRIDGE_MACRO_ARGS");
+		ast_app_run_macro(NULL, c0, bridge_macro, bridge_macro_args);
+	}
 
 	for (/* ever */;;) {
 		struct timeval now = { 0, };




More information about the asterisk-commits mailing list