]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_queue: load queues and members from Realtime when needed
authorAlexei Gradinari <alex2grad@gmail.com>
Fri, 21 Jan 2022 19:00:53 +0000 (14:00 -0500)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Fri, 11 Feb 2022 18:21:11 +0000 (12:21 -0600)
commitaaf507fa368d185fc20dde1f5a5ade0dcdc70559
treea3b7f0d33cf92e6401938e61110a1d1d4d035ff2
parenta2eb55523073a169bc7f97e424b449ee31b5cecb
app_queue: load queues and members from Realtime when needed

There are a lot of Queue AMI actions and Queue applications
which do not load queue and queue members from Realtime.

AMI actions
QueuePause - if queue not in memory - response "Interface not found".
QueueStatus/QueueSummary - if queue not in memory - empty response.

Applications:
PauseQueueMember - if queue not in memory
Attempt to pause interface %s, not found
UnpauseQueueMember - if queue not in memory
Attempt to unpause interface xxxxx, not found

This patch adds a new function load_realtime_queues
which loads queue and queue members for desired queue
or all queues and all members if param 'queuename' is NULL or empty.
Calls the function load_realtime_queues when needed.

Also this patch fixes leak of ast_config in function set_member_value.

Also this patch fixes incorrect LOG_WARNING when pausing/unpausing
already paused/unpaused member.
The function ast_update_realtime returns 0 when no record modified.
So 0 is not an error to warn about.

ASTERISK-29873 #close
ASTERISK-18416 #close
ASTERISK-27597 #close

Change-Id: I554ee0eebde93bd8f49df7f84b74acb21edcb99c
apps/app_queue.c
doc/CHANGES-staging/load_realtime_queues.txt [new file with mode: 0644]