aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-25 17:24:02 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-25 17:24:02 +0000
commitd76291cffbcb51ccee8d10ca05e00d2895e2503f (patch)
treec9a6a6be9c696ebf4360e6c2247ab8bc88fd3e0d /apps
parent938c2edf40ff7a834f12ef2986335f2495576a59 (diff)
Add output of variables to AgentRingNoAnswer manager
event if eventwhencalled is set to "vars" in queues.conf. Yay for consistency. (closes issue #13369) Reported by: srt Patches: 13369_agentringnoanswer_variables.diff uploaded by srt (license 378) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@139832 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 8f94ef11b..1e3a493f5 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2449,20 +2449,25 @@ static void record_abandoned(struct queue_ent *qe)
static void rna(int rnatime, struct queue_ent *qe, char *interface, char *membername)
{
ast_verb(3, "Nobody picked up in %d ms\n", rnatime);
- if (qe->parent->eventwhencalled)
+ if (qe->parent->eventwhencalled) {
+ char vars[2048];
+
manager_event(EVENT_FLAG_AGENT, "AgentRingNoAnswer",
"Queue: %s\r\n"
"Uniqueid: %s\r\n"
"Channel: %s\r\n"
"Member: %s\r\n"
"MemberName: %s\r\n"
- "Ringtime: %d\r\n",
+ "Ringtime: %d\r\n"
+ "%s",
qe->parent->name,
qe->chan->uniqueid,
qe->chan->name,
interface,
membername,
- rnatime);
+ rnatime,
+ qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
+ }
ast_queue_log(qe->parent->name, qe->chan->uniqueid, membername, "RINGNOANSWER", "%d", rnatime);
if (qe->parent->autopause) {
if (!set_member_paused(qe->parent->name, interface, "Auto-Pause", 1)) {