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
This commit is contained in:
Mark Michelson
2008-08-25 17:24:02 +00:00
parent 8d62c61678
commit e833fd2ab1

View File

@@ -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)) {