summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJason Parker <jparker@digium.com>2007-09-07 19:53:30 +0000
committerJason Parker <jparker@digium.com>2007-09-07 19:53:30 +0000
commitce12177952fe5c45e169dbc2f683e65ebbfa428c (patch)
treea9ed72fc1289dad2cc3d542dd058fd8994187924 /apps
parent00da8c6dc7b8a7d8d45162464a1b5cb05aee1ca9 (diff)
Merged revisions 81923 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue #10671) ........ r81923 | qwell | 2007-09-07 14:48:00 -0500 (Fri, 07 Sep 2007) | 5 lines Allow the MEMBERINTERFACE variable to be used as the mixmonitor filename. This moves the setting of the MEMBERINTERFACE variable to before mixmonitor. Issue 10671, patch by sim. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index c904488b0..d18c68d15 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2742,6 +2742,27 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
ast_log(LOG_WARNING, "Announcement file '%s' is unavailable, continuing anyway...\n", qe->parent->sound_callerannounce);
}
+ ast_mutex_lock(&qe->parent->lock);
+ /* if setinterfacevar is defined, make member variables available to the channel */
+ /* use pbx_builtin_setvar to set a load of variables with one call */
+ if (qe->parent->setinterfacevar) {
+ snprintf(interfacevar,sizeof(interfacevar), "MEMBERINTERFACE=%s|MEMBERNAME=%s|MEMBERCALLS=%d|MEMBERLASTCALL=%ld|MEMBERPENALTY=%d|MEMBERDYNAMIC=%d|MEMBERREALTIME=%d",
+ member->interface, member->membername, member->calls, (long)member->lastcall, member->penalty, member->dynamic, member->realtime);
+ pbx_builtin_setvar(qe->chan, interfacevar);
+ }
+
+ /* if setqueueentryvar is defined, make queue entry (i.e. the caller) variables available to the channel */
+ /* use pbx_builtin_setvar to set a load of variables with one call */
+ if (qe->parent->setqueueentryvar) {
+ snprintf(interfacevar,sizeof(interfacevar), "QEHOLDTIME=%ld|QEORIGINALPOS=%d",
+ (long) time(NULL) - qe->start, qe->opos);
+ pbx_builtin_setvar(qe->chan, interfacevar);
+ }
+
+ /* try to set queue variables if configured to do so*/
+ set_queue_variables(qe);
+ ast_mutex_unlock(&qe->parent->lock);
+
/* Begin Monitoring */
if (qe->parent->monfmt && *qe->parent->monfmt) {
if (!qe->parent->montype) {
@@ -2836,27 +2857,6 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
ast_channel_sendurl(peer, url);
}
- ast_mutex_lock(&qe->parent->lock);
- /* if setinterfacevar is defined, make member variables available to the channel */
- /* use pbx_builtin_setvar to set a load of variables with one call */
- if (qe->parent->setinterfacevar) {
- snprintf(interfacevar,sizeof(interfacevar), "MEMBERINTERFACE=%s|MEMBERNAME=%s|MEMBERCALLS=%d|MEMBERLASTCALL=%ld|MEMBERPENALTY=%d|MEMBERDYNAMIC=%d|MEMBERREALTIME=%d",
- member->interface, member->membername, member->calls, (long)member->lastcall, member->penalty, member->dynamic, member->realtime);
- pbx_builtin_setvar(qe->chan, interfacevar);
- }
-
- /* if setqueueentryvar is defined, make queue entry (i.e. the caller) variables available to the channel */
- /* use pbx_builtin_setvar to set a load of variables with one call */
- if (qe->parent->setqueueentryvar) {
- snprintf(interfacevar,sizeof(interfacevar), "QEHOLDTIME=%ld|QEORIGINALPOS=%d",
- (long) time(NULL) - qe->start, qe->opos);
- pbx_builtin_setvar(qe->chan, interfacevar);
- }
-
- /* try to set queue variables if configured to do so*/
- set_queue_variables(qe);
- ast_mutex_unlock(&qe->parent->lock);
-
/* run a macro for this connection if defined. The macro simply returns, no action is taken on the result */
/* use macro from dialplan if passed as a option, otherwise use the default queue macro */
if (!ast_strlen_zero(macro)) {