diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-22 18:14:44 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-22 18:14:44 +0000 |
commit | f28a21a4bfee4df1e708ce47eccc51da47152fea (patch) | |
tree | 95b51e4f8740dcb7aadbcca08d7eb1165054e1ba /apps | |
parent | 4b004c6df5c04870b17bcf60649fb8e57be7211a (diff) |
Merged revisions 114540 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r114540 | qwell | 2008-04-22 13:14:09 -0500 (Tue, 22 Apr 2008) | 8 lines
Allow setqueuevar=yes (et al) to work, after changes to pbx_builtin_setvar()
(closes issue #12490)
Reported by: bcnit
Patches:
12490-queuevars-3.diff uploaded by qwell (license 4)
Tested by: qwell
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@114541 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_queue.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index f77554b69..b95aa12a4 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -587,11 +587,11 @@ static void set_queue_variables(struct queue_ent *qe) sl = 100 * ((float) qe->parent->callscompletedinsl / (float) qe->parent->callscompleted); snprintf(interfacevar, sizeof(interfacevar), - "QUEUENAME=%s|QUEUEMAX=%d|QUEUESTRATEGY=%s|QUEUECALLS=%d|QUEUEHOLDTIME=%d|QUEUECOMPLETED=%d|QUEUEABANDONED=%d|QUEUESRVLEVEL=%d|QUEUESRVLEVELPERF=%2.1f", + "QUEUENAME=%s,QUEUEMAX=%d,QUEUESTRATEGY=%s,QUEUECALLS=%d,QUEUEHOLDTIME=%d,QUEUECOMPLETED=%d,QUEUEABANDONED=%d,QUEUESRVLEVEL=%d,QUEUESRVLEVELPERF=%2.1f", qe->parent->name, qe->parent->maxlen, int2strat(qe->parent->strategy), qe->parent->count, qe->parent->holdtime, qe->parent->callscompleted, qe->parent->callsabandoned, qe->parent->servicelevel, sl); - pbx_builtin_setvar(qe->chan, interfacevar); + pbx_builtin_setvar_multiple(qe->chan, interfacevar); } } @@ -3386,17 +3386,17 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce /* 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", + 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); + pbx_builtin_setvar_multiple(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", + snprintf(interfacevar, sizeof(interfacevar), "QEHOLDTIME=%ld,QEORIGINALPOS=%d", (long) time(NULL) - qe->start, qe->opos); - pbx_builtin_setvar(qe->chan, interfacevar); + pbx_builtin_setvar_multiple(qe->chan, interfacevar); } /* try to set queue variables if configured to do so*/ @@ -4650,10 +4650,10 @@ static int queue_function_var(struct ast_channel *chan, const char *cmd, char *d sl = 100 * ((float) q->callscompletedinsl / (float) q->callscompleted); snprintf(interfacevar, sizeof(interfacevar), - "QUEUEMAX=%d|QUEUESTRATEGY=%s|QUEUECALLS=%d|QUEUEHOLDTIME=%d|QUEUECOMPLETED=%d|QUEUEABANDONED=%d|QUEUESRVLEVEL=%d|QUEUESRVLEVELPERF=%2.1f", + "QUEUEMAX=%d,QUEUESTRATEGY=%s,QUEUECALLS=%d,QUEUEHOLDTIME=%d,QUEUECOMPLETED=%d,QUEUEABANDONED=%d,QUEUESRVLEVEL=%d,QUEUESRVLEVELPERF=%2.1f", q->maxlen, int2strat(q->strategy), q->count, q->holdtime, q->callscompleted, q->callsabandoned, q->servicelevel, sl); - pbx_builtin_setvar(chan, interfacevar); + pbx_builtin_setvar_multiple(chan, interfacevar); } ao2_unlock(q); |