struct agent_pvt *p;
struct localuser *u;
struct timeval tv;
+ time_t start;
char user[AST_MAX_AGENT];
char pass[AST_MAX_AGENT];
+ char agent[AST_MAX_AGENT] = "";
char xpass[AST_MAX_AGENT] = "";
char *errmsg;
char info[512];
"Agent: %s\r\n"
"Channel: %s\r\n",
p->agent, chan->name);
+ time(&start);
+ snprintf(agent, sizeof(agent), "Agent/%s", p->agent);
+ ast_queue_log("NONE", chan->uniqueid, agent, "AGENTLOGIN", "%s", chan->name);
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Agent '%s' logged in (format %s/%s)\n", p->agent,
ast_getformatname(chan->readformat), ast_getformatname(chan->writeformat));
ast_mutex_unlock(&p->lock);
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Agent '%s' logged out\n", p->agent);
+ ast_queue_log("NONE", chan->uniqueid, agent, "AGENTLOGOFF", "%s|%ld", chan->name, (long)(time(NULL) - start));
manager_event(EVENT_FLAG_AGENT, "Agentlogoff",
"Agent: %s\r\n",
p->agent);
AGENTDUMP
The agent dumped the caller while listening to the queue announcement.
+AGENTLOGIN(channel)
+The agent logged in. The channel is recorded.
+
+AGENTLOGOFF(channel|logintime)
+The agent logged off. The channel is recorded, along with the total time
+the agent was logged in.
+
COMPLETEAGENT(holdtime|calltime|origposition)
The caller was connected to an agent, and the call was terminated normally
by the *agent*. The caller's hold time and the length of the call are both