AgentConnect, AgentComplete, AgentDump, and AgentRingNoAnswer will always be
sent. The "Variable" fields will also no longer exist on the Agent* events.
+ * Queues now support a hint for member paused state. The hint uses the form
+ 'Queue:{queue_name}_pause_{member_name}', where {queue_name} and {member_name}
+ are the name of the queue and the name of the member to subscribe to,
+ respectively. For example: exten => 8501,hint,Queue:sales_pause_mark.
+ Members will show as In Use when paused.
+
ResetCDR
------------------
* The 'e' option has been deprecated. Use the CDR_PROP function to re-enable
}
}
+
+#define QUEUE_PAUSED_DEVSTATE AST_DEVICE_INUSE
+#define QUEUE_UNPAUSED_DEVSTATE AST_DEVICE_NOT_INUSE
+#define QUEUE_UNKNOWN_PAUSED_DEVSTATE AST_DEVICE_NOT_INUSE
+
/*! \internal
* \brief If adding a single new member to a queue, use this function instead of ao2_linking.
* This adds round robin queue position data for a fresh member as well as links it.
ao2_lock(queue->members);
mem->queuepos = ao2_container_count(queue->members);
ao2_link(queue->members, mem);
+ ast_devstate_changed(mem->paused ? QUEUE_PAUSED_DEVSTATE : QUEUE_UNPAUSED_DEVSTATE,
+ AST_DEVSTATE_CACHABLE, "Queue:%s_pause_%s", queue->name, mem->interface);
ao2_unlock(queue->members);
}
static void member_remove_from_queue(struct call_queue *queue, struct member *mem)
{
ao2_lock(queue->members);
+ ast_devstate_changed(QUEUE_UNKNOWN_PAUSED_DEVSTATE, AST_DEVSTATE_CACHABLE, "Queue:%s_pause_%s", queue->name, mem->interface);
queue_member_follower_removal(queue, mem);
ao2_unlink(queue->members, mem);
ao2_unlock(queue->members);
ast_copy_string(m->rt_uniqueid, rt_uniqueid, sizeof(m->rt_uniqueid));
if (paused_str) {
m->paused = paused;
+ ast_devstate_changed(m->paused ? QUEUE_PAUSED_DEVSTATE : QUEUE_UNPAUSED_DEVSTATE,
+ AST_DEVSTATE_CACHABLE, "Queue:%s_pause_%s", q->name, m->interface);
}
if (strcasecmp(state_interface, m->state_interface)) {
ast_copy_string(m->state_interface, state_interface, sizeof(m->state_interface));
}
mem->paused = paused;
-
+ ast_devstate_changed(mem->paused ? QUEUE_PAUSED_DEVSTATE : QUEUE_UNPAUSED_DEVSTATE,
+ AST_DEVSTATE_CACHABLE, "Queue:%s_pause_%s", q->name, mem->interface);
found++;
/* Before we do the PAUSE/UNPAUSE log, if this was a PAUSEALL/UNPAUSEALL, log that here, but only on the first found entry. */
if (m->realtime) {
update_realtime_member_field(m, q->name, args.option, rtvalue);
}
-
m->paused = (memvalue <= 0) ? 0 : 1;
+ ast_devstate_changed(m->paused ? QUEUE_PAUSED_DEVSTATE : QUEUE_UNPAUSED_DEVSTATE,
+ AST_DEVSTATE_CACHABLE, "Queue:%s_pause_%s", q->name, args.interface);
+
} else if ((!strcasecmp(args.option, "ignorebusy")) || (!strcasecmp(args.option, "ringinuse"))) {
if (m->realtime) {
update_realtime_member_field(m, q->name, args.option, rtvalue);