mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
Add option to mask certain high frequency events (bug #3707)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -275,6 +275,7 @@ struct ast_call_queue {
|
|||||||
unsigned int timeoutrestart:1;
|
unsigned int timeoutrestart:1;
|
||||||
unsigned int announceholdtime:2;
|
unsigned int announceholdtime:2;
|
||||||
unsigned int strategy:3;
|
unsigned int strategy:3;
|
||||||
|
unsigned int maskmemberstatus:1;
|
||||||
int announcefrequency; /* How often to announce their position */
|
int announcefrequency; /* How often to announce their position */
|
||||||
int roundingseconds; /* How many seconds do we round to? */
|
int roundingseconds; /* How many seconds do we round to? */
|
||||||
int holdtime; /* Current avg holdtime, based on recursive boxcar filter */
|
int holdtime; /* Current avg holdtime, based on recursive boxcar filter */
|
||||||
@@ -424,17 +425,19 @@ static void *changethread(void *data)
|
|||||||
if (!strcasecmp(sc->dev, cur->interface)) {
|
if (!strcasecmp(sc->dev, cur->interface)) {
|
||||||
if (cur->status != sc->state) {
|
if (cur->status != sc->state) {
|
||||||
cur->status = sc->state;
|
cur->status = sc->state;
|
||||||
manager_event(EVENT_FLAG_AGENT, "QueueMemberStatus",
|
if (!q->maskmemberstatus) {
|
||||||
"Queue: %s\r\n"
|
manager_event(EVENT_FLAG_AGENT, "QueueMemberStatus",
|
||||||
"Location: %s\r\n"
|
"Queue: %s\r\n"
|
||||||
"Membership: %s\r\n"
|
"Location: %s\r\n"
|
||||||
"Penalty: %d\r\n"
|
"Membership: %s\r\n"
|
||||||
"CallsTaken: %d\r\n"
|
"Penalty: %d\r\n"
|
||||||
"LastCall: %ld\r\n"
|
"CallsTaken: %d\r\n"
|
||||||
"Status: %d\r\n"
|
"LastCall: %ld\r\n"
|
||||||
"Paused: %d\r\n",
|
"Status: %d\r\n"
|
||||||
q->name, cur->interface, cur->dynamic ? "dynamic" : "static",
|
"Paused: %d\r\n",
|
||||||
cur->penalty, cur->calls, cur->lastcall, cur->status, cur->paused);
|
q->name, cur->interface, cur->dynamic ? "dynamic" : "static",
|
||||||
|
cur->penalty, cur->calls, cur->lastcall, cur->status, cur->paused);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cur = cur->next;
|
cur = cur->next;
|
||||||
@@ -765,17 +768,19 @@ static int update_status(struct ast_call_queue *q, struct member *member, int st
|
|||||||
while(cur) {
|
while(cur) {
|
||||||
if (member == cur) {
|
if (member == cur) {
|
||||||
cur->status = status;
|
cur->status = status;
|
||||||
manager_event(EVENT_FLAG_AGENT, "QueueMemberStatus",
|
if (!q->maskmemberstatus) {
|
||||||
"Queue: %s\r\n"
|
manager_event(EVENT_FLAG_AGENT, "QueueMemberStatus",
|
||||||
"Location: %s\r\n"
|
"Queue: %s\r\n"
|
||||||
"Membership: %s\r\n"
|
"Location: %s\r\n"
|
||||||
"Penalty: %d\r\n"
|
"Membership: %s\r\n"
|
||||||
"CallsTaken: %d\r\n"
|
"Penalty: %d\r\n"
|
||||||
"LastCall: %ld\r\n"
|
"CallsTaken: %d\r\n"
|
||||||
"Status: %d\r\n"
|
"LastCall: %ld\r\n"
|
||||||
"Paused: %d\r\n",
|
"Status: %d\r\n"
|
||||||
q->name, cur->interface, cur->dynamic ? "dynamic" : "static",
|
"Paused: %d\r\n",
|
||||||
cur->penalty, cur->calls, cur->lastcall, cur->status, cur->paused);
|
q->name, cur->interface, cur->dynamic ? "dynamic" : "static",
|
||||||
|
cur->penalty, cur->calls, cur->lastcall, cur->status, cur->paused);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
cur = cur->next;
|
cur = cur->next;
|
||||||
@@ -2667,6 +2672,8 @@ static void reload_queues(void)
|
|||||||
q->leavewhenempty = QUEUE_EMPTY_NORMAL;
|
q->leavewhenempty = QUEUE_EMPTY_NORMAL;
|
||||||
else
|
else
|
||||||
q->leavewhenempty = 0;
|
q->leavewhenempty = 0;
|
||||||
|
} else if (!strcasecmp(var->name, "eventmemberstatus")) {
|
||||||
|
q->maskmemberstatus = !ast_true(var->value);
|
||||||
} else if (!strcasecmp(var->name, "eventwhencalled")) {
|
} else if (!strcasecmp(var->name, "eventwhencalled")) {
|
||||||
q->eventwhencalled = ast_true(var->value);
|
q->eventwhencalled = ast_true(var->value);
|
||||||
} else if (!strcasecmp(var->name, "reportholdtime")) {
|
} else if (!strcasecmp(var->name, "reportholdtime")) {
|
||||||
|
@@ -137,11 +137,18 @@ persistentmembers = yes
|
|||||||
; leavewhenempty = yes
|
; leavewhenempty = yes
|
||||||
;
|
;
|
||||||
;
|
;
|
||||||
; Asterisk can generate AgentCalled events when an agent is rung, if this is turned on
|
; If this is set to yes, the following manager events will be generated:
|
||||||
; (may generate a LOT of extra manager events)
|
; AgentCalled, AgentDump, AgentConnect, AgentComplete
|
||||||
|
; (may generate some extra manager events, but probably ones you want)
|
||||||
;
|
;
|
||||||
; eventwhencalled = yes
|
; eventwhencalled = yes
|
||||||
;
|
;
|
||||||
|
; If this is set to no, the following manager events will be generated:
|
||||||
|
; QueueMemberStatus
|
||||||
|
; (may generate a WHOLE LOT of extra manager events)
|
||||||
|
;
|
||||||
|
; eventmemberstatusoff = no
|
||||||
|
;
|
||||||
; If you wish to report the caller's hold time to the member before they are connected
|
; If you wish to report the caller's hold time to the member before they are connected
|
||||||
; to the caller, set this to yes.
|
; to the caller, set this to yes.
|
||||||
;
|
;
|
||||||
|
Reference in New Issue
Block a user