]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_queue: indicate the paused state of a dynamically added member in queue_log.
authorSperl Viktor <viktike32@gmail.com>
Thu, 5 Dec 2024 16:55:10 +0000 (17:55 +0100)
committerasterisk-org-access-app[bot] <120671045+asterisk-org-access-app[bot]@users.noreply.github.com>
Tue, 10 Dec 2024 14:24:13 +0000 (14:24 +0000)
Fixes: #1021
apps/app_queue.c

index 2053328a6f6788b5c7f942b3e199fa73aefda714..f70652274e60bd9183d059d159c03dddf9e283bb 100644 (file)
@@ -8447,9 +8447,9 @@ static int aqm_exec(struct ast_channel *chan, const char *data)
        switch (add_to_queue(args.queuename, args.interface, args.membername, penalty, paused, queue_persistent_members, args.state_interface, reason, wrapuptime)) {
        case RES_OKAY:
                if (ast_strlen_zero(args.membername) || !log_membername_as_agent) {
-                       ast_queue_log(args.queuename, ast_channel_uniqueid(chan), args.interface, "ADDMEMBER", "%s", "");
+                       ast_queue_log(args.queuename, ast_channel_uniqueid(chan), args.interface, "ADDMEMBER", "%s", paused ? "PAUSED" : "");
                } else {
-                       ast_queue_log(args.queuename, ast_channel_uniqueid(chan), args.membername, "ADDMEMBER", "%s", "");
+                       ast_queue_log(args.queuename, ast_channel_uniqueid(chan), args.membername, "ADDMEMBER", "%s", paused ? "PAUSED" : "");
                }
                ast_log(LOG_NOTICE, "Added interface '%s' to queue '%s'\n", args.interface, args.queuename);
                pbx_builtin_setvar_helper(chan, "AQMSTATUS", "ADDED");
@@ -11113,9 +11113,9 @@ static char *handle_queue_add_member(struct ast_cli_entry *e, int cmd, struct as
        switch (add_to_queue(queuename, interface, membername, penalty, paused, queue_persistent_members, state_interface, reason, 0)) {
        case RES_OKAY:
                if (ast_strlen_zero(membername) || !log_membername_as_agent) {
-                       ast_queue_log(queuename, "CLI", interface, "ADDMEMBER", "%s", "");
+                       ast_queue_log(queuename, "CLI", interface, "ADDMEMBER", "%s", paused ? "PAUSED" : "");
                } else {
-                       ast_queue_log(queuename, "CLI", membername, "ADDMEMBER", "%s", "");
+                       ast_queue_log(queuename, "CLI", membername, "ADDMEMBER", "%s", paused ? "PAUSED" : "");
                }
                ast_cli(a->fd, "Added interface '%s' to queue '%s'\n", interface, queuename);
                return CLI_SUCCESS;