Make monitoring accept args from both sides (bug #3449, with mods)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4941 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
58bd6b402a
commit
37f1b05c63
|
@ -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 */
|
||||
|
|
Reference in New Issue