aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_features.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-09-17 03:49:57 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-09-17 03:49:57 +0000
commit20134827de099576d6b031d282fa456d2a3c2aa8 (patch)
treec81403d238b08262cfb39ed325554297c05762dd /res/res_features.c
parentd95b48e7fa9e762fb64a67535d26b3ce0a705574 (diff)
Merge anthm's monitor patch with minor mods (bug #2383)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3797 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_features.c')
-rwxr-xr-xres/res_features.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/res/res_features.c b/res/res_features.c
index 5daa0b5e2..d8fcbf233 100755
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -90,6 +90,9 @@ static char *descrip2 = "Park(exten):"
"into the dialplan, although you should include the 'parkedcalls'\n"
"context.\n";
+static struct ast_app *monitor_app=NULL;
+static int monitor_ok=1;
+
struct parkeduser {
struct ast_channel *chan;
struct timeval start;
@@ -297,7 +300,18 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
struct timeval start, end;
char *transferer_real_context;
int allowdisconnect_in,allowdisconnect_out,allowredirect_in,allowredirect_out;
-
+ char *monitor_exec;
+
+ if(monitor_ok) {
+ if(!monitor_app)
+ if(!(monitor_app = pbx_findapp("Monitor")))
+ monitor_ok=0;
+ if((monitor_exec = pbx_builtin_getvar_helper(chan,"AUTO_MONITOR")))
+ pbx_exec(chan, monitor_app, monitor_exec, 1);
+ else if((monitor_exec = pbx_builtin_getvar_helper(peer,"AUTO_MONITOR")))
+ pbx_exec(peer, monitor_app, monitor_exec, 1);
+ }
+
allowdisconnect_in = config->allowdisconnect_in;
allowdisconnect_out = config->allowdisconnect_out;
allowredirect_in = config->allowredirect_in;