Make app_queue AMI events more consistent. Give Join/Leave more useful names.

This also removes the eventwhencalled and eventmemberstatus configuration
options.  These events can just be filtered via manager.conf blacklists.

(closes issue ASTERISK-21469)
Review: https://reviewboard.asterisk.org/r/2586/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/78/78/1
Jason Parker 12 years ago
parent f19ff9579a
commit a2d02edca5

@ -106,6 +106,11 @@ AMI (Asterisk Manager Interface)
core, and is now two events: Hold and Unhold. The status field has been
removed.
* The AMI events in app_queue have been made more consistent with each other.
Events that reference channels (QueueCaller* and Agent*) will show
information about each channel. The (infamous) "Join" and "Leave" AMI
events have been changed to "QueueCallerJoin" and "QueueCallerLeave".
AGI (Asterisk Gateway Interface)
------------------
* The manager event AGIExec has been split into AGIExecStart and AGIExecEnd.
@ -243,6 +248,11 @@ Queue
Reports 'InUse' for no logged in agents or no free agents.
Reports 'Idle' when an agent is free.
* The configuration options eventwhencalled and eventmemberstatus have been
removed. As a result, the AMI events QueueMemberStatus, AgentCalled,
AgentConnect, AgentComplete, AgentDump, and AgentRingNoAnswer will always be
sent. The "Variable" fields will also no longer exist on the Agent* events.
Core
------------------
* Redirecting reasons can now be set to arbitrary strings. This means

File diff suppressed because it is too large Load Diff

@ -475,20 +475,6 @@ monitor-type = MixMonitor
; loose - penalty,invalid
;
; If this is set to yes, the following manager events will be generated:
; AgentCalled, AgentDump, AgentConnect, AgentComplete; setting this to
; vars also sends all channel variables with the event.
; (may generate some extra manager events, but probably ones you want)
;
; eventwhencalled = yes|no|vars
;
; If this is set to yes, the following manager events will be generated:
; QueueMemberStatus
; (may generate a WHOLE LOT of extra manager events)
; The default value is yes and this can not be set globally.
;
; eventmemberstatus = no
;
; If you wish to report the caller's hold time to the member before they are
; connected to the caller, set this to yes.
;

@ -1287,7 +1287,24 @@ struct ast_str *ast_manager_str_from_json_object(struct ast_json *blob, key_excl
if (exclusion_cb && exclusion_cb(key)) {
continue;
}
ast_str_append(&output_str, 0, "%s: %s\r\n", key, ast_json_string_get(value));
switch (ast_json_typeof(value)) {
case AST_JSON_STRING:
ast_str_append(&output_str, 0, "%s: %s\r\n", key, ast_json_string_get(value));
break;
case AST_JSON_INTEGER:
ast_str_append(&output_str, 0, "%s: %jd\r\n", key, ast_json_integer_get(value));
break;
case AST_JSON_TRUE:
ast_str_append(&output_str, 0, "%s: True\r\n", key);
break;
case AST_JSON_FALSE:
ast_str_append(&output_str, 0, "%s: False\r\n", key);
break;
default:
ast_str_append(&output_str, 0, "%s: \r\n", key);
break;
}
if (!output_str) {
return NULL;
}

Loading…
Cancel
Save