Repository navigation
Releases
v2.6.1
Fixed
is_offlineno longer stays stucktrueacross a logout/login cycle. An agent that went offline (QueueMemberStatusStatus 5) while logged into a queue, was then disconnected and later reconnected its WDA and logged back in, keptis_offline: trueinGET /queues/agents_statusand thequeue_agents_statusevent — nothing cleared the flag after the re-login (only aQueueMemberAddedfires on re-login, and noQueueMemberStatusfollows when the device registered before the queue login). Now:is_offlineis reset tofalsewhen an agent leaves all its queues (full logout / confd dissociation to empty), so a stale value never bleeds into the next login;QueueMemberAddedderivesis_offlinefrom the deviceStatusthe event already carries (Status 5→ offline), so any (re)join reflects the real device state immediately — including an agent added while its device is still unavailable, which a logout-only reset would miss. Guarded onStatuspresence so a source that omits it never clobbers a known state.
Covered by four new unit tests (TDD); the QueueMemberStatus Status-5 → offline path (the "agent offline while still in a queue" case) is unchanged.
Full changelog: v2.6.0...v2.6.1
v2.6.0
Added
-
Connect auto-login —
PUT /queues/{queue_name}/connectnow handles an agent that has no activewazo-agentdsession: instead of failing, the agent is logged in on its own line (resolved from confd) and joined to only the selected queue. A400is now returned solely when the agent has no line to log in on. Fixes #17. -
WDA connectivity pre-check on connect — before connecting, the agent's application (WDA) must be reachable: its device must be registered. If the device is
Unavailable(websocket KO), the request is rejected with409 agent-wda-not-connectedso the supervisor can be told to have the agent reconnect first. This also catches an agent that still holds an agentd session while its WDA has dropped. Checked via AMIExtensionStateon the agent's own extension. -
New ACL
amid.action.ExtensionState.createon thewazo-calldservice token (etc/wazo-auth-keys/conf.d/call_queue.yml), required by the WDA pre-check. Re-runwazo-auth-keys service updateand restartwazo-calldafter upgrading.
Fixed
is_offlinenow tracks real device/WDA reachability. It is recomputed on everyQueueMemberStatusevent (Status 5/ Unavailable →is_offline: true, reachable statuses →false), so an agent still logged into a queue whose WDA has disconnected is correctly reported offline. Previouslyis_offlinecould stayfalsefor a disconnected device.
Changed — error mapping on /connect
| outcome | HTTP |
|---|---|
| success / already connected | 204 (idempotent) |
| agent has no line to log in on | 400 |
| agent's WDA not connected | 409 (agent-wda-not-connected) |
| supervisor not a member of the queue | 403 |
| unknown agent / queue | 404 |
Internal
- Code-quality toolchain (PR #19):
pre-commitorchestratingblack,isort,flake8,pyupgrade,mypyand the Wazo copyright check; configuration inpyproject.toml;tox -e linters; and a GitHub Actions CI running the linters andpyteston every PR. The whole codebase was formatted to one consistent style (double-quoted strings). docs/ISSUE-agentd-fresh-login-missing-per-queue-event.md: upstream report that a full agentd login emits no per-queueUserAgentQueueLoggedInEvent, so a standard WDA's queue list only refreshes after a reload.
Full changelog: v2.5.0...v2.6.0
v2.5.0
Added
-
Per-queue agent connect / disconnect for supervisors — two new REST endpoints on the
wazo-calldplugin:Method Path Caller ACL PUT/queues/{queue_name}/connectcalld.queues.{queue_name}.connect.updatePUT/queues/{queue_name}/disconnectcalld.queues.{queue_name}.disconnect.updateBody
{"agent_id": <int>},204on success. The endpoint acts as an authorization proxy + delegation towazo-agentd: the caller is authorized server-side — the token's user must be an agent that is itself a member of the target queue (resolved via confduser → agent → queue roster) — then the request is delegated to agentd (agent_login_to_queue/agent_logoff_from_queue). Thequeue_idsent to agentd comes from the supervisor's own roster, never from the request body, and all confd/agentd calls are tenant-scoped.No AMI action, no in-memory state mutation and no new bus event: the change propagates through the existing
QueueMemberAdded/QueueMemberRemovedevents and thequeue_agents_statuspayload. -
Two
agentd.agents.*.queues.*.{login,logoff}.updateACL on thewazo-calldservice token (etc/wazo-auth-keys/conf.d/call_queue.yml).
Error mapping
| agentd outcome | HTTP |
|---|---|
| success | 204 |
ALREADY_IN_QUEUE / NOT_IN_QUEUE |
204 (idempotent — target state reached) |
NOT_LOGGED (no active session) |
400 |
NO_SUCH_QUEUE / NO_SUCH_AGENT |
404 |
| supervisor not a member of the queue | 403 |
| any other agentd error | 502 |
Fixes #3.
Full changelog: v2.4.1...v2.5.0
v2.4.1
Fixed
configured_queuesnow stays in sync with confd when an agent is added to or removed from a queue. The handler subscribes to the confdqueue_member_agent_associated/queue_member_agent_dissociatedevents and resyncs the cached roster (and runtimequeues/paused_queues) from confd. Previously a queue removed from a logged-off agent in confd stayed inconfigured_queues(and the legacyqueuefield) until the nextwazo-calldrestart, because the plugin only learned membership from runtime AMI events and never pruned the configured roster.- When the prune empties the agent's runtime membership, session/device fields (
logged_at,paused_at,is_talking, …) are now cleared just like a regular last-queue logout. - The legacy
queuefield is reset tofalsewhen an agent is no longer configured for any queue. It stays "sticky" (keeps its last-known name) only while the agent still belongs to at least one queue.
Full changelog: v2.4.0...v2.4.1
v2.4.0
Added
configured_queueson each agent inGET /queues/agents_statusand thequeue_agents_statusevent: the full confd-configured queue roster, independent of login state. Unlike runtimequeues(empty when the agent is logged off), it lets a client list a queue's complete roster — including logged-off members — and derive per-queue status (present when the queue is also inqueues, paused when inpaused_queues, else disconnected). Kept a superset ofqueues; does not feedis_logged/is_paused(those stay derived from runtime membership).docs/FRONTEND_INTEGRATION.mdand theQueueAgentsStatusSwagger definition document the new field and the per-queue roster/status pattern.
Fixed
- #13 — a multi-queue agent that was logged off only surfaced its first configured queue via the legacy
queuefield and was undiscoverable for its other queues. The newconfigured_queuesexposes the full membership regardless of login.
Frontend counterpart: wazo-communication/wda-supervisor#16.
Full changelog: v2.1.0...v2.4.0
v2.1.0
wazo-calld-queue 2.1.0
Requires Wazo 26.06. The plugin now lives in the wazo namespace under the wazo-communication organization.
Fixes
- Remove recursive
__ne__inArbitraryEvent(prevents infinite recursion). - Make
ArbitraryEvent.__eq__robust to missingrequired_acland foreign types. - Avoid
IndexErrorwhen removing waiting calls in_livestats. - Use
load_defaultinstead of the deprecatedmissingargument inQueueSchema. - Use a valid plugin namespace (
wazo).
Improvements
- Remove unused
AgentStatusHandlerandQueueStatusHandler. - Replace debug
printwithlogger.infoinget_agents_status. - Add unit tests for
bus_consume,QueueService, and the marshmallow schemas. - Add
AGENTS.mdcontributor guidance (withCLAUDE.mdpointer).
Full changelog: v2.0.2...v2.1.0