diff options
author | Mark Spencer <markster@digium.com> | 2005-02-01 03:49:35 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2005-02-01 03:49:35 +0000 |
commit | a6c065816a9715d0f6d3fc8e9a754324fbd80196 (patch) | |
tree | aec5e2cdb1c8c13bda704ea7dfddfdbe68f67e9d /apps/app_queue.c | |
parent | d77b6a6c8ce4e6f17acd548c31be443edd368fe8 (diff) |
Make monitoring accept args from both sides (bug #3449, with mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_queue.c')
-rwxr-xr-x | apps/app_queue.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 4f5b174c5..31f844231 100755 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1380,6 +1380,7 @@ static int try_calling(struct queue_ent *qe, char *options, char *announceoverri char *newnum; char *monitorfilename; struct ast_channel *peer; + struct ast_channel *which; struct localuser *lpeer; struct member *member; int res = 0, bridge = 0; @@ -1584,14 +1585,18 @@ static int try_calling(struct queue_ent *qe, char *options, char *announceoverri } /* Begin Monitoring */ if (qe->parent->monfmt && *qe->parent->monfmt) { - monitorfilename = pbx_builtin_getvar_helper( qe->chan, "MONITOR_FILENAME"); + monitorfilename = pbx_builtin_getvar_helper(qe->chan, "MONITOR_FILENAME"); + if(pbx_builtin_getvar_helper(qe->chan, "MONITOR_EXEC") || pbx_builtin_getvar_helper( qe->chan, "MONITOR_EXEC_ARGS")) + which = qe->chan; + else + which = peer; if(monitorfilename) { - ast_monitor_start( peer, qe->parent->monfmt, monitorfilename, 1 ); + ast_monitor_start(which, qe->parent->monfmt, monitorfilename, 1 ); } else { - ast_monitor_start( peer, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1 ); + ast_monitor_start(which, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1 ); } if(ast_test_flag(qe->parent, QUEUE_FLAG_MONJOIN)) { - ast_monitor_setjoinfiles( peer, 1); + ast_monitor_setjoinfiles(which, 1); } } /* Drop out of the queue at this point, to prepare for next caller */ |