summaryrefslogtreecommitdiff
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2008-08-25 17:24:02 +0000
committerMark Michelson <mmichelson@digium.com>2008-08-25 17:24:02 +0000
commite833fd2ab16f59159ff287850e7cede22efe15db (patch)
treec9a6a6be9c696ebf4360e6c2247ab8bc88fd3e0d /apps/app_queue.c
parent8d62c61678c4410cfe27d579d8e4f808457010fe (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: https://origsvn.digium.com/svn/asterisk/trunk@139832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_queue.c')
-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)) {