diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-27 00:17:39 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-27 00:17:39 +0000 |
commit | 8e0628a54d488c18f24c80e24b634fcdfdd69f9f (patch) | |
tree | ac6299a2923fee8740a0effada3ca3c3691e31af /apps/app_queue.c | |
parent | 9e849bbbbb4ec23f607900a140daf6db98f5742e (diff) |
Merged revisions 125649 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r125649 | mmichelson | 2008-06-26 19:15:54 -0500 (Thu, 26 Jun 2008) | 15 lines
The monitor-join option for queues was deprecated in favor of using
MixMonitor to mix audio. However, it was pointed out to me that because
of this, the command set for the MONITOR_EXEC variable is ignored as well.
This means that people can't do their own custom mixing commands at the end
of recordings in order to make, for instance, stereo recordings of calls.
With this patch, app_queue will set the "joinfiles" variable for the channel's
monitor if MONITOR_EXEC is not zero-length. This means that for normal audio
mixing, MixMonitor is still the preferred choice, but we allow custom
mixing to be done with the two Monitor streams if desired.
(closes issue #12923)
Reported by: snyfer
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@125650 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r-- | apps/app_queue.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 535b584d3..a81835b43 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3487,9 +3487,10 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce /* Begin Monitoring */ if (qe->parent->monfmt && *qe->parent->monfmt) { if (!qe->parent->montype) { + char *monexec, *monargs; ast_debug(1, "Starting Monitor as requested.\n"); 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")) + if ((monexec = pbx_builtin_getvar_helper(qe->chan, "MONITOR_EXEC")) || (monargs = pbx_builtin_getvar_helper(qe->chan, "MONITOR_EXEC_ARGS"))) which = qe->chan; else which = peer; @@ -3502,6 +3503,9 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce snprintf(tmpid, sizeof(tmpid), "chan-%lx", ast_random()); ast_monitor_start(which, qe->parent->monfmt, tmpid, 1, X_REC_IN | X_REC_OUT); } + if (!ast_strlen_zero(monexec)) { + ast_monitor_setjoinfiles(which, 1); + } } else { ast_debug(1, "Starting MixMonitor as requested.\n"); monitorfilename = pbx_builtin_getvar_helper(qe->chan, "MONITOR_FILENAME"); |